// JQuery folding menu for Shopp 1.0.11+
// Author: Claude Spengler http://www.cla-ude.net(/blog)
// Using hoverIntent for delaying roll over > http://cherne.net/brian/resources/jquery.hoverIntent.html

jQuery(document).ready(function(){
	// Roll over functions (you can comment all the roll over part if you don't want it)
	jQuery(".shopp_categories li").hoverIntent(
	{
		sensitivity: 7, 
		interval: 100, 
		over: roll_over, 
		timeout: 3000, // Ajust timeout to your needs
		out: roll_out
	}
	);
	// Roll over and roll out functions
	function roll_over() {
	jQuery(this).children(".children").slideDown();
	}
	function roll_out() {
		if(jQuery(this).children("ul").hasClass(".active") == false) {
			jQuery(this).children(".children").slideUp();
		}
	} // End roll over
	
	jQuery(".children").hide();
	jQuery(".active").show();
	jQuery(".current").show();

});