$(document).ready(function() {
	
	jQuery(".comparison tr:odd").css("background-color", "#eeeeee");
	
	$("#child_select").change(function() {
		var val = $(this).val();
		if ( val == "Y" ) {
			$("#kids").show();
		} else {
			$("#kids").hide();
		}
	});
	
	$(".panel_member").mouseover(function() {
		var alt = $("img", this).attr("alt");
		$("img", this).attr("src", alt);		
	});
	
	$(".panel_member").mouseout(function() {
		var orig = $("img", this).attr("orig");
		$("img", this).attr("src", orig);		
	});
	
	$(".productNav .items .item").mouseover(function() {
		$(".productNav .items .item").removeClass("show");
		$(this).addClass("show");
	});
	
	$(".productNav .items .item").mouseout(function() {
		$(".productNav .items .item").removeClass("show");
	});
	
	$(".menu li").each(function() {
		if ( !$(this).hasClass("active") ) {
			$(this).addClass("inactive");
		}
	});
	$(".menu li:first").removeClass("inactive");
	$(".menu li:last").addClass("last");
	
	$(".menu li").click(function() {
		var href = $("a", this).attr("href");
		document.location = href;
	});

	$("#search_input").focus(function() {
		var value = $(this).val();
		if ( value == "Search..." ) {
			$(this).val("");
		}
	});
	
	$("#magnifier").click(function() {
		$("#search_form").submit();
	});
	
	$("#header #links2 ul li").click(function() {
		var href = $("a", this).attr("href");
		window.location = href;
	});
	
	$(".featureBox .links a").click(function() {
		$(".featureBox .links li").removeClass("active");
		$(this).closest("li").addClass("active");
		var rel = $(this).attr("rel");
		$(".featureBox .content").hide();
		$(".featureBox #" + rel).fadeIn("slow");
		return false;
	});
	
	$(".featureBox .links li").click(function() {
		$("a", this).click();
	});
	
	$(".column").livequery(function() {
		$(".column").css("padding-right", "16px");
		$(".column:last").css("padding-right", "0px");
	});

	/*
	Cufon.replace($("#header #links2"), {
		textShadow: '#3a3b3b -1px 1px'
	});
	Cufon.replace($("#header #links"));
	Cufon.replace($(".menu li"));
	Cufon.replace($(".newsletter"));
	*/

});

function facebox(content) {
	
	$.facebox(content);
	
}