PageSourceSearch

https://www.triadadv.com/themes/mocha/js/script.js?tm6g0v

js triadadv.com collected 2026-10-05 23:04:11 UTC 30,504 bytes, 1,034 lines download raw bytes

1/**
2 * @file
3 * A JavaScript file for the theme.
4 *
5 * In order for this JavaScript to be loaded on pages, see the instructions in
6 * the README.txt next to this file.
7 */
8
9// JavaScript should be made compatible with libraries other than jQuery by
10// wrapping it with an "anonymous closure". See:
11// - https://drupal.org/node/1446420
12// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
13(function ($, Drupal, window, document, undefined) {
14
15
16
17// To understand behaviors, see https://drupal.org/node/756722#behaviors
18Drupal.behaviors.my_custom_behavior = {
19  attach: function(context) {
20	  
21
22
23	  (function (Drupal, once) {
24  Drupal.behaviors.myfeature = {
25    attach(context) {
26      const elements = once('script', '[data-myfeature]', context);
27      // `elements` is always an Array.
28      elements.forEach(processingCallback);
29    }
30  };
31
32  // The parameters are reversed in the callback between jQuery `.each` method 
33  // and the native `.forEach` array method.
34  function processingCallback(value, index) {}
35}(Drupal, once));
36	  
37// BEGIN CUSTOM SCRIPT -------------------  
38
39	    $(".get-stuff").each(function() {
40  var stuff = $(this).attr('id');
41  $( "."+stuff ).prependTo(this);
42});
43
44      $(once('body', '.slide-menu')).prependTo('body');
45      $(once('body', '.menu-button')).prependTo('body');
46
47
48
49$(function() {  
50  $('.slide-menu .top .right .buttons a')
51    .on('mouseenter', function(e) {
52      var parentOffset = $(this).offset(),
53          relX = e.pageX - parentOffset.left,
54          relY = e.pageY - parentOffset.top;
55      $(this).find('span').css({top:relY, left:relX})
56    })
57    .on('mouseout', function(e) {
58      var parentOffset = $(this).offset(),
59          relX = e.pageX - parentOffset.left,
60          relY = e.pageY - parentOffset.top;
61      $(this).find('span').css({top:relY, left:relX})
62    });
63});
64
65
66	
67  // MOBILE MENU
68
69// Events still heavily rely on jQuery so this is the best way to replace for now.
70// $(once('#mobile-menu', 'body')).prepend('<div id="mobile-menu" class=""></div><div id="mt-container" ><a href="#mobile-menu" tabindex="0"  id="mt-trigger"><span class="content"><span></span><span></span><span></span><span></span></span></a></div>');
71
72    
73//   $('#mobile-menu').prepend($('#block-mocha-main-menu > ul').clone());
74//   $('#mobile-menu').mmenu({
75//     'extensions': [
76//       'position-right',
77//     ]
78//   });
79
80
81//  $('nav.main-menu > ul > li > span').each(function() {               
82//     $(this).attr('tabindex', '0');
83// });
84
85//  $('.colorbox-media-video').each(function() {
86//  	$(this).attr('tabindex', '0');
87//  });
88
89//    $('.pop-alert .inner .hide').each(function() {
90//  	$(this).attr('tabindex', '0');
91//  });
92
93
94//   $(once('#mobile-menu', '.top-nav ul.nav', context))
95//   .each(function () {
96//     var $nav = $(this).clone();
97//     console.log($nav);
98//     $('#mobile-menu #mm-1 .mm-listview').append('<li class="sub-nav"></li>');
99//     $('#mobile-menu #mm-1 .mm-listview li:last-of-type').prepend($nav);
100//   });
101
102
103	//   $(once('#mobile-menu', '#mobile-menu .mm-searchfield input[type="text"]', context))
104  // .each(function () {
105  //  var $this = $(this);
106	// 	$(this).keypress(function(e) {
107	// 		if (!e) { e = window.event; }
108	// 		var keyCode = e.keyCode || e.which;
109	// 		if (keyCode == '13') {
110	// 			var searchfor = encodeURIComponent($this.val());
111	// 			location.replace('/search/node/' + searchfor);
112	// 		}
113			
114	// 	});
115  // });
116
117
118
119
120
121
122$('.paragraph--type--large-video').each(function() {
123    // 1. Get the HTML text from the target element
124    var htmlContent = $(this).find('.replace').html();
125    
126    
127    // 3. Set the src of the <img>
128    $(this).find('img').attr('src', htmlContent);
129});
130	
131
132    $('#boop').on('click', function() {
133        // Reset sound to the beginning (allows rapid clicking)
134        $('#boopSound')[0].currentTime = 0;
135        $('#boopSound')[0].play();
136    });
137
138
139
140
141    $(once('body', 'aside .primary-img', context))
142  .each(function () {
143   var $photo = $(this).clone();
144    console.log($photo);
145    $('#block-mocha-content').prepend($photo);
146  });
147
148
149  $(once('body', '.paragraph--type--project')).wrapInner("<div class='card-cont'></div>");
150
151  // Background replace snippet
152  // $target is an element, $source is an <img /> tag
153  function bg_replace($target, $source) {
154    $target.css('background-image','url('+$source.attr('src')+')');
155  }
156
157    $('.paragraph--type--image-grid-text .image').each(function() {
158    bg_replace($(this), $('img', this));
159  });
160
161        $('.region-banner .wrapper').each(function() {
162    bg_replace($('.region-banner'), $('img', this));
163  });
164
165
166
167  $('.region-banner .banner-img').each(function() {
168    bg_replace($('.region-banner'), $('img', this));
169  });
170
171    $('.hp-work .view-content .card .front').each(function() {
172    bg_replace($(this), $('img', this));
173  });
174
175     $('.hp-work .view-content .card .front').each(function() {
176    bg_replace($(this), $('img', this));
177  });
178
179    $('.hp-work .view-content .card .back').each(function() {
180    bg_replace($(this), $('img', this));
181  });
182
183
184      $('.paragraph--type--large-video .glightbox-media-video ').each(function() {
185    bg_replace($(this), $('img', this));
186  });
187
188      
189    $('.project .view-content .card .front').each(function() {
190    bg_replace($(this), $('img', this));
191  });
192
193    $('.project .view-content .card .back').each(function() {
194    bg_replace($(this), $('img', this));
195  });
196
197
198      $('.team .view-content .card .front').each(function() {
199    bg_replace($(this), $('img', this));
200  });
201
202    $('.pets .item .image').each(function() {
203    bg_replace($(this), $('img', this));
204  });
205
206    $('.paragraph--type--project .front').each(function() {
207    bg_replace($(this), $('img', this));
208  });
209
210
211  /* SMOOTH SCROLLING ------------------------------------------- */
212  $('a[href*="#"]').not('[href="#"]').not('[href="#0"]').click(function(t){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var e=$(this.hash);(e=e.length?e:$("[name="+this.hash.slice(1)+"]")).length&&(t.preventDefault(),$("html, body").animate({scrollTop:e.offset().top},1e3,function(){var t=$(e);if(t.focus(),t.is(":focus"))return!1;t.attr("tabindex","-1"),t.focus()}))}});
213  
214
215
216  //   $('.project .view-content .card .back').each(function() {
217  //   bg_replace($(this), $('img', this));
218  // });
219
220  //   $('.team .view-content .card .front').each(function() {
221  //   bg_replace($(this), $('img', this));
222  // });
223
224  //   $('.pets .item .image').each(function() {
225  //   bg_replace($(this), $('img', this));
226  // });
227
228
229//     const container = document.querySelector('.compare');
230// document.querySelector('.slider').addEventListener('input', (e) => {
231//   container.style.setProperty('--position', `${e.target.value}%`);
232// })
233
234
235	
236	// Once everything is set-up move the skip link back up below the body
237	$('body').prepend($('#skip-link').detach());
238
239
240$(once('body', '.accordion .item .image', context))
241  .each(function () {
242   var $test = $(this).clone();
243    console.log($test);
244    $('.accordion .item .image').parent().children('.content').prepend($test);
245  });
246	
247
248
249
250	// $(once('body', '.swiper-wrapper')).parent('.field__item').addClass('swiper');
251	$(once('body', '.swiper-wrapper.lg-5.pagination')).wrapAll("<div class='swiper five-swiper-p'></div>");
252  $(once('body', '.swiper-wrapper.lg-5.arrows')).wrapAll("<div class='swiper five-swiper-a'></div>");
253  $(once('body', '.five-swiper-a')).append('<div class="swiper-button-next swiper-button-next-five"></div>').append('<div class="swiper-button-prev swiper-button-prev-five"></div>');
254  $(once('body', '.five-swiper-p')).append('<div class="swiper-pagination swiper-pagination-five"></div>');
255
256
257  $(once('body', '.swiper-wrapper.lg-4.pagination')).wrapAll("<div class='swiper four-swiper-p'></div>");
258  $(once('body', '.swiper-wrapper.lg-4.arrows')).wrapAll("<div class='swiper four-swiper-a'></div>");
259  $(once('body', '.four-swiper-a')).append('<div class="swiper-button-next swiper-button-next-four"></div>').append('<div class="swiper-button-prev swiper-button-prev -four"></div>');
260  $(once('body', '.four-swiper-p')).append('<div class="swiper-pagination swiper-pagination-four"></div>');
261
262
263  $(once('body', '.swiper-wrapper.lg-3.pagination')).wrapAll("<div class='swiper three-swiper-p'></div>");
264  $(once('body', '.swiper-wrapper.lg-3.arrows')).wrapAll("<div class='swiper three-swiper-a'></div>");
265  $(once('body', '.three-swiper-a')).append('<div class="swiper-button-next swiper-button-next-three"></div>').append('<div class="swiper-button-prev swiper-button-prev-three"></div>');
266  $(once('body', '.three-swiper-p')).append('<div class="swiper-pagination swiper-pagination-three"></div>');
267
268   $(once('body', '.hp-work .view-content')).addClass("swiper work-swiper").wrapInner("<div class='swiper-wrapper'></div>");
269  $(once('body', '.hp-test .view-content')).addClass("swiper test-swiper").wrapInner("<div class='swiper-wrapper'></div>");
270   $(once('body', '.hp-test-logo .view-content')).addClass("swiper logo-swiper").wrapInner("<div class='swiper-wrapper'></div>");
271 $(once('body', '.single-gal')).addClass("swiper gal-swiper").wrapInner("<div class='swiper-wrapper'></div>").append('<div class="swiper-button-next swiper-button-next-gal"></div>').append('<div class="swiper-button-prev swiper-button-prev-gal"></div>');
272
273  var swiper = new Swiper(".gal-swiper", {
274      slidesPerView: 1,
275      loop: true,
276      effect: "fade",
277      fadeEffect: {
278    crossFade: true
279  },
280     navigation: {
281        nextEl: ".swiper-button-next-gal",
282        prevEl: ".swiper-button-prev-gal",
283      },
284    });
285 
286
287
288
289
290 var swiper = new Swiper(".five-swiper-a", {
291      cssMode: true,
292      loop: true,
293      lazy: true,
294      centeredSlides: true,
295      slidesPerView: 2,
296      spaceBetween: 20,
297      keyboard: {
298        enabled: true,
299      },
300      navigation: {
301        nextEl: ".swiper-button-next-five",
302        prevEl: ".swiper-button-prev-five",
303      },
304      breakpoints: {
305        600: {
306          centeredSlides: false,
307        },
308        900: {
309          slidesPerView: 3,
310          centeredSlides: false,
311        },
312        1300: {
313          slidesPerView: 4,
314          centeredSlides: false,
315        },
316        1500: {
317         slidesPerView: 5,
318         centeredSlides: false,
319        }
320      }
321    });
322
323  var swiper = new Swiper(".five-swiper-p", {
324      cssMode: true,
325      loop: true,
326      lazy: true,
327      centeredSlides: true,
328      slidesPerView: 2,
329      spaceBetween: 20,
330      keyboard: {
331        enabled: true,
332      },
333     pagination: {
334        el: ".swiper-pagination-five",
335        clickable: true,
336      },
337      breakpoints: {
338        600: {
339          centeredSlides: false,
340        },
341        900: {
342          slidesPerView: 3,
343          centeredSlides: false,
344        },
345        1300: {
346          slidesPerView: 4,
347          centeredSlides: false,
348        },
349        1500: {
350         slidesPerView: 5,
351         centeredSlides: false,
352        }
353      }
354    });
355
356
357
358   var swiper = new Swiper(".four-swiper-a", {
359      cssMode: true,
360      loop: true,
361      lazy: true,
362      centeredSlides: true,
363      spaceBetween: 20,
364      slidesPerView: 1.25,
365      keyboard: {
366        enabled: true,
367      },
368      navigation: {
369        nextEl: ".swiper-button-next-four",
370        prevEl: ".swiper-button-prev-four",
371      },
372      breakpoints: {
373        600: {
374          centeredSlides: false,
375        },
376        900: {
377          slidesPerView: 3,
378          centeredSlides: false,
379        },
380        1500: {
381         slidesPerView: 4,
382         centeredSlides: false,
383        }
384      }
385    });
386
387   var swiper = new Swiper(".four-swiper-p", {
388      cssMode: true,
389      loop: true,
390      lazy: true,
391      centeredSlides: true,
392      spaceBetween: 20,
393      slidesPerView: 2,
394      keyboard: {
395        enabled: true,
396      },
397       pagination: {
398        el: ".swiper-pagination-four",
399        clickable: true,
400      },
401      breakpoints: {
402        600: {
403          centeredSlides: false,
404        },
405        900: {
406          slidesPerView: 3,
407          centeredSlides: false,
408        },
409        1500: {
410         slidesPerView: 4,
411         centeredSlides: false,
412        }
413      }
414    });
415
416
417   var swiper = new Swiper(".three-swiper-a", {
418      cssMode: true,
419      loop: true,
420      lazy: true,
421      centeredSlides: true,
422      spaceBetween: 20,
423      slidesPerView: 2,
424      keyboard: {
425        enabled: true,
426      },
427      navigation: {
428        nextEl: ".swiper-button-next-three",
429        prevEl: ".swiper-button-prev-three",
430      },
431      breakpoints: {
432        600: {
433
434          centeredSlides: false,
435        },
436        900: {
437          slidesPerView: 3,
438          centeredSlides: false,
439        }
440      }
441    });
442
443   var swiper = new Swiper(".three-swiper-p", {
444      cssMode: true,
445      loop: true,
446      lazy: true,
447      centeredSlides: true,
448      spaceBetween: 20,
449      slidesPerView: 2,
450      keyboard: {
451        enabled: true,
452      },
453      pagination: {
454        el: ".swiper-pagination-three",
455        clickable: true,
456      },
457      breakpoints: {
458        600: {
459
460          centeredSlides: false,
461        },
462        900: {
463          slidesPerView: 3,
464          centeredSlides: false,
465        }
466      }
467    });
468
469
470var swiper = new Swiper(".work-swiper", {
471      loop: true,
472      lazy: true,
473      centeredSlides: true,
474      slidesPerView: 2,
475      keyboard: {
476        enabled: true,
477      },
478      //  scrollbar: {
479      //   el: ".swiper-scrollbar",
480      //   draggable: true,
481      // },
482      breakpoints: {
483        900: {
484          slidesPerView: 2.25,
485          centeredSlides: false,
486        },
487        1500: {
488         slidesPerView: 3.25,
489         centeredSlides: false,
490        }
491      }
492    });
493
494
495var swiper = new Swiper(".proc-swiper", {
496      keyboard: true,
497      spaceBetween: 0,
498      slidesPerView: 1,
499      effect: "fade",
500       loop: true,
501      navigation: {
502        nextEl: ".button-next-pro",
503      },
504      fadeEffect: {
505    crossFade: true, // This ensures the previous slide fades out as the new one fades in.
506  },
507    
508    });
509
510var testSlider = new Swiper(".test-swiper", {
511      slidesPerView: 1,
512      loop: true,
513      watchSlidesProgress: true,
514      effect: "fade",
515      fadeEffect: {
516    crossFade: true, // This is the key setting
517  },
518      autoplay: {
519        delay: 8000,
520        disableOnInteraction: false,
521      },
522    });
523
524var logoSlider = new Swiper(".logo-swiper", {
525      allowTouchMove: false,
526      loop: true,
527      effect: "fade", 
528      fadeEffect: {
529    crossFade: true, // This is the key setting
530  },
531    });
532		
533
534	
535testSlider.controller.control = logoSlider;
536
537
538
539
540// The Nice accordians ---------------------------------
541
542
543
544$(document).on('click', '.blah', function() {
545  if ($('#menu-button').hasClass('is-active')) {
546          $('#menu-button').removeClass('is-active');
547          $('.slide-menu').removeClass('is-active');
548          $('body').removeClass('noscroll');
549        } else {
550          $('#menu-button').addClass('is-active');
551          $('.slide-menu').addClass('is-active');
552          $('body').addClass('noscroll')
553        }
554});
555
556
557$(document).on('click', '.menu-wrap:before', function() {
558  if ($('#menu-button').hasClass('is-active')) {
559          $('#menu-button').removeClass('is-active');
560          $('.slide-menu').removeClass('is-active');
561          $('body').removeClass('noscroll');
562        } else {
563          $('#menu-button').addClass('is-active');
564          $('.slide-menu').addClass('is-active');
565          $('body').addClass('noscroll')
566        }
567});
568
569
570// $(once('body', '#slide-menu')).on('click', function(){
571//   if ($('#menu-button').hasClass('is-active')) {
572//           $('#menu-button').removeClass('is-active');
573//           $('body').removeClass('noscroll');
574//         } else {
575//           $('#menu-button').addClass('is-active');
576//           $('body').addClass('noscroll');
577//         }
578// });
579
580
581
582
583$(once(".accordion.item", ".accordion .item")).each(function() {
584          
585      var $item = $(this);
586      var $toggle = $('.title', $item);
587      var $content = $('.content', $item);
588
589      $toggle.attr('tabindex', '0');
590
591      $toggle.on('click', function() {
592        
593        if ($item.hasClass('open')) {
594          $item.removeClass('open');
595          $content.slideUp('fast');
596        } else {
597          $item.addClass('open');
598          $content.slideDown('fast');
599        }
600      });
601
602       $toggle.on('keypress', function() {
603        
604        if ($item.hasClass('open')) {
605          $item.removeClass('open');
606          $content.slideUp('fast');
607        } else {
608          $item.addClass('open');
609          $content.slideDown('fast');
610        }
611      });
612
613    });
614
615// Full Width Content - create wrapper -----------------------
616
617$(once("body", ".field__item:has(.full-width)" )).wrap( "<div class='full-width-wrp'></div>" );
618$(once("body", ".field__item:has(.wide)" )).wrap( "<div class='full-widths'></div>" );
619
620$(once("body",".field__item:has(.light .accordion)" )).wrap( "<div class='full-width-wrp'></div>" );
621
622
623
624document.addEventListener('DOMContentLoaded', function() {
625    const urlParams = new URLSearchParams(window.location.search);
626    if (!urlParams.has('keys')) {
627        document.body.classList.add('fresh-search');
628    }
629});
630
631
632gsap.registerPlugin(DrawSVGPlugin, ScrollTrigger, MotionPathPlugin);
633
634
635
636    gsap.to(".hp-what .images .star", {
637  rotation: 360 * .5,
638  ease: "none",
639  scrollTrigger: {
640    trigger: ".hp-what",
641    start: "top bottom", // the default values
642    end: "bottom top",
643    scrub: true
644  }, 
645});
646
647//         gsap.to(".hp-what .images .sparkle", {
648//   rotation: 360 * .5,
649//   ease: "none",
650//   scrollTrigger: {
651//     trigger: ".hp-what",
652//     start: "top bottom", // the default values
653//     end: "bottom top",
654//     scrub: true
655//   }, 
656// });
657
658
659gsap.to(".hp-culture .right .images .star", {
660  rotation: 360 * .5,
661  ease: "none",
662  scrollTrigger: {
663    trigger: ".hp-culture",
664    start: "top bottom", // the default values
665    end: "bottom top",
666    scrub: true
667  }, 
668});
669
670
671gsap.to(".hp-thoughts .target", {
672  rotation: 360 * .5,
673  ease: "none",
674  scrollTrigger: {
675    trigger: ".hp-thoughts",
676    start: "top bottom", // the default values
677    end: "bottom top",
678    scrub: true
679  }, 
680});
681
682
683
684const lightbox = GLightbox({
685    selector: '.glightbox', // Your target class names
686    loop: true             // Enables infinite loop navigation
687});
688
689
690
691let mm = gsap.matchMedia();
692
693
694
695mm.add("(min-width: 1000px)", () => {
696
697    const ham = document.querySelector("#menu-button");
698const blur = document.querySelector("#slide-menu");
699const menu = document.querySelector('.menu-wrap');
700const logo = document.querySelector('.menu-logo');
701
702
703  var tl = gsap.timeline({ paused: true });
704
705tl.to('.slide-menu',{
706  duration: .05,
707  width: '100%',
708  // backdropFilter: 'blur(20px)',
709})
710tl.to('.fader', {
711  duration: .35,
712  backdropFilter: 'blur(20px)',
713})
714tl.to(menu, {
715  duration: .35,
716  opacity: 1,
717  width: '85vw', // change this to 100vh for full-height menu
718  ease: 'power4.inOut',
719}, "<")
720tl.to(logo, {
721  opacity: 1,
722    duration: .5,
723  y: 20,
724  ease: 'expo.inOut',
725})
726tl.to('.slide-menu .holder', {
727  opacity: 1,
728    duration: 1,
729  y: 20,
730  ease: 'expo.inOut',
731}, "<")
732
733
734tl.reverse();
735
736ham.addEventListener('click', () => {
737  tl.reversed(!tl.reversed());
738});
739
740blur.addEventListener('click', () => {
741  tl.reversed(!tl.reversed());
742});
743
744});
745
746
747mm.add("(max-width: 999px)", () => {
748  // mobile setup code here...
749const ham = document.querySelector("#menu-button");
750const menu = document.querySelector('.menu-wrap');
751const logo = document.querySelector('.menu-logo');
752
753  var tl = gsap.timeline({ paused: true });
754
755  tl.to('.slide-menu',{
756  duration: .25,
757  width: '100%',
758})
759tl.to(menu, {
760  duration: .35,
761  opacity: 1,
762  width: '100vw', // change this to 100vh for full-height menu
763  ease: 'power4.inOut',
764}, "<")
765tl.to(logo, {
766  opacity: 1,
767    duration: .5,
768  y: 20,
769  ease: 'expo.inOut',
770})
771tl.to('.slide-menu .holder', {
772  opacity: 1,
773    duration: 1,
774  y: 20,
775  ease: 'expo.inOut',
776}, "<")
777
778tl.reverse();
779
780ham.addEventListener('click', () => {
781  tl.reversed(!tl.reversed());
782});
783
784
785});
786
787
788
789
790
791
792
793
794
795
796const words = ["branding", "website", "logo", "social media", "marketing"];
797
798let tlMaster = gsap.timeline({repeat: -1});
799
800gsap.to("#cursor", {
801  opacity: 0,
802  repeat: -1,
803  yoyo: true,
804  duration: .5,
805  ease: "power2.inOut"
806});
807
808words.forEach((word)=> {
809  let tlText = gsap.timeline({repeat: 1, yoyo: true});
810  tlText.to("#animated-text", {duration: 1, text: word});
811  tlMaster.add(tlText)
812})
813
814gsap.from('.star-path', {
815  drawSVG:'0%',
816  duration:1.5,
817  ease: 'sine.inOut',
818  scrollTrigger: {
819    trigger: '.hp-culture',
820    start: 'top+=20% center',
821    end: 'bottom-=20% center',
822    scrub: true,
823  }
824});
825
826
827gsap.to('.cow', {
828  top:'38%',
829  left: '40%',
830  rotation: 45, 
831  scrollTrigger: {
832    trigger: '.rex',
833    start: '35% bottom',
834    end: 'bottom 35%',
835    scrub: true,
836  }
837});
838
839
840function initDrawRandomUnderline() {
841  const svgVariants = [
842    `<svg width="310" height="40" viewBox="0 0 310 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 20.9999C26.7762 16.2245 49.5532 11.5572 71.7979 14.6666C84.9553 16.5057 97.0392 21.8432 109.987 24.3888C116.413 25.6523 123.012 25.5143 129.042 22.6388C135.981 19.3303 142.586 15.1422 150.092 13.3333C156.799 11.7168 161.702 14.6225 167.887 16.8333C181.562 21.7212 194.975 22.6234 209.252 21.3888C224.678 20.0548 239.912 17.991 255.42 18.3055C272.027 18.6422 288.409 18.867 305 17.9999" stroke="currentColor" stroke-width="10" stroke-linecap="round"/></svg>`,
843    `<svg width="310" height="40" viewBox="0 0 310 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 24.2592C26.233 20.2879 47.7083 16.9968 69.135 13.8421C98.0469 9.5853 128.407 4.02322 158.059 5.14674C172.583 5.69708 187.686 8.66104 201.598 11.9696C207.232 13.3093 215.437 14.9471 220.137 18.3619C224.401 21.4596 220.737 25.6575 217.184 27.6168C208.309 32.5097 197.199 34.281 186.698 34.8486C183.159 35.0399 147.197 36.2657 155.105 26.5837C158.11 22.9053 162.993 20.6229 167.764 18.7924C178.386 14.7164 190.115 12.1115 201.624 10.3984C218.367 7.90626 235.528 7.06127 252.521 7.49276C258.455 7.64343 264.389 7.92791 270.295 8.41825C280.321 9.25056 296 10.8932 305 13.0242" stroke="#E55050" stroke-width="10" stroke-linecap="round"/></svg>`,
844    `<svg width="310" height="40" viewBox="0 0 310 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 29.5014C9.61174 24.4515 12.9521 17.9873 20.9532 17.5292C23.7742 17.3676 27.0987 17.7897 29.6575 19.0014C33.2644 20.7093 35.6481 24.0004 39.4178 25.5014C48.3911 29.0744 55.7503 25.7731 63.3048 21.0292C67.9902 18.0869 73.7668 16.1366 79.3721 17.8903C85.1682 19.7036 88.2173 26.2464 94.4121 27.2514C102.584 28.5771 107.023 25.5064 113.276 20.6125C119.927 15.4067 128.83 12.3333 137.249 15.0014C141.418 
84416.3225 143.116 18.7528 146.581 21.0014C149.621 22.9736 152.78 23.6197 156.284 24.2514C165.142 25.8479 172.315 17.5185 179.144 13.5014C184.459 10.3746 191.785 8.74853 195.868 14.5292C199.252 19.3205 205.597 22.9057 211.621 22.5014C215.553 22.2374 220.183 17.8356 222.979 15.5569C225.4 13.5845 227.457 11.1105 230.742 10.5292C232.718 10.1794 234.784 12.9691 236.164 14.0014C238.543 15.7801 240.717 18.4775 243.356 19.8903C249.488 23.1729 255.706 21.2551 261.079 18.0014C266.571 14.6754 270.439 11.5202 277.146 13.6125C280.725 14.7289 283.221 17.209 286.393 19.0014C292.321 22.3517 298.255 22.5014 305 22.5014" stroke="#E55050" stroke-width="10" stroke-linecap="round"/></svg>`,
845    `<svg width="310" height="40" viewBox="0 0 310 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.0039 32.6826C32.2307 32.8412 47.4552 32.8277 62.676 32.8118C67.3044 32.807 96.546 33.0555 104.728 32.0775C113.615 31.0152 104.516 28.3028 102.022 27.2826C89.9573 22.3465 77.3751 19.0254 65.0451 15.0552C57.8987 12.7542 37.2813 8.49399 44.2314 6.10216C50.9667 3.78422 64.2873 5.81914 70.4249 5.96641C105.866 6.81677 141.306 7.58809 176.75 8.59886C217.874 9.77162 258.906 11.0553 300 14.4892" stroke="#E55050" stroke-width="10" stroke-linecap="round"/></svg>`,
846    `<svg width="310" height="40" viewBox="0 0 310 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.99805 20.9998C65.6267 17.4649 126.268 13.845 187.208 12.8887C226.483 12.2723 265.751 13.2796 304.998 13.9998" stroke="currentColor" stroke-width="10" stroke-linecap="round"/></svg>`,
847    `<svg width="310" height="40" viewBox="0 0 310 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 29.8857C52.3147 26.9322 99.4329 21.6611 146.503 17.1765C151.753 16.6763 157.115 15.9505 162.415 15.6551C163.28 15.6069 165.074 15.4123 164.383 16.4275C161.704 20.3627 157.134 23.7551 153.95 27.4983C153.209 28.3702 148.194 33.4751 150.669 34.6605C153.638 36.0819 163.621 32.6063 165.039 32.2029C178.55 28.3608 191.49 23.5968 204.869 19.5404C231.903 11.3436 259.347 5.83254 288.793 5.12258C294.094 4.99476 299.722 4.82265 305 5.45025" stroke="#E55050" stroke-width="10" stroke-linecap="round"/></svg>`
848  ];
849  // Add attributes to <svg> elements
850  function decorateSVG(svgEl) {
851    svgEl.setAttribute('class', 'text-draw__box-svg');
852    svgEl.setAttribute('preserveAspectRatio', 'none');
853    svgEl.querySelectorAll('path').forEach(path => {
854      path.setAttribute('stroke', 'currentColor');
855    });
856  }
857  let nextIndex = null;
858  document.querySelectorAll('[data-draw-line]').forEach(container => {
859    const box = container.querySelector('[data-draw-line-box]');
860    if (!box) return;
861    let enterTween = null;
862    let leaveTween = null;
863    container.addEventListener('mouseenter', () => {
864      // Don't restart if still playing
865      if (enterTween && enterTween.isActive()) return;
866      if (leaveTween && leaveTween.isActive()) leaveTween.kill();
867      // Random Start
868      if (nextIndex === null) {
869        nextIndex = Math.floor(Math.random() * svgVariants.length);
870      }
871      // Animate Draw
872      box.innerHTML = svgVariants[nextIndex];
873      const svg = box.querySelector('svg');
874      if (svg) {
875        decorateSVG(svg);
876        const path = svg.querySelector('path');
877        if (path) {
878          gsap.set(path, { drawSVG: '0%' });
879          enterTween = gsap.to(path, {
880            duration: 0.5,
881            drawSVG: '100%',
882            ease: 'power2.inOut',
883            onComplete: () => { enterTween = null; }
884          });
885        }
886      }
887      // Advance for next hover across all items
888      nextIndex = (nextIndex + 1) % svgVariants.length;
889    });
890    container.addEventListener('mouseleave', () => {
891      const path = box.querySelector('path');
892      if (!path) return;
893      const playOut = () => {
894        // Don't restart if still drawing out
895        if (leaveTween && leaveTween.isActive()) return;
896        leaveTween = gsap.to(path, {
897          duration: 0.5,
898          drawSVG: '100% 100%',
899          ease: 'power2.inOut',
900          onComplete: () => {
901            leaveTween = null;
902            box.innerHTML = ''; // remove SVG when done
903          }
904        });
905      };
906      if (enterTween && enterTween.isActive()) {
907        // Wait until draw-in finishes
908        enterTween.eventCallback('onComplete', playOut);
909      } else {
910        playOut();
911      }
912    });
913  });
914}
915
916
917initDrawRandomUnderline();
918
919const parallax = new SuperParallax(".parallax-container", {
920  scrollMultiplier: 1,
921  mouseMultiplier: 0.5,
922  smoothing: 0.1,
923});
924
925// const mediaQuery = window.matchMedia('(max-width: 850px)');
926
927// function handleTabletChange(e) {
928//     if (e.matches) {
929//         // Screen is less than 768px wide
930//         $('.para-hold').removeClass('parallax-container');
931//         $('.para-hold div').removeAttr('data-parallax-layer').removeAttr('data-parallax-depth');
932//     } else {
933//         // Screen is 768px wide or greater
934//         $('.para-hold').addClass('parallax-container');
935//     }
936// }
937
938// // Register event listener
939// mediaQuery.addEventListener('change', handleTabletChange);
940
941// // Initial check
942// handleTabletChange(mediaQuery);
943
944    /***** ALERT COOKIE *****/
945    // https://www.w3schools.com/js/js_cookies.asp
946    function setCookie(cname, cvalue, exhours) {
947      var d = new Date();
948      // NOW + (Milliseconds * seconds * minutes * hours)
949      d.setTime(d.getTime() + (1000 * 60 * 60 * exhours));
950      var expires = "expires=" + d.toUTCString();
951      document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
952    }
953
954    function getCookie(cname) {
955      var name = cname + "=";
956      var decodedCookie = decodeURIComponent(document.cookie);
957      var ca = decodedCookie.split(';');
958      for(var i = 0; i < ca.length; i++) {
959        var c = ca[i];
960        while (c.charAt(0) == ' ') {
961          c = c.substring(1);
962        }
963        if (c.indexOf(name) == 0) {
964          return c.substring(name.length, c.length);
965        }
966      }
967      return '';
968    }
969
970    function checkCookie(cname) {
971      var cookiename = getCookie(cname);
972      if (cookiename != "") {
973        // alert("Welcome again " + cookiename);
974        return true;
975      } else {
976        /*
977        cookiename = prompt("Please enter your Cookie Name:", "");
978        if (cookiename != "" && cookiename != null) {
979          setCookie(cookiename, 'true', 4);
980        }
981        */
982        return false;
983      }
984    }
985
986    $('.block.pop-alert').each(function() {
987    });
988
989    function setAlertPosition() {
990      var v_height = $('.pop-alert .view').innerHeight();
991      $('.pop-alert .view').css('margin-top','-'+(v_height / 2)+'px');
992    }
993
994    $('.pop-alert').each(function() {
995
996      if(checkCookie('pop-alert')) {
997        $('html').removeClass('show-alerts');
998        $('html').addClass('hide-alerts');
999      } else {
1000        $('html').addClass('show-alerts');
1001      }
1002
1003      if ($(window).width() > 400) {
1004        setAlertPosition();
1005      }
1006
1007      $('.inner .hide', this).click(function() {
1008        setCookie('pop-alert', 'true', 4);
1009        $('html').removeClass('show-alerts');
1010        $('html').addClass('hide-alerts');
1011      });
1012
1013      $('.inner .link .btn', this).click(function(e) {
1014
1015        setCookie('pop-alert', 'true', 12);
1016        $('html').removeClass('show-alerts');
1017        $('html').addClass('hide-alerts');
1018        return true;
1019      });
1020
1021
1022    });
1023
1024    const copy = document.querySelector(".hp-clients .view-content").cloneNode(true);
1025document.querySelector(".hp-clients").appendChild(copy);
1026
1027
1028// END CUSTOM SCRIPT -------------------------
1029
1030  }
1031};
1032
1033
1034})(jQuery, Drupal, this, this.document);

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.