Menu = {
    block : null,
    init : function()
    {
        var menu = jQuery('.v_menu .menu_main');
        menu.removeClass('jsoff');
        Menu.block = jQuery('<div class="js_block"></div>');
        jQuery('.v_menu').prepend(Menu.block);
        jQuery('.menu li', menu).hover(function(event){Menu.hoverIn(event, $(this))},
                            function(event){Menu.hoverOut(event, $(this))}
        );
    },
    hoverIn : function(event, obj)
    {
        Menu.block.stop();
        var liWidth = jQuery('a', obj).width()+20;
        var liHeight = jQuery('a', obj).height()+83;
        var posLeft = jQuery('a', obj).position().left;
        Menu.block.css('width', liWidth).css('left', posLeft);
        Menu.block.animate({height : liHeight}, 'fast', function(){
            Menu.block.animate({height : '-=10'}, 'fast');
        });
    },
    hoverOut : function(event, obj)
    {
        Menu.block.stop();
        Menu.block.animate({height : 0}, 'fast');
    }
}
jQuery(document).ready(Menu.init );
