1 2 3jQuery(document).ready(function($) { 4 5 "use strict"; 6 7 AOS.init({ 8 duration: 800, 9 easing: 'slide', 10 once: true 11 }); 12 13 var lozadFunc = function() { 14 const el = document.querySelectorAll('img'); 15 const observer = lozad(el); 16 observer.observe(); 17 } 18 lozadFunc(); 19 20 var siteMenuClone = function() { 21 22 $('.js-clone-nav').each(function() { 23 var $this = $(this); 24 $this.clone().attr('class', 'site-nav-wrap').appendTo('.site-mobile-menu-body'); 25 }); 26 27 28 setTimeout(function() { 29 30 var counter = 0; 31 $('.site-mobile-menu .has-children').each(function(){ 32 var $this = $(this); 33 34 $this.prepend('<span class="arrow-collapse collapsed">'); 35 36 $this.find('.arrow-collapse').attr({ 37 'data-toggle' : 'collapse', 38 'data-target' : '#collapseItem' + counter, 39 }); 40 41 $this.find('> ul').attr({ 42 'class' : 'collapse', 43 'id' : 'collapseItem' + counter, 44 }); 45 46 counter++; 47 48 }); 49 50 }, 1000); 51 52 $('body').on('click', '.arrow-collapse', function(e) { 53 var $this = $(this); 54 if ( $this.closest('li').find('.collapse').hasClass('show') ) { 55 $this.removeClass('active'); 56 } else { 57 $this.addClass('active'); 58 } 59 e.preventDefault(); 60 61 }); 62 63 $(window).resize(function() { 64 var $this = $(this), 65 w = $this.width(); 66 67 if ( w > 768 ) { 68 if ( $('body').hasClass('offcanvas-menu') ) { 69 $('body').removeClass('offcanvas-menu'); 70 } 71 } 72 }) 73 74 $('body').on('click', '.js-menu-toggle', function(e) { 75 var $this = $(this); 76 e.preventDefault(); 77 78 if ( $('body').hasClass('offcanvas-menu') ) { 79 $('body').removeClass('offcanvas-menu'); 80 $this.removeClass('active'); 81 } else { 82 $('body').addClass('offcanvas-menu'); 83 $this.addClass('active'); 84 } 85 }) 86 87 // click outisde offcanvas 88 $(document).mouseup(function(e) { 89 var container = $(".site-mobile-menu"); 90 if (!container.is(e.target) && container.has(e.target).length === 0) { 91 if ( $('body').hasClass('offcanvas-menu') ) { 92 $('body').removeClass('offcanvas-menu'); 93 } 94 } 95 }); 96 }; 97 siteMenuClone(); 98 99 100 var sitePlusMinus = function() { 101 $('.js-btn-minus').on('click', function(e){ 102 e.preventDefault(); 103 if ( $(this).closest('.input-group').find('.form-control').val() != 0 ) { 104 $(this).closest('.input-group').find('.form-control').val(parseInt($(this).closest('.input-group').find('.form-control').val()) - 1); 105 } else { 106 $(this).closest('.input-group').find('.form-control').val(parseInt(0)); 107 } 108 }); 109 $('.js-btn-plus').on('click', function(e){ 110 e.preventDefault(); 111 $(this).closest('.input-group').find('.form-control').val(parseInt($(this).closest('.input-group').find('.form-control').val()) + 1); 112 }); 113 }; 114 // sitePlusMinus(); 115 116 117 var siteSliderRange = function() { 118 $( "#slider-range" ).slider({ 119 range: true, 120 min: 0, 121 max: 500, 122 values: [ 75, 300 ], 123 slide: function( event, ui ) { 124 $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); 125 } 126 }); 127 $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + 128 " - $" + $( "#slider-range" ).slider( "values", 1 ) ); 129 }; 130 // siteSliderRange(); 131 132 133 134 var siteCarousel = function () { 135 if ( $('.nonloop-block-13').length > 0 ) { 136 $('.nonloop-block-13').owlCarousel({ 137 center: false, 138 items: 1, 139 loop: true, 140 stagePadding: 0, 141 margin: 0, 142 autoplay: true, 143 nav: true, 144 navText: ['<span class="icon-arrow_back">', '<span class="icon-arrow_forward">'], 145 responsive:{ 146 600:{ 147 margin: 0, 148 nav: true, 149 items: 2 150 }, 151 1000:{ 152 margin: 0, 153 stagePadding: 0, 154 nav: true, 155 items: 3 156 }, 157 1200:{ 158 margin: 0, 159 stagePadding: 0, 160 nav: true, 161 items: 4 162 } 163 } 164 }); 165 } 166 167 $('.slide-one-item').owlCarousel({ 168 center: false, 169 items: 1, 170 loop: true, 171 stagePadding: 0, 172 margin: 0, 173 smartSpeed: 1000, 174 autoplay: true, 175 pauseOnHover: false, 176 nav: true, 177 navText: ['<span class="icon-keyboard_arrow_left">', '<span class="icon-keyboard_arrow_right">'] 178 }); 179 }; 180 siteCarousel(); 181 182 var siteStellar = function() { 183 $(window).stellar({ 184 responsive: true,
185 parallaxBackgrounds: true, 186 parallaxElements: true, 187 horizontalScrolling: false, 188 hideDistantElements: false, 189 scrollProperty: 'scroll' 190 }); 191 }; 192 siteStellar(); 193 194 var siteCountDown = function() { 195 196 $('#date-countdown').countdown('2020/10/10', function(event) { 197 var $this = $(this).html(event.strftime('' 198 + '<span class="countdown-block"><span class="label">%w</span> weeks </span>' 199 + '<span class="countdown-block"><span class="label">%d</span> days </span>' 200 + '<span class="countdown-block"><span class="label">%H</span> hr </span>' 201 + '<span class="countdown-block"><span class="label">%M</span> min </span>' 202 + '<span class="countdown-block"><span class="label">%S</span> sec</span>')); 203 }); 204 205 }; 206 siteCountDown(); 207 208 var siteDatePicker = function() { 209 210 if ( $('.datepicker').length > 0 ) { 211 $('.datepicker').datepicker(); 212 } 213 214 }; 215 siteDatePicker(); 216 217 var siteSticky = function() { 218 $(".js-sticky-header").sticky({topSpacing:0}); 219 }; 220 siteSticky(); 221 222 // navigation 223 var OnePageNavigation = function() { 224 var navToggler = $('.site-menu-toggle'); 225 $("body").on("click", ".main-menu li a[href^='#'], .smoothscroll[href^='#'], .site-mobile-menu .site-nav-wrap li a", function(e) { 226 e.preventDefault(); 227 228 var hash = this.hash; 229 230 $('html, body').animate({ 231 'scrollTop': $(hash).offset().top 232 }, 600, 'easeInOutCirc', function(){ 233 window.location.hash = hash; 234 }); 235 236 }); 237 }; 238 OnePageNavigation(); 239 240 var siteScroll = function() { 241 242 243 244 $(window).scroll(function() { 245 246 var st = $(this).scrollTop(); 247 248 if (st > 100) { 249 $('.js-sticky-header').addClass('shrink'); 250 } else { 251 $('.js-sticky-header').removeClass('shrink'); 252 } 253 254 }) 255 256 }; 257 siteScroll(); 258 259});
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.