jQuery(document).ready(function () { //jQuery(".bigsotext").lettering(); //jQuery(".b-f-tc h3 div").lettering("words"); jQuery(".loading-text h3").lettering("words"); }); //top fixed $(window).scroll(function () { if ($(window).scrollTop() > 0) { $('#c_static_001-16420726227420').addClass('active') } else { $('#c_static_001-16420726227420').removeClass('active') } }) $('#c_static_001-16420726227420').mouseenter(function () { $('#c_static_001-16420726227420').addClass('active') }).mouseleave(function () { if ($(window).scrollTop() == 0) { $('#c_static_001-16420726227420').removeClass('active') } }); if ($('.ny_breadcrumb').hasClass('nobanner')) { $('#c_static_001-16420726227420').addClass('navbai') } $(function () { $(".head_lan .lan_con").hover(function () { $(this).find(".lan_list").addClass("cur"); }, function () { $(this).find(".lan_list").removeClass("cur"); }) }); //鎼滅储涓嬫媺 $('.head_search').click(function () { if ($('#search_warp').hasClass('active')) { $('#search_warp').removeClass('active'); } else { $('#search_warp').addClass('active'); } }); $('.closeFrom').click(function () { $('#search_warp').removeClass('active'); }); //products details $(document).ready(function () { $('.sp-wrap').smoothproducts(); }); $(function () { //home prolist var indProlist = new Swiper('.ind_prolist .swiper-container', { loop: true, speed: 1800, slidesPerView: 4, spaceBetween: 30, slidesPerGroup: 4, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?80 480: { slidesPerView: 2, spaceBetween: 10, slidesPerGroup: 2 }, //褰撳搴﹀皬浜庣瓑浜?80 980: { slidesPerView: 2, spaceBetween: 20, slidesPerGroup: 2 }, //褰撳搴﹀皬浜庣瓑浜?200 1200: { slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 3 } }, pagination: { el: '.ind_prolist_p .swiper-pagination', clickable: true, }, observer: true, observeParents: true, }); //home prolist01 var HotP01 = new Swiper('.hot_p01 .swiper-container', { slideActiveClass: 'active', slidesPerView: 4, slidesPerGroup: 1, spaceBetween: 30, speed: 800, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?20 767: { slidesPerView: 1.2, slidesPerGroup: 1, centeredSlides: true, spaceBetween: 10 }, 1024: { slidesPerView: 2.2, slidesPerGroup: 2, spaceBetween: 15 } }, navigation: { nextEl: '.hot_p01 .swiper-button-next', prevEl: '.hot_p01 .swiper-button-prev', }, observer: true, observeParents: true, }); //home prolist02 var HotP02 = new Swiper('.hot_p02 .swiper-container', { slideActiveClass: 'active', slidesPerView: 4, slidesPerGroup: 1, spaceBetween: 30, speed: 800, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?20 767: { slidesPerView: 1.2, slidesPerGroup: 1, centeredSlides: true, spaceBetween: 10 }, 1024: { slidesPerView: 2.2, slidesPerGroup: 2, spaceBetween: 15 } }, navigation: { nextEl: '.hot_p02 .swiper-button-next', prevEl: '.hot_p02 .swiper-button-prev', }, observer: true, observeParents: true, }); //home prolist03 var HotP03 = new Swiper('.hot_p03 .swiper-container', { slideActiveClass: 'active', slidesPerView: 4, slidesPerGroup: 1, spaceBetween: 30, speed: 800, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?20 767: { slidesPerView: 1.2, slidesPerGroup: 1, centeredSlides: true, spaceBetween: 10 }, 1024: { slidesPerView: 2.2, slidesPerGroup: 2, spaceBetween: 15 } }, navigation: { nextEl: '.hot_p03 .swiper-button-next', prevEl: '.hot_p03 .swiper-button-prev', }, observer: true, observeParents: true, }); //related news if (window.innerWidth > 768) { var LastNews = new Swiper('.latest_news .swiper-container', { slideActiveClass: 'active', slidesPerView: 3, slidesPerGroup: 1, spaceBetween: 30, speed: 1000, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?20 1024: { slidesPerView: 2.2, slidesPerGroup: 2, spaceBetween: 15 }, 767: { slidesPerView: 1.2, slidesPerGroup: 1, centeredSlides: true, spaceBetween: 20 } }, navigation: { nextEl: '.latest_news .swiper-button-next', prevEl: '.latest_news .swiper-button-prev', }, observer: true, observeParents: true, }); } //related products var reproSwiper = new Swiper('.repro_con.swiper-container', { autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, loop: false, slideActiveClass: 'active', initialSlide: 0, //榛樿鏄剧ず绗嚑寮 mousewheel: false, slidesPerView: 3, spaceBetween: 30, speed: 600, observer: true, observeParents: true, watchSlidesVisibility: true, centerInsufficientSlides: true, navigation: { nextEl: '.repro_con .swiper-button-next', prevEl: '.repro_con .swiper-button-prev', }, scrollbar: { el: '.repro_con .swiper-scrollbar', }, pagination: { el: '.repro_con .swiper-pagination', clickable: true, }, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 5 }, 1024: { slidesPerView: 3, spaceBetween: 20 } } }); var NewproList = new Swiper('.newproList .swiper-container', { slideActiveClass: 'active', slidesPerView: 4, slidesPerGroup: 4, spaceBetween: 30, speed: 1000, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?20 1024: { slidesPerView: 2.2, slidesPerGroup: 2, spaceBetween: 15 }, 767: { slidesPerView: 1.2, slidesPerGroup: 1, centeredSlides: true, spaceBetween: 20 } }, navigation: { nextEl: '.newproList .swiper-button-next', prevEl: '.newproList .swiper-button-prev', }, pagination: { el: '.newproList .swiper-pagination', clickable: true, }, observer: true, observeParents: true, }); }); $(function () { var urlName = window.location.pathname; //鑾峰彇鍦板潃鏍忎腑鏂囦欢鍚嶆垨璺緞銆 $('.NavList_a1 li a').each(function () { //閬嶅巻褰撳墠缃戦〉瀵艰埅鎴栧垎绫 var urlHref = $(this).attr('href'); //鑾峰彇瀵艰埅閾炬帴鍦板潃href鍊 if (urlName.indexOf(urlHref) >= 0) { //妫€娴嬫枃浠跺悕鎴栬矾寰勪腑鏄惁鍖呭惈褰撳墠閾炬帴鍊 $(this).addClass('active'); } }); }); $(function () { // subnav light var nySubnav = new Swiper('.NavList_a1.swiper-container', { slidesPerView: "auto", navigation: { nextEl: '.NavList_a1 .swiper-button-next', prevEl: '.NavList_a1 .swiper-button-prev', }, observer: true, observeParents: true, }); }); var productseries = { percent: 0, timers: "", index: function () { var _w = $('body').width(), _w_2 = _w / 2, _h_series = $('.citrus .R .bottom').height(); //绯诲垪 var $productLis = $('.citrus .productLis .li'), productLis_len = $('#visualTCon').data('len'), $pageNumber = $('.pageNumber') $pageNumber.html('1 / ' + productLis_len) var time = 4000; var transition_time = 1200; var time_with_trans = (time + transition_time) / 1000; //绯诲垪鍙充笅鍥 $('.productLis .pic').attr('data-swiper-parallax-x', _w_2); $('.citrus .R .bottom .pic').attr('data-swiper-parallax-y', _h_series); var productShow = new Swiper('.productShow', { loop: true, parallax: true, noSwiping: true, direction: 'vertical', speed: transition_time }); //鍙充笂鏂囧瓧 var productTXTShow = new Swiper('.productText', { loop: true, parallax: true, noSwiping: true, direction: 'vertical', speed: transition_time }); //鍒囨崲鏁堟灉鍙婃椂闂存帶鍒 var timer = new TweenMax.to('.timerCurrent', time / 1000, { css: { transform: 'scaleX(1)' }, ease: Linear.easeNone, onComplete: function () { productShow.slideNext(); productTXTShow.slideNext(); productLis.slideNext(); } }); timer.pause(); //绯诲垪宸︿晶澶у浘 var productLis = new Swiper('.productLis', { loop: true, noSwiping: true, parallax: true, speed: transition_time, on: { init: function () { timer.restart(); }, transitionStart: function () { timer.duration(time_with_trans); timer.restart(); $pageNumber.html((this.realIndex + 1) + ' / ' + productLis_len); }, slideChangeTransitionStart: function () { for (var i = 0; i < productLis_len; i++) { $productLis.find(i).find('.pic').css({ 'transform': 'translateX(0)' }); } } }, observer:true, observeParents:true }); $('.citrus .btnR').click(function (e) { productShow.slideNext(); productTXTShow.slideNext(); productLis.slideNext(); }); $('.citrus .btnL').click(function (e) { productShow.slidePrev(); productTXTShow.slidePrev(); productLis.slidePrev(); }); productLis.on('slideChange', function () { var current_slide = this.previousIndex; var new_slide = this.realIndex; }); } } productseries.index();