PageSourceSearch

https://noravmedical.com/wp-content/themes/norav/assets/js/scripts.js?ver=8820

js noravmedical.com collected 2026-10-02 11:11:26 UTC 36,196 bytes, 1,252 lines download raw bytes

1jQuery(document).ready(function ($) {
2  function sliderProducts(
3    classSlider,
4    classPrevBtn,
5    classNextBtn,
6    infinite = false
7  ) {
8    if ($(classSlider).length && $(classSlider).find(".item").length > 3) {
9      $(classSlider).slick({
10        infinite: infinite,
11        slidesToShow: 3,
12        slidesToScroll: 1,
13        dots: true,
14        arrows: false,
15        variableWidth: true,
16        responsive: [
17          {
18            breakpoint: 767,
19            settings: {
20              slidesToShow: 1,
21              slidesToScroll: 1,
22              infinite: false,
23              dots: true,
24            },
25          },
26        ],
27      });
28      $(classPrevBtn).click(function () {
29        $(classSlider).slick("slickPrev");
30      });
31      $(classNextBtn).click(function () {
32        $(classSlider).slick("slickNext");
33      });
34    }
35  }
36
37  // add url to hidden wpcf7 
38  var url = window.location.href;  
39  console.log("url"+url);		 
40  $('input.wpcf7-form-control.wpcf7-hidden').attr("value",url) ; 	
41  
42  // mobile menu
43  $(".open-main-menu").click(function () {
44    $(this).toggleClass("active");
45    $(".mobile-header-menu").toggleClass("active");
46    if ($(".mobile-header-menu").hasClass("active")) {
47      $("html, body").css({
48        overflow: "hidden",
49        height: "100%",
50      });
51    } else {
52      $("html, body").css({
53        overflow: "auto",
54        height: "auto",
55      });
56    }
57  });
58
59  // style all select
60  $("select").niceSelect();
61
62  // submit event
63  document.addEventListener(
64    "wpcf7mailsent",
65    function (event) {
66      if ("45" == event.detail.contactFormId) {
67        $(".contact-us__left .wrap-button .message").show();
68      }
69    },
70    false
71  );
72
73  // banner slider
74  $(".banner-slider .home_slider").slick({
75//     lazyLoad: "ondemand",
76    infinite: false,
77    slidesToShow: 1,
78    slidesToScroll: 1,
79    dots: true,
80    arrows: false,
81    cssEase: "linear",
82    autoplay: true,
83    autoplaySpeed: 7000,
84	  fade: true,
85  });
86
87  $('.banner-slider .sbtn_mbl').insertBefore($('.home_slider .slick-dots'));
88
89  $(".banner-slider .home_slider").on(
90    "lazyLoaded",
91    function (event, slick, currentSlide, nextSlide) {
92      currentSlide.closest(".banner-slide").addClass("active-fade");
93    }
94  );
95
96  // $('.banner-slider .container').on('afterChange', function(slick, currentSlide) {
97  // 	console.log(slick);
98  // });
99
100  // banner slider
101  if ($(".our-product-lines .products-cat").length > 5) {
102    $(".our-product-lines .products-cats").slick({
103      infinite: false,
104      slidesToShow: 7,
105      slidesToScroll: 1,
106      dots: true,
107      arrows: false,
108      cssEase: "linear",
109      //autoplay: true,
110      autoplaySpeed: 4000,
111      // centerMode: true,
112      // variableWidth: true,
113      responsive: [
114        {
115          breakpoint: 1400,
116          settings: {
117            slidesToShow: 6,
118            slidesToScroll: 1,
119          }
120        },
121        {
122          breakpoint: 1100,
123          settings: {
124            slidesToShow: 5,
125            slidesToScroll: 1,
126          }
127        },
128        {
129          breakpoint: 1024,
130          settings: "unslick",
131        },
132      ],
133    });
134    $(".our-product-lines .top .btn-wrap").css("display", "flex");
135    // $(".our-product-lines__prev-btn").click(function () {
136    //   $(".our-product-lines .products-cats").slick("slickPrev");
137    // });
138    // $(".our-product-lines__next-btn").click(function () {
139    //   $(".our-product-lines .products-cats").slick("slickNext");
140    // });
141  }
142
143  // standards slider
144  $(".standards__slider-logos").slick({
145    infinite: true,
146    slidesToShow: 6,
147    slidesToScroll: 1,
148    dots: false,
149    // cssEase: 'linear',
150    autoplay: true,
151    autoplaySpeed: 3000,
152    // centerMode: true,
153    // variableWidth: true
154    responsive: [
155      {
156        breakpoint: 1025,
157        settings: "unslick",
158      },
159    ],
160  });
161
162  // post slider
163  $(".news-blog__posts").slick({
164    // infinite: true,
165    slidesToShow: 1,
166    slidesToScroll: 1,
167    dots: true,
168    arrows: false,
169    cssEase: "linear",
170    // autoplay: true,
171    autoplaySpeed: 3000,
172    // centerMode: true,
173    variableWidth: true,
174    responsive: [
175      {
176        breakpoint: 1025,
177        settings: {
178          infinite: false,
179        },
180      },
181    ],
182  });
183  $(".news-blog__prev-btn").click(function () {
184    $(".news-blog__posts").slick("slickPrev");
185  });
186  $(".news-blog__next-btn").click(function () {
187    $(".news-blog__posts").slick("slickNext");
188  });
189
190  // standards slider
191  if ($(".related-market-segments__list .item").length > 4) {
192    $(".related-market-segments__list").slick({
193      infinite: true,
194      slidesToShow: 3,
195      slidesToScroll: 3,
196      dots: true,
197      arrows: false,
198      cssEase: "linear",
199      autoplay: true,
200      autoplaySpeed: 3000,
201      centerMode: true,
202      variableWidth: true,
203      responsive: [
204        {
205          breakpoint: 1024,
206          settings: {
207            centerMode: false,
208            slidesToShow: 1,
209            slidesToScroll: 1,
210          },
211        },
212      ],
213    });
214  }
215
216  //Norav's History Slider
217  $(".about-history__slider-js").slick({
218    slidesToShow: 1,
219    slidesToScroll: 1,
220    arrows: false,
221    fade: true,
222    accessibility: false,
223    focusOnSelect: false,
224    draggable: false,
225  });
226
227  $(".about-history__slider-nav-js").slick({
228    slidesToShow: 8,
229    slidesToScroll: 1,
230    asNavFor: ".about-history__slider-js",
231    dots: false,
232    arrows: true,
233    centerMode: false,
234    focusOnSelect: false,
235    accessibility: false,
236    variableWidth: true,
237    infinite: false,
238    responsive: [
239      {
240        breakpoint: 1024,
241        settings: {
242          slidesToScroll: 2,
243        },
244      },
245    ],
246  });
247
248  $(".about-history__slider-nav-js").on(
249    "beforeChange",
250    function (event, slick, currentSlide, nextSlide) {
251      nextSlide = $(slick.$slides.get(nextSlide));
252
253      $(".about-history__slider-nav-js").find("path").attr("fill", "");
254      $(".about-history__slider-nav-js").find("p").css("color", "#FFFFFF");
255
256      $(nextSlide).find("p").css("color", "#00B2F2");
257      $(nextSlide).find("path").attr("fill", "#F7F5FB");
258    }
259  );
260
261  $(".about-history__slider-nav-js .slick-slide").on(
262    "mouseover",
263    function (event) {
264      $(".about-history__slider-js").slick(
265        "slickGoTo",
266        $(this).data("slickIndex")
267      );
268      $(".about-history__slider-nav-js").find("path").attr("fill", "");
269      $(".about-history__slider-nav-js").find("p").css("color", "#FFFFFF");
270      $(this).find("p").css("color", "#00B2F2");
271      $(this).find("path").attr("fill", "#F7F5FB");
272    }
273  );
274
275  // Global Pressence Map Slider (About Us Page)
276
277  $(".about-global-pressence-slider-js").slick({
278    slidesToShow: 1,
279    slidesToScroll: 1,
280    arrows: false,
281
282    focusOnSelect: false,
283    draggable: true,
284    dots: true,
285  });
286
287  //Job Cards Slider (About Us Page)
288  $(".about-careers-job-slider-js").slick({
289    slidesToShow: 1,
290    slidesToScroll: 1,
291    arrows: false,
292    fade: true,
293    focusOnSelect: false,
294    draggable: true,
295    dots: true,
296  });
297
298  //Diagnostic Applications Slider
299
300  $(".diagnostic-applications__slider-js").slick({
301    slidesToShow: 1,
302    slidesToScroll: 1,
303    arrows: false,
304    fade: false,
305    focusOnSelect: false,
306    draggable: true,
307    dots: true,
308    variableWidth: true,
309    infinite: false,
310  });
311
312  // Tabs
313
314  $(".about-anchors-slider-js").slick({
315    slidesToShow: 1,
316    slidesToScroll: 1,
317    arrows: false,
318    focusOnSelect: false,
319    draggable: true,
320    dots: false,
321    variableWidth: true,
322    infinite: false,
323  });
324
325  $(".diagnostic-applications__tabs-texts .text-wrap").hover(function () {
326    $(".diagnostic-applications__tabs-texts .text-wrap").removeClass("active");
327    $(this).addClass("active");
328    let numTab = $(this).data("num-tab");
329    $(".diagnostic-applications__tabs-images img").removeClass("active");
330    $(".diagnostic-applications__tabs-images .img-" + numTab).addClass(
331      "active"
332    );
333  });
334
335  if ($(".diagnostic-applications").length) {
336    controller = new ScrollMagic.Controller({
337      globalSceneOptions: { duration: 50 },
338    });
339
340    $(".diagnostic-applications .bottom .text-wrap").each(function (
341      index,
342      element
343    ) {
344      index = index + 1;
345      new ScrollMagic.Scene({
346        triggerElement: ".diagnostic-applications .bottom .text-wrap-" + index,
347      })
348        .on("start", (event) => {
349          $(".diagnostic-applications .bottom .text-wrap").removeClass(
350            "active"
351          );
352          $(".diagnostic-applications .bottom .text-wrap-" + index).addClass(
353            "active"
354          );
355          $(
356            ".diagnostic-applications .diagnostic-applications__tabs-images img"
357          ).removeClass("active");
358          $(
359            ".diagnostic-applications .diagnostic-applications__tabs-images .img-" +
360              index
361          ).addClass("active");
362        })
363        .addTo(controller);
364    });
365  }
366
367  //Search Tabs Slider (Search Page Mobile)
368
369  $(".search-tabs__slider-js").slick({
370    slidesToShow: 1,
371    slidesToScroll: 1,
372    arrows: false,
373    focusOnSelect: false,
374    draggable: true,
375    dots: false,
376    variableWidth: true,
377    infinite: false,
378  });
379
380  //Resouces Page Menu Cats Slider (Mobile)
381
382  $(".posts-content__menu-cats .menu-cats__slider-js").slick({
383    slidesToShow: 1,
384    slidesToScroll: 1,
385    arrows: false,
386    focusOnSelect: false,
387    draggable: true,
388    dots: false,
389    variableWidth: true,
390    infinite: false,
391  });
392
393  // newsletter custom checkbox
394  $('.newsletter form .bottom .wpcf7-form-control-wrap [type="checkbox"]').on(
395    "click",
396    function () {
397      if ($(this).is(":checked")) {
398        $(".newsletter form .bottom .wpcf7-form-control-wrap").addClass(
399          "checked"
400        );
401      } else {
402        $(".newsletter form .bottom .wpcf7-form-control-wrap").removeClass(
403          "checked"
404        );
405      }
406    }
407  );
408
409  // tabs videos
410  $(".nems-web-system-highlights__list .item").hover(function () {
411    let num = $(this).data("num");
412    $(".nems-web-system-highlights__list .item").removeClass("active");
413    $(".nems-web-system-highlights__video-wrap").removeClass("active");
414    $(this).addClass("active");
415    $(".nems-web-system-highlights__video-wrap.video-" + num).addClass(
416      "active"
417    );
418  });
419
420  // tabs Essential Capabilities
421  $(".powerful-features__tabs .tab-title").hover(function () {
422    if (window.innerWidth > 1024) {
423      let num = $(this).data("num");
424      $(".powerful-features__tabs .tab-title").removeClass("active");
425      $(".powerful-features__tabs .tab-description").removeClass("active");
426      $(this).addClass("active");
427      $(".powerful-features__tabs .tab-description-" + num).addClass("active");
428    }
429  });
430
431  // tabs NEMS Web
432  $(".nems-web__list-titles .item").hover(function () {
433    if (window.innerWidth > 1024) {
434      let num = $(this).data("num");
435      $(".nems-web__list-titles .item").removeClass("active");
436      $(".nems-web__list-descriptions .item").removeClass("active");
437      $(this).addClass("active");
438      $(".nems-web__list-descriptions .item-" + num).addClass("active");
439    }
440  });
441
442  if ($(".nems-web__list").length) {
443    // init controller
444    var controller = new ScrollMagic.Controller({
445      globalSceneOptions: { duration: 50 },
446    });
447
448    // build scenes
449    $(".nems-web__list-titles .item").each(function (index, element) {
450      index = index + 1;
451      new ScrollMagic.Scene({
452        triggerElement: ".nems-web__list-titles .item-" + index,
453      })
454        .on("start", (event) => {
455          if (window.innerWidth > 1024) {
456            $(".nems-web__list-titles .item").removeClass("active");
457            $(".nems-web__list-titles .item-" + index).addClass("active");
458            $(".nems-web__list-descriptions .item").removeClass("active");
459            $(".nems-web__list-descriptions .item-" + index).addClass("active");
460          }
461        })
462        // .addIndicators() // add indicators (requires plugin)
463        .addTo(controller);
464    });
465  }
466
467  // link to language
468  // remove this code after adding translation for polylang - start
469  // $(".pll-switcher-select .list .option").each(function () {
470  //   let currentLang = $(this).html();
471  //   if (currentLang == "fr") {
472  //     $(this).hide();
473  //   }
474  // });
475  // remove this code after adding translation for polylang - end
476  $(".pll-switcher-select .list .option").on("click", function () {
477    let url = $(this).data("value");
478
479    // // remove this code after adding translation for polylang - start
480    // let currentLang = $(this).html();
481    // if (currentLang == "de") {
482    //   window.location.href = "https://tali377.wixsite.com/norav/home-de";
483    // } else if (currentLang == "es") {
484    //   window.location.href = "https://tali377.wixsite.com/norav/inicio";
485    // } else if (currentLang == "ja") {
486    //   window.location.href = "https://tali377.wixsite.com/norav/home-jp";
487    // }
488    // remove this code after adding translation for polylang - end
489
490    // uncomment this code after adding translation for Polylang - start
491    window.location.href = url;
492    // uncomment this code after adding translation for Polylang - end
493  });
494  if ($("body.error404").length) {
495    let currentLang = $(".header-lang").data("current-lang");
496    $(".nice-select.pll-switcher-select > span").html(currentLang);
497    $(".nice-select.pll-switcher-select .list li").each(function (
498      index,
499      value
500    ) {
501      if ($(value).html() == currentLang) {
502        $(value).addClass("selected");
503      } else {
504        $(value).removeClass("selected");
505      }
506    });
507  }
508
509  // standards slider
510  if ($(".single-product-banner .slider").length) {
511    $(".single-product-banner .slider").slick({
512      // infinite: true,
513      slidesToShow: 1,
514      slidesToScroll: 1,
515      dots: true,
516      arrows: true,
517      cssEase: "linear",
518      autoplay: true,
519      autoplaySpeed: 3000,
520      responsive: [
521        {
522          breakpoint: 1025,
523          settings: {
524            arrows: false,
525          },
526        },
527      ],
528    });
529  }
530
531  // information tabs
532  $(".information-tabs__titles .title").on("click", function () {
533    let num = $(this).data("num");
534    $(".information-tabs__titles .title").removeClass("active");
535    $(".information-tabs__descriptions .description").removeClass("active");
536    $(this).addClass("active");
537    $(".information-tabs__descriptions .description-" + num).addClass("active");
538  });
539
540  // slider products
541  sliderProducts(
542    ".slider-products--single",
543    ".slider-products-prev-btn",
544    ".slider-products-next-btn"
545  );
546  //sliderProducts('.slider-products--tax-segments', '.slider-products-prev-btn', '.slider-products-next-btn', false);
547  sliderProducts(
548    ".slider-products--tax-products-parent:not(.slider-products-mobile-js)",
549    ".slider-products-prev-btn",
550    ".slider-products-next-btn"
551  );
552  $(".slider-products--tax-products-children").each(function (index) {
553    let num = index + 1;
554    sliderProducts(
555      ".slider-products--tax-products-" + num,
556      ".slider-products-children-prev-btn-" + num,
557      ".slider-products-children-next-btn-" + num
558    );
559  });
560
561  $(".slider-products--tax-segments").each(function () {
562    let catId = $(this).data("id");
563    sliderProducts(
564      ".slider-products--tax-segments.slider-products-" + catId,
565      ".slider-products-prev-btn",
566      ".slider-products-next-btn",
567      false
568    );
569  });
570
571  //slider products mobile
572
573  $(".slider-products-mobile-js").slick({
574    slidesToShow: 1,
575    slidesToScroll: 1,
576    dots: true,
577    arrows: false,
578    variableWidth: true,
579    infinite: false,
580  });
581
582  // slider products more description
583  $(".slider-products .item__more").on("click", function () {
584    $(this).toggleClass("open");
585    $(this)
586      .parent(".item__text")
587      .find(".item__description")
588      .toggleClass("open");
589  });
590
591  $(".slider-products-mobile-js .item__more").on("click", function () {
592    $(this).toggleClass("open");
593    $(this)
594      .parent(".item__text")
595      .find(".item__description")
596      .toggleClass("open");
597  });
598
599  // slider products add the same height
600  let hSlideProduct = 0;
601  $(".slider-products .item")
602    .each(function () {
603      let h = $(this).height();
604      if (h > hSlideProduct) {
605        hSlideProduct = h;
606      }
607    })
608    .css("min-height", hSlideProduct + "px");
609
610  // related segments slider
611  if ($(".related-segments__list").length) {
612
613      if ($(".related-segments__list").hasClass('slick-initialized')) {
614          $(".related-segments__list").slick('unslick');
615      }
616
617      $(".related-segments__list").css('max-width', 'none'); 
618
619      $(".related-segments__list").slick({
620          autoplay: true,
621          infinite: true,
622          slidesToShow: 5, 
623          slidesToScroll: 1,
624          autoplaySpeed: 3000,
625          speed: 800,
626          dots: true,
627          arrows: false,
628          
629          variableWidth: false, 
630          centerMode: true,   
631          cssEase: 'linear',
632          
633          responsive: [
634            {
635              breakpoint: 1600, 
636              settings: {
637                slidesToShow: 5,
638              }
639            },
640            {
641              breakpoint: 1366, 
642              settings: {
643                slidesToShow: 4,
644              }
645            },
646            {
647              breakpoint: 1024, 
648              settings: {
649                slidesToShow: 3,
650              }
651            },
652            {
653              breakpoint: 767, 
654              settings: {
655                centerMode: false,
656                slidesToShow: 1,
657                variableWidth: true 
658              },
659            },
660          ],
661      });
662      
663      $(".related-segments-prev-btn").off('click').on('click', function () {
664          $(".related-segments__list").slick("slickPrev");
665      });
666      $(".related-segments-next-btn").off('click').on('click', function () {
667          $(".related-segments__list").slick("slickNext");
668      });
669  }
670
671  // Related Product Lines tabs
672  $(".related-product-lines__top .tab-title").on("click", function () {
673    let id = $(this).data("id");
674    $(".related-product-lines__top .tab-title").removeClass("active");
675    $(".related-product-lines__bottom .slider-products").removeClass("active");
676    $(".related-product-lines .wrap-btn").removeClass("active");
677    $(this).addClass("active");
678    $(".related-product-lines__bottom .slider-products-" + id).addClass(
679      "active"
680    );
681    $(".related-product-lines .wrap-btn-" + id).addClass("active");
682  });
683
684  // slider products
685  if ($(".related-product-lines__top .tabs-titles").length) {
686    if ($(".related-product-lines__top .tabs-titles").width() < 900) {
687      $(".related-product-lines__top").addClass("active");
688      $(".related-product-lines__top .tabs-titles").css(
689        "width",
690        jQuery(".related-product-lines__top .tabs-titles").width()
691      );
692    }
693    $(".related-product-lines__top:not(.hidden-1024-flex) .tabs-titles").slick({
694      infinite: false,
695      slidesToShow: 1,
696      slidesToScroll: 1,
697      dots: false,
698      arrows: false,
699      variableWidth: true,
700    });
701    $(".related-product-lines__top .products-prev-btn").click(function () {
702      $(".related-product-lines__bottom .slider-products.active").slick(
703        "slickPrev"
704      );
705    });
706    $(".related-product-lines__top .products-next-btn").click(function () {
707      $(".related-product-lines__bottom .slider-products.active").slick(
708        "slickNext"
709      );
710    });
711  }
712
713  /** Image to SVG **/
714  // chage img tag class to svg or other
715  $("img.svg").each(function () {
716    var $img = $(this);
717    var imgID = $img.attr("id");
718    var imgClass = $img.attr("class");
719    var imgURL = $img.attr("src");
720
721    $.get(
722      imgURL,
723      function (data) {
724        // Get the SVG tag, ignore the rest
725        var $svg = $(data).find("svg");
726
727        // Add replaced image's ID to the new SVG
728        if (typeof imgID !== "undefined") {
729          $svg = $svg.attr("id", imgID);
730        }
731        // Add replaced image's classes to the new SVG
732        if (typeof imgClass !== "undefined") {
733          $svg = $svg.attr("class", imgClass + " replaced-svg");
734        }
735
736        // Remove any invalid XML tags as per http://validator.w3.org
737        $svg = $svg.removeAttr("xmlns:a");
738
739        // Check if the viewport is set, else we gonna set it if we can.
740        if (
741          !$svg.attr("viewBox") &&
742          $svg.attr("height") &&
743          $svg.attr("width")
744        ) {
745          $svg.attr(
746            "viewBox",
747            "0 0 " + $svg.attr("height") + " " + $svg.attr("width")
748          );
749        }
750
751        // Replace image with new SVG
752        $img.replaceWith($svg);
753      },
754      "xml"
755    );
756  });
757
758  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
759
760  // Downloads tabs
761  //Temporary disable functionality for mobile
762
763  $(".downloads__list .item").on("click", function () {
764    if ($(window).width() > 1220) {
765      let id = $(this).data("num");
766      $(".downloads__list .item").removeClass("active");
767      $(this).addClass("active");
768      $(".downloads__list .content").removeClass("active");
769      $(".downloads__list .content-" + id).addClass("active");
770    }
771  });
772
773  $(".downloads__list .content__btn").on("click", function () {
774    $(".downloads__list .item").removeClass("active");
775    $(".downloads__list .content").removeClass("active");
776  });
777
778  // Product Lines Resources tabs
779  //Temporary disable functionality for mobile
780
781  $(".product-lines-resources__categoties .item").on("click", function () {
782    if ($(window).width() > 1024) {
783      let id = $(this).data("num");
784      $(".product-lines-resources__categoties .item").removeClass("active");
785      $(this).addClass("active");
786      $(".product-lines-resources__categoties .content").removeClass("active");
787      $(".product-lines-resources__categoties .content-" + id).addClass(
788        "active"
789      );
790    }
791  });
792  $(".product-lines-resources__categoties .content__btn").on(
793    "click",
794    function () {
795      $(".product-lines-resources__categoties .item").removeClass("active");
796      $(".product-lines-resources__categoties .content").removeClass("active");
797    }
798  );
799
800  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
801
802  // ajax Product Lines Resources
803  $(".product-lines-resources__categoties .content__list-post .item-product").on("click", function () {
804    let wrapBreadCrumbs = $(this).closest(".content").find(".content__breadcrumbs");
805    let wrapDownloads = $(this).closest(".content").find(".content__list-downloads");
806    let idProduct = $(this).data("post-id");
807    let subCat = $(this).data("subcat");
808    $( ".product-lines-resources__categoties .content__list-post .item-product" ).removeClass("active");
809    $(this).addClass("active");
810    if(!$(this).parent().hasClass('wrap-child-cat')) {
811      $(this).siblings('.wrap-child-cat').removeClass("active");
812    }
813
814    $.ajax({
815      url: wp_helper.ajax_url,
816      data: {
817        //hook in php
818        action: "product_lines_resources",
819        id_product: idProduct,
820        sub_cat: subCat,
821      },
822      type: "POST",
823      beforeSend: function () {
824        wrapDownloads.find(".empty").html('<div class="lds-dual-ring"></div>');
825      },
826      success: function (response) {
827        if (response) {
828          wrapBreadCrumbs.html(response.top);
829          wrapDownloads.html(response.html);
830        }
831      },
832    });
833  });
834
835  // play video
836  $(".virtual-training .content__right .video-wrap .play").on(
837    "click",
838    function (ev) {
839      let dataSrc = $(
840        ".virtual-training .content__right .video-wrap iframe"
841      ).data("src");
842      $(".virtual-training .content__right .video-wrap iframe").attr(
843        "src",
844        dataSrc
845      );
846      $(this).hide();
847      $(
848        ".virtual-training .content__right .video-wrap .video-wrap__placeholder"
849      ).hide();
850      $(".virtual-training .content__right .video-wrap iframe").show();
851      //as noted in addendum, check for querystring exitence
852      var symbol =
853        $(
854          ".virtual-training .content__right .video-wrap iframe"
855        )[0].src.indexOf("?") > -1
856          ? "&"
857          : "?";
858      //modify source to autoplay and start video
859      $(".virtual-training .content__right .video-wrap iframe")[0].src +=
860        symbol + "autoplay=1";
861      ev.preventDefault();
862    }
863  );
864  $(document).on('click','.product-lines-resources__categoties .child-cat',function(){ 
865    $(this).closest(".wrap-child-cat").toggleClass("active");
866    $(this).find('.item-product').removeClass("active");
867    $(this).parent().siblings().removeClass("active");
868    $(this).parent().siblings().find('.item-product').removeClass("active");
869  });
870
871  // Comparison Table tabs
872  $(".comparison-table .tab-title").on("click", function () {
873    let id = $(this).data("num");
874    $(".comparison-table .tab-title").removeClass("active");
875    $(this).addClass("active");
876    $(".comparison-table .tab-img").removeClass("active");
877    $(".comparison-table .tab-img-" + id).addClass("active");
878  });
879
880  // FAQ Accordion
881  $(".faq--accordion__subtitle").on("click", function () {
882    $(this).toggleClass("active");
883    $(this).next(".faq--accordion__description").toggleClass("active");
884  });
885
886  // About Us Anchors
887  $(".about-anchor-js").on("click", function () {
888    $(".about-anchor-js").removeClass("active");
889    $(this).addClass("active");
890  });
891
892  // electrode placement tabs -- al
893  $(".electrode-placement__list .list-left .item").hover(function () {
894    if (window.innerWidth > 1024) {
895      let id = $(this).data("num");
896      $(".electrode-placement__list .list-left .item").removeClass("active");
897      $(".electrode-placement__list .list-center .item").removeClass("active");
898      $(".electrode-placement__list .list-right .item").removeClass("active");
899      $(this).addClass("active");
900      $(".electrode-placement__list .list-center .item-" + id).addClass("active");
901      $(".electrode-placement__list .list-right .item-" + id).addClass("active");
902    }
903  }); 
904
905  //About Us Careers Job Cards
906
907  $(".about-careers__job-card .job-more-btn").on("click", function () {
908    //getting card content DOM element
909    let cardContent = $(".about-careers__job-cards")
910      .find(
911        `.about-careers__job-card-info[data-card-id='${$(this).data(
912          "card-id"
913        )}']`
914      )
915      .get();
916    let parentNode = $(this).parent();
917
918    //hiding all card contents and showing related card content only
919    if ($(this).data("opened")) {
920      $(this).text("MORE INFO").data("opened", 0).addClass("closed-job-card");
921      $(cardContent).css("display", "none");
922      $(parentNode).removeClass("active-card");
923    } else {
924      $(".about-careers__job-card-info").css("display", "none");
925      $(cardContent).css("display", "flex");
926      $(".about-careers__job-card .job-more-btn")
927        .text("MORE INFO")
928        .data("opened", 0)
929        .addClass("closed-job-card");
930      $(this)
931        .text("SHOW LESS")
932        .data("opened", 1)
933        .removeClass("closed-job-card");
934      $(".about-careers__job-card").removeClass("active-card");
935      $(parentNode).addClass("active-card");
936    }
937  });
938
939  $(".about-careers__job-card-info .job-show-less-btn").on(
940    "click",
941    function () {
942      let cardContent = $(".about-careers__job-cards")
943        .find(
944          `.about-careers__job-card-info[data-card-id='${$(this).data(
945            "card-id"
946          )}']`
947        )
948        .get();
949      let showLessBtn = $(".about-careers__job-cards")
950        .find(
951          `.about-careers__job-card .job-more-btn[data-card-id='${$(this).data(
952            "card-id"
953          )}']`
954        )
955        .get();
956
957      $(showLessBtn)
958        .text("MORE INFO")
959        .data("opened", 0)
960        .addClass("closed-job-card");
961      $(showLessBtn).parent().removeClass("active-card");
962      $(cardContent).css("display", "none");
963    }
964  );
965
966  //Search Form Hide/Show/Clear
967  $(".search-wrapper svg").on("click", function () {
968    let parentNode = $(this).parent();
969
970    $(this).css("display", "none");
971    $(parentNode).find(".form-search").css("display", "block");
972    $(parentNode).find("input[type='search']").focus();
973  });
974
975  $(".search-wrapper .form-close-js").on("click", function () {
976    $(".search-wrapper svg").css("display", "flex");
977    $(this).parent().css("display", "none");
978  });
979
980  $(".search-input-form .form-close-js").on("click", function () {
981    $(".search-input-form input[type='search']").val("");
982  });
983
984  //Search Tabs on Search Page
985
986  $(".form-search-tab").on("click", function () {
987    if (!$(this).data("active")) {
988      return;
989    }
990
991    $(this).submit();
992  });
993
994  $(".search-page__show-more-btn").on("click", function () {
995    $(this).submit();
996  });
997
998  //Load hidden posts (mobile 'load more')
999
1000  $(".load-hidden-posts-js").on("click", function () {
1001    $(this).css("display", "none");
1002    $(".hidden-load-more-post").css({
1003      opacity: "0",
1004    });
1005    $(".hidden-load-more-post").addClass("active").animate({ opacity: 1 }, 300);
1006  });
1007
1008  // AOS init
1009  // AOS.init();
1010
1011  function isMobileDevice() {
1012    return /Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
1013  }
1014
1015  function scrollToTarget() {
1016      var target = $('.about-distributor__form.contact-us__left');
1017      if (target.length) {
1018          $('html, body').animate({
1019              scrollTop: target.offset().top - 100
1020          }, 800);
1021      }
1022  }
1023
1024  if (isMobileDevice() && window.location.pathname === "/about/" && window.location.hash === "#about-distributor") {
1025      setTimeout(scrollToTarget, 500); 
1026  }
1027
1028  function circRandomMove(elems) {
1029    let circ = document.querySelectorAll(elems);
1030    let newq;
1031    let h, w, nh, nw, s;
1032
1033    function newPosition() {
1034      h = window.innerHeight - 50;
1035      w = window.innerWidth - 50;
1036      nh = Math.floor(Math.random() * h);
1037      nw = Math.floor(Math.random() * w);
1038      s = Math.floor(Math.random() * 1000) + 500;
1039      return [nh, nw, s];
1040    }
1041
1042    circ.forEach(function circ(myclass) {
1043      let newq = newPosition();
1044      $(myclass).animate(
1045        {
1046          top: newq[0],
1047          left: newq[1],
1048        },
1049        10000,
1050        function () {
1051          circ(myclass);
1052        }
1053      );
1054    });
1055  }
1056
1057  circRandomMove(".circle-404");
1058
1059  // home solution animation
1060  if ($(".solution .bottom").length) {
1061    // init controller
1062    var controller = new ScrollMagic.Controller({
1063      globalSceneOptions: { duration: 0 },
1064    });
1065
1066    // build scenes
1067    new ScrollMagic.Scene({ triggerElement: ".solution .bottom", offset: -100 })
1068      .setClassToggle(".solution .bottom", "active") // add class toggle
1069      .on("start", function (event) {
1070        let filter1 = $(".solution .active .puzzle-1 > g").attr("filter");
1071        let filter2 = $(".solution .active .puzzle-2 > g").attr("filter");
1072        let filter3 = $(".solution .active .puzzle-3 > g").attr("filter");
1073        let filter4 = $(".solution .active .puzzle-4 > g").attr("filter");
1074        let filter5 = $(".solution .active .puzzle-5 > g").attr("filter");
1075        if (event.progress == 1) {
1076          let filterHide = () => {
1077            $(".solution .active .puzzle > g").css("filter", "none");
1078          };
1079          setTimeout(filterHide, 1200);
1080        } else {
1081          let filterShow = () => {
1082            $(".solution .puzzle-1 > g").css("filter", filter1);
1083            $(".solution .puzzle-2 > g").css("filter", filter2);
1084            $(".solution .puzzle-3 > g").css("filter", filter3);
1085            $(".solution .puzzle-4 > g").css("filter", filter4);
1086            $(".solution .puzzle-5 > g").css("filter", filter5);
1087          };
1088          setTimeout(filterShow, 1200);
1089        }
1090      })
1091      .addTo(controller);
1092  }
1093
1094  //Footer Accordions
1095
1096  $(".footer__accordion-title").on("click", function () {
1097    $(this).parent().toggleClass("active");
1098  });
1099
1100  //Information Tab Accordion
1101
1102  $(".information-tabs__accordion").on("click", function () {
1103    $(this).toggleClass("active");
1104  });
1105
1106  //360 component animations
1107
1108  $(".portfolio__products .item").on("mouseover", function () {
1109    $(".portfolio__products .item").addClass("stop-anim");
1110  });
1111
1112  $(".portfolio__products .item").on("mouseleave", function () {
1113    $(".portfolio__products .item").removeClass("stop-anim");
1114  });
1115
1116  jQuery(window).ready(function () {
1117    jQuery("html").css("scroll-behavior", "smooth");
1118  });
1119
1120  //Support Center Headquarters & Distributors Count (Map)
1121
1122  if ($(".section-map__map .headquarters-marker").length) {
1123    $(".section-map__map .types-pins__headquarter span").text(
1124      "(" + $(".section-map__map .headquarters-marker").length + ")"
1125    );
1126  }
1127
1128  if ($(".section-map__map .marker img:not(.headquarters-marker)").length) {
1129    $(".section-map__map .types-pins__distributor span").text(
1130      "(" +
1131        $(".section-map__map .marker img:not(.headquarters-marker)").length +
1132        ")"
1133    );
1134  }
1135
1136  //Support Center Map Marker postition
1137  $(".section-map__map .marker").on("mouseover", function () {
1138    let elem = $(this).get(0);
1139    if (parseFloat(elem.style.left) < 50) {
1140      $(this).find(".country-select").css("left", "-20px");
1141      $(this).find(".country-select").css("right", "unset");
1142    } else {
1143      $(this).find(".country-select").css("right", "-20px");
1144      $(this).find(".country-select").css("left", "unset");
1145    }
1146  });
1147
1148  //Landing Page CF7 Page Title + URL
1149  $("form #page-title-landing").val(document.title);
1150  $("form #page-url-landing").val(document.location);
1151});
1152
1153
1154// Smooth scrolling for anchor links on the page or between pages
1155function smooth_scroll(link, e) {
1156  let hash;
1157  let isSamePage = false;
1158  
1159  if (!link && window.location.hash === '#contact-us') {
1160    return;
1161  }
1162  if (link && link.hash === '#contact-us') {
1163    return;
1164  }
1165
1166  // Determine the hash of the anchor
1167  if (!link && window.location.hash) {
1168    hash = window.location.hash;
1169    isSamePage = true;
1170  } else if (link && link.hash) {
1171    // Check if it's the same page
1172    isSamePage =
1173      location.pathname.replace(/^\//, '') ===
1174        link.pathname.replace(/^\//, '') &&
1175      location.hostname === link.hostname;
1176
1177    hash = link.hash;
1178
1179    // Always prevent default for anchor links to avoid conflicts
1180    if (
1181      e &&
1182      hash &&
1183      hash !== '#' &&
1184      hash !== '#0' &&
1185      !hash.startsWith('#popup-')
1186    ) {
1187      e.preventDefault();
1188      e.stopPropagation();
1189    }
1190  }
1191
1192  if (
1193    hash &&
1194    hash !== '#' &&
1195    hash !== '#0' &&
1196    !hash.startsWith('#popup-')
1197  ) {
1198    // Check if the target element exists
1199    const targetElement = document.querySelector(hash);
1200    if (!targetElement) {
1201      // If element doesn't exist and it's a different page, allow normal navigation
1202      if (!isSamePage && link) {
1203        window.location.href = link.href;
1204      }
1205      return;
1206    }
1207
1208    // Scroll immediately without waiting for animations
1209    const offset = jQuery(hash).offset().top - 84; // Adjust for fixed header height
1210    jQuery('html, body')
1211      .stop(true, true)
1212      .animate(
1213        {
1214          scrollTop: offset >= 0 ? offset : 0, // Ensure the scroll position is not negative
1215        },
1216        600,
1217        () => {
1218          // Update the URL after scrolling
1219          if (isSamePage) {
1220            history.replaceState(null, null, hash);
1221          }
1222        }
1223      );
1224  }
1225}
1226
1227// Bind click event to anchor links with improved event handling
1228jQuery(document).on(
1229  'click',
1230  'a[href*="#"]:not([href="#"],[href="#0"],[href^="#popup-"])',
1231  function (e) {
1232    // #contact-us обрабатывается ForceHashScroller
1233    if (this.hash === '#contact-us') {
1234      return;
1235    }
1236    smooth_scroll(this, e);
1237  }
1238);
1239
1240// Execute smooth scrolling on page load if hash is present
1241jQuery(document).ready(function () {
1242  // Small delay to ensure DOM is fully ready
1243  setTimeout(function () {
1244    if (window.location.hash && window.location.hash === '#contact-us') {
1245      return;
1246    }
1247    smooth_scroll();
1248  }, 100);
1249});
1250
1251
1252

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.