// Based on Son of Suckerfish.
// http://htmldog.com/articles/suckerfish/dropdowns/
// Requires MooTools goodness!
// Used to add a class to the parent LI tag of an A link
 function suckerfishNavMenu(pSetDefault) {
	// Set this boolean to TRUE if you want the first element to be highlighted a la Wayfinder.
	// Only useful if the first item is not the Home Page.
	if(pSetDefault){
		var firstListItem = $("nav").getElement('li');
		firstListItem.addClass('sfhover');
	}
	
	var sfEls = $('main-nav').getElements('#nav > li');
	for (var i=0; i<sfEls.length; i++) {
		
		sfEls[i].onmouseover=function() {
			//switch off previous hover state	
			//this uses getElements, since there seems to be times when more than one LI has the class!
			$('main-nav').getElements('li.sfhover').removeClass('sfhover');
			this.addClass('sfhover');
			//if(this.parentNode != navRoot){
				//put class on parent A tag
				//this.parentNode.previousSibling.className+=" level1Menu";
			//}
			
		}
		
		
		
		sfEls[i].onmouseup=sfEls[i].onmouseout;
	}
	
	
}


