// JavaScript Document

sfHover = function() {
  	var sfEls = document.getElementById("nav").getElementsByTagName("li");
  	for (var i=0; i<sfEls.length; i++) {
    	sfEls[i].onmouseover=function() {
      		this.className+=" sfhover";
    	}
    	sfEls[i].onmouseout=function() {
      		this.className=this.className.replace(new RegExp("\\s?sfhover\\b"), "");
    	}
  	}
	var listItem = document.getElementById("nav").getElementsByTagName("ul");
for(var i=0;i<listItem.length;i++) {
	
	listItem[i].onmouseover=function() {
  var changeStyle = this.parentNode.getElementsByTagName("a");
  changeStyle[0].className+=" active";
}
listItem[i].onmouseout=function() {
  var changeStyle = this.parentNode.getElementsByTagName("a");
  changeStyle[0].className=this.className.replace(new RegExp("\\s?active\\b"), "");
}
}
	
}




if (window.attachEvent) window.attachEvent("onload", sfHover);