	// on hover over
	function megaHoverOver(){
	    $(this).find(".sub").stop().fadeTo('fast', 1).show(); // find sub and fade it in
	    (function($) {
	        // function to calculate total width of all ul's
	        jQuery.fn.calcSubWidth = function() {
	            rowWidth = 0;
	            // calculate row
	            $(this).find("ul").each(function() { // for each ul...
	                rowWidth += $(this).width(); // add each ul's width together
	            });
	        };
	    })(jQuery); 

	    if ( $(this).find(".row").length > 0 ) { // if row exists...

	        var biggestRow = 0;	

	        $(this).find(".row").each(function() {	// for each row...
	            $(this).calcSubWidth(); // call function to calculate width of all ul's
	            // find biggest row
	            if(rowWidth > biggestRow) {
	                biggestRow = rowWidth;
	            }
	        });

	        $(this).find(".sub").css({'width' :biggestRow}); // set width
	        $(this).find(".row:last").css({'margin':'0'});  // kill last row's margin

	    } else { // if row does not exist...

	        $(this).calcSubWidth();  // call function to calculate width of all ul's
	        $(this).find(".sub").css({'width' : rowWidth}); // set width

	    }
	}
	// on hover out
	function megaHoverOut(){
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() { //Fade to 0 opactiy
	      $(this).hide();  //after fading, hide it
	  });
	}

	// set custom configurations
	var config = {
	     sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
	     interval: 0, // number = milliseconds for onMouseOver polling interval
	     over: megaHoverOver, // function = onMouseOver callback (REQUIRED)
	     timeout: 0, // number = milliseconds delay before onMouseOut
	     out: megaHoverOut // function = onMouseOut callback (REQUIRED)
	};
	
	
	$(function() {
		// top navigation jquery initialization
		$("ul#topnav li .sub").css({'opacity':'0'}); //fade sub nav to 0 opacity on default
		$("ul#topnav li").hoverIntent(config); //trigger hover intent with custom configurations
		// activates gold 'active' state of top navigation
		$("a." + currSection).css("background-position","right");
		$("a." + currSection).hover(  
			function () { $(this).css("background-position","center"); }, 
			function () { $(this).css("background-position","right"); }
		);	
	});	
	
	
	$(function() {
		// slideshow on the product pages
		$(".slidetabs").tabs(".product-images > div", {
			effect: 'fade',
			fadeOutSpeed: "slow",
			rotate: true
		}).slideshow( {interval: 3000, autoplay: true } );
	});	
	
	$(function() {
		// slideshow on the product pages
		$(".tvtabs").tabs(".tv-images > div", {
			effect: 'fade',
			fadeOutSpeed: "slow",
			rotate: true
		}).slideshow( {interval: 2800, autoplay: true } );
	});		
