PageSourceSearch

https://centurylithium.com/_templates/1/source/js/scripts.js?v=0.002

js centurylithium.com collected 2026-09-29 22:26:01 UTC 23,342 bytes, 460 lines download raw bytes

vendor: 9,186 bytes, lines 1-29
1// *********************  PLUGINS ********************* //
2/*! WOW - v1.1.3 - 2016-05-06 --Copyright (c) 2016 Matthieu Aussaguel;*/
3(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"js-reveal",animateClass:"animate-init",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
4
5
6function check_email_address(email) {
7  var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
8  return re.test(email);
9}
10
11
12$(document).ready(function(){
13
14// Wow Initialize
15wow = new WOW({offset: 220})
16wow.init();
17
18function afterReveal(el){
19  el.addEventListener('animationend', function(event){
20    $('.js-reveal').each(function(){ $(this).css('opacity',1); }); });
21}
22wow = new WOW({
23  offset: 220,
24  callback: afterReveal
25});
26wow.init();
27
28// ********************* MOBILE CHECK ********************* //
29function detectmob() {                        // function to test if on a mobile device
30  var $check = $('#width-check').css('z-index');
31  if(!!navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)) {
32    return true;
33  } else if($check != 0) {
34    return true;
35  } else {
36    return false;
37  }
38}
39
40// ********************* NAV SCROLL ********************* //
41$(window).bind("scroll", function() {
42  if ($(this).scrollTop() > 10) {
43    $("header").addClass("fixed");
44  } else {
45    $("header").removeClass("fixed");
46  }
47});
48
49// ********************* SEARCH AND SIGN UP MODALS ********************* //
50// $('.search-open').on('click', function(e) {
51//   e.preventDefault();
52//   $('.search-open').toggleClass('active');
53//   $('#search_form').toggleClass('show');
54//   $('#s').focus();
55// });
56
57$('.top-search i').on('click', function(e) {
58  e.preventDefault();
59  $('.top-search').toggleClass('active');
60  $('.top-search i ').toggleClass('fa-search fa-times');
61  $('.top-search  #s').focus();
62});
63
64
65
66// ********************* MOBILE MENU ********************* //
67
68var mobileMenuFunctions = function() {
69  // SUBNAV
70  $('header#is-mobile ul.top > li.has-submenu > a').on('click touch', function(e){
71    e.preventDefault();
72    if($(this).hasClass('show')) {
73      $('header#is-mobile ul.top').removeClass('show');
74      $('header#is-mobile ul.top > li.has-submenu').removeClass('show');
75      $('header#is-mobile ul.top > li.has-submenu > a').removeClass('show');
76      $('header#is-mobile ul.sub').slideUp();
77    } else {
78      $('header#is-mobile ul.top').removeClass('show');
79      $('header#is-mobile ul.top > li.has-submenu').removeClass('show');
80      $('header#is-mobile ul.top > li.has-submenu > a').removeClass('show');
81      $('header#is-mobile ul.sub').slideUp();
82      $(this).next().slideToggle();
83      $(this).addClass('show');
84      $(this).closest('ul.top').addClass('show');
85      $(this).closest('li').addClass('show');
86    }
87  });
88  $('header#is-mobile ul.sub > li.has-submenu > a').on('click touch', function(e){
89    e.preventDefault();
90    $(this).next().slideToggle();
91    $(this).toggleClass('show');
92  });
93
94  // MOBILE NAV OPEN
95  $('header#is-mobile .menu-icon').on('click touch', function(){
96    $('header#is-mobile').toggleClass('open');
97  });
98
99}
100mobileMenuFunctions();
101
102var mobileMenuHeightFix = function() {        // Function to make 100vh actually work on mobile
103  let vh = window.innerHeight * 0.01;         // in CSS replace 100vh with calc(var(--vh, 1vh) * 100)
104  document.documentElement.style.setProperty('--vh', `${vh}px`);
105}
106mobileMenuHeightFix();
107
108
109// ********************* MOBILE SIGNUP FORM OPEN ********** //
110$(".mobile-menu-bottom__signup").on('click touch', function(){
111  $('.mobile-menu__signup-form').addClass('open');
112});
113$(".mobile-menu__signup-form .button-cancel").on('click touch', function(){
114  $('.mobile-menu__signup-form').removeClass('open');
115});
116
117
118
119// ********************* EMAIL SIGNUP ********************* //
120  //Error checking
121  $('.required input').focusout(function() {
122    if ($(this).val() == "") {
123      $(this).parent().addClass("error");
124    } else {
125      if ($(this).parent().hasClass("signup-email")) {
126        if (!check_email_address($(this).val())) {
127          $(this).parent().addClass("error");
128          }
129         else {
130          $(this).parent().removeClass('error');
131        }
132      } else {
133          $(this).parent().removeClass('error');
134      }
135    }
136  });
137
138// ********************* Recaptcha Show ********************* //
139$('form.signup').on('click touch', function(){
140  $('.grecaptcha-badge').addClass('show');
141});
142
143// ********************* Form Submission & Error Checking  ********************* //
144  $('form.signup').submit ( function(e) {
145
146    e.preventDefault();
147
148    var $this = $(this);
149    var $message = $(this).next('.signup-message'); // Variable for selecting appropriate signup message
150    var $signuptext = $('#signup-text');
151    $message.empty().hide();
152
153    grecaptcha.ready(function() {         // Call the V3 Recaptcha system
154      grecaptcha.execute($recaptcha_site_key, {action: 'submit'}).then(function(token) {
155
156        // Add the below for each unique recaptcha element you have
157        if ( $('#recaptchaResponse1').length > 0 )  {$('#recaptchaResponse1').val(token);}
158
159        if ( $('#recaptchaResponse2').length > 0 )  {$('#recaptchaResponse2').val(token);}
160        
161        if ( $('#recaptchaResponse3').length > 0 )  {$('#recaptchaResponse3').val(token);}
162
163        if ( $('#recaptchaResponse4').length > 0 )  {$('#recaptchaResponse4').val(token);}
164        
165        var $form = $this;
166        var formData = $form.serialize(),
167          // formArray = $form.serializeArray(),
168          formUrl = $form.attr('action'),
169          formMethod = $form.attr('method'),
170          responseMsg = $message;
171
172          console.log(formData);
173
174        $.ajax({
175          url: formUrl,
176          type: formMethod,
177          data: formData,
178          success:function(data){
179
180            console.log(data);
181
182            try {
183              var responseData = jQuery.parseJSON(data);
184              console.log(responseData);
185            } catch (err) {
186              console.log('error', err);
187            }
188            
189            switch(responseData.SUCCESS){
190            case 'false':
191              // $form.show();
192              responseMsg.empty().hide().fadeIn('slow').append(responseData.CONFIRMATION);
193              break;
194            case 'true':
195              $('.grecaptcha-badge').removeClass('show');
196              $form.hide();
197              responseMsg.empty().hide().fadeIn('slow').append(responseData.CONFIRMATION);
198              $signuptext.empty().hide();
199              break;
200            }
201          }
202        });
203
204
205      });
206    });
207  return false;
208});
209
210// ********************* Window Scroll Function ********************* //
211var scrollTimeout = null;
212$(window).scroll(function() {
213  mobileMenuHeightFix();
214  if (scrollTimeout) clearTimeout(scrollTimeout);
215  scrollTimeout = setTimeout(function(){
216    /* Put functions that need to be delayed here */
217  },250);
218});
219
220// ********************* Resize Functions ********************* //
221var resizeRotate = function(){
222  mobileMenuHeightFix();
223}
224
225// Mobile chrome resizes on scroll, add width check to fix
226var width = $(window).width();
227var height = $(window).height();
228$(window).resize(function() {
229  if($(window).width() != width || $(window).height() != height){
230    setTimeout(function(){resizeRotate();},250);
231  }
232});
233
234
235
236
237// ********************* TABS ********************* //
238
239var addActiveClassTabHelper = function() {
240  $('.tab-content').each(function(index) {
241    if(index < 3){
242      $(this).addClass('tab-active')
243      if ($(this).hasClass('stock-hub__chart')) {
244        $(this).find('div.highStock').addClass('fadeIn');
245      }
246    } else {
247      return false;
248    }
249  })
250}
251
252var stockItemTabsInit = function() {
253  addActiveClassTabHelper();
254  $('.tabs li').on('click touch', function(){
255    var self = $(this);
256    $(self).siblings().removeClass('active');
257    $(self).addClass('active');
258
259    var tabBtn = $(self).data('tab');
260    console.log(tabBtn);
261
262    $(self).parents().siblings().removeClass('tab-active');
263    $('.stock-hub__chart').find('div.highStock').removeClass('fadeIn');
264    // refreshChart($('.tab-content#'+tabBtn)); // RECAPTCHAe-draw stock chart when tab changes state
265    // $(window).resize();
266    $('.tab-content[data-tab-content="'+tabBtn+'"]').addClass('tab-active');
267    setTimeout(function(){$('.stock-hub__chart[data-tab-content="'+tabBtn+'"]').find('div.highStock').addClass('fadeIn') }, 150);
268    window.dispatchEvent(new Event('resize'));
269
270  });
271}
272stockItemTabsInit();
273
274
275var convertTabsToDropdown = function() {
276  $('ul.tabs').each(function() {
277    // var list = $(this), select = $(document.createElement('select')).insertBefore($(this).hide());
278    var list = $(this), select = $(document.createElement('select')).insertBefore($(this)).wrap( "<div class='tab-select'></div>" );
279
280    $('>li', this).each(function() {
281      var target = $(this).attr('data-tab'),
282      option = $(document.createElement('option'))
283      .appendTo(select)
284      // .val(this.href)
285      .attr('data-tab', target)
286      .html($(this).html())
287      .click(function(){
288          // if(target==='_blank') {
289          //   window.open($(this).val());
290          // }
291          // else {
292          //   window.location.href = $(this).val();
293          // }
294      });
295    });
296    // list.remove();
297  });
298}
299convertTabsToDropdown();
300
301var controlTabSwitchWithDynamicDropdown = function() {
302  $('.tab-select select').change(function() {
303    // var tabBtn = $(self).data('tab');
304    var tabId = $(this).find(':selected').attr('data-tab');
305    console.log(tabId);
306
307    $(this).parents().siblings().removeClass('tab-active');
308    $('.stock-hub__chart').find('div.highStock').removeClass('fadeIn');
309    // refreshChart($('.tab-content#'+tabBtn)); // RECAPTCHAe-draw stock chart when tab changes state
310    // $(window).resize();
311    $('.tab-content[data-tab-content="'+tabId+'"]').addClass('tab-active');
312    setTimeout(function(){$('.stock-hub__chart[data-tab-content="'+tabId+'"]').find('div.highStock').addClass('fadeIn') }, 150);
313    window.dispatchEvent(new Event('resize'));
314
315
316  });
317}
318controlTabSwitchWithDynamicDropdown();
319
320var refreshChart = function(e) { // Re-readies the stock chart within the clicked tab
321  if($('div.highStock').length) {
322    readyStockChart(e.find('div.highStock').attr('id'));
323  }
324}
325
326
327
328
329  /****** SignUp POPUP ************/
330  $("a.scroll-to").on('click', function(e){
331    e.preventDefault();
332    var target = $(this).data('target');
333    target = $(target);
334    if (target.length) {target.addClass('show');}
335  } );
336
337  $('#newsletter-popup .popup-close').click(function(e){
338    e.preventDefault()
339    $(this).parents('.popup-window').removeClass('show');
340  });
341
342
343
344
345  // Tiny Slider initialization
346  if ( $(".sustainability-slider").length > 0 ) {
347    var slider = tns({
348      container: '.sustainability-slider',
349      items: 1,
350      // slideBy: 'page',
351      autoplay: true,
352      controls: false,
353      // controlsText: ["prev", "next"],
354      nav: true,
355      navPosition: 'bottom',
356      mouseDrag: true
357    });
358  }
359
360
361
362  // COUNT UP 
363  var options = {
364    useEasing: true, 
365    useGrouping: true, 
366    separator: ',', 
367    decimal: '.', 
368  };
369
370  // CountUp(target, startVal, endVal, decimals, duration, options)
371  if ( $('#stats_1').length > 0 ) { var stats_1 = new CountUp('stats_1', 0, document.getElementById("stats_1").innerHTML, 1, 3, options); }
372  if ( $('#stats_2').length > 0 ) { var stats_2 = new CountUp('stats_2', 0, document.getElementById("stats_2").innerHTML, 0, 4, options); }
373  if ( $('#stats_3').length > 0 ) { var stats_3 = new CountUp('stats_3', 0, document.getElementById("stats_3").innerHTML, 1, 3, options); }
374  if ( $('#stats_4').length > 0 ) { var stats_4 = new CountUp('stats_4', 0, document.getElementById("stats_4").innerHTML, 2, 2, options); }
375
376      
377  if ( $('#stats_1').length > 0 ) {
378    if ($('#stats_1:visible').visible()) {                // The first count up numbers init
379      $('#stats_1').parents('div').addClass('visible');
380      if (!stats_1.error) {stats_1.start();} else {console.error(stats_1.error);}
381    } else {
382      $(window).on('resize scroll', function() {
383        if ($('#stats_1:visible').visible()) {
384          $('#stats_1').parents('div').addClass('visible');
385          if (!stats_1.error) {stats_1.start();} else {console.error(stats_1.error);}
386        }
387      });
388    }
389  }
390
391  if ( $('#stats_2').length > 0 ) { 
392    if ($('#stats_2:visible').visible()) {                // The second count up numbers init
393      $('#stats_2').parents('div').addClass('visible');
394      if (!stats_2.error) {stats_2.start();} else {console.error(stats_2.error);}
395      } else {
396      $(window).on('resize scroll', function() {
397        if ($('#stats_2:visible').visible()) {
398          $('#stats_2').parents('div').addClass('visible');
399          if (!stats_2.error) {stats_2.start();} else {console.error(stats_2.error);}
400        }
401      });
402    }
403  }
404
405  if ( $('#stats_3').length > 0 ) {
406    if ($('#stats_3:visible').visible()) {                // The Third count up numbers init
407      $('#stats_3').parents('div').addClass('visible');
408      if (!stats_3.error) {stats_3.start();} else {console.error(stats_3.error);}
409      } else {
410      $(window).on('resize scroll', function() {
411        if ($('#stats_3:visible').visible()) {
412          $('#stats_3').parents('div').addClass('visible');
413          if (!stats_3.error) {stats_3.start();} else {console.error(stats_3.error);}
414        }
415      });
416    }
417   }
418
419   if ( $('#stats_3').length > 0 ) {
420    if ($('#stats_4:visible').visible()) {                // The fourth count up numbers init
421      $('#stats_4').parents('div').addClass('visible');
422      if (!stats_4.error) {stats_4.start();} else {console.error(stats_4.error);}
423      } else {
424      $(window).on('resize scroll', function() {
425        if ($('#stats_4:visible').visible()) {
426          $('#stats_4').parents('div').addClass('visible');
427          if (!stats_4.error) {stats_4.start();} else {console.error(stats_4.error);}
428        }
429      });
430    }
431   }
432
433});
434
435
436
437$(document).ready(function() {
438  $(".animsition").animsition({
439    inClass: 'fade-in',
440    outClass: 'fade-out',
441    inDuration: 1500,
442    outDuration: 800,
443    linkElement: '.animsition-link',
444    // e.g. linkElement: 'a:not([target="_blank"]):not([href^="#"])'
445    loading: true,
446    loadingParentElement: 'body', //animsition wrapper element
447    loadingClass: 'animsition-loading',
448    loadingInner: '', // e.g '<img src="loading.svg" />'
449    timeout: true,
450    timeoutCountdown: 2000,
451    onLoadEvent: true,
452    browser: [ 'animation-duration', '-webkit-animation-duration'],
453    // "browser" option allows you to disable the "animsition" in case the css property in the array is not supported by your browser.
454    // The default setting is to disable the "animsition" in a browser that does not support "animation-duration".
455    overlay : false,
456    overlayClass : 'animsition-overlay-slide',
457    overlayParentElement : 'body',
458    transition: function(url){ window.location.href = url; }
459  });
460});

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.