1function fontLoad(){ 2setTimeout(function () { 3 document.getElementsByTagName("html")[0].classList.add("wfno-load"); 4 }, 3000); 5} 6 7function firstLoad() { 8 const isFirstLoad = sessionStorage.getItem('isFirstLoad'); 9 window.addEventListener('load', function() { 10 if (!isFirstLoad) { 11 $('body').addClass('load-first'); 12 sessionStorage.setItem('isFirstLoad', true); 13 } else { 14 $('body').addClass('load-second'); 15 } 16 }); 17} 18 19// function video() { 20// setTimeout(function(){ 21// var v = document.getElementById('fvkey'); 22// v.play(); 23// },1500); 24// } 25 26function scrollBox() { 27 $(window).on("scroll", function() { 28 var scroll = $(this).scrollTop(); 29 var target = $(".scroll--box"); 30 if (scroll > 30) { 31 target.addClass("fade"); 32 } 33 }); 34} 35 36function loadedC() { 37 const timings = [ 38 { delay: 5000, className: 'loadedC' } 39 ]; 40 timings.forEach(function(item) { 41 setTimeout(function() { 42 $('body').addClass(item.className); 43 }, item.delay); 44 }); 45} 46 47 48function resize() { 49 $(window).on('resize', function() { 50 const windowWidth = $(window).width(); 51 const windowHeight = $(window).height(); 52 if (windowHeight < (630 / 1230) * windowWidth) { 53 $('video').css({ 54 'width': '90%', 55 // 'margin-top' : '-8vh' 56 }); 57 $('.top--image img').css({ 58 'width': '90%', 59 // 'margin-top' : '-8vh' 60 }); 61 } else { 62 $('video').css({ 63 'width': '100%', 64 'margin-top' : '0' 65 }); 66 $('.top--image img').css({ 67 'width': '100%', 68 'margin-top' : '0' 69 }); 70 } 71 }).trigger('resize'); 72}; 73 74function loaded() { 75 if ($(window).width() >= 961) { 76 const timings = [ 77 { delay: 10, className: 'loaded' }, 78 { delay: 3000, className: 'loadedB' }, 79 ]; 80 timings.forEach(function(item) { 81 setTimeout(function() { 82 $('body').addClass(item.className); 83 }, item.delay); 84 }); 85 } else { 86 const timings = [ 87 { delay: 10, className: 'loaded' }, 88 { delay: 3000, className: 'loadedB' }, 89 ]; 90 91 timings.forEach(function(item) { 92 setTimeout(function() { 93 $('body').addClass(item.className); 94 }, item.delay); 95 }); 96 } 97} 98 99function bnrSwiper() { 100 if ($('body').hasClass('page--home')) { 101 var swiper = new Swiper('.section--banner .bnr-container', { 102 effect: 'slide', 103 speed: 500, 104 pagination: { 105 el: '.swiper-pagination', 106 clickable: true, 107 renderBullet: function (index, className) { 108 return ( 109 '<div class="' + 110 className + 111 ' progress-bar' + 112 '"><div class="progress-bar__inner">' + 113 //(Number(index) + 1) + 114 '</div></div>' 115 ) 116 }, 117 }, 118 navigation: { 119 nextEl: '.swiper-button-next', 120 prevEl: '.swiper-button-prev', 121 }, 122 autoplay: false, 123 loop: true, 124 on: { 125 slideChange: function () { 126 if (this.realIndex > 0) { 127 this.params.autoplay.delay = 4700 128 } 129 }, 130 }, 131 breakpoints: { 132 320: { 133 //spaceBetween: 20, 134 slidesPerView: 1, 135 centerInsufficientSlides: true, 136 }, 137 959: { 138 centeredSlides: true, 139 spaceBetween: 40, 140 slidesPerView: 3, 141 }, 142 }, 143 }); 144 } 145 } 146 147function menu() { 148 $('.open').click(function() { 149 $('.g-nav').fadeIn(400); 150 151 }); 152 $('.g-nav .close').click(function() { 153 $('.g-nav').fadeOut(400); 154 }); 155}; 156 157 158 159$(function () { 160 // video(); 161 fontLoad(); 162 firstLoad(); 163 scrollBox(); 164 resize(); 165 loaded() 166 loadedC(); 167 bnrSwiper(); 168 menu(); 169}) 170 171
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.