if(navigator.userAgent.indexOf('MSIE 6')==-1){
	var nav_buttons = $('nav').immediateDescendants();
	nav_buttons[0].className += ' first';
	nav_buttons[nav_buttons.length-1].className += ' last';
}

navHover = function() {	
	  var lis = document.getElementById("nav").getElementsByTagName("li");
	  for (var i=0; i<lis.length; i++) {		
		lis[i].onmouseover=function() {
			this.className+=" over";
			
			 if ((Element.childElements(this)) && (Element.childElements(this)[1]!=null)) {
			var uL = Element.childElements(this)[1];
			var iS = true;

			}
			if(iS){ uL.addClassName('shown-sub')};
	
		}		
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over"), "");
			  if ((Element.childElements(this)) && (Element.childElements(this)[1] != null)) {
				var uL = Element.childElements(this)[1];
				var iS = true;

			}
			if(iS){ uL.removeClassName('shown-sub')};				
		}			
	}
}
navHover();
