var highlightMenu = true;
var textResizing = false;
var expandingMenu = false;

$(document).ready(function() {
    // <li> Hover for IE6 and below
    if ($.browser.msie && $.browser.version < "7") {
        $("#nav li").hover(function() {
            $(this).addClass("hover");
        }, function() {
            $(this).removeClass("hover");
        });
    }

    $('#col-1 .nav-sub a').each(function(i, e) {
        if (location.href.indexOf(this.href) != -1) $(this).addClass('active').parent().addClass("active");
    });

    $("#nav a").each(function() {
        // Add active class to current page link in the menu
        if (highlightMenu) {
            if (location.href.indexOf(this.href) != -1) $(this).addClass('active').parent().addClass("active");
        }

        var s = $('div#hNav > ul > li.active').first().siblings('.active').size();
        if (s > 0) {
            $('div#hNav > ul > li.active').first().removeClass('active')
        }

        // Expand lists when the user tabs through menu items
        $(this).focus(function() {
            $(this).parents('li').addClass('hover');
        });
        // Collapse lists again when the link loses focus
        $(this).blur(function() {
            $(this).parents('#nav li').removeClass('hover');
        });
    });

});
