var key = document.getelementbyid("key"); function searchinfo() { var base = $('head').data('base'); if (key.value) { location.href = base + "search.php?key=" + key.value; } else { alert('请输入您要搜索的关键词!'); } } key.addeventlistener('keypress', function(event) { var keycode = event.keycode || event.which; if (keycode == "13") { searchinfo(); } }); function searchlink(el) { var href = $(el).attr("href"); location.href = href ? href : "/search.php?key=" + $(el).html(); } jquery(".h_nav").slide({ type: "menu", titcell: ".nul li", targetcell: ".sub", effect: "slidedown", delaytime: 300, triggertime: 0, returndefault: true }); jquery(".fullslide").slide({ titcell:".hd ul", maincell:".bd ul", effect:"fold", autoplay:true,autopage:true,vis:1, intertime:3000}); $(document).ready(function () { var $tab1_li = $('#tab1 .pjxl_nr_tit li'); $tab1_li.hover(function () { $(this).addclass('active1').siblings().removeclass('active1'); var index = $tab1_li.index(this); $('div.pjxl_list > div').eq(index).show().siblings().hide(); }); }); jquery(".schy_box").slide({maincell:"#simgs1",autopage:true,effect:"left",autoplay:true,vis:7}); $(document).ready(function () { var $tab2_li = $('#tab2 .ys_nr_tit li'); $tab2_li.hover(function () { $(this).addclass('active2').siblings().removeclass('active2'); var index = $tab2_li.index(this); $('div.ys_list > div').eq(index).show().siblings().hide(); }); }); $(function () { var cc = new scrollpic(); cc.scrollcontid = "simgs2"; // 内容容器id cc.framewidth = 1180; //显示框宽度 cc.pagewidth = 1180; //翻页宽度 cc.arrleftid = "left2"; //左箭头id cc.arrrightid = "right2"; //右箭头id cc.speed = 10; //移动速度(单位毫秒,越小越快) cc.space = 10; //每次移动像素(单位px,越大越快) cc.autoplay = true; //自动播放 cc.autoplaytime = 1; //自动播放间隔时间(秒) cc.initialize(); //初始化 }); if (!(/msie [6|7|8|9]/i.test(navigator.useragent))){ new wow().init(); }; //数字增加动画 $.fn.countto = function(options) { options = $.extend({}, $.fn.countto.defaults, options || {}); var loops = math.ceil(options.speed / options.refreshinterval), increment = (options.to - options.from) / loops; return $(this).each(function() { var _this = this, loopcount = 0, value = options.from, interval = setinterval(updatetimer, options.refreshinterval); function updatetimer() { value += increment; loopcount++; $(_this).html(value.tofixed(options.decimals)); if (typeof(options.onupdate) == 'function') { options.onupdate.call(_this, value); } if (loopcount >= loops) { clearinterval(interval); value = options.to; if (typeof(options.oncomplete) == 'function') { options.oncomplete.call(_this, value); } } } }) }; function countadd(){ var count = 0; count++; $('.ibrand-num.ani li').each(function(){ dataperc = $(this).attr('data-perc'), $(this).find('.num').delay(6000).countto({ from: 0, to: dataperc, speed: 2500, refreshinterval: 150 }); }); } function scrolltop(){ var top = $(window).scrolltop(); var htop = $('.shi').offset().top - $(window).height()/2; if(top>=htop){ countadd(); $('.ibrand-num').removeclass('ani'); } } scrolltop(); $(window).scroll(function(){ scrolltop(); }); $(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"); } }); });