var $j=jQuery.noConflict();

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

	// entire list element clickable 
	$j("#homeProducts li").click(function(){
	  window.location=$j(this).find("a").attr("href"); return false;
	});
	
	$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(function() {
    $j("#oblLogin").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"));   		
        }
    );
	});	
	
	// rotate nav image
	$j(".learnMore").prepend("<span></span>"); //Throws an empty span tag right before the a tag

	$j(".learnMore").each(function() { //For each list item...
		var linkText = $j(this).find("a").html(); //Find the text inside of the <a> tag
		$j(this).find("span").show().html(linkText); //Add the text in the <span> tag
	}); 
	
	var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
	if(!IE6){

	$j("#homeProducts li").hover(function() {	//On hover...
		$j(this).find("span").stop().animate({
			marginTop: "-25" //Find the <span> tag and move it up 25 pixels
		}, 250);
	} , function() { //On hover out...
		$j(this).find("span").stop().animate({
			marginTop: "0"  //Move the <span> back to its original state (0px)
		}, 250);
	});
	
	$j("#secondaryProducts li.odd").hover(function() {	//On hover...
		$j(this).find("span").stop().animate({
			marginTop: "-25" //Find the <span> tag and move it up 25 pixels
		}, 250);
	} , function() { //On hover out...
		$j(this).find("span").stop().animate({
			marginTop: "0"  //Move the <span> back to its original state (0px)
		}, 250);
	});
	
	$j("#secondaryProducts li.even").hover(function() {	//On hover...
		$j(this).find("span").stop().animate({
			marginTop: "-25" //Find the <span> tag and move it up 25 pixels
		}, 250);
	} , function() { //On hover out...
		$j(this).find("span").stop().animate({
			marginTop: "0"  //Move the <span> back to its original state (0px)
		}, 250);
	});
	
	} // end !IE6	
	
});




