$(function(){ if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE6.0") { window.location.href = "/ie6.html" } else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE7.0") { window.location.href = "/ie6.html" } else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0") { window.location.href = "/ie6.html" } // window.document.oncontextmenu = function () { return false; } /(iPhone|iPad|iPhone OS|Phone|iPod|iOS)/i.test(navigator.userAgent)&&(head=document.getElementsByTagName("head"),viewport=document.createElement("meta"),viewport.name="viewport",viewport.content="target-densitydpi=device-dpi, width=640px, user-scalable=no",head.length>0&&head[head.length-1].appendChild(viewport)); $("a").focus(function () { //去掉边线 $(this).blur(); }); //视频播放 $("#vedio-btn1").click(function () { layout(1); $(".showVedio2").show(); var x = document.getElementById("video0"); if (x.paused) { x.play(); } }); $(".flash").click(function () { layout(1); $(".showVedio2").show(); var x = document.getElementById("video0"); if (x.paused) { x.play(); } }); $(".showVedio2 .close").click(function () { var x = document.getElementById("video0"); x.pause(); $(".showVedio2").hide(); layout(0); }); showimg(); //头部搜索 $(".header .search-box .butn").on('click', function () { if ($(this).hasClass('hov')) { $(this).removeClass('hov'); $(this).siblings('.search_main').stop().animate({ width: 0 }, 500); } else { $(this).addClass('hov'); $(this).siblings('.search_main').stop().animate({ width: 360 }, 500); } }); search()//搜索 //$('.produc_fix').hover(function () { // $(this).toggleClass("product_fix_no"); // $('.product_fix_ul').toggleClass("product_fix_on") //}) //产品下拉 $(".product_1 .box1 .body").click(function () { $(this).find("ul").toggle(); $(this).toggleClass("hov"); }) $(document).mouseup("click", function (e) { var _con = $('.header .search-box'); //这个目标区域就是弹框 if (!_con.is(e.target) && _con.has(e.target).length === 0) { $(".header .share-sub").stop().animate({ width: 0 }, 0); $(".header .search-box .butn").removeClass('hov'); } }) $('.ts-btn').click(function(){ var id = $(this).data('id'); $('.weui_mask').eq(id).show(); $('.weui_dialog').eq(id).show(); }); $('.weui_btn_dialog').click(function(){ $('.weui_mask').hide(); $('.weui_dialog').hide(); }); $(".ewmbox .close").click(function () { $(".ewmbox").hide(); layout(0); }); }) //关于我们视频播放 function toggleSound() { var video = document.getElementById('video0'); if (video.paused) { //如果已暂停则播放 $('.sub_flash .btn').hide(); video.play(); //播放控制 currentTime=video.duration;// 得到视频播放时间; setTimeout(function () { $('.sub_flash .btn').show(); }, currentTime*1000); } } menuer(); // 侧边导航 function menuer(){ var $window = $(window), $document = $(document), $html = $('html'), $body = $('body'), $wrapper = $('#wrapper'), $nav = $('#navigation'); var isTouch = 'ontouchstart' in window; $html.addClass(isTouch ? 'isTouch' : 'noTouch'); $('#nav-toggle').on('click', function() { $html.toggleClass('navActive'); return false; }); $nav.find('.toggle').on('click', function() { $html.removeClass('navActive'); return false; }).end().on('click', function(e) { e.stopPropagation(); }); $wrapper.on('click', function() { $html.removeClass('navActive'); }); } function topSearchUnit() { var _kw = $('#keyWord').val(); if (_kw != '' && _kw != "输入关键字搜索产品") { //20为分页条数 window.location.href = '/searchresults/' + _kw + '/13/1/20'; } else { alert("输入关键字搜索产品"); $("#keyWord").focus(); } } function SubMessage() { var username = $("#username").val(); var s_province=$("#s_province").val(); var s_city=$("#s_city").val(); var s_county=$("#s_county").val(); var tel = $("#tel").val(); if (username == "" || username == "联系人") { alert("联系人不能为空"); $("#username").focus(); return false; } if (tel == "" || tel == "手机") { alert("您的手机不能为空"); $("#tel").focus(); return false; } if(s_province=="省份"){ alert("请选择省份"); document.getElementById('s_province').focus(); return false; } if(s_city=="地级市"){ alert("请选择地级市"); document.getElementById('s_city').focus(); return false; } if(s_county=="市、县级市"){ alert("请选择市、县级市"); document.getElementById('s_county').focus(); return false; } $("#field_demo").val(s_province+"-"+s_city+"-"+s_county); var length = tel.length; if (length == 11) { $.ajax({ url: '/ajax/message/send', type: 'POST', data: $(form).serialize(), dataType: 'JSON', success: function (result) { // me.holdSubmit(false); alert(result.msg); if (result.flag) { $(form)[0].reset(); } }, error: function (xhr) { //me.holdSubmit(false); alert(xhr.responseText); } }); } else { alert("您的手机不正确"); $("#tel").focus(); return false; } } function search() { $('#J-Global-SearchSubmit').bind('click', function () { var _kw = $.trim($('#J-Global-SearchTxt').val()); // alert(_kw); if (_kw != '' && _kw != "请输入关键词搜索") { window.location.href = '/searchresults/' + encodeURIComponent(_kw) + '/0/1/20'; } else { alert('请输入关键词搜索'); $('#J-Global-SearchTxt').focus(); } }); $(document).keydown(function (event) { event = event || window.event || arguments.callee.caller.arguments[0]; if (event.keyCode == 13 && $('#J-Global-SearchTxt').is(':focus')) { $("#J-Global-SearchSubmit").trigger("click"); } }); } function showimg() { if (!$("#showimg").length) { return false; } $('#showimg').banqh({ box: "#showimg",//总框架 pic: "#bigimg",//大图框架 pnum: "#smallimg",//小图框架 prev_btn: ".prev",//小图左箭头 next_btn: ".next",//小图右箭头 autoplay: true,//是否自动播放 interTime: 5000,//图片自动切换间隔 delayTime: 400,//切换一张图片时间 order: 0,//当前显示的图片(从0开始) picdire: true,//大图滚动方向(true为水平方向滚动) mindire: true,//小图滚动方向(true为水平方向滚动) min_picnum:4,//小图显示数量 pop_up: false//大图是否有弹出框 }); } function layout(u) { var $obj = $('
'); if (u == 0) { $('.dialog-layout').remove(); } else { if (!$('.dialog-layout').length) { $obj.appendTo('body').show(); } } } function share(){ window._bd_share_config={ "common":{ "bdSnsKey":{}, "bdText":"", "bdMini":"1", "bdMiniList":["sqq","qzone","weixin","tsina"], "bdPic":"0","bdStyle":"0","bdSize":"16" }, "share": {} }; with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)]; } $(function () { nav(); //下拉 banner(); //首页banner share(); showimg(); $("a").focus(function () { $(this).blur(); }); $(".rightFix .share").hover(function () { //侧边栏 $(this).find(".box").slideDown(); }, function () { $(this).find(".box").slideUp(); }); $(".fix_top").click(function () { $("body, html").stop().animate({ "scrollTop": 0 }); $('#navLi').find('li').eq(0).trigger("click"); });//top }); function _PreLoadImg(b,e){var c=0,a={},d=0;for(src in b){d++}for(src in b){a[src]=new Image();a[src].onload=function(){if(++c>=d){e(a)}};a[src].src=b[src]}}; function nav(){ $("#nav li.item").hover(function() { $(this).children('.sub-box').stop(true,true).slideDown(); }, function() { $(this).children('.sub-box').stop(true,true).slideUp(); }); } function banner() { if (!$("#banner").length || $("#banner .list li").length <= 1) { return false; } var _this = $("#banner"), me = $("#banner .list"), tip = $("#banner .tip"), prev = _this.find(".prev"), next = _this.find(".next"), t, interval = 5000, speed = 1000, speed2 = 700, n = 0, N = me.children("li").length; me.find("li:gt(0)").hide(); if ($("#banner .tip").length) { var htmlTip = ""; for (var i = 0; i < N; i++) { if (i == 0) { htmlTip += "
  • "; } else { htmlTip += "
  • "; } } tip.append(htmlTip); } var func = function () { if (n >= N - 1) { n = 0; } else { n++; } me.children("li").eq(n).css({ "z-index": 2 }).stop(true,true).fadeIn(speed).siblings("li").css({ "z-index": 1 }).stop(true,true).fadeOut(speed2); if ($("#banner .tip").length) { tip.children("li").eq(n).addClass("cur").siblings("li").removeClass("cur"); } } t = setInterval(func, interval); next.bind("click", function () { clearInterval(t); func(); }); prev.bind("click", function () { clearInterval(t); n -= 2; n < -1 ? n = N - 2 : n; func(); }); tip.children("li").mouseover(function () { clearInterval(t); n = $(this).index() - 1; func(); }); _this.hover(function () { clearInterval(t); }, function () { t = setInterval(func, interval); }); } $("#lag_show").on("click",function(){ $(".lag_box").toggleClass("on",""); }) !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b(require,exports,module):a.CountUp=b()}(this,function(){var d=function(a,b,c,d,e,f){for(var g=0,h=["webkit","moz","ms","o"],i=0;ithis.endVal,this.frameVal=this.startVal,this.decimals=Math.max(0,d||0),this.dec=Math.pow(10,this.decimals),this.duration=1e3*Number(e)||2e3;var k=this;this.version=function(){return"1.5.3"},this.printValue=function(a){var b=isNaN(a)?"--":k.formatNumber(a);"INPUT"==k.d.tagName?this.d.value=b:"text"==k.d.tagName?this.d.textContent=b:this.d.innerHTML=b},this.easeOutExpo=function(a,b,c,d){return 1024*c*(-Math.pow(2,-10*a/d)+1)/1023+b},this.count=function(a){k.startTime||(k.startTime=a),k.timestamp=a;var b=a-k.startTime;k.remaining=k.duration-b,k.frameVal=k.options.useEasing?k.countDown?k.startVal-k.easeOutExpo(b,0,k.startVal-k.endVal,k.duration):k.easeOutExpo(b,k.startVal,k.endVal-k.startVal,k.duration):k.countDown?k.startVal-(k.startVal-k.endVal)*(b/k.duration):k.startVal+(k.endVal-k.startVal)*(b/k.duration),k.frameVal=k.countDown?k.frameValk.endVal?k.endVal:k.frameVal,k.frameVal=Math.round(k.frameVal*k.dec)/k.dec,k.printValue(k.frameVal),bk.endVal,k.rAF=requestAnimationFrame(k.count)},this.formatNumber=function(a){a=a.toFixed(k.decimals),a+="";var b,c,d,e;if(b=a.split("."),c=b[0],d=b.length>1?k.options.decimal+b[1]:"",e=/(\d+)(\d{3})/,k.options.useGrouping)for(;e.test(c);)c=c.replace(e,"$1"+k.options.separator+"$2");return k.options.prefix+c+d+k.options.suffix},k.printValue(k.startVal)};return d});