var $j=jQuery.noConflict();

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

	// primary navigation
	$j("#priNav li").prepend("<span></span>"); 

	$j("#priNav li").each(function() { 
		var linkText = $j(this).find("a").html();
		$j(this).find("span").show().html(linkText); 
	}); 

	$j("#priNav li").hover(function() {	
		$j(this).find("span").stop().animate({
			marginTop: "-37" 
		}, 250);
	} , function() { 
		$j(this).find("span").stop().animate({
			marginTop: "0"  
		}, 250);
	});	
	
	// entire list element clickable; add hover state 
	$j("#priNav li").click(function(){
	 window.location=$j(this).find("a").attr("href"); return false;
	});		

	$j("#homeProducts li").hover(
		function(){
			$j(this).addClass("active");
		},
		function(){
			$j(this).removeClass("active");
		}
	);

	$j("#homeProducts li").click(function(){
	 window.location=$j(this).find("a").attr("href"); return false;
	});	

	$j("ul#secondaryProducts li").hover(
		function(){
			$j(this).addClass("active");
		},
		function(){
			$j(this).removeClass("active");
		}
	);

	$j("#secondaryProducts li.odd").click(function(){
	 window.location=$j(this).find("a").attr("href"); return false;
	});
	
	$j("#secondaryProducts li.even").click(function(){
	 window.location=$j(this).find("a").attr("href"); return false;
	});	
	
	// swap image 
	$j("ul#homeProducts h4 img").hover(
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/.png/, "-hover.png"));	
		},
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/-hover.png/, ".png"));   		
		}
	);

	$j(".inputButton").hover(
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/.png/, "-hover.png"));	
		},
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/-hover.png/, ".png"));   		
		}
	);

	$j("#printButton img").hover(
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/.png/, "-hover.png"));	
		},
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/-hover.png/, ".png"));   		
		}
	);	

	$j("#shareButton img").hover(
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/.png/, "-hover.png"));	
		},
		function () {
			$j(this).attr("src", $j(this).attr("src").replace(/-hover.png/, ".png"));   		
		}
	);

	// columnize uls
	//$j("#productDetails dl dd ul").columnize({columns: 2});

 });