﻿pageLoad = function () {
    //спецпредложения
    $(function () {
        if (document.getElementById('SpOToGetWidth')) {
            var getS = document.getElementById('SpOToGetWidth');
            var setS = document.getElementById('SpOLoadBlock');
            var imgS = document.getElementById('SpOLoadImage');

            setS.style.width = getS.offsetWidth + 'px';
            setS.style.height = getS.offsetHeight + 'px';
            imgS.style.marginTop = Math.round(getS.offsetHeight / 2 - 50) + 'px';
        }
    })

    $(function () {
        $('.zoom').hover(function () {
            $(this).stop().animate({ width: "150px", height: "135px", marginLeft: "-7px", marginTop: "-5px", marginRight: "-7px", marginBottom: "-5px" }, 100);
            $(this).find('img').stop().animate({ width: "150px", height: "100px" }, 100);
        },
		function () {
		    $(this).stop().animate({ width: "135px", height: "125px", marginLeft: "0px", marginTop: "0px", marginRight: "0px", marginBotom: "0px" }, 100);
		    $(this).find('img').stop().animate({ width: "135px", height: "90px" }, 100);
		});
    });
    //эксклюзивы
    $(function () {
        if (document.getElementById('ExOToGetWidth')) {
            var getS = document.getElementById('ExOToGetWidth');
            var setS = document.getElementById('ExOLoadBlock');
            var imgS = document.getElementById('ExOLoadImage');

            setS.style.width = getS.offsetWidth + 'px';
            setS.style.height = getS.offsetHeight + 'px';
            imgS.style.marginTop = Math.round(getS.offsetHeight / 2 - 50) + 'px';
        }
    })

    $(function () {
        $('.zoomEx').hover(function () {
            $(this).stop().animate({ width: "190px", height: "162px", marginLeft: "-7px", marginTop: "-5px" }, 100);
            $(this).find('img').stop().animate({ width: "190px", height: "127px" }, 100);
        },
		function () {
		    $(this).stop().animate({ width: "175px", height: "152px", marginLeft: "0px", marginTop: "0px" }, 100);
		    $(this).find('img').stop().animate({ width: "175px", height: "117px" }, 100);
		});
    });

}

