﻿$(document).ready(function() {

/*PNG fix for IE6*/
	if ($.browser.msie && $.browser.version == 6) {
		DD_belatedPNG.fix('#header div.shopcart_panel, #content .zoom, #wrapper div.consult img, a.b_but, a.b_but span, a.b_but_short, a.b_but_short span');
	}

/*label dynamics*/
	$("#header li.search input.text").focus(function () {
		$(this).prev().css('display','none');
						
	});
	$("#header li.search input.text").blur(function () {
		if (!$('#header input.text').val())
			$(this).prev().css('display','block');
	});
	
	
	


	$("input.text").each(function() {

       var default_value = this.value;
		
       $(this).focus(function(){
               if(this.value == default_value) {
                       this.value = '';
               }
       });

       $(this).blur(function(){
               if(this.value == '') {
                       this.value = default_value;
               }
       });

});
	
    
	

	

	
	$("#consult .text").focus(function () {
		$(this).prev().css('display','none');
						
	});
	$("#consult .text").blur(function () {
		if (!$(this).val())
			$(this).prev().css('display','block');
	});
	
	
	$("#content div.feedback_form .text").focus(function () {
		$(this).prev().css('display','none');
						
	});
	$("#content div.feedback_form .text").blur(function () {
		if (!$(this).val())
			$(this).prev().css('display','block');
	});
	
/*form of consultation dynamics*/	
	 $("#wrapper div.consult a").toggle(
		 function () {
			 if ($.browser.msie && $.browser.version == 6) {
				$(this).parent().animate( { left:0 }, { queue:false, duration:500 } );
			}
			else{
					$(this).parent().animate( { left:0 }, { queue:false, duration:500 } );
				}
			 
			 },
		 function () {
			 	 if ($.browser.msie && $.browser.version == 6) {
					$(this).parent().animate( { left:-302 }, { queue:false, duration:500 } );
				}
				else{
					$(this).parent().animate( { left:-302 }, { queue:false, duration:500 } );
					}
			 }
	  );

/*User Actions dynamics*/

	$("#header div.user_actions .log_in a").click(function () {	
			$("div.trans_bg").css("display","block");
			$("div.pop_up_login").css("display","block");
	});
	
	$("div.trans_bg").click(function () {	
			$(this).css("display","none");
			$("div.pop_up_login").css("display","none");
	});
	
	
});



