$('.main-menu').ready(function(){
    zIndexNumber = 10000;
    $('li', this).each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
    $('.text-up').hover(function(){           
       $('.poz-abs' ,this).show();      
       $('.top-link' ,this).css("z-index", 7000);
       
       if($.browser.msie&&$.browser.version=='6.0')  //хак для ие6
        {
            var w = $('.poz-abs',this).width();       
            $('.top-level-2',this).css("margin-left",-(($('.top-link',this).width())/2)+"px");
            $('.poz-abs',this).css("left",(($('.top-link',this).width())/2)+"px");
            $('.poz-abs',this).css("margin-left",(-($('.top-link a',this).width())/2)-20+"px");
            $('.poz-abs',this).width(w);
        }else{
            $('.poz-abs',this).css("margin-left",(($('.top-link',this).width()-$('.top-link a',this).width())/2-30)+"px");
        }    
    }, function(){        
        $('.top-link' ,this).css("z-index", 1000);
        $('.poz-abs',this).hide();        
    })   
})
$('.klients').ready(function(){
    $('.klients a',this).hover(function(){       
        var name = $('img',this).attr('src').substr(0, $('img',this).attr('src').length-4);      
        var rash = $('img',this).attr('src').substr($('img',this).attr('src').length-4, 4);      
        $('img',this).attr('src', name+'_'+rash);
    }, function(){
        var name = $('img',this).attr('src').substr(0, $('img',this).attr('src').length-5);
        var rash = $('img',this).attr('src').substr($('img',this).attr('src').length-4, 4);
        $('img',this).attr('src', name+rash);
    });
})

