jQuery(function()
{	
	//IE FIXES
	if(jQuery.browser.msie)
	{ 						
		//Search box focus (:focus pseudo class doesn't work in IE)
		jQuery("#plc_lt_zoneHeader_SearchBox_txtWord")
			.focus(function(){ jQuery(this).css({ "background-position" : "0px -47px" }) })
			.blur(function(){ jQuery(this).css({ "background-position" : "0px -20px" }) })
		
		//IE6 FIXES
		//Because IE supports :hover pseudo class only on <a> elements
		if(jQuery.browser.version < 7 )
		{
			/*
			jQuery("#slideshow .next")
				.hover(function(){  jQuery(this).css({ "background-position" : "0 -40px" });  },
					   function(){	jQuery(this).css({ "background-position" : "0 0" });	});
			
			jQuery("#slideshow .previous")
				.hover(function(){  jQuery(this).css({ "background-position" : "0 -120px" });  },
					   function(){  jQuery(this).css({ "background-position" : "0 -80px" });  })
			*/
			jQuery("#sidebar input.submit")
				.hover(function(){  jQuery(this).css({ "background-position" : "0 -1096px" })  },
					   function(){  jQuery(this).css({ "background-position" : "0 -1066px"});  });
			
			//Menu hover fix			
			jQuery("#header ul li:not(#user_login li)")
				.hover(function(){  jQuery(this).find("a:not(#header ul li ul li a)").css({ "color" : "fedd21" }).end().find("ul").css({ "display" : "block" })  },
					   function(){  jQuery(this).find("a:not(#header ul li ul li a)").css({ "color" : "fff" }).end().find("ul").css({ "display" : "none" })  })
			
		}
		
	}//if(jQuery.browser.msie)
	else
	{
		
		//Menu fadeIn/fadeOut
		//Works just for non-IE browser, due to lack of support for animating png images
		jQuery("ul li ul").css({ "opacity" : "0" });
		jQuery("#header ul>li:has(ul)")
			.hover(function()
			{
				if( jQuery("ul li ul:animated").size()==0 )			
				jQuery(this).find("ul").css({ "opacity" : "0" , "display" : "block" }).animate({ "opacity" : 1 }, 300);  
			},
			function()
			{ 
				jQuery(this).find("ul").css({ "display" : "none" }); //.animate({ "opacity" : 0 }, 0, function(){ jQuery(this).css({ "opacity" : 1 , "display" : "none" }) })
			})
	}



	//Safari 3 FIX - (display:table-cell doesn't work in safari 3)
	if( (jQuery.browser.safari) && (jQuery.browser.version <= "525.29"))
	{	jQuery("#main .box a:not(#main .box h3 a)").css({ "display" : "inline-block" }).find("img").css({ "margin-top" : "15px" });   }
	
	
	
	//Search input field - text clear
	jQuery("#plc_lt_zoneHeader_SearchBox_txtWord")
		.focus(function(){  if( jQuery(this).val() == 'Search...' ){ jQuery(this).val(""); }  })		
		.blur(function(){  if( jQuery(this).val() == '' ){  jQuery(this).val("Search..."); }  })
		


	//Preload menu background images - not visible at site load
	preload_image = new Image(212,34);
	preload_image.src="/App_Themes/TwoeyToys/interface/menu_ul_open_top.png";
	preload_image = new Image(212,124);
	preload_image.src="/App_Themes/TwoeyToys/interface/menu_ul_open.png";


})
