jQuery(document).ready(function() {
    
	var productOverviewSelector = jQuery(".productsOverview");
	
	jQuery(".product", productOverviewSelector).click(function(){
		var url = jQuery("a", this).attr("href");
		window.location.href = url;
	});
	
	var fadingSpeed = 250;
	var visible = 0.75;
	var invisible = 0;
	
	jQuery(".product", productOverviewSelector).mouseenter(function(){
		var highlight = jQuery(this).find(".highlight");
		jQuery(this).parent().parent().find(".highlight.act").removeClass("act");
		jQuery(this).parent().parent().find(".highlight.act").fadeTo(fadingSpeed, visible);
		highlight.stop(true,true).addClass("act");
		highlight.stop(true,true).fadeTo(fadingSpeed, invisible);
		jQuery(this).parent().parent().find(".highlight:not(.act)").stop(true,true).fadeTo(fadingSpeed, visible);
	});
	
	productOverviewSelector.mouseleave(function(){
		jQuery(".highlight", productOverviewSelector).stop(true,true).fadeTo(fadingSpeed, invisible);
	});
	
});   
