//** Navigation Drop Down

$(document).ready(function(){ 
        $("#menu ul").superfish({
			hoverClass:    'hover',          // the class applied to hovered list items 
			animation:     {opacity:'show',height:'show'},  // an object equivalent to first parameter of jQuery’s .animate() method 
			speed:         'normal',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
			autoArrows:    false,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
			dropShadows:   true,               // completely disable drop shadows by setting this to false 
			onInit:        function(){},       // callback function fires once Superfish is initialised – 'this' is the containing ul 
			onBeforeShow:  function(){},       // callback function fires just before reveal animation begins – 'this' is the ul about to open 
			onShow:        function(){},       // callback function fires once reveal animation completed – 'this' is the opened ul 
			onHide:        function(){}        // callback function fires after a sub-menu has closed – 'this' is the ul that just closed 
		}); 
    }); 

//** Animated Collapsible DIV Settings

animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
	if ($('#'+divobj.id+'-slide').length==1){ //if toggler link has id 'divid-toggler' defined
		if (state=="block"){
			$('#'+divobj.id+'-slide').addClass("open")
			
		}
		else{
			$('#'+divobj.id+'-slide').addClass("closed")
			.removeClass("open")
		}
	}
}
animatedcollapse.init()

