'use strict';

/**
 * Created by liaili on 16/8/16.
 */
//判断IE浏览器
(function () {
    var explorer = window.navigator.userAgent;
    var sw = $(window).width();
    var cw = 0;

    function setClientWidth(sw, cw) {
        if (explorer.indexOf('MSIE') >= 0) {

            cw = sw > 1441 ? 1360 : sw > 1281 ? 1150 : 990;

            //index
            $('.banner-box').width(cw);
            $('.download').width(cw);
            $('ul', '.character').width(cw);
            $('.section', '.projects').width(cw);

            $('.project-header-left', '.projects-header').width(sw / 10 * 4);
            $('.project-header-right', '.projects-header').width(sw / 10 * 6);
            $('.products ul').width(cw);
            $('.products-image-large').css({
                marginTop: cw / 33,
                marginBottom: cw / 33
            });
            $('.products-image', '.products-image-large').css({
                width: (cw + cw / 33) / 3 * 2 - cw / 33,
                marginRight: cw / 33
            });
            $('.products-detail').width((cw + cw / 33) / 3 - cw / 33);
            $('.products-image-small').css({
                width: (cw + cw / 33) / 3 - cw / 33,
                marginRight: cw / 33
            });
            $('.products-image-small:last').css('marginRight', 0);

            //project
            $('p', '.hot-project-banner').width(cw / 2);
            $('.hot-project-introducer').width(cw);
            $('.hot-project-tabs ul').width(cw);
            $('.container', '#header').width(cw);
            $('.nav', '#header').css('paddingLeft', cw / 4);

            //about
            $('p', '.about-us-banner-bottom').width(cw);
            $('.company-introduction-box').width(cw);
        }
    }

    //初始化
    setClientWidth(sw, cw);

    $(window).resize(function () {
        sw = $(undefined).width();
        setClientWidth(sw, cw);
    });
})();

//# sourceMappingURL=layout-ie8.js.map