if(navigator.useragent.indexof('ipad') != -1){ document.write('\n'); }else if(navigator.useragent.indexof('mobile') != -1){ document.write('\n'); }else if(navigator.useragent.indexof('android') != -1){ document.write('\n'); }else{ document.write('\n'); } new wow().init() //禁止ios10 自带浏览器放大缩小 window.onload=function () { document.addeventlistener('touchstart',function (event) { if(event.touches.length>1){ event.preventdefault(); } }); var lasttouchend=0; document.addeventlistener('touchend',function (event) { var now=(new date()).gettime(); if(now-lasttouchend<=300){ event.preventdefault(); } lasttouchend=now; },false) }; $(window).on('scroll', function() { if ($(document).scrolltop() < 90) { $('.header .header-top').removeclass('header-topbg'); } else { $('.header .header-top').addclass('header-topbg'); } }); $(function(){ $('.header-top .nav').click(function(){ if($(this).hasclass('cur')){ $(this).removeclass('cur'); $('.nav-holder').fadeout(); $('.nav-holder .nav-list').addclass('nav-load'); } else{ $(this).addclass('cur'); $('.nav-holder').fadein(); $('.nav-holder .nav-list').removeclass('nav-load'); } }); }); /*$(function(){ $('.about a').on('click',function() { $('.mask').fadein(200); }); $('.photo-mask .close').on('click',function() { $('.mask').fadeout(200); }); });*/ $(function(){ $('.about a').on('click',function() { $(".mask").css({ "z-index": 1001, "opacity": "1" }); }); $('.mask .close').on('click',function() { $(".mask").css({ "z-index": "-1", "opacity": "0" }); }); }); $(function(){ var swiper = new swiper('.industry .swiper-container-4', { slidesperview: 3, spacebetween: 45, pagination: { el: '.swiper-pagination', clickable: true, }, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, }); }); $(function(){ $(".p-about-1 .down").hover(function(){ $(".p-about-1 .content").animate({ margintop:-$(".p-about-1 .content").height()+$(".p-about-1 .frame").height()+"px" },5000) },function(){ $(".p-about-1 .content").stop() }) $(".p-about-1 .up").hover(function(){ $(".p-about-1 .content").animate({ margintop:0 },5000) },function(){ $(".p-about-1 .content").stop() }) }) function animatecounters() { $('.counter:in-viewport').each(function() { var $t = $(this), n = $t.attr("data-value"), r = parseint($t.attr("data-speed"), 10); if (!$t.hasclass("already-animated")) { $t.addclass("already-animated"); $({ countnum: $t.text() }).animate({ countnum: n }, { duration: r, easing: "linear", step: function() { $t.text(math.floor(this.countnum)); }, complete: function() { $t.text(this.countnum); } }); } }); } $(document).ready(function() { animatecounters(); }); $(window).scroll(function() { animatecounters(); }); $(document).ready(function(){ $(".wechat").hover(function(){ $(this).find(".wechat-img").fadein(200); $('.wechat-img').removeclass('location') },function(){ $(this).find(".wechat-img").fadeout(200); /* fading out the sub menu */ $('.wechat-img').addclass('location') }); }); $(function(){ $("a[href^='#']").click(function(){ $('html, body').animate({scrolltop: $(this.hash).offset().top-90}, 400); }); $(".p-news li:nth-child(3n),.p-project li:nth-child(3n),.p-newspaper li:nth-child(4n),.p-culture-1 li:nth-child(3n)").css({"margin-right":"0"}); $(".p-contact-2 .map-list li:nth-last-child(1)").css({"border":"none"}); $('#culture-canvas').polygonizr(); /*$(window).load(function(){ $('.load').fadeout(); })*/ }); /*var ai=0; function add(ai){ var num =$(".load-num"); num.html(ai+" %"); } function xh(){ if(ai>100){ $('.load').fadeout(); return; } if(ai<=100){ settimeout("xh()",100) add(ai); ai++; } } $(window).ready(function(){ xh(); });*/