
    /*
     * Menu management methods
     * -- all functions only required for IE to work
     * -- method works with other browsers
     * -- areas that would harm rendering in other browsers
     * -- only ran if browser is IE
     */
    
    
    var name1 = "#drupal_right_management_div";
    var name2 = "#drupal_left_management_div";
    
    // on document load execute methods
    
    $(document).ready(function(){            

        
        // primary navigation, top level td hover
        $('#siteprimarynav td').hover(function() {        
            
            var td = $(this);
            var a = td.children('a');
            
            
            //var w = td.width() ;
            
            // width, min 154px use td's width if wider (account for border)
            //$(this).children('ul').css("width", ((w > 152) ? w - 2 : 154));
            
            var w = (td.width() > 152) ? td.width()- 2 : 154;
            $(this).children('ul').css("width", w);
            $(this).children('ul').children('li').css("width", w);
            
            // top, use link's top + height + td's bottom padding (fixes safari issue)
            $(this).children('ul').css("top", a.offset().top + a.height() + 7);
            
            // left, use td's left + border width
            $(this).children('ul').css("left", td.offset().left + 1);
            
            // display
            $(this).children('ul').show();
        },
        function() {
            $(this).children('ul').hide(); 
        });
        
        
        // primary navigation, drop menu item hover
        $('#siteprimarynav li.expanded').hover(function() {            
            
            // top, li's top - top of parent ul
            $(this).children('ul').css("top", $(this).offset().top - $(this).parent().offset().top - 2);            
            
            // left, parent ul's width 
            $(this).children('ul').css("left", $(this).parent().width());
            
            
            
            //var h = $(this).height();
            
            //alert($(this).height());
            
            // display
            //$(this).children('ul').show();
            $(this).children('ul').css("display", "block");
            //$(this).height(h);
        },
        function() {
            $(this).children('ul').hide(); 
        });        

        
        
        /* Administration menu functions */
        if ($(name1).css("margin-top") == "auto") {
            $(name1).css("margin-top", "0px");
        }
        
        if ($(name2).css("margin-top") == "auto") {
            $(name2).css("margin-top", "0px");
        } 
        
        $(window).scroll(function () {
            if ($(name1).height() < $(window).height() || $(name1).css("margin-top") < $("#sitebox").height()) {
                $(name1).css("margin-top", $(document).scrollTop()+"px");
            }
            if ($(name2).height() < $(window).height() || $(name2).css("margin-top") < $("#sitebox").height()) {
                $(name2).css("margin-top", $(document).scrollTop()+"px");
            }
        });
    });
