Показать сообщение отдельно
  #2 (permalink)  
Старый 01.09.2012, 21:49
Аватар для Aetae
Тлен
Отправить личное сообщение для Aetae Посмотреть профиль Найти все сообщения от Aetae
 
Регистрация: 02.01.2010
Сообщений: 6,491

$(function(){
var menulen = 0;
$("#menu").children('img').each(function(indx, element){menulen +=  $(element).outerWidth(true);});
$("#menu").css({"margin-right":function(i,val){val = (menulen/2)*(-1); return val;}, "margin-top":"0"});
$("#menu").children('img').last().prevAll()
               .css("margin-right", function(i,val){
                        var lenth = $(this).width();
                        val = Math.round((200 -lenth)/2);
                        return val;});
    $('.zoom').hover(function(){
            var name = $(this).attr("src");    
            $(this).stop().animate({width:"200px",height:"200px",left:"-40px",top:"-40px"}, 400);
            name = name.replace(/1/g, "2");
            $(this).attr("src",name);
        },
        function(){        
            var name = $(this).attr("src");    
            $(this).stop().animate({width:"100px",height:"100px",left:"0",top:"0"}, 400);
            name = name.replace(/2/g, "1");
            $(this).attr("src",name);
        });
});

Скорее всего.
__________________
29375, 35
Ответить с цитированием