$(document).ready(function() {
    productsOn();
    // Figure out which menu item belongs in the "on" state
    // Key on location.pathname - might not be 100% reliable!
    // If the pathname corresponds to an item, mark it as on
    $("#subnav li:has(a[href='" + location.pathname + "'])").addClass("on");
    // If the pathname corresponds to a third tier item, mark the second tier item as on
    $(".second_tier li:has(ul > li > a[href='" + location.pathname + "'])").addClass("on");
    
    // Hack to make li's 'hover-able'
    if (document.all && document.getElementById) {
        $(".second_tier > li, .third_tier > li").each(function() {
            this.onmouseover = function() { this.className += " over"; }
            this.onmouseout = function() { this.className = this.className.replace(" over", ""); }
        });
    }
    
    $("#subnav").show();

    $(".hotspotButton").pngfix();
    $(".hotspotCalloutTextContainer").pngfix();
});