/**
 * Version 0.10
 * based on jQuery
 * ie6 hack for overlay menu over formElements
 */

(function($){
    
    $.fn.navmenu = function(params) {
        
        
        return this.each(function(){
            $t = $(this);
            $t.mouseenter(function(){
               $(this).addClass('hover');
               if ($.browser.msie && parseInt($.browser.version) == 6 && $(this).find('.submenu').length > 0) {
                   
                   var submenu = $(this).find('.submenu');
                  
                   $('#ieNav').attr('width',parseInt($(submenu).width()) + 'px');
                   $('#ieNav').attr('height', parseInt($(submenu).height() +5) + 'px');
                   $('#ieNav').css('left', $(submenu).offset().left + 'px');
                   $('#ieNav').css('top', parseInt($(submenu).offset().top +10) + 'px');
                   $('#ieNav').show();
               }
            });
            
            $t.mouseleave(function(){
                $(this).removeClass('hover');
                if ($.browser.msie && parseInt($.browser.version) == 6) {
                    $('#ieNav').hide();
                }
            });
            $t.find('.submenu li:not(.extra_short)').hover(function(){
                $(this).css('background-position', '0px -82px');
            },
            function(){
                $(this).css('background-position', '0px  -33px');
            });
        });
    };
})(jQuery);


