

jQuery(document).ready(function(){     
	
	jQuery("body").addClass("js-switch");
	   
    HoverEffect('input.button', 'sfhover');
    HoverEffect('ul.home-tabs li', 'current');

	/* Dropdown navigation */	
	jQuery(".primary-nav, .category-nav").each(function() {        			
		jQuery(this).find('li:last-child').addClass('last-child');				
			jQuery(this).find('ul').parent('li').hover(function() {						
			    	jQuery(this).addClass('hover');
			    }, function(){ jQuery(this).removeClass('hover');});		
		});	
	
	jQuery('ul.primary-nav li ul li').each(function(){
		var el = jQuery(this).find('ul');
		jQuery(this).hover(function(){ 
			if (jQuery(this).parents('.container').width() < 1300){el.addClass('pos'); el.parents('li').addClass('hover-left');}
			}, function(){
			el.removeClass('pos');
			el.parents('li').removeClass('hover-left');
			});		
	});
});


function HoverEffect(el, cl){
	jQuery(el).hover(function() {
        jQuery(this).addClass(cl);
        }, function(){
        jQuery(this).removeClass(cl);
    });
}

(function(jQuery){jQuery.fn.setEqualBlocksHeight=function(count){if(count=='all'||count>this.length)count=this.length;count=parseInt(count);if(count>1)
{this.css({height:'auto','min-height':0});for(var i=1;i<=this.length;i+=count)
{var sameH=0;for(var j=0;j<=count-1;j++)
{if(this.get(i+j-1))
{var blockH=this.eq(i+j-1).height();sameH=(blockH>sameH)?(sameH=blockH):sameH}}
for(var j=0;j<=count-1;j++)
{if(this.get(i+j-1))
{this.eq(i+j-1).css({'min-height':sameH});if(jQuery.browser.msie&&jQuery.browser.version=='6.0')this.eq(i+j-1).height(sameH)}}}};if(count==1)this.css({height:'auto','min-height':0});return this};})(jQuery);