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"); };