// Setting all the Event Handlers Dynamically

function hover() {

   var sfEls = document.getElementById("menu").getElementsByTagName("LI");
   for (var i=0; i<sfEls.length; i++) {
      sfEls[i].onmouseover=function() {
         this.className += "hoverEffect";
      }
      sfEls[i].onmouseout=function() {
         this.className=this.className.replace(new RegExp("hoverEffect\\b"), "");
      }
   }
}


if (window.attachEvent) {
    window.attachEvent("onload", hover);
}

