// sfHover = function() {
//    var sfEls = document.getElementById("header").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(" sfhover\\b"), "");
//        }
//    }
// }
// if (window.attachEvent) window.attachEvent("onload", sfHover);

function clear_dropdown(obj) {
  $(obj).removeClass('active');
  $(obj).css('z-index', 1);
  $(obj).find('ul.level2').hide();
}

$(document).ready(function() {
  $('.mainNav > li').hover(function() {
    $(this).addClass('active');
    $(this).css('z-index', 100);
    $(this).find('ul.level2').show();
  }, function() {
    clear_dropdown(this);
  });
});
