
jQuery(document).ready(function(){
	
	
	// Remove the class of child
	// This removes the CSS 'falback'
	if(jQuery("#nav ul").is('.child')) {
		jQuery("#nav ul.child").removeClass("child");
	}
	if(jQuery("#nav li").is('.cur a')) {
			jQuery("#nav li.cur a").textgrad({ begin: 'FBBB8C',maxGroup:2,type:'o',end:'8F5310'});
	}
	
	jQuery("#nav li.cur").children("ul").stop(true, true).show();
	// When a list item that contains an unordered list
	// is hovered on
	jQuery("#nav li").has("ul").hover(function()
	{
		jQuery("#nav li.cur").children("ul").stop(true, true).hide();
		//Add a class of current and fade in the sub-menu
		jQuery(this).addClass("act").children("ul").show();
		
	}, 
	function() {

		// On mouse off remove the class of current
		// Stop any sub-menu animation and set its display to none
		jQuery(this).removeClass("act").children("ul").stop(true, true).css("display", "none");
		jQuery("#nav li.cur").children("ul").stop(true, true).show();

	});

});

