function addBookmark(_this) { try { var _title = document.title; var url = document.URL; if (window.sidebar) { var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf("firefox") > -1 && ua.match(/firefox\/([\d.]+)/)[1] == "23.0") { _this.setAttribute("title", _title) } else { window.sidebar.addPanel(_title, url, "") } } else if (window.opera && window.print) { var __mbm = document.createElement("a"); __mbm.setAttribute("rel", "sidebar"); __mbm.setAttribute("href", url); __mbm.setAttribute("title", _title); __mbm.click() } else if (document.all) { window.external.AddFavorite(url, _title); return } else { alert("浏览器不支持该操作,尝试快捷键 Ctrl + D !") } } catch (e) { alert("浏览器不支持该操作,尝试快捷键 Ctrl + D !") } } jQuery(".fullSlide").slide({ titCell:".hd li", mainCell:".bd ul", effect:"fold", autoPlay:true, delayTime:700 }); var key = document.getElementById("key"); function searchInfo() { var base = $('head').data('base'); if (key.value) { location.href = base + "search.htmp?key=" + key.value; } else { alert('请输入您要搜索的关键词!'); } } jQuery(".pin").slide({ titOnClassName:'cur', titCell: ".pin_nav ul li", mainCell: ".pin_nr", autoPlay:false,effect:"fade" }); jQuery(".case").slide({ mainCell:".case_nr .case_c",vis:1,prevCell:".casenext",nextCell:".caseprev",effect:"leftLoop"}); jQuery(".coo").slide({mainCell:".coo_c ul",autoPlay:true,effect:"leftMarquee",vis:5,interTime:50,trigger:"click"}); jQuery(".xc1").slide({mainCell:".xcimg1 ",autoPlay:true,effect:"leftMarquee",vis:3,interTime:50}); jQuery(".xc1").slide({mainCell:".xcimg2 ",autoPlay:true,effect:"leftMarquee",vis:3,interTime:50}); jQuery(".xc").slide({ titOnClassName:'cur', titCell: ".xc_nav ul li", mainCell: ".xc_nr", autoPlay: false,effect:"fade" }); jQuery(".news").slide({ titOnClassName:'cur', titCell: ".news_nav ul li", targetCell:".newsspan span", mainCell: ".news_nr", autoPlay:false,effect:"fade" }); jQuery(".wt").slide({mainCell:".wt_c",autoPlay:true,effect:"topMarquee",vis:4,interTime:60,trigger:"click"}); $(".ftop").click(function(){var speed = 200; //滑动的速度 $('body,html').animate({scrollTop:0} ,speed);return false;} ); function searchInfo(){var searchKey = document.getElementById("key").value;var base = $('head').data('base');location.href = base + "search.htmp?key=" + searchKey;} $('.m4-t-sear2-txt p').click(function(){$('.m4-t-sear2').hide();} ); $(".m4-t-sear2-inp-but").click(function(){searchInfo();} ); function keydown(event){var e = event || window.event; if (e && e.keyCode == 13){searchInfo();} } ; $(" .topWrap h2 , .bt01 ,.pinz h2").fadeThis({speed:800}); $(window).fadeThis(); $(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({ left: 77-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'); var divDom = $(this).children('div'); var maxWidth = divDom.width(); if (pic.length > 0) { pic.hide(); } clearTimeout(time); var divDom = $(this).children('div'); $(this).stop().animate({ left: 0 }, "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"); } }); });