$(function () { var mySwiper; var mySwiper1; var mySwiper2; var mySwiper3; var mySwiper4; var mySwiper5; var mySwiper6; var mySwiper7; var mySwiper8; var mySwiper9; var mySwiper10; var pagew = $(document).outerWidth(true) + (window.innerWidth - document.body.clientWidth); var pageh = $(window).innerHeight(); $(window).on("resizeEnd", function (event) { repage_com(); }); try { var _topfs_v = $(document).scrollTop(); var previousScrollPos = 0; var scrollTimeout = null; $(window).scroll(function () { _topfs_v = $(document).scrollTop(); topfr_fun(_topfs_v); }) topfr_fun(_topfs_v); function topfr_fun(obj) { var currentScrollPos = $(this).scrollTop(); if (currentScrollPos > previousScrollPos) { $(".topfr").addClass("topDown"); } else if (currentScrollPos < previousScrollPos) { if (obj > 100) { $(".topfr").removeClass("topDown").addClass("on"); } else { $(".topfr").removeClass("topDown").removeClass("on"); } } previousScrollPos = currentScrollPos; var currentScrollPos = $(this).scrollTop(); $(".sharefr").removeClass("active"); if (scrollTimeout) { clearTimeout(scrollTimeout); } scrollTimeout = setTimeout(function () { if (obj > 100) { $(".sharefr").addClass("active"); } else { $(".sharefr").removeClass("active"); } }, 500); } } catch (e) { } try { mySwiper1 = new Swiper('.banner_slide', { slidesPerView: "1", speed: 1000, effect: 'fade', //loop: true, lazy: { loadPrevNext: true, loadPrevNextAmount:2, }, autoplay: { delay: 5800, disableOnInteraction: false, }, pagination: { el: '.bs_sp', clickable: true, }, on: { init: function (sw) { $(".banner_slide .swiper-slide").eq(0).find(".bs_c").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionStart: function (sw) { var num = sw.previousIndex; $(".banner_slide .swiper-slide").eq(num).find(".bs_c").stop(true, true).css({ "opacity": "0" }); var num = sw.activeIndex; $(".banner_slide .swiper-slide").eq(num).find(".bs_c").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionEnd: function (sw) { } } }); } catch (e) { } try { var my2_sb = $(".in_03_c .b1").innerWidth(); mySwiper2 = new Swiper('.in03c01_slide_01', { slidesPerView: "auto", speed: 6000, spaceBetween: my2_sb, loopAdditionalSlides: 10, autoplay: { delay: 1, }, loopFillGroupWithBlank: true, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, loop: true }); mySwiper3 = new Swiper('.in03c01_slide_02', { slidesPerView: "auto", speed: 6000, spaceBetween: my2_sb, loopAdditionalSlides: 10, autoplay: { delay: 1, }, loopFillGroupWithBlank: true, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, loop: true }); mySwiper4 = new Swiper('.in03c01_slide_03', { slidesPerView: "auto", speed: 6000, spaceBetween: my2_sb, loopAdditionalSlides: 10, autoplay: { delay: 1, }, loopFillGroupWithBlank: true, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, loop: true }); } catch (e) { } try { mySwiper5 = new Swiper('.btn01_slide', { slidesPerView: "auto", speed: 1000, autoplay: { delay: 3000, }, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.btn01_sp', clickable: true, }, }); } catch (e) { } try { mySwiper6 = new Swiper('.pli01_slide', { slidesPerView: "auto", centerInsufficientSlides:true, speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.btn01_sp', clickable: true, }, }); } catch (e) { } try { $(".pli03c_c ul li").each(function () { $(this).hover( function () { $(".pli03c_c ul li").removeClass("prevon"); $(this).prev().addClass("prevon"); }, function () { $(".pli03c_c ul li").removeClass("prevon"); } ); }); } catch (e) { } try { $(".p06_click").click(function () { if (!$(this).hasClass("active")) { $(this).addClass("active"); $(".pli_07").addClass("active"); } else { $(this).removeClass("active"); $(".pli_07").removeClass("active"); } }); } catch (e) { } try { mySwiper7 = new Swiper('.cxq01fl_slide', { slidesPerView:1, centerInsufficientSlides: true, speed: 1000, autoplay: { delay: 3000, }, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.cxq01fl_sp', clickable: true, }, }); } catch (e) { } try { mySwiper8 = new Swiper('.ns01c_slide', { slidesPerView: 1, centerInsufficientSlides: true, speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, scrollbar: { el: '.ns01c_sol', draggable: true, }, on: { init: function (sw) { $("1.ns01c_slide .swiper-slide").eq(0).find(".an").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionStart: function (sw) { var num = sw.previousIndex; $("1.ns01c_slide .swiper-slide").eq(num).find(".an").stop(true, true).css({ "opacity": "0" }); var num = sw.activeIndex; $("1.ns01c_slide .swiper-slide").eq(num).find(".an").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionEnd: function (sw) { } } }); } catch (e) { } try { var my9_sp = $(".cpbj02_t .b1").width(); mySwiper9 = new Swiper('.cpbj02t_slide', { slidesPerView:"auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my9_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.cpbj02t_sp', clickable: true, }, }); } catch (e) { } try { var my10_sp = $(".scjd_05 .p2 .b1").width(); mySwiper10 = new Swiper('.scjd05_slide', { slidesPerView:"auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my10_sp, lazy: { loadPrevNext: true, loadPrevNextAmount:3 }, navigation: { prevEl: '.scjd05_prev', nextEl: '.scjd05_next', }, }); } catch (e) { } try { var my10_sp = $(".scjd_05 .p2 .b1").width(); mySwiper11 = new Swiper('.scjd06_slide', { slidesPerView: "auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my10_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.scjd06_sp', clickable: true, }, }); } catch (e) { } try { var my12_sp = $(".ls01_c .b1").width(); mySwiper12 = new Swiper('.ls01c_slide', { slidesPerView: "auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my12_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, navigation: { prevEl: '.ls01c_prev', nextEl: '.ls01c_next', }, }); } catch (e) { } try { var my13_sp = $(".pz02_b .b1").width(); mySwiper13 = new Swiper('.lz02b_slide', { slidesPerView: "auto", speed: 1000, spaceBetween: my13_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, }); } catch (e) { } try { var my14_sp = $(".job05_c .b1").width(); if (pagew > 768) { mySwiper14 = new Swiper('.job04cl_slide', { slidesPerView: "1", effect: 'fade', speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, }); } else { mySwiper14 = new Swiper('.job04cl_slide', { slidesPerView: "auto", speed: 1000, spaceBetween: my14_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4, }, navigation: { prevEl: '.job04c_prev', nextEl: '.job04c_next', }, }); } var jb04_time; $(".jb04_sol ul li").each(function (i, e) { $(this).mouseenter(function () { var that = $(this); jb04_time = setTimeout(function () { if (!that.hasClass("active")) { $(".jb04_sol ul li").removeClass("active"); that.addClass("active"); mySwiper14.slideTo(i); } }, 250); }); $(this).mouseleave(function () { clearTimeout(jb04_time); }); }); } catch (e) { } try { var my15_sp = $(".job05_c .b1").width(); mySwiper15 = new Swiper('.job05c_slide', { slidesPerView: "auto", speed: 1000, spaceBetween: my15_sp, lazy: { loadPrevNext: true, loadPrevNextAmount:4, }, navigation: { prevEl: '.job05c_prev', nextEl: '.job05c_next', }, }); $(".job05_t ul li").each(function (i,e) { $(this).click(function () { if (!$(this).hasClass("active")) { $(".job05_t ul li").removeClass("active"); $(this).addClass("active"); $(".job05c_slide").css({ "opacity": "0" }); $(".job05c_more").css({ "opacity": "0" }); mySwiper15.removeAllSlides(); $(".job05_hid ul").eq(i).find("li").each(function () { mySwiper15.appendSlide('
'); }); if ($(".job05_hid ul").eq(i).find("li").length > 3) { $(".job05c_more").css({ "opacity": "1" }); } mySwiper15.update(); mySwiper15.updateSize(); mySwiper15.lazy.load(); $(".job05c_slide").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); } }); }); } catch (e) { } try { mySwiper16 = new Swiper('.fa03c_slide', { slidesPerView:1, speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.fa03t_sp', clickable: true, }, }); } catch (e) { } try { $(".btn_02 .btn02_r .p3 a").each(function (i, e) { $(this).click(function () { if (!$(this).hasClass("active")) { $(".btn_02 .btn02_r .p3 a").removeClass("active"); $(this).addClass("active"); $(".btn_02 .btn02_r .p2 img").stop(true, true).css({"opacity":"0"}); $(".btn_02 .btn02_r .p2 img").eq(i).stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); } }); }); } catch (e) { } try { layui.use('laydate', function () { var laydate = layui.laydate; laydate.render({ elem: '.sch_time1', format: 'yyyy', trigger: "click", type:"year", ready: function (data) { var showcurr = data.year + "年"; $(".layui-laydate .layui-laydate-footer").append("" + showcurr + ""); } }); laydate.render({ elem: '.sch_time2', format: 'yyyy', trigger: "click", type: "year", ready: function (data) { var showcurr = data.year + "年"; $(".layui-laydate .layui-laydate-footer").append("" + showcurr + ""); } }); }); } catch (e) { } try { mySwiper17 = new Swiper('.cxq02c_slide', { slidesPerView: "1", centerInsufficientSlides: true, speed: 1000, spaceBetween:20, lazy: { loadPrevNext: true, loadPrevNextAmount: 12 }, pagination: { el: '.cxq02c_sp', clickable: true, }, }); } catch (e) { } try { $(".cpbj01c_txt ul li").each(function (i,e) { $(this).click(function () { if (!$(this).hasClass("active")) { $(".cpbj01c_txt ul li").removeClass("active"); $(this).addClass("active"); $(".cpbj01c_img img.img0").css({"opacity":"0"}); $(".cpbj01c_img .c img").css({ "display": "none" }); $(".cpbj01c_img .c img").eq(i).stop(true, true).velocity("transition.expandIn", { duration:100,stagger: 300 }); } }); }); } catch (e) { } try { var my18_sb = $(".pz_03 .b1").innerWidth(); mySwiper18 = new Swiper('.pz03_slide', { slidesPerView: "auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my18_sb, lazy: { loadPrevNext: true, loadPrevNextAmount: 12 }, }); } catch (e) { } try{ $(".pli_07 ul li .p2").each(function(){ $(this).html($(this).html().replace('®','