jQuery(document).ready(function() {
    var sfEls = document.getElementById("main_navigation").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"), "");
        }
    }
    
    jQuery('ul.nav_menu').each(function(i) {
        var topNav = this.parentNode;

        this.onmouseover=function() {
            topNav.className = "expanded";
        }
        this.onmouseout=function() {
            topNav.className = "";
        }
    });
});