PageSourceSearch

https://aquaterraenergy.com/wp-content/themes/aquaterra-energy/assets/js/starter-min.js

js aquaterraenergy.com collected 2026-10-05 21:51:29 UTC 13,235 bytes, 497 lines download raw bytes

1import Aquaterra from "./Aquaterra.js";
2
3Splitting();
4
5new Aquaterra();
6
7$(".dowload-button").click(function() {
8    $('html, body').animate({
9        scrollTop: $("#download-section").offset().top - 80
10    }, 2000);
11});
12
13$('a.share').click(function(e){
14	e.preventDefault();
15	var $link   = $(this);
16	var href    = $link.attr('href');
17	var network = $link.attr('data-network');
18	var networks = {
19	    facebook : { width : 600, height : 300 },
20	    twitter  : { width : 600, height : 254 },
21	    google   : { width : 515, height : 490 },
22	    linkedin : { width : 600, height : 473 }
23	};
24	var popup = function(network){
25	    var options = 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,';
26	    window.open(href, '', options+'height='+networks[network].height+',width='+networks[network].width);
27	}
28	popup(network);
29});
30
31// Site menu toggle
32$(".site-menu-toggle").on("click", function(e) {
33    $(".site-menu, .site-menu-toggle").toggleClass("site-menu-is-open");
34    if ($(".site-search").hasClass("site-search-is-open")) {
35        $(".site-search, .site-search-toggle").removeClass("site-search-is-open");
36    }
37});
38
39// Site search toggle
40$(".site-search-toggle").on("click", function(e) {
41    $(".site-search, .site-search-toggle").toggleClass("site-search-is-open");
42    if ($(".site-menu").hasClass("site-menu-is-open")) {
43        $(".site-menu, .site-menu-toggle").removeClass("site-menu-is-open");
44    } else {
45        jQuery('#newsSearch').focus();
46    }
47});
48$(document).on("click", function(e){
49    if(!$(e.target).is(".site-search-toggle, .site-search-toggle *, .site-search, .site-search *")) {
50        if ($(".site-search").hasClass("site-search-is-open")) {
51            $(".site-search, .site-search-toggle").removeClass("site-search-is-open");
52        }
53    }
54});
55$(".dropdown-toggle").on("click", function(e){
56    if ($(".site-search").hasClass("site-search-is-open")) {
57        $(".site-search, .site-search-toggle").removeClass("site-search-is-open");
58    } else if ($(".site-menu").hasClass("site-menu-is-open")) {
59        $(".site-menu, .site-menu-toggle").removeClass("site-menu-is-open");
60    }
61});
62
63// Home hero carousel
64function getPaginationTheme() {
65    var homeHeroPagination = $(".home-hero .swiper-pagination");
66
67    $(".home-hero .home-hero-primary-slide.swiper-slide-active").each(function() {
68        var activeSlide = $(this).find(".home-hero-slide");
69    
70        if (activeSlide.hasClass("home-hero-theme-light") || activeSlide.hasClass("home-hero-theme-blue")) {
71            homeHeroPagination.addClass("swiper-pagination-theme-light");
72        } else {
73            homeHeroPagination.removeClass("swiper-pagination-theme-light");
74        }
75    });
76}
77
78const homeHero = new Swiper('.home-hero', {
79    slidesPerView: 1,
80    speed: 800,
81    loop: true,
82    allowTouchMove: false,
83    effect: 'fade',
84    preloadImages: false,
85    lazy: true,
86    fadeEffect: {
87        crossFade: true
88    },
89    autoplay: {
90        delay: 6000,
91        disableOnInteraction: false,
92    },
93    pagination: {
94        el: '.swiper-pagination',
95        clickable: true,
96    },
97    on: {
98        init: function () {
99            getPaginationTheme(); 
100        },
101    },
102});
103
104$(".home-hero").mouseenter(function() {
105    homeHero.autoplay.stop();
106    console.log('slider stopped');
107});
108
109$(".home-hero").mouseleave(function() {
110    homeHero.autoplay.start();
111    console.log('slider started again');
112});
113
114homeHero.on('slideChangeTransitionEnd', function () {
115    getPaginationTheme(); 
116});
117
118const homeHeroCallouts = new Swiper('.home-hero-callouts', {
119    slidesPerView: 'auto',
120    spaceBetween: 15,
121    nested: true,
122    freeMode: true,
123    resistanceRatio: 0,
124    preventClicks: false,
125});
126
127// Solutions carousel
128const solutionsCarousel = new Swiper('.solutions-carousel-og', {
129    slidesPerView: 1.25,
130    spaceBetween: 96,
131    freeMode: true,
132    preventClicks: false,
133    preventClicksPropagation: false,
134    navigation: {
135        prevEl: '.solutions-og-nav .solutions-carousel-prev',
136        nextEl: '.solutions-og-nav .solutions-carousel-next',
137    },
138    breakpoints: {
139        600: {
140          slidesPerView: 1,
141        },
142        800: {
143          slidesPerView: 2,
144        },
145        1000: {
146          slidesPerView: 2.5,
147        },
148        1200: {
149          slidesPerView: 3,
150        },
151        1400: {
152            slidesPerView: 3,
153        }
154    }
155});
156
157// Solutions carousel
158const renewablesCarousel = new Swiper('.solutions-carousel-renewables', {
159    slidesPerView: 1.25,
160    spaceBetween: 96,
161    freeMode: true,
162    preventClicks: false,
163    navigation: {
164        prevEl: '.solutions-renewables-nav .solutions-carousel-prev',
165        nextEl: '.solutions-renewables-nav .solutions-carousel-next',
166    },
167    breakpoints: {
168        600: {
169          slidesPerView: 1,
170        },
171        800: {
172          slidesPerView: 2,
173        },
174        1000: {
175          slidesPerView: 2.5,
176        },
177        1200: {
178          slidesPerView: 3,
179        },
180        1400: {
181            slidesPerView: 3,
182        }
183    }
184});
185
186// Stats carousel
187const statsCarousel = new Swiper('.stats-carousel', {
188    slidesPerView: 1.25,
189    spaceBetween: 30,
190    freeMode: true,
191    navigation: {
192        prevEl: '.solutions-carousel-prev',
193        nextEl: '.solutions-carousel-next',
194    },
195    breakpoints: {
196        600: {
197          slidesPerView: 1.5,
198        },
199        800: {
200          slidesPerView: 2,
201        },
202        1000: {
203          slidesPerView: 2.5,
204        },
205        1200: {
206          slidesPerView: 2.5,
207        },
208        1400: {
209            slidesPerView: 2.5,
210        }
211    }
212});
213
214// Benefits carousel
215const benefitsCarousel = new Swiper('.benefits-carousel', {
216    slidesPerView: 1.25,
217    spaceBetween: 96,
218    navigation: {
219        prevEl: '.benefits-carousel-prev',
220        nextEl: '.benefits-carousel-next'
221    },
222    breakpoints: {
223        600: {
224          slidesPerView: 1.5,
225        },
226        800: {
227          slidesPerView: 2,
228        },
229        1000: {
230          slidesPerView: 2.5,
231        },
232        1200: {
233          slidesPerView: 2,
234        },
235        1400: {
236            slidesPerView: 2.5,
237        }
238    }
239});
240
241// Media carousel
242const mediaTabs = new Swiper('.media-carousel-tabs', {
243    slidesPerView: 'auto',
244    spaceBetween: 9,
245    freeMode: true,
246    resistanceRatio: 0,
247    preventClicks: false,
248    preventClicksPropagation: false,
249    shortSwipes: false,
250    navigation: {
251        prevEl: '.media-carousel-tabs-prev',
252        nextEl: '.media-carousel-tabs-next',
253    }
254});
255const mediaCarousel = new Swiper('.media-carousel', {
256    slidesPerView: 1.25,
257    spaceBetween: 96,
258    freeMode: true,
259    observer: true,
260    navigation: {
261        prevEl: '.media-carousel-prev',
262        nextEl: '.media-carousel-next',
263    },
264    breakpoints: {
265        600: {
266          slidesPerView: 1.5
267        },
268        800: {
269          slidesPerView: 2
270        },
271        1000: {
272          slidesPerView: 2.5
273        },
274        1200: {
275          slidesPerView: 3
276        },
277        1400: {
278            slidesPerView: 3.5
279        }
280    }
281});
282
283// Split carousel
284const splitText = new Swiper('.split-carousel-text', {
285    allowTouchMove: false,
286    effect: 'fade',
287    fadeEffect: {
288        crossFade: true,
289    },
290});
291const splitImages = new Swiper('.split-carousel-images', {
292    allowTouchMove: false,
293    effect: 'fade',
294    fadeEffect: {
295        crossFade: true,
296    },
297    navigation: {
298        prevEl: '.split-carousel-prev',
299        nextEl: '.split-carousel-next',
300    },
301    pagination: {
302        el: '.split-carousel-pagination',
303        clickable: true,
304    },
305    controller: {
306        control: splitText,
307    },
308});
309
310// About us timeline carousel
311const timeline = new Swiper('.history-timeline', {
312    direction: 'horizontal',
313    slidesPerView: 1,
314    autoHeight: true,
315    updateOnWindowResize: true,
316    allowTouchMove: false,
317	simulateTouch: false,
318    pagination: {
319      el: '.swiper-pagination',
320      clickable: true,
321      renderBullet: function (index, className) {
322        return '<div class="' + className + '"><span class="bullet"></span> <span class="year-label">' + yearsArray[index] + '</span></div>';
323      },
324    },
325    breakpoints: {
326        576: {
327            direction: 'vertical',
328            allowTouchMove: true
329        }
330    }
331});
332
333//  Mixitup filtering
334$(document).ready(function() {
335    $(".container-mix").each(function() {
336        var mixer = mixitup('.container-mix', {
337            selectors: {
338                control: '[data-mixitup-control]',
339                target: '.mix',
340            },
341            animation: {
342                duration: 250,
343                nudge: false,
344                reverseOut: false,
345                effects: "fade translateY(20%)"
346            }
347        });
348    });
349    $(".media-carousel-tabs").each(function() {
350        $(".container-mix").on('mixEnd', function(e, state){
351            mediaCarousel.update();
352        });
353    });
354
355    jQuery('.init-click').click();
356});
357
358// Contact block tabs
359const contactTabs = new Swiper('.contact-block-tabs', {
360    slidesPerView: 'auto',
361    spaceBetween: 9,
362    freeMode: true,
363    resistanceRatio: 0,
364    preventClicks: false,
365    preventClicksPropagation: false,
366    slideToClickedSlide: true,
367    shortSwipes: false,
368    navigation: {
369        prevEl: '.contact-block-tabs-prev',
370        nextEl: '.contact-block-tabs-next',
371    }
372});
373const contactSlides = new Swiper('.contact-block-slides', {
374    allowTouchMove: false,
375    effect: 'fade',
376    fadeEffect: {
377        crossFade: true
378    },
379    thumbs: {
380        swiper: contactTabs,
381        multipleActiveThumbs: false,
382    },
383    on: {
384        afterInit: function() {
385            const currentSlide = this.slides[this.activeIndex];
386            const email = currentSlide.getAttribute('data-email');
387            const location = currentSlide.getAttribute('data-location');
388            const inputSubject = document.getElementById('subject');
389            const input = document.getElementById('formEmail');
390            input.value = email;
391            inputSubject.value = `Contact - ${location}`;
392        },
393        slideChange: function() {
394            const currentSlide = contactSlides.slides[contactSlides.activeIndex];
395            const email = currentSlide.getAttribute('data-email');
396            const location = currentSlide.getAttribute('data-location');
397            const inputSubject = document.getElementById('subject');
398            const input = document.getElementById('formEmail');
399            input.value = email;
400            inputSubject.value = `Contact - ${location}`;
401        }
402    }
403});
404
405// Solution carousel block tabs
406const solutionTabs = new Swiper('.solution-block-tabs', {
407    slidesPerView: 'auto',
408    spaceBetween: 9,
409    freeMode: true,
410    resistanceRatio: 0,
411    preventClicks: false,
412    preventClicksPropagation: false,
413    slideToClickedSlide: false,
414    shortSwipes: false,
415    navigation: {
416        prevEl: '.solution-block-tabs-prev',
417        nextEl: '.solution-block-tabs-next',
418    },
419});
420const solutionSlides = new Swiper('.solution-block-slides', {
421    allowTouchMove: false,
422    effect: 'fade',
423    slidesPerView: 1,
424    fadeEffect: {
425        crossFade: true
426    },
427    thumbs: {
428        swiper: solutionTabs,
429        multipleActiveThumbs: false,
430    }
431});
432
433// Testimonials carousel
434const testimonialsCarousel = new Swiper('.testimonials-carousel', {
435    loop: true,
436    effect: 'fade',
437    fadeEffect: {
438        crossFade: true
439    },
440    pagination: {
441        el: '.testimonials-carousel-pagination',
442        clickable: true,
443    }
444});
445
446$(".tags-dropdown-toggle").on("click", function() {
447    $(this).toggleClass("is-open");
448    $(".tags-dropdown").slideToggle();
449});
450
451// Venobox
452$('.venobox').venobox();
453
454// Products page grid
455let container = document.querySelector('#products');
456
457if (container) {
458  const mixer = mixitup(container);
459}
460
461document.addEventListener('DOMContentLoaded', function() {
462    var primaryNav = document.querySelector('.site-header');
463    var secondaryNav = document.querySelector('.page-solutions-nav');
464    if (document.querySelector('.page-solutions-nav')) {
465        var links = secondaryNav.querySelectorAll('a');
466    }
467    
468    if (secondaryNav) {
469        var originalTop = secondaryNav.getBoundingClientRect().top + window.pageYOffset;
470
471        window.addEventListener('scroll', function() {
472            var rect = secondaryNav.getBoundingClientRect();
473            var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
474
475            var currentSection;
476            links.forEach(function(link) {
477                var section = document.querySelector(link.getAttribute('href'));
478                var sectionTop = section.getBoundingClientRect().top;
479
480                if(sectionTop <= 0) {
481                    currentSection = section;
482                }
483            });
484
485            links.forEach(function(link) {
486                link.classList.remove('active');
487            });
488
489            if(currentSection) {
490                var currentLink = secondaryNav.querySelector('a[href="#' + currentSection.id + '"]');
491                if(currentLink) {
492                    currentLink.classList.add('active');
493                }
494            }
495        });
496    }
497});

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.