var w = $(window).width(); if (w <= 1279) { $(".banner").remove(); $(".homed .vh video").remove(); var bannerm = new Swiper(".bannerm", { speed: 1000, spaceBetween: 0, loop:true, observer: true, observeParents: true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false }, pagination: { el: ".bannerm .pga", clickable: true, }, }) }else{ $(".bannerm").remove() } $(window).resize(function () { var w = $(window).width(); if (w <= 1279) { $(".banner").remove(); $(".homed .vh video").remove(); }else{ $(".bannerm").remove() } }) window.onload = function () { var slideNews = new Swiper(".slide-news", { speed: 800, loop: true, spaceBetween: 20, slidesPerView: 1, roundLengths: true, pagination: { el: ".homeb .aleft .pga", clickable: true }, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false } }); //if (w > 1279) { var banner = new Swiper(".banner", { resistanceRatio: 0, speed: 1000, spaceBetween: 0, parallax: true, effect: "fade", fadeEffect: { crossFade: true }, observer: true, observeParents: true, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false }, pagination: { el: ".banner .pgaline", clickable: true, renderBullet: function (index, className) { return ''; } }, navigation: { nextEl: ".banner .next", prevEl: ".banner .prev" }, on: { init: function (swiper) { var active = this.activeIndex; $(".banner .swiper-num .active").text("01"); var docW = $(window).width(); var svideo = document.getElementById("video1"); if (docW >= 1200) { if (this.realIndex != 3) { } else { } } }, slideChangeTransitionStart: function (swiper) { var active = this.realIndex + 1; $(".banner .swiper-num .active").text("0" + active); }, transitionStart: function () { if (this.realIndex == 3) { delay = 20000; } else { delay = this.params.autoplay.delay; } anime({ targets: ".pgaline .swiper-pagination-bullet-active i", delay: 0, width: ["0", "100%"], easing: "linear", duration: delay }); }, transitionEnd: function (swiper) { if (this.realIndex == 2) { $(".scNum1").countUp({ time: 2000 }); } if (this.activeIndex == 5) { $(".scNum2").countUp({ time: 2000 }); } } } }); anime({ targets: ".pgaline .swiper-pagination-bullet-active i", width: ["0", "100%"], easing: "linear", duration: 4000 }); var w = $(window).width(); if (w > 1279) { var totala = banner.pagination.bullets.length; $(".banner .swiper-num .total").text("0" + totala); // var docWa = $(window).width(); // if (docWa < 1280) { // } } $(".js-play").fancybox(); // $(".navbtn .open").mouseover(function () { // $(this).hide().next(".close").show(); // $(".topFix").addClass("black"); // $(".rightNav").addClass("show"); // $(".rightNavbg").fadeIn(); // }); // $(".rightNavbg").click(function () {}); // $(".rightNav").mouseleave(function () { // $(".open").show().next(".close").hide(); // $(".topFix").removeClass("black"); // $(this).removeClass("show"); // $(".rightNavbg").fadeOut(); // }); var slideMain = new Swiper(".slideMain", { direction: "vertical", hashNavigation: true, parallax: true, wrapperClass: "main-wrapper", slidesPerView: "auto", speed: 500, resistanceRatio: 0, mousewheel: true, breakpoints: { 980: { noSwiping: true, noSwipingClass: "no-swi", } }, pagination: { el: ".slideMain .pagination-m", clickable: true }, navigation: { nextEl: ".arrow.next", prevEl: ".arrow.prev" }, on: { init: function (swiper) { console.log(this.activeIndex); if (this.activeIndex == 0) { $(".leftFix").fadeOut(); } if (this.activeIndex == 0) { $(".homea .ani").addClass("fadeInUp"); } else { $(".homea .ani").removeClass("fadeInUp"); } }, transitionEnd: function () { if (this.activeIndex == 4) { $(".scNum").countUp({ time: 2000 }); } if (this.activeIndex == 0) { $(".scNum2").countUp({ time: 1500 }); } if (this.activeIndex == 0) { $(".videoHero .ani").addClass("fadeInUp"); } else { $(".videoHero .ani").removeClass("fadeInUp"); } }, transitionStart: function () { if(this.isEnd){ $(".arrow").hide() }else{ $(".arrow").show() } if (this.activeIndex == 0) { $(".homea .ani").addClass("fadeInUp"); } else { $(".homea .ani").removeClass("fadeInUp"); } if (this.activeIndex == 1) { $(".homeb .ani").addClass("fadeInUp"); //$(".homeb .aright1").addClass("fadeInUp"); $(".leftFix ul.s1").show().addClass("on"); } else { $(".homeb .ani").removeClass("fadeInUp"); //$(".homeb .aright1").removeClass("fadeInUp"); $(".leftFix ul.s1").hide().removeClass("on"); } if (this.activeIndex == 2) { $(".homec .ani").addClass("fadeInUp"); $(".homec .ani1").addClass("fadeInDown"); $(".homec .ani2").addClass("fadeInDown"); $(".homec .ani3").addClass("fadeInLeft"); $(".homec .ani4").addClass("fadeInUp"); $(".leftFix ul.s2").show().addClass("on"); } else { $(".homec .ani").removeClass("fadeInUp"); $(".homec .ani1").removeClass("fadeInDown"); $(".homec .ani2").removeClass("fadeInDown"); $(".homec .ani3").removeClass("fadeInLeft"); $(".homec .ani4").removeClass("fadeInUp"); $(".leftFix ul.s2").hide().removeClass("on"); } if (this.activeIndex == 3) { $(".homed .ani").addClass("fadeInUp"); $(".homed .aniq").addClass("fadeInRight"); $(".leftFix ul.s3").show().addClass("on"); } else { $(".homed .ani").removeClass("fadeInUp"); $(".homed .aniq").removeClass("fadeInRight"); $(".leftFix ul.s3").hide().removeClass("on"); } if (this.activeIndex == 4) { $(".homee .ani").addClass("fadeInUp"); $(".leftFix ul.s4").show().addClass("on"); } else { $(".homee .ani").removeClass("fadeInUp"); $(".leftFix ul.s4").hide().removeClass("on"); } if (this.activeIndex == 5) { $(".homef .ani").addClass("fadeInUp"); } else { $(".homef .ani").removeClass("fadeInUp"); } if (this.activeIndex == 6) { $(".homeg .ani").addClass("fadeInUp"); $(".homeg .anic").addClass("flipInY"); } else { $(".homeg .ani").removeClass("fadeInUp"); $(".homeg .anic").removeClass("flipInY"); } console.log(this.activeIndex); if (this.isEnd) { console.log("end"); $(".leftFix").fadeOut(); $(".rightFix").fadeOut(); } else { $(".leftFix").fadeIn(); $(".rightFix").fadeIn(); } // if (this.activeIndex == 1 || this.activeIndex == 3) { // $(".logo img").attr("src", "images/logo.png"); // $(".navbtn .open img").attr("src", "images/navb.png"); // $(".navbtn .close").click(function () { // $(this).hide().prev(".open").show(); // $(".rightNav").removeClass("show"); // $(".rightNavbg").fadeOut(); // }); // } else { // $(".logo img").attr("src", "images/logo.png"); // $(".navbtn .open img").attr("src", "images/navb.png"); // $(".navbtn .close").click(function () { // $(this).hide().prev(".open").show(); // $(".topFix").removeClass("black"); // $(".rightNav").removeClass("show"); // $(".rightNavbg").fadeOut(); // }); // } // if (this.activeIndex == 3) { // $(".navbtn .close").click(function () { // $(this).hide().prev(".open").show(); // $(".topFix").removeClass("black"); // $(".rightNav").removeClass("show"); // $(".rightNavbg").fadeOut(); // }); // } if (this.activeIndex == 1 || this.activeIndex == 5) { $(".leftFix").removeClass("bga").addClass("bgb"); //$(".homeb").addClass("black"); //$(".homed").addClass("black"); //$(".homef").addClass("black"); } else { $(".leftFix").removeClass("bgb").addClass("bga"); // $(".homeb").removeClass("black"); //$(".homed").removeClass("black"); //$(".homef").removeClass("black"); } if (this.activeIndex == 0) { $(".leftFix").fadeOut(); $(".rightFix").fadeOut(); } } } }); $(".homef ul li").hover(function () { $(this).addClass("show").siblings().removeClass("show"); $(".homef .spmore").removeClass("sp"); }); $(".homef ul li:eq(2)").hover(function () { $(".homef .spmore").addClass("sp"); }); var slideTab = new Swiper(".slide-tab", { effect: "fade", fadeEffect: { crossFade: true }, speed: 800, autoHeight: true, noSwiping: true, noSwipingClass: "no-swi", breakpoints: { 1200: { autoHeight: false } }, on: { slideChangeTransitionStart: function () { $(".homeb .tabNav li") .eq(this.realIndex) .addClass("on") .siblings() .removeClass("on"); } } }); $(".homeb .tabNav li").click(function () { $(this).addClass("on").siblings().removeClass("on"); slideTab.slideTo($(this).index()); }); var slideHcbg = new Swiper(".slide-hcbg", { resistanceRatio: 0, spaceBetween: 5, effect: "fade", fadeEffect: { crossFade: true }, speed: 800, loop: true, noSwiping: true, noSwipingClass: "no-swi" }); // var slideHct = new Swiper(".slide-hct", { // resistanceRatio: 0, // spaceBetween: 5, // slidesPerView: 1, // loop: true, // speed: 800, // effect: "fade", // fadeEffect: { crossFade: true }, // noSwiping: true, // noSwipingClass: "no-swi", // autoplay: { // delay: 5000, // stopOnLastSlide: false, // disableOnInteraction: false // }, // controller: { control: slideHcbg }, // on: { // slideChangeTransitionStart: function () { // $(".homec .tabNav li") // .eq(this.realIndex) // .addClass("on") // .siblings() // .removeClass("on"); // } // } // }); $(".homec .tabNav li").click(function () { $(this).addClass("on").siblings().removeClass("on"); slideHcbg.slideTo($(this).index() + 1); }); var slideJr = new Swiper(".slide-jr", { resistanceRatio: 0, spaceBetween: 25, speed: 800, loop: true, noSwiping: true, pagination: { el: ".slide-jr .pga", clickable: true } }); var slideYear = new Swiper(".slide-year", { slidesPerView: 4, watchSlidesVisibility: true, speed: 1000, direction: "vertical" }); var slideYeart = new Swiper(".slide-yeart", { spaceBetween: 5, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false }, effect: "fade", fadeEffect: { crossFade: true }, speed: 1000, noSwiping: true, noSwipingClass: "no-swi", navigation: { nextEl: ".homed .aright .next", prevEl: ".homed .aright .prev" }, thumbs: { swiper: slideYear } }); var slideHdbg = new Swiper(".slide-hdbg", { resistanceRatio: 0, spaceBetween: 5, effect: "fade", fadeEffect: { crossFade: true }, speed: 800, //loop: true, noSwiping: true, noSwipingClass: "no-swi" }); var slideHdt = new Swiper(".slide-hdt", { resistanceRatio: 0, spaceBetween: 5, slidesPerView: 1, autoHeight:true, ////loop: true, speed: 800, effect: "fade", fadeEffect: { crossFade: true }, noSwiping: true, noSwipingClass: "no-swi", controller: { control: slideHdbg }, on: { slideChangeTransitionStart: function (swiper) { $(".homed .tabNav li") .eq(this.realIndex) .addClass("on") .siblings() .removeClass("on"); if (this.activeIndex == 2) { //$(".scNum").countUp({ time: 2000 }); } }, transitionStart: function () { if (this.activeIndex == 0) { $(".homed .ani").addClass("fadeInUp"); $(".homed .aniq").addClass("fadeInRight"); } else { $(".homed .ani").removeClass("fadeInUp"); $(".homed .aniq").removeClass("fadeInRight"); } if (this.activeIndex == 1) { $(".homed .his2 .aniLeft").addClass("fadeInLeft"); $(".homed .his2 .aniRight").addClass("fadeInRight"); } else { $(".homed .his2 .aniLeft").removeClass("fadeInLeft"); $(".homed .his2 .aniRight").removeClass("fadeInRight"); } if (this.activeIndex == 2) { $(".jryxsq1 .anii2").addClass("fadeInLeft"); $(".jryxsq1 .anii3").addClass("fadeInRight"); } else { $(".jryxsq1 .anii2").removeClass("fadeInLeft"); $(".jryxsq1 .anii3").removeClass("fadeInRight"); } }, } }); $(".homed .tabNav li").click(function () { $(this).addClass("on").siblings().removeClass("on"); slideHdt.slideTo($(this).index()); }); var slidhis3 = new Swiper(".slide-his3", { effect: "fade", fadeEffect: { crossFade: true }, speed: 800, // autoHeight: true, noSwiping: true, noSwipingClass: "no-swi", // breakpoints: { 1200: { autoHeight: false } }, on: { slideChangeTransitionStart: function () { $(".homed .tabnav3 li") .eq(this.realIndex) .addClass("on") .siblings() .removeClass("on"); }, transitionStart: function () { if (this.activeIndex == 0) { $(".slide-his3 .ani3").addClass("fadeInUp"); }else{ $(".slide-his3 .ani3").removeClass("fadeInUp"); } if (this.activeIndex == 1) { $(".slide-his3 .ani6").addClass("fadeInUp"); $(".scnn").countUp({ time: 1000 }); }else{ $(".slide-his3 .ani6").removeClass("fadeInUp"); } if (this.activeIndex == 2) { $(".slide-his3 .ani7").addClass("fadeInUp"); }else{ $(".slide-his3 .ani7").removeClass("fadeInUp"); } if (this.activeIndex == 3) { $(".slide-his3 .ani8").addClass("fadeInUp"); $(".scnn").countUp({ time: 1000 }); }else{ $(".slide-his3 .ani8").removeClass("fadeInUp"); } } } }); $(".homed .tabnav3 li").hover(function () { $(this).addClass("on").siblings().removeClass("on"); slidhis3.slideTo($(this).index()); }); var pDitems = new Swiper('.pE-itemss', { autoplayDisableOnInteraction: false, loop:true, autoplay: {delay: 2500,stopOnLastSlide: false,disableOnInteraction: false,}, pagination: {el: '.pE-itemss .swiper-pagination',clickable: false,renderBullet: function (index, className) {return '';}},}); var slideHe = new Swiper(".slide-he", { resistanceRatio: 0, spaceBetween: 5, slidesPerView: 1, effect: "fade", fadeEffect: { crossFade: true }, speed: 1000, observer: true, observeParents: true, pagination: { el: ".slide-he .pga", clickable: true }, navigation: { nextEl: ".slide-hep .next", prevEl: ".slide-hep .prev" } }); var slideHg = new Swiper(".slide-hg", { resistanceRatio: 0, spaceBetween: "3.5%", slidesPerView: 3, speed: 1000, loop: true, observer: true, observeParents: true, breakpoints: { 540: { slidesPerView: 1 }, 980: { slidesPerView: 2 } }, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false }, pagination: { el: ".slide-hg .pga", clickable: true }, navigation: { nextEl: ".slide-hgp .next", prevEl: ".slide-hgp .prev" } }); var slideTabft = new Swiper(".slide-tabft", { effect: "fade", fadeEffect: { crossFade: true }, speed: 800, autoHeight: true, noSwiping: true, noSwipingClass: "no-swi", breakpoints: { 1200: { autoHeight: false } }, on: { transitionStart: function () { $(".tabft .tabNav ul li") .eq(this.realIndex) .addClass("on") .siblings() .removeClass("on"); } } }); $(".tabft .tabNav ul li").click(function () { $(this).addClass("on").siblings().removeClass("on"); slideTabft.slideTo($(this).index()); }); $(".footer .infoft .aright a").each(function () { $(this).hover(function () { $(this).addClass("show").siblings().removeClass("show"); }); }); $(".loader").fadeOut(); var w = $(window).width(); if (w <= 1279) { slideMain.destroy(false); // $(".logo img").attr("src", "images/logo4.png"); // $(".topFix").addClass("black"); // $(".navbtn .open img").attr("src", "images/navb.png"); // $(".navbtn .close").click(function () { // $(".topFix").addClass("black"); // }); }else{ //$(".bannerm").remove() } $(window).resize(function () { var w = $(window).width(); if (w <= 1279) { slideMain.destroy(false); } else { window.location.reload(); } }); $(".scNum").countUp({ time: 2000 }); $(".scNum2").countUp({ time: 1500 }); $(".videoHero .ani").addClass("fadeInUp"); };