$(document).ready(
	function()
	{
		//$('img[@src$=.png]').ifixpng(); 
		
		
		$("#search_box").click(function(){
				if($(this).val() == 'search site...'){
					$(this).val('');
				}
		});
		
		$("#search_box").blur(function(){
				if($(this).val() == ''){
					$(this).val('search site...');
				}
		});
		
		/*
		$("#join_newsletter_email").val("enter your email").onclick(function(){
				$(this).val("");
		});
		 */
		// ADD STYLE CLASS TO TEXT INPUTS
		$('input[@type=text]').addClass("text_input");
		$('input[@type=password]').addClass("text_input");	
		$('textarea').addClass("text_input");		
		
		
		// CHANGE TEXT INPUT CLASS ON FOCUS AND BLUR
		$('input[@type=text]').focus(function() {
			$(this).addClass("text_input_focus");
			
			$(this).blur(function() {
				$(this).removeClass("text_input_focus");	
			});
		});
		
		$('textarea').focus(function() {
			$(this).addClass("text_input_focus");
			
			$(this).blur(function() {
				$(this).removeClass("text_input_focus");	
			});
		});	
		
	$(".accountTable tr:even").addClass("alt");
	
	$("#nav li ul").hide();
		
	$("#nav li").hover(
		function(){ $("ul", this).show();
					thisid = $(this).attr("id");
					$(this).attr({id: thisid + "_over"});
				}, 
		function() { $("ul", this).hide();
					thisid = $(this).attr("id").replace("_over", "");
					$(this).attr({id: thisid});
				}
		
	);
	
	if (document.all) {
		$("#nav li").mouseover(
			function() {$(this).addClass("over");},
			function() {$(this).removeClass("over");}
		);
		$("#nav li").mouseout(
			function() {}
			//setTimeout("function() {$j(this).removeClass('over')}", 1000);
		);			
	}
	
	$("#home_news div").mouseover(function() {
		$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");
	});
		
	$("#home_news div").click(function() {
		link = $(this).find("h4 a").attr("href");
		if(link !== null) {
			window.location = link;
		}
	});	
	
	$("#all_products div").mouseover(function() {
		$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");
	});
	
	$("#all_products div").click(function() {
		link = $(this).find("h3 a").attr("href");
		if(link !== null) {
			window.location = link;
		}
	});	
	
})
