$(function(){ //婊戝嚭瀵艰埅 var timer; $(".nav-hover").hover(function(){ var $this = $(this); timer = setTimeout(function(){ $this.find(".drop-down").fadeIn("fast"); }, 300); }, function(){ clearTimeout(timer); $(this).find(".drop-down").fadeOut(); }) //涓嫳鏂 $(".lang-box").hover(function(){ $(this).css({"height": "50px", "border-radius": "6px"}); }, function(){ $(this).css({"height": "24px", "border-radius": "12px"}); }) //棣栭〉banner if($("#swiperBanner").length > 0){ var swiperBanner = new Swiper("#swiperBanner", { loop : true, autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: false, //鎵嬪姩鎿嶄綔鍚庝粛鍙嚜鍔ㄨ疆鎾 autoplayDisableOnInteraction: true, }, pagination: { el: ".swiper-pagination", clickable: true }, }); } //浼佷笟鏂囧寲banner if($("#swiperCulture").length > 0){ var swiperCulture = new Swiper("#swiperCulture", { watchSlidesProgress: true, slidesPerView: "auto", centeredSlides: true, loop: true, loopedSlides: 3, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, on: { // progress: function(progress) { // for (i = 0; i < this.slides.length; i++) { // var slide = this.slides.eq(i); // var slideProgress = this.slides[i].progress; // if (Math.abs(slideProgress) > 1) { // modify = (Math.abs(slideProgress) - 1) * 0.4 + 1; // } // translate = slideProgress * modify * 318 + "px"; // scale = 1 - Math.abs(slideProgress) / 5; // zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); // slide.transform("translateX(" + translate + ") scale(" + scale + ")"); // slide.css("zIndex", zIndex); // slide.css("opacity", 1); // if (Math.abs(slideProgress) > 3) { // slide.css("opacity", 0); // } // } // }, // setTransition: function(transition) { // for (var i = 0; i < this.slides.length; i++) { // var slide = this.slides.eq(i) // slide.transition(transition); // } // } } }) } //棣栭〉鏂伴椈鍒囨崲 $("#tabSwitch").find(".tab").eq(0).addClass("active"); $("#tabSwitch").siblings(".panel-wrap").eq(0).addClass("panel-block"); $("#tabSwitch .tab").on("click", function(){ let $this = $(this), index = $this.index(), $par = $("#tabSwitch"), $sib = $par.siblings(".panel-wrap"); if(!$this.hasClass("active")){ $this.addClass("active").siblings(".tab").removeClass("active"); $sib.removeClass("panel-block").eq(index).addClass("panel-block"); $par.siblings(".arrow").animate({"left": index*275+170 + "px"}, 0); } }) //鑾峰彇url鍙傛暟 function getQueryVariable(variable){ var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0; i