PageSourceSearch

https://chemicalmarketanalytics.com/wp-content/themes/cma/assets/js/app.js?ver=1790586650

js chemicalmarketanalytics.com collected 2026-09-28 09:25:36 UTC 38,214 bytes, 1,179 lines download raw bytes

1$ = jQuery.noConflict();
2const $body = $('body');
3const $header = $('header');
4const $footer = $('footer');
5const $footerBottomTab = $('.fix-bottom-resources');
6//const fullHeightSections = $('.full-screen');
7const paginationLineEl = $('.pagination-line');
8var waitForFullHeightDetect = true;
9var scrollToSectionSpeed = 1000;
10var scrollToSectionIndex = null;
11var scrollToSectionInitComplete = false;
12var blnScrollTop = false;
13jQuery(function($) {
14  var path = window.location.href; // because the 'href' property of the DOM element is the absolute path
15  $('.eventpageheader ul.desktop-menu li a').each(function() {
16    if(this.href != ''){
17      if (this.href === path) {
18        $(this).closest('li').addClass('active');
19      }
20    }
21    
22  });
23});
24
25$(".agenda-card__faq-toggle").on("click", function(e) {
26  $(this).hasClass("agenda-card__faq-toggle--open") ? ($(".accordion").removeClass("open"),
27  1 == $(".accordion-trigger").prop("checked") && $(".accordion-trigger").prop("checked", !1)) : ($(".accordion").addClass("open"),
28  0 == $(".accordion-trigger").prop("checked") && $(".accordion-trigger").prop("checked", !0)),
29  $(".agenda-card__faq-toggle").toggleClass("agenda-card__faq-toggle--open")
30}); 
31
32$(window).on('load', function () {
33  // initFullHeightScrolls();
34  stickyHeaderHandle();
35});
36
37$(window).on('resize', function () {
38  if ($(window).width() < 992) {
39    scrollToSectionInitComplete = false;
40  }
41});
42function scrollDetect() {
43  let lastScroll = 0;
44  window.onscroll = function () {
45    stickyHeaderHandle();
46    footerBottomTabHandle();
47    let currentScroll =
48      document.documentElement.scrollTop || document.body.scrollTop;
49    if (blnScrollTop == false) {
50      if (currentScroll > 0 && lastScroll <= currentScroll) {
51        lastScroll = currentScroll;
52        triggerScrolls('down');
53      } else {
54        lastScroll = currentScroll;
55        triggerScrolls('up');
56      }
57    }
58  };
59}
60scrollDetect();
61
62/**
63 * Header class for sticky
64 */
65function stickyHeaderHandle() {
66  if (window.scrollY === 0) {
67    $header.removeClass('srolled');
68  } else {
69    $header.addClass('srolled');
70  }
71}
72
73/**
74 * Footer sticky tabs
75 */
76function footerBottomTabHandle() {
77  let elValFromTop = Math.ceil($footer.offset().top),
78    windowHeight = $(window).height(),
79    windowScrollValFromTop = $(this).scrollTop();
80  if (windowHeight + windowScrollValFromTop > elValFromTop) {
81    if ($('.slide-menu').is(':hidden')) {
82      $footerBottomTab.addClass('position-absolute');
83    }
84  } else {
85    $footerBottomTab.removeClass('position-absolute');
86  }
87}
88
89/**
90 * Smooth Scroll for hash links
91 */
92// $("a[href^='#']:not(.has-submenu)").on('click', function (e) {
93// 	e.preventDefault();
94// 	var hash = this.hash;
95// 	$('html, body').animate({
96// 		scrollTop: ($(hash).offset().top - 120)
97// 	}, 500, function () {
98// 		window.location.hash = hash;
99// 	});
100// });
101
102/**
103 * Down Arrow scroll
104 */
105jQuery(".green-down-arrow").click(function(){
106  $('html, body').animate({
107    scrollTop: ($('.number-section').offset().top - 50)
108  }, 500);
109});
110
111/**
112 * Promo bar toggle
113 */
114$('.promo-bar').click(function () {
115  $body.toggleClass('modal-open');
116});
117$('.popup-btn').click(function (e) {
118  e.preventDefault();
119  $body.toggleClass('modal-open');
120});
121$(document).on('click', function (event) {
122  if (
123    !$(event.target).closest('.promo-left-main').length &&
124      !$(event.target).closest('.popup-btn').length &&
125    !$(event.target).closest('.promo-text').length
126  ) {
127    $body.removeClass('modal-open');
128  }
129});
130$(document).on('click', function (event) {
131  if (!$(event.target).closest('.resources-center').length) {
132    $('.resources-center .multi-collapse').removeClass('show');
133  }
134});
135$(document).on('click', function (event) {
136  if (
137    !$(event.target).closest('.promo1-left-main').length &&
138      !$(event.target).closest('.popup-btn').length &&
139    !$(event.target).closest('.chat-left').length &&
140	  event.target.id != "nf-field-24"
141  ) {
142    $body.removeClass('modal-open1');
143  }
144});
145
146$('.menu-lavel-1').hover(
147  function (e) {
148    e.stopPropagation();
149    if ($(this).find('.dropdown-full').length > 0) {
150      $('.menu-lavel-1 > a').addClass('opacity-01');
151      $(this).find('a').removeClass('opacity-01');
152    }
153  },
154  function (e) {
155    e.stopPropagation();
156    $('.menu-lavel-1 > a').removeClass('opacity-01');
157  }
158);
159
160$('.ds-input').on('input', function () {
161  $('.desk-search-input').val($(this).val());
162});
163$('.mobile-search-submit').on('click', function () {
164  $('.search-input-box').submit();
165});
166
167/**
168 * message Form bar toggle
169 */
170$('.chat-left').click(function () {
171  $body.toggleClass('modal-open1');
172});
173
174/**
175 * Full height scroll
176 */
177function initFullHeightScrolls() {
178  if (fullHeightSections.length > 0 && $(window).width() >= 992) {
179    scrollToNextSectionTrigger('down');
180  }
181}
182
183function triggerScrolls(direction) {
184  if (!scrollToSectionInitComplete) {
185    return;
186  }
187  if (!waitForFullHeightDetect) {
188    if (
189      direction === 'down' &&
190      (scrollToSectionIndex === fullHeightSections.length - 1 ||
191        scrollToSectionIndex === null)
192    ) {
193      scrollToSectionIndex = null;
194      $(paginationLineEl).hide();
195      return;
196    }
197    if (direction === 'up' && scrollToSectionIndex === null) {
198      direction = 'down';
199    }
200    scrollToNextSectionTrigger(direction);
201  }
202}
203
204function scrollToNextSectionTrigger(direction) {
205  let startWithIndex = 0;
206  fullHeightSections.each(function (i, el) {
207    if (elementInViewport(el)) {
208      startWithIndex = i;
209    }
210  });
211  if (direction === 'up') {
212    startWithIndex = startWithIndex > 0 ? startWithIndex - 1 : 0;
213  }
214  goToFullHeightSectionEl(startWithIndex);
215}
216
217function goToFullHeightSectionEl(index) {
218  waitForFullHeightDetect = true;
219  if (paginationLineEl) {
220    $(paginationLineEl).show();
221    let perSectionWidth = 100 / fullHeightSections.length;
222    let paginationLineWidth = perSectionWidth * (index + 1);
223    $(paginationLineEl).css('width', paginationLineWidth + '%');
224  }
225
226  scrollToPosition($(fullHeightSections[index]).offset().top);
227  scrollToSectionIndex = index;
228  setTimeout(function () {
229    waitForFullHeightDetect = false;
230    scrollToSectionInitComplete = true;
231  }, scrollToSectionSpeed + 200);
232}
233
234function scrollToPosition(position) {
235  $('body,html').animate(
236    {
237      scrollTop: position,
238    },
239    scrollToSectionSpeed
240  );
241}
242
243$('.owl-home-top').owlCarousel({
244  items: 1,
245  loop: true,
246  margin: 0,
247  nav: false,
248  dots: true,
249  autoplay: true,
250  autoplayTimeout:9000,
251  slideSpeed: 7000,
252});
253
254
255$('.test-slider').owlCarousel({
256  items: 1,
257  loop: true,
258  margin: 0,
259  nav: true,
260  dots: false,
261  autoplay: true,
262  autoplayTimeout:9000,
263  slideSpeed: 7000,
264  autoHeight: true,
265});
266
267$('.owl-home-bottom').owlCarousel({
268  navContainer: '#customNav',
269  navText: [
270    '<span aria-label="Previous"></span>',
271    '<span aria-label="Next"></span>',
272  ],
273  loop: false,
274  margin: 30,
275  nav: true,
276  dots: false,
277  items: 1,
278  onInitialized: function (e) {
279    owlHomeBottomPrevNextNavTexts(e);
280  },
281  onChanged: function (e) {
282    owlHomeBottomPrevNextNavTexts(e);
283  },
284});
285
286function owlHomeBottomPrevNextNavTexts(e) {
287  if (e.item.count > 0) {
288    let slides = $('.owl-home-bottom .owl-item');
289    let activeSlide = $(slides[e.item.index]);
290    let previousSlide = $(activeSlide).prev();
291    let nextSlide = $(activeSlide).next();
292    if (previousSlide.length > 0) {
293      let prevText = $(previousSlide).find('.item').attr('data-info');
294      $('#customNav .owl-prev span').html(prevText);
295    } else {
296      $('#customNav .owl-prev span').html('');
297    }
298    if (nextSlide.length > 0) {
299      let nextText = $(nextSlide).find('.item').attr('data-info');
300      $('#customNav .owl-next span').html(nextText);
301    } else {
302      $('#customNav .owl-next span').html('');
303    }
304  }
305}
306var x, i, j, l, ll, selElmnt, a, b, c;
307/*look for any elements with the class "custom-select":*/
308x = document.getElementsByClassName('filter-topic-select');
309l = x.length;
310for (i = 0; i < l; i++) {
311  selElmnt = x[i].getElementsByTagName('select')[0];
312  ll = selElmnt.length;
313  /*for each element, create a new DIV that will act as the selected item:*/
314  a = document.createElement('DIV');
315  a.setAttribute('class', 'select-selected select-drop-down-created');
316  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
317  x[i].appendChild(a);
318  /*for each element, create a new DIV that will contain the option list:*/
319  b = document.createElement('DIV');
320  b.setAttribute('class', 'select-items select-hide filterTopic');
321  for (j = 1; j < ll; j++) {
322    /*for each option in the original select element,
323							create a new DIV that will act as an option item:*/
324    c = document.createElement('DIV');
325    //c.innerHTML = selElmnt.options[j].innerHTML;
326    c.innerHTML = selElmnt.options[j].innerHTML;
327    c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
328    c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
329    c.addEventListener('click', function (e) {
330      /*when an item is clicked, update the original select box,
331										and the selected item:*/
332      var y, i, k, s, h, sl, yl;
333      s = this.parentNode.parentNode.getElementsByTagName('select')[0];
334      sl = s.length;
335      h = this.parentNode.previousSibling;
336      for (i = 0; i < sl; i++) {
337        if (s.options[i].innerHTML == this.innerHTML) {
338          s.selectedIndex = i;
339          h.innerHTML = this.innerHTML;
340          y = this.parentNode.getElementsByClassName('same-as-selected');
341          yl = y.length;
342          for (k = 0; k < yl; k++) {
343            y[k].removeAttribute('class');
344          }
345          this.setAttribute('class', 'same-as-selected');
346          break;
347        }
348      }
349      h.click();
350    });
351    b.appendChild(c);
352  }
353  x[i].appendChild(b);
354  a.addEventListener('click', function (e) {
355    /*when the select box is clicked, close any other select boxes,
356							and open/close the current select box:*/
357    e.stopPropagation();
358    closeAllSelect(this);
359    this.nextSibling.classList.toggle('select-hide');
360    this.classList.toggle('select-arrow-active');
361  });
362}
363
364x = document.getElementsByClassName('filter-type-select');
365l = x.length;
366for (i = 0; i < l; i++) {
367  selElmnt = x[i].getElementsByTagName('select')[0];
368  ll = selElmnt.length;
369  /*for each element, create a new DIV that will act as the selected item:*/
370  a = document.createElement('DIV');
371  a.setAttribute('class', 'select-selected select-drop-down-created');
372  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
373  x[i].appendChild(a);
374  /*for each element, create a new DIV that will contain the option list:*/
375  b = document.createElement('DIV');
376  b.setAttribute('class', 'select-items select-hide filterType');
377  for (j = 1; j < ll; j++) {
378    /*for each option in the original select element,
379							create a new DIV that will act as an option item:*/
380    c = document.createElement('DIV');
381    //c.innerHTML = selElmnt.options[j].innerHTML;
382    c.innerHTML = selElmnt.options[j].innerHTML;
383    c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
384    c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
385    c.addEventListener('click', function (e) {
386      /*when an item is clicked, update the original select box,
387										and the selected item:*/
388      var y, i, k, s, h, sl, yl;
389      s = this.parentNode.parentNode.getElementsByTagName('select')[0];
390      sl = s.length;
391      h = this.parentNode.previousSibling;
392      for (i = 0; i < sl; i++) {
393        if (s.options[i].innerHTML == this.innerHTML) {
394          s.selectedIndex = i;
395          h.innerHTML = this.innerHTML;
396          y = this.parentNode.getElementsByClassName('same-as-selected');
397          yl = y.length;
398          for (k = 0; k < yl; k++) {
399            y[k].removeAttribute('class');
400          }
401          this.setAttribute('class', 'same-as-selected');
402          break;
403        }
404      }
405      h.click();
406    });
407    b.appendChild(c);
408  }
409  x[i].appendChild(b);
410  a.addEventListener('click', function (e) {
411    /*when the select box is clicked, close any other select boxes,
412							and open/close the current select box:*/
413    e.stopPropagation();
414    closeAllSelect(this);
415    this.nextSibling.classList.toggle('select-hide');
416    this.classList.toggle('select-arrow-active');
417  });
418}
419
420x = document.getElementsByClassName('filter-year-select');
421l = x.length;
422for (i = 0; i < l; i++) {
423  selElmnt = x[i].getElementsByTagName('select')[0];
424  ll = selElmnt.length;
425  /*for each element, create a new DIV that will act as the selected item:*/
426  a = document.createElement('DIV');
427  a.setAttribute('class', 'select-selected select-drop-down-created');
428  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
429  x[i].appendChild(a);
430  /*for each element, create a new DIV that will contain the option list:*/
431  b = document.createElement('DIV');
432  b.setAttribute('class', 'select-items select-hide filterYear');
433  for (j = 1; j < ll; j++) {
434    /*for each option in the original select element,
435							create a new DIV that will act as an option item:*/
436    c = document.createElement('DIV');
437    //c.innerHTML = selElmnt.options[j].innerHTML;
438    c.innerHTML = selElmnt.options[j].innerHTML;
439    c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
440    c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
441    c.addEventListener('click', function (e) {
442      /*when an item is clicked, update the original select box,
443										and the selected item:*/
444      var y, i, k, s, h, sl, yl;
445      s = this.parentNode.parentNode.getElementsByTagName('select')[0];
446      sl = s.length;
447      h = this.parentNode.previousSibling;
448      for (i = 0; i < sl; i++) {
449        if (s.options[i].innerHTML == this.innerHTML) {
450          s.selectedIndex = i;
451          h.innerHTML = this.innerHTML;
452          y = this.parentNode.getElementsByClassName('same-as-selected');
453          yl = y.length;
454          for (k = 0; k < yl; k++) {
455            y[k].removeAttribute('class');
456          }
457          this.setAttribute('class', 'same-as-selected');
458          break;
459        }
460      }
461      h.click();
462    });
463    b.appendChild(c);
464  }
465  x[i].appendChild(b);
466  a.addEventListener('click', function (e) {
467    /*when the select box is clicked, close any other select boxes,
468							and open/close the current select box:*/
469    e.stopPropagation();
470    closeAllSelect(this);
471    this.nextSibling.classList.toggle('select-hide');
472    this.classList.toggle('select-arrow-active');
473  });
474}
475
476x = document.getElementsByClassName('filter-solution-select');
477l = x.length;
478for (i = 0; i < l; i++) {
479  selElmnt = x[i].getElementsByTagName('select')[0];
480  ll = selElmnt.length;
481  /*for each element, create a new DIV that will act as the selected item:*/
482  a = document.createElement('DIV');
483  a.setAttribute('class', 'select-selected select-drop-down-created');
484  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
485  x[i].appendChild(a);
486  /*for each element, create a new DIV that will contain the option list:*/
487  b = document.createElement('DIV');
488  b.setAttribute('class', 'select-items select-hide filterYear');
489  for (j = 1; j < ll; j++) {
490    /*for each option in the original select element,
491							create a new DIV that will act as an option item:*/
492    c = document.createElement('DIV');
493    //c.innerHTML = selElmnt.options[j].innerHTML;
494    c.innerHTML = selElmnt.options[j].innerHTML;
495    c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
496    c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
497    c.addEventListener('click', function (e) {
498      /*when an item is clicked, update the original select box,
499										and the selected item:*/
500      var y, i, k, s, h, sl, yl;
501      s = this.parentNode.parentNode.getElementsByTagName('select')[0];
502      sl = s.length;
503      h = this.parentNode.previousSibling;
504      for (i = 0; i < sl; i++) {
505        if (s.options[i].innerHTML == this.innerHTML) {
506          s.selectedIndex = i;
507          h.innerHTML = this.innerHTML;
508          y = this.parentNode.getElementsByClassName('same-as-selected');
509          yl = y.length;
510          for (k = 0; k < yl; k++) {
511            y[k].removeAttribute('class');
512          }
513          this.setAttribute('class', 'same-as-selected');
514          break;
515        }
516      }
517      h.click();
518    });
519    b.appendChild(c);
520  }
521  x[i].appendChild(b);
522  a.addEventListener('click', function (e) {
523    /*when the select box is clicked, close any other select boxes,
524							and open/close the current select box:*/
525    e.stopPropagation();
526    closeAllSelect(this);
527    this.nextSibling.classList.toggle('select-hide');
528    this.classList.toggle('select-arrow-active');
529  });
530}
531
532x = document.getElementsByClassName('filter-industry-select');
533l = x.length;
534for (i = 0; i < l; i++) {
535  selElmnt = x[i].getElementsByTagName('select')[0];
536  ll = selElmnt.length;
537  /*for each element, create a new DIV that will act as the selected item:*/
538  a = document.createElement('DIV');
539  a.setAttribute('class', 'select-selected select-drop-down-created');
540  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
541  x[i].appendChild(a);
542  /*for each element, create a new DIV that will contain the option list:*/
543  b = document.createElement('DIV');
544  b.setAttribute('class', 'select-items select-hide filterYear');
545  for (j = 1; j < ll; j++) {
546    /*for each option in the original select element,
547							create a new DIV that will act as an option item:*/
548    c = document.createElement('DIV');
549    //c.innerHTML = selElmnt.options[j].innerHTML;
550    c.innerHTML = selElmnt.options[j].innerHTML;
551    c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
552    c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
553    c.addEventListener('click', function (e) {
554      /*when an item is clicked, update the original select box,
555										and the selected item:*/
556      var y, i, k, s, h, sl, yl;
557      s = this.parentNode.parentNode.getElementsByTagName('select')[0];
558      sl = s.length;
559      h = this.parentNode.previousSibling;
560      for (i = 0; i < sl; i++) {
561        if (s.options[i].innerHTML == this.innerHTML) {
562          s.selectedIndex = i;
563          h.innerHTML = this.innerHTML;
564          y = this.parentNode.getElementsByClassName('same-as-selected');
565          yl = y.length;
566          for (k = 0; k < yl; k++) {
567            y[k].removeAttribute('class');
568          }
569          this.setAttribute('class', 'same-as-selected');
570          break;
571        }
572      }
573      h.click();
574    });
575    b.appendChild(c);
576  }
577  x[i].appendChild(b);
578  a.addEventListener('click', function (e) {
579    /*when the select box is clicked, close any other select boxes,
580							and open/close the current select box:*/
581    e.stopPropagation();
582    closeAllSelect(this);
583    this.nextSibling.classList.toggle('select-hide');
584    this.classList.toggle('select-arrow-active');
585  });
586}
587
588x = document.getElementsByClassName('filter-resource-select');
589l = x.length;
590for (i = 0; i < l; i++) {
591  selElmnt = x[i].getElementsByTagName('select')[0];
592  ll = selElmnt.length;
593  /*for each element, create a new DIV that will act as the selected item:*/
594  a = document.createElement('DIV');
595  a.setAttribute('class', 'select-selected select-drop-down-created');
596  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
597  x[i].appendChild(a);
598  /*for each element, create a new DIV that will contain the option list:*/
599  b = document.createElement('DIV');
600  b.setAttribute('class', 'select-items select-hide filterYear');
601  for (j = 1; j < ll; j++) {
602    /*for each option in the original select element,
603							create a new DIV that will act as an option item:*/
604    c = document.createElement('DIV');
605    //c.innerHTML = selElmnt.options[j].innerHTML;
606    c.innerHTML = selElmnt.options[j].innerHTML;
607    c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
608    c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
609    c.addEventListener('click', function (e) {
610      /*when an item is clicked, update the original select box,
611										and the selected item:*/
612      var y, i, k, s, h, sl, yl;
613      s = this.parentNode.parentNode.getElementsByTagName('select')[0];
614      sl = s.length;
615      h = this.parentNode.previousSibling;
616      for (i = 0; i < sl; i++) {
617        if (s.options[i].innerHTML == this.innerHTML) {
618          s.selectedIndex = i;
619          h.innerHTML = this.innerHTML;
620          y = this.parentNode.getElementsByClassName('same-as-selected');
621          yl = y.length;
622          for (k = 0; k < yl; k++) {
623            y[k].r
623emoveAttribute('class');
624          }
625          this.setAttribute('class', 'same-as-selected');
626          break;
627        }
628      }
629      h.click();
630    });
631    b.appendChild(c);
632  }
633  x[i].appendChild(b);
634  a.addEventListener('click', function (e) {
635    /*when the select box is clicked, close any other select boxes,
636							and open/close the current select box:*/
637    e.stopPropagation();
638    closeAllSelect(this);
639    this.nextSibling.classList.toggle('select-hide');
640    this.classList.toggle('select-arrow-active');
641  });
642}
643
644
645
646function closeAllSelect(elmnt) {
647  /*a function that will close all select boxes in the document,
648				except the current select box:*/
649  var x,
650    y,
651    i,
652    xl,
653    yl,
654    arrNo = [];
655  x = document.getElementsByClassName('select-items');
656  y = document.getElementsByClassName('select-selected');
657  xl = x.length;
658  yl = y.length;
659  for (i = 0; i < yl; i++) {
660    if (elmnt == y[i]) {
661      arrNo.push(i);
662    } else {
663      y[i].classList.remove('select-arrow-active');
664    }
665  }
666  for (i = 0; i < xl; i++) {
667    if (arrNo.indexOf(i)) {
668      x[i].classList.add('select-hide');
669    }
670  }
671}
672document.addEventListener('click', closeAllSelect);
673
674$(document).ready(function () {
675  // declare variable
676  var scrollTop = $('.scrollTop');
677
678  $(window).scroll(function () {
679    // declare variable
680    var topPos = $(this).scrollTop();
681
682    // if user scrolls down - show scroll to top button
683    if (topPos > 200) {
684      $(scrollTop).css('opacity', '1');
685    } else {
686      $(scrollTop).css('opacity', '0');
687    }
688  }); // scroll END
689
690  //Click event to scroll to top
691  $(scrollTop).click(function () {
692    blnScrollTop = true;
693    $('html, body').animate(
694      {
695        scrollTop: 0,
696      },
697      800
698    );
699    setTimeout(() => {
700      blnScrollTop = false;
701    }, 800);
702    return false;
703  });
704  
705  // Popup Js
706  jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
707          disableOn: 700,
708          type: 'iframe',
709          mainClass: 'mfp-fade',
710          removalDelay: 160,
711          preloader: false,
712
713          fixedContentPos: false
714        });
715		
716	/*team bio toggle*/
717		$('.teambio_item').click(function(){
718			$('.teambio_item').not(this).removeClass('bioopen');
719			$('.teambio_item').not(this).find('.teambio_info').hide();
720			
721			$(this).toggleClass('bioopen');
722			$(this).find('.teambio_info').slideToggle();
723		});
724
725		/*sid code*/
726		$('.typelocation .greenselect').on('change', function(){
727			var value=$(this).val();
728			if(value != 0){
729				$('.typelocation .location_box').hide();
730				$('.typelocation .location_box[data-id="'+value+'"]').show();
731			}else{
732				$('.typelocation .location_box').show();
733			}
734		})	
735  
736}); // ready() END
737
738// jQuery(window).on('load', function () {
739//   x = document.getElementsByClassName('b2iLibToolsContainer');
740//   l = x.length;
741//   for (i = 0; i < l; i++) {
742//     selElmnt = x[i].getElementsByTagName('select')[0];
743//     ll = selElmnt.length;
744//     /*for each element, create a new DIV that will act as the selected item:*/
745//     a = document.createElement('DIV');
746//     a.setAttribute('class', 'select-selected select-drop-down-created');
747//     a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
748    
749//     /*for each element, create a new DIV that will contain the option list:*/
750//     b = document.createElement('DIV');
751//     b.setAttribute('class', 'select-items select-hide filterYear');
752//     for (j = 1; j < ll; j++) {
753//       /*for each option in the original select element,
754//                 create a new DIV that will act as an option item:*/
755//       c = document.createElement('DIV');
756//       //c.innerHTML = selElmnt.options[j].innerHTML;
757//       c.innerHTML = selElmnt.options[j].innerHTML;
758//       c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
759//       c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
760//       c.addEventListener('click', function (e) {
761//         /*when an item is clicked, update the original select box,
762//                       and the selected item:*/
763//         var y, i, k, s, h, sl, yl;
764//         s = this.parentNode.parentNode.getElementsByTagName('select')[0];
765//         sl = s.length;
766//         h = this.parentNode.previousSibling;
767//         for (i = 0; i < sl; i++) {
768//           if (s.options[i].innerHTML == this.innerHTML) {
769//             s.selectedIndex = i;
770//             h.innerHTML = this.innerHTML;
771//             y = this.parentNode.getElementsByClassName('same-as-selected');
772//             yl = y.length;
773//             for (k = 0; k < yl; k++) {
774//               y[k].removeAttribute('class');
775//             }
776//             this.setAttribute('class', 'same-as-selected');
777//             UpdateApiYear(this.innerHTML,'LibDiv');
778//             break;
779//           }
780//         }
781//         h.click();
782//       });
783//       b.prepend(c);
784//     }
785//     x[i].prepend(b);
786//     x[i].prepend(a);
787//   a.addEventListener('click', function (e) {
788//     /*when the select box is clicked, close any other select boxes,
789// 							and open/close the current select box:*/
790//     e.stopPropagation();
791//     closeAllSelect(this);
792//     this.nextSibling.classList.toggle('select-hide');
793//     this.classList.toggle('select-arrow-active');
794//   });
795// }
796// });
797var count=1;
798
799jQuery(document).on("click", "#B2iLibSearchButton", function(){
800  count=1;
801}); 
802jQuery(document).on("click", ".b2iNav a", function(){
803  count=1;
804}); 
805jQuery(document).on("keypress", "#LibSearchLibDiv", function(e){
806  var key = e.which;
807  if(key == 13)  // the enter key code
808   {
809    count=1;
810   }
811}); 
812  
813(function() {
814 
815  const send = XMLHttpRequest.prototype.send;
816  XMLHttpRequest.prototype.send = function() { 
817      this.addEventListener('load', function() {
818        if(count==1){  
819            x = document.getElementsByClassName('b2iLibToolsContainer');
820  l = x.length;
821  for (i = 0; i < l; i++) {
822    selElmnt = x[i].getElementsByTagName('select')[0];
823    ll = selElmnt.length;
824    /*for each element, create a new DIV that will act as the selected item:*/
825    a = document.createElement('DIV');
826    a.setAttribute('class', 'select-selected select-drop-down-created');
827    a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
828    
829    /*for each element, create a new DIV that will contain the option list:*/
830    b = document.createElement('DIV');
831    b.setAttribute('class', 'select-items select-hide filterYear');
832    for (j = 1; j < ll; j++) {
833      /*for each option in the original select element,
834                create a new DIV that will act as an option item:*/
835      c = document.createElement('DIV');
836      //c.innerHTML = selElmnt.options[j].innerHTML;
837      c.innerHTML = selElmnt.options[j].innerHTML;
838      c.setAttribute('data-id', selElmnt.options[j].getAttribute('value'));
839      c.setAttribute('data-cat', selElmnt.options[j].getAttribute('data-cat'));
840      c.addEventListener('click', function (e) {
841        /*when an item is clicked, update the original select box,
842                      and the selected item:*/
843        var y, i, k, s, h, sl, yl;
844        s = this.parentNode.parentNode.getElementsByTagName('select')[0];
845        sl = s.length;
846        h = this.parentNode.previousSibling;
847        for (i = 0; i < sl; i++) {
848          if (s.options[i].innerHTML == this.innerHTML) {
849            s.selectedIndex = i;
850            h.innerHTML = this.innerHTML;
851            y = this.parentNode.getElementsByClassName('same-as-selected');
852            yl = y.length;
853            for (k = 0; k < yl; k++) {
854              y[k].removeAttribute('class');
855            }
856            this.setAttribute('class', 'same-as-selected');
857            count=1;
858            UpdateApiYear(this.innerHTML,'LibDiv');
859            
860            break;
861          }
862        }
863        h.click();
864      });
865      b.prepend(c);
866    }
867    x[i].prepend(b);
868    x[i].prepend(a);
869  a.addEventListener('click', function (e) {
870    /*when the select box is clicked, close any other select boxes,
871							and open/close the current select box:*/
872    e.stopPropagation();
873    closeAllSelect(this);
874    this.nextSibling.classList.toggle('select-hide');
875    this.classList.toggle('select-arrow-active');
876  });
877}
878count++;
879        }
880      })
881      return send.apply(this, arguments)
882  }
883})()
884$(document).ready(function(){
885    $(".search-show-icon").click(function(){
886        $(".search-box-form").addClass("main");
887        $(".search-show-icon").addClass("main");
888    });
889	
890	  // Menu icon Jquer
891    $(".mobile-header button").click(function () {
892      $(".mobile-header button").toggleClass("btn-remove");
893    });
894    //Sub menu toggle js start
895    // main menu toggle of sub-menu
896    $(".mob-menu-has-children > a").click(function(e) {
897      e.preventDefault();
898      // remove .visible from other .sub-menu
899      $(this).next(".mob-menu-has-children").toggleClass('visible');
900      $(this).parent().siblings().children(".moblie-submenu").removeClass('visible');
901
902      // toggle the .visible class on the current parent item
903      
904      
905      // prevent the <a> from default behavior
906      
907
908    });
909    
910    
911
912    $('.post-slider').owlCarousel({		  
913        loop: true,  
914        nav: true,
915        dots: false,
916        autoplay: true,
917        autoplayTimeout:9000,
918        slideSpeed: 7000,		  
919        responsive: {
920        0: {
921          items: 1
922          },
923
924          767: {
925            items: 2
926          },
927
928          1024: {
929            items: 2,
930            nav: true,
931          },
932
933          1366: {
934            items: 3,
935            nav: true,
936          }
937          }
938      });
939		
940		// tabbed content
941			// http://www.entheosweb.com/tutorials/css/tabs.asp
942    $(".tab_content").hide();
943    $(".tab_content:first").show();
944
945		  /* if in tab mode */
946    $("ul.tabs li").click(function() {
947      
948      $(".tab_content").hide();
949      var activeTab = $(this).attr("rel"); 
950      $("#"+activeTab).fadeIn();		
951      
952      $("ul.tabs li").removeClass("active");
953      $(this).addClass("active");
954
955      $(".tab_drawer_heading").removeClass("d_active");
956      $(".tab_drawer_heading[rel^='"+activeTab+"']").addClass("d_active");
957      
958    });
959    /* if in drawer mode */
960    $(".tab_drawer_heading").click(function() {
961      
962      $(".tab_content").hide();
963      var d_activeTab = $(this).attr("rel"); 
964      $("#"+d_activeTab).fadeIn();
965      
966      $(".tab_drawer_heading").removeClass("d_active");
967      $(this).addClass("d_active");
968      
969      $("ul.tabs li").removeClass("active");
970      $("ul.tabs li[rel^='"+d_activeTab+"']").addClass("active");
971    });
972			
973			
974    /* Extra class "tab_last" 
975        to add border to right side
976        of last tab */
977    $('ul.tabs li').last().addClass("tab_last");	
978      
979    /* Js for slider */
980    
981    $(".slideshow-gallery").each(function (idx, t) {
982      slideId = "slider" + idx;
983      this.id = slideId;
984          $(this).next(".slideshow-prev-next").attr("id", slideId),
985          $(this)
986              .slick({
987                  prevArrow: $("#" + slideId + " .prev"),
988                  nextArrow: $("#" + slideId + " .next"),
989                  adaptiveHeight: true,
990                  centerMode: true,
991                  slidesToShow: 3,
992                  responsive: [
993                      { breakpoint: 768, settings: { centerMode: true, slidesToShow: 3 } },
994                      { breakpoint: 480, settings: { centerMode: true, slidesToShow: 1 } },
995                  ],
996                  autoplay: true,
997                  autoplaySpeed: 6000,
998              })
999              .on("beforeChange", (event, slick, currentSlide, nextSlide) => {
1000                nextSlide !== currentSlide &&
1001                      
1002                      $(this).find(".slick-center").nextAll(".slick-active").first().addClass("slick-center");
1003                      $(this).find(".slick-center").prevAll(".slick-active").first().addClass("slick-center");
1004              });
1005    });
1006    $(".slideshow-gallery .lightbox-image").on("click", function () {
1007      $.colorbox({ inline: !0, scrolling: !1, maxWidth: "75%", href: $(this) });
1008    });
1009    $(".slideshow-gallery").each(function (ids, t) {
1010        ids = "slider" + ids;
1011        (this.id = ids), $(this).next(".slideshow-prev-next").attr("id", ids), $(this).slick({ prevArrow: $("#" + ids + " .prev"), nextArrow: $("#" + ids + " .next"), adaptiveHeight: !0 });
1012    })
1013
1014    $(".accordion-label").on("click", function () {
1015      $(this).parent().toggleClass("open");
1016  })
1017      
1018    
1019});
1020
1021
1022$('.accordion:first').addClass('active');
1023$('.spotlighted:first').addClass('active');
1024var timer = null;
1025function startSetInterval() {
1026  timer = setInterval(() => {
1027    if ($('.accordion.active').length) {
1028      //check if last accordion
1029		
1030      if ($('.accordion.active').next().length) {
1031        $('.accordion.active').removeClass('active').next().addClass('active');
1032		
1033		$('.spotlighted.active').removeClass('active').next().addClass('active');
1034      } else {
1035		$('.accordion').removeClass('active');	  
1036        $('.accordion:first').addClass('active');
1037		
1038		$('.spotlighted').removeClass('active');	  
1039        $('.spotlighted:first').addClass('active');
1040      }
1041    }      
1042  }, 6000);
1043}
1044
1045startSetInterval();
1046
1047  const accordions = document.querySelectorAll(".spotlight-three-section .accordion");
1048
1049  accordions.forEach((accordion, index) => {
1050      accordion.onclick = () => {
1051        clearInterval(timer);
1052        $('.accordion').removeClass('active');
1053        $(accordion).addClass('active');
1054        startSetInterval();
1055        $('.spotlighted').removeClass('active');
1056        var index = $('.accordion.active').index() + 1; 
1057        $('.spotlighted:nth-child('+ index+')').addClass('active');
1058      };
1059  });
1060
1061
1062/* team layer js start */
1063  // (function($) {
1064  //   $(document).ready(function() {
1065  //     // Remove Colorbox Close Label Text
1066  //     $(document).bind('cbox_load', function(){
1067  //       $( "#cboxClose" ).empty();
1068  //     });
1069  
1070  //     // People Slideshow
1071  
1072  //     $('.team__slideshow').each(function(idx, item){
1073  //       var sliderId = "slider" + idx;
1074  //       //this.id = sliderId;
1075  
1076  //       $(this).parent('.team__slideshow__container').attr( 'id', sliderId );
1077  //       $(this).next('.slideshow-prev-next').attr('id', sliderId + '_control');
1078  //       //$(this).prev('.team').attr('id', sliderId);
1079  
1080  //       $(this).parent('.team__slideshow__container').parent().prev('.team').find('.person').each(function(){
1081  //         $(this).attr('href', '#' + sliderId);
1082  //       });
1083  
1084  //       $(this).slick({
1085  //         prevArrow: $('#' + sliderId + '_control .prev'),
1086  //         nextArrow: $('#' + sliderId + '_control .next'),
1087  //       });
1088  //     });
1089  
1090  //     // People Lightbox
1091  
1092  //     $('.person').each(function(){
1093  //       var slider = $(this).attr('href');
1094  //       var sliderHeight = $(slider).height();
1095  
1096  //       $(this).colorbox({
1097  //         inline: true,
1098  //         scrolling: false,
1099  //         height: sliderHeight,
1100  //         width: "50%",
1101  //        });
1102
1103  //        $(this).colorbox({ inline: !0, scrolling: !1, height: e, width: "50%" });
1104  //     });
1105  
1106  
1107  //     // Open colorbox on correct slide
1108  //     $('.person').click(function(){
1109  //       var slide = $(this).data('slidenum');
1110  //       var show = $(this).attr('href').replace('#','');
1111  
1112  //       $('.team__slideshow__container').each(function(idx, item){
1113  //         if( this.id == show ) {
1114  //           $(this).children('.team__slideshow').slick('slickGoTo', slide);
1115  //         }
1116  //       });
1117  //     });
1118  
1119  //     // People Accordions
1120  //     $('.team-column .name').click(function(){
1121  //       $(this).toggleClass('open');
1122  //       $(this).next('.info').toggle('slow');
1123  //     });
1124  
1125  //   });
1126  // })(jQuery);
1127
1128  $(document).bind("cbox_load", function() {
1129    $("#cboxClose").empty()
1130}),
1131$(".team__slideshow").each(function(e, t) {
1132    var i = "slider" + e;
1133    $(this).parent(".team__slideshow__container").attr("id", i),
1134    $(this).next(".slideshow-prev-next").attr("id", i + "_control"),
1135    $(this).parent(".team__slideshow__container").parent().prev(".team").find(".person").each(function() {
1136        $(this).attr("href", "#" + i)
1137    }),
1138    $(this).slick({
1139        prevArrow: $("#" + i + "_control .prev"),
1140        nextArrow: $("#" + i + "_control .next")
1141    })
1142}),
1143$(".person").each(function(e) {
1144    $(this).colorbox({
1145        inline: !0,
1146        scrolling: !1,
1147        width: "50%",
1148        height: "80%",
1149    })
1150}),
1151$(".person").click(function() {
1152    var i = $(this).data("slidenum")
1153      , n = $(this).attr("href").replace("#", "");
1154    $(".team__slideshow__container").each(function(e, t) {
1155        this.id == n && $(this).children(".team__slideshow").slick("slickGoTo", i, "slidesToScroll", 1, "arrows", true)
1156    })
1157}),
1158$(".team-column .name").click(function() {
1159    $(this).toggleClass("open"),
1160    $(this).next(".info").toggle("slow")
1161})
1162// $(".people_popup").click(function() {
1163// // 	  alert('sdsds');
1164//     var i = $(this).data("slidenum")
1165//       , n = $(this).attr("href").replace("#", "");
1166//     $(".team__slideshow__container").each(function(e, t) {
1167//         this.id == n && $(this).children(".team__slideshow").slick("slickGoTo", i, "slidesToScroll", 1, "arrows", true)
1168//     })
1169// }),
1170/* team layer js end */
1171
1172$('.person').colorbox({
1173  onOpen: function(){
1174    $('body').css({ overflow: 'hidden' });
1175  },
1176  onClosed: function(){
1177     $('body').css({ overflow: '' });
1178  }
1179});

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.