/**
 * @fileOverview
 * js for blog.maxthon.com
 * @author zhangwei <zhangwei@maxthon.net>
 * @version 2011-09-01
 */

(function ($) {
    $.fn.menu = function (btns) {
    
        var btns = btns || '.menu-list>li';
        
        $(btns).each(function (i) {
            // have menu
            if (!!$(this).children("ul").get(0)) {
                $(this).hover(function () {
                    $(this).addClass("hover");
                    $(this).children("ul").stop(true, true).slideDown(100);
                }, function () {
                    $(this).removeClass("hover");
                    $(this).children("ul").stop(true, true).slideUp(100);
                });
                
                $(this).children("ul").mouseleave(function () {
                    $(this).slideUp("fast");
                });
            }
            
        });
    }
})(jQuery);

 $(document).ready(function () {

/**
 * 语言选择框弹出
 */
    $("#language").hover(
        function () {
            $(this).find(".all-languages").toggle();
        }
    );

/**
 * 下拉菜单
 */
   $(".menu-list").menu(); 
});


