/**
 * menu.js
 * Sets up the various drop down menus used in the site.
 * If you want more than one menu, you need to duplicate the function completely, 
 * as IE was getting confused with multiple menus created from a single function.
 * Requires mootools 1.11
 */

function dropDown() 
{
	//els is an array of all li items on the page inside uls with the id nav
	var els = $ES('li', "nav"); 
	for (var i=0; i<els.length; i++) 
	{
		//for each li set up two events
		els[i].addEvent('mouseover', function() { this.addClass("sfhover") });
		els[i].addEvent('mouseout', function() { this.removeClass('sfhover') });
	}
	
	//now add the hrs between above each a tag in each li
	var hrs = $ES('hr', "nav"); 
	for (var i=0; i<hrs.length; i++) 
	{
		//set the opacity
		hrs[i].setStyle('opacity', '0.3');
	} 	
}

//on load event
window.addEvent('load', dropDown);
