
jQuery(function(){
	jQuery.noConflict();

	jQuery('ul.superfish').superfish({
		delay:       200,                            // one second delay on mouseout
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
		speed:       'fast',                          // faster animation speed
		autoArrows:  false,                           // disable generation of arrow mark-up
		dropShadows: true                           // disable drop shadows
	});

	jQuery('ul.superfish li ul').append('<li class="dropdown-bottom ie6fix"></li>');
	
    
    
    // image rollovers
    
    var imgPath = 'http://79.170.40.41/cheeseandgrain.co.uk/preview/wp-content/themes/OnTheGo/images/';
    var onExt = '-hover.png';
    var offExt = '.png';      

	jQuery('li.category span.img').hover(
	   function(){
	   	   jQuery(this).parent().find('h5 a').css('color', '#c00');
	   },
	   function(){
	   	   jQuery(this).parent().find('h5 a').css('color', '#333');
	   }
	);	
	jQuery('li.category h5 a').hover(
	   function(){
	   	   jQuery(this).css('color', '#c00');
	   },
	   function(){
	   	   jQuery(this).css('color', '#333');
	   }
	);	
	
	if (!((jQuery("#footer-widgets .widget").length) == 0)) {
		jQuery("#footer-widgets .widget").each(function (index, domEle) {
			// domEle == this
			if ((index+1)%3 == 0) jQuery(domEle).after("<div class='clear'></div>");
		});
	};

});
