
        var QQ = "2197248579";

        function addFavorite2() {
            var url = window.location;
            var title = document.title;
            var ua = navigator.userAgent.toLowerCase();
            if (ua.indexOf("360se") > -1) {
                alert("由于360浏览器功能限制，请按 Ctrl+D 手动收藏！");
            } else if (ua.indexOf("msie 8") > -1) {
                try {
                    window.external.AddToFavoritesBar(url, title); //IE8
                } catch (e) {
                    alert("由于360浏览器功能限制，请按 Ctrl+D 手动收藏！");
                }
            } else if (document.all) {
                try {
                    window.external.addFavorite(url, title);
                } catch (e) {
                    alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
                }
            } else if (window.sidebar) {
                window.sidebar.addPanel(title, url, "");
            } else {
                alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
            }
        }
    

        
        $(function(){
            var image = new Image();
            image.onload = function() {
                var imgWidth=$('.ty-banner-1 img').width();
               var windowWidth=$(window).width();
               var length = (imgWidth-windowWidth)/2;
               if(length>0){
                    $('.ty-banner-1 img').attr('style','margin-left:'+ (-length) + 'px');
               }
               $('.ty-banner-1 img').addClass('show');
            }
            image.src = $('.ty-banner-1 img').attr('src');
           
        });
    

            function searchInfo() {
                var key = document.getElementById("key").value;
                var base = $('head').data('base');
                if (key) {
                    location.href = base + "search.php?key=" + key;
                } else {
                    alert('请输入您要搜索的关键词！');
                }
            }
        

        $("[navcrumbs]").find("dd a").last().addClass('cur');
        $(function() {
            $("[navcrumbs]").find("dd a").each(function() {
                    var source = $(this).attr("href");
                if (source.indexOf("index.html") > -1) {
                    source=source.substring(0, source.lastIndexOf('index.html')); 
                     $(this).attr("href",source);
                }
            });
        })
    

        $(function() {
            $(".p4-product-3").slide({
                titCell: ".p4-prod-showcase-dd ul",
                mainCell: ".p4-prod-showcase-img",
                autoPage: true,
                effect: "left",
                autoPlay: true,
                vis: 1,
                titOnClassName: "cur"
            });
        })
    

        window.onload=function(){
            if($('.p4-curmbs-1 a:last').attr('href')=="/product/"){
                $('.nav').removeClass('cur')
                $('.nav').eq(2).addClass('cur');
            }
        }
    

        $(function() {
            var time;
            //var winHeight = top.window.document.body.clientHeight || $(window.parent).height();
            $('.client-2').css({
                'marginTop': -($('.client-2').height() / 2)
            });
            $('#client-2 li').on({
                'mouseenter': function() {
                    var scope = this;
                    time = setTimeout(function() {
                        var divDom = $(scope).children('div');
                        var maxWidth = divDom.width();
                        $(scope).stop().animate({
                            marginLeft: -maxWidth + 77,
                            width: maxWidth
                        }, 'normal', function() {
                            var pic = $(scope).find('.my-kefu-weixin-pic');
                            if (pic.length > 0) {
                                pic.show();
                            }
                        });
                    }, 100) 
},
                'mouseleave': function() {
                    var pic = $(this).find('.my-kefu-weixin-pic');
                    if (pic.length > 0) {
                        pic.hide();
                    }
                    clearTimeout(time);
                    var divDom = $(this).children('div');
                    $(this).stop().animate({
                        marginLeft: 0,
                        width: 77
                    }, "normal", function() { 
});
                }
            });
            //返回顶部
            $(window).scroll(function() {
                var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
                var eltop = $("#client-2").find(".my-kefu-ftop");
                if (scrollTop > 0) {
                    eltop.show();
                } else {
                    eltop.hide();
                }
            });
            $("#client-2").find(".my-kefu-ftop").click(function() {
                var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
                if (scrollTop > 0) {
                    $("html,body").animate({
                        scrollTop: 0
                    }, "slow");
                }
            }); 
});
    
