
       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.src = $('.ty-banner-1 img').attr('src');
            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');
            }
           
        });
    

        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() {
            $(".sidenavcur").parent('ul').show();
            $(".sidenavcur").parents('.jm_fdh-txt-div').show();
            $('.jm_fdh-txt h4').on('mouseover', function() {
                $(this).next(".jm_fdh-txt-div").stop().fadeIn(100).siblings('.jm_fdh-txt-div').fadeOut(100).find('ul').fadeOut(100);
            });
            $('.jm_fdh-txt-div p').on('mouseover', function() {
                $(this).next("ul").fadeIn(100).siblings('ul').hide();

            });
           
        })
    

        $(function() {
            $('.p1-contact-1-tt7').on({
                'mouseover': function() {
                    $(".p1-contact-1-txt p span").show();
                },
                'mouseout': function() {
                    $(".p1-contact-1-txt p span").hide();
                }
            })
        })
    

        $(function() {
            var time;
            var winHeight = $(window.parent).height() || top.window.document.body.clientHeight;
            $('.client-2').css({
                'top': (winHeight - $('#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 > winHeight) {
                    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");
                }
            }); 
});
    
