$(document).ready(function(){
    var m_a = '';
    var m_ul = '';
    var m_speed = 'normal';
    var m_class = 'activated';
    
    /*
    if (jQuery.browser.msie && (String(jQuery.browser.version) == '7.0' || String(jQuery.browser.version) == '6.0')) {
        $("#ie7-option-panel").css("zIndex", 100);
        $("#ie7-menu").css("zIndex", 10000);
    }
    */
        
    // mouseenter
    $("#menu li.main").bind("mouseenter", function(i){
        m_a = "#" + $(this).attr("id") + " a.item";
        m_ul = "#l" + $(this).attr("id").substring(1);
        if ($(m_ul).attr("id") == null) {
            return false;
        }
        
        //$(m_ul).slideDown(m_speed);
        $(m_ul).show();
        $(m_a).addClass(m_class);

        /*
        if (jQuery.browser.msie && (String(jQuery.browser.version) == '7.0' || String(jQuery.browser.version) == '6.0')) {
            $("#option-panel .last").hide();
            $("#option-panel .second").css("border", "0");
        }
        */
    });
    
    // mouseleave
    $("#menu li.main").bind("mouseleave", function(i){
        $("#menu ul.sub").hide();
        $(m_a).removeClass(m_class);
        
        /*
        if (jQuery.browser.msie && (String(jQuery.browser.version) == '7.0' || String(jQuery.browser.version) == '6.0')) {
            $("#option-panel .last").show();
            $("#option-panel .second").css("border-right", "1px dotted #b6b6b6;");
        }
        */
    });
})
