PageSourceSearch

https://sonorousgroup.com/wp-content/themes/soronus/assets/js/main-js.js?ver=bb961d39460c49b494ae7e7fb9fe7059

js sonorousgroup.com collected 2026-10-08 08:00:00 UTC 9,715 bytes, 397 lines download raw bytes

1//Smooth scroll START
2$(function() {
3	$('a[href*="#"]:not([href="#"])').click(function() {
4	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
5		var target = $(this.hash);
6		target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
7		if (target.length) {
8			$('html, body').animate({
9				scrollTop: target.offset().top
10			}, 200);
11		return false;
12		}
13	}
14	});
15});
16//Smooth scroll END
17
18//Lazy load - works with waypoints START
19function lazyload() {
20
21	$('[data-done][data-img]').each(function() {
22		var thisImg = $(this);
23
24		var waypoint = new Waypoint({
25			element: thisImg,
26			handler: function(direction) {
27				if(direction == 'down'){
28					var done = thisImg.data('done');
29
30					if(done === false){
31
32						if(thisImg.is('img')){
33							var lazy = thisImg.data('img');
34							thisImg.attr('src',lazy).on('load', function(){
35								Waypoint.refreshAll();
36							});
37							thisImg.addClass('loaded');
38							thisImg.data('done', 'true')
39						} else {
40							var lazy = thisImg.data('img');
41							thisImg.css('background-image','url(' + lazy + ')').on('load', function(){
42								Waypoint.refreshAll();
43							});
44							thisImg.addClass('loaded');
45							thisImg.data('done', 'true')
46						}
47					}
48				}
49			},
50			offset: '110%',
51		});
52	});
53}
54//Lazy load - works with waypoints END
55
56//Waypoints START
57function waypoints() {
58	$('.waypoint').each(function() {
59		var thisOne = $(this);
60
61		var waypoint = new Waypoint({
62			element: thisOne,
63			handler: function(direction) {
64				if(direction == 'down'){
65					thisOne.addClass('animate');
66				}
67			},
68			offset: '80%',
69		});
70
71		var waypoint = new Waypoint({
72			element: thisOne,
73			handler: function(direction) {
74				if(direction == 'up'){
75					thisOne.removeClass('animate');
76				}
77			},
78			offset: '100%'
79		});
80	});
81}
82//Waypoints END
83
84//Waypoint.refreshAll();
85
86//Scroll Menu START
87var body = document.body;
88var triggerMenu = document.querySelector(".page-header .trigger-menu");
89var nav = document.querySelector(".page-header nav");
90var menu = document.querySelector(".page-header .menu");
91var scrollUp = "scroll-up";
92var scrollDown = "scroll-down";
93let lastScroll = 0;
94
95window.addEventListener("scroll", function(e) {
96  var currentScroll = window.pageYOffset;
97  if (currentScroll < 50) {
98	body.classList.remove(scrollUp);
99	return;
100  }
101
102  if (currentScroll > lastScroll && !body.classList.contains(scrollDown)) {
103	// down
104	body.classList.remove(scrollUp);
105	body.classList.add(scrollDown);
106  } else if (currentScroll < lastScroll && currentScroll < 50 && body.classList.contains(scrollDown)) {
107	// up and at top
108	body.classList.remove(scrollDown);
109	body.classList.remove(scrollUp);
110	
111  } else if (currentScroll < lastScroll && body.classList.contains(scrollDown)) {
112	// up
113	body.classList.remove(scrollDown);
114	body.classList.add(scrollUp);
115  }
116  lastScroll = currentScroll;
117});
118//Scroll Menu END
119
120$(window).ready(function() {
121	//$('.pakery-grid').addClass('loading');
122
123	$('#burger').click(function(){
124		$(this).toggleClass('open');
125		$(this).addClass('close');
126		$('html').toggleClass('menu-open');
127	});
128
129	$('li.menu-item-has-children').click(function(){
130		$(this).toggleClass('open');
131	});
132
133	$('.main-menu li a').click(function(e){
134		e.stopPropagation()
135		// $('#burger').toggleClass('open');
136		// $('#burger').addClass('close');
137		// $('html').toggleClass('menu-open');
138	});
139
140	$('p:has(img)').css('margin-bottom','0').addClass('p-img');
141	$('p:has(.btn)').css('margin-bottom','0').addClass('btn-con');
142
143	$('p.btn-con').each(function(){
144		var thisOne = this;
145		var thisBtn = $(this);
146
147		var textA = thisOne.style.textAlign;
148
149		if(textA == 'center'){
150			thisBtn.addClass('btn-con-center');
151		} else if(textA == 'right') {
152			thisBtn.addClass('btn-con-right');
153		} else if(textA == 'left') {
154			thisBtn.addClass('btn-con-left');
155		}
156	})
157
158	if ($('dl.accordion').length > 0) {
159		
160		$(document).on('click', 'dl.accordion dt', function(){
161			$('dl.accordion dt').next('dd').css('maxHeight', '0px');
162			$('dl.accordion dt').removeClass('open');
163			var ddH = $(this).next('dd').find('.inner').outerHeight();
164			$(this).next('dd').css('maxHeight', ddH+'px');
165			$(this).addClass('open');
166	
167			setTimeout(function(){
168				Waypoint.refreshAll();
169			}, 500);
170		});
171	
172		$(document).on('click', 'dl.accordion dt.open', function(){
173			$('dl.accordion dt').removeClass('open');
174			$('dl.accordion dt').next('dd').css('maxHeight', '0px');
175			$(this).removeClass('open');
176			
177			setTimeout(function(){
178				Waypoint.refreshAll();
179			}, 500);
180		});
181	
182		$(window).resize(function() {
183			$('dl.accordion dt.open').each(function(){
184				var thisOne = $(this);
185				var ddH = thisOne.next('dd').find('.inner').outerHeight();
186				thisOne.next('dd').css('maxHeight', ddH+'px');
187			});
188		});
189	}
190
191	$(document).on('click', '.text-select-section [data-title]', function(){
192		var thisOne = $(this);
193		var thisTitle = thisOne.data('title');
194
195		$('[data-title]').removeClass('active');
196		$('[data-text]').removeClass('active');
197
198		thisOne.addClass('active');
199		$('[data-text='+thisTitle+']').addClass('active');
200
201		setTimeout(function(){
202			Waypoint.refreshAll();
203		}, 500);
204	});
205
206//	//people select
207//	$('.people-con .on-change').on('change', function() {
208//		$('.name-side .names, .bio-side .bio-con').removeClass('active');
209//
210//		var activeSelect = $(this).val();
211//		$(".bio-side .bio-con#"+activeSelect).addClass('active');
212//		$(".name-side .names[rel='"+activeSelect+"']").addClass("active");
213//	});
214
215	$(window).mousemove(function(event) {
216		$('#mouseSmall').css({
217			'top' : event.clientY + 'px',
218			'left' : event.clientX + 'px'
219		});
220
221		setTimeout(function () {
222			$('#mouseBig').css({
223				'top' : event.clientY + 'px',
224				'left' : event.clientX + 'px'
225			});
226		}, 200);
227	});
228
229	$('a, [data-title]').hover( function() {
230			$('#mouseBig, #mouseSmall').addClass('hovered');
231		}, function() {
232			$('#mouseBig, #mouseSmall').removeClass('hovered');
233		}
234	);
235
236	$(document).mouseleave(function() {
237		$('#mouseBig, #mouseSmall').addClass('hide');
238	});
239
240	$(document).mouseenter(function() {
241		$('#mouseBig, #mouseSmall').removeClass('hide');
242	});
243
244	var resizeTimer;
245
246	var width = $(window).width();
247	$(window).on('resize', function() {
248		if ($(this).width() !== width) {
249			width = $(this).width();
250			
251			clearTimeout(resizeTimer);
252			resizeTimer = setTimeout(function(){
253				location.reload();
254			}, 250);
255		}
256	});
257});
258
259$(window).on('load', function(){
260	$('html').addClass('loaded');
261
262	setTimeout(function(){
263		//$(window).trigger('resize');
264
265		setTimeout(function(){
266			//$(window).trigger('resize');
267			waypoints();
268			lazyload();
269		}, 0);
270	}, 0);
271
272	gsap.registerPlugin(ScrollTrigger);
273
274	const textElements = gsap.utils.toArray('.text-line');
275
276	textElements.forEach(text => {
277		gsap.to(text, {
278			backgroundSize: '100%',
279			ease: 'none',
280			scrollTrigger: {
281			trigger: text,
282			start: 'center 80%',
283			end: 'center 20%',
284			scrub: true,
285			},
286		});
287	});
288
289	$('.gform_footer [type="submit"]').prepend('<svg enable-background="new 0 0 9.56 9.97" height="9.97" viewBox="0 0 9.56 9.97" width="9.56" xmlns="http://www.w3.org/2000/svg"><path d="m9.56 6.43-3.54 3.54-.89-.88 2.04-2.04h-7.17v-7.05h1.25v5.8h5.91l-2.02-2.03.88-.88 2.65 2.66.25.25z" fill="#fff"/></svg>');
290
291	jQuery(document).bind('gform_post_render', function(){
292		$('.gform_footer [type="submit"]').prepend('<svg enable-background="new 0 0 9.56 9.97" height="9.97" viewBox="0 0 9.56 9.97" width="9.56" xmlns="http://www.w3.org/2000/svg"><path d="m9.56 6.43-3.54 3.54-.89-.88 2.04-2.04h-7.17v-7.05h1.25v5.8h5.91l-2.02-2.03.88-.88 2.65 2.66.25.25z" fill="#fff"/></svg>');
293	});
294	
295
296	// const swiper = new Swiper('.-slide', {
297	// 	loop: true,
298	// 	spaceBetween: 20,
299	// 	slidesPerView: 1,
300	// 	autoplay: {
301	// 		delay: 3000,
302	// 		disableOnInteraction: false,
303	// 		pauseOnMouseEnter: true,
304	// 	},
305	// 	speed: 300,
306	// 	navigation: {
307	// 		nextEl: '.swiper-button-next',
308	// 		prevEl: '.swiper-button-prev',
309	// 	},
310	// 	pagination: {
311	// 		el: '.swiper-pagination',
312	// 		type: 'bullets',
313	// 		clickable: true,
314	// 	},
315	// 	scrollbar: {
316	// 		el: '.swiper-scrollbar',
317	// 		draggable: true,
318	// 		hide: false,
319	// 	},
320	// 	breakpoints: {
321	// 		768: {
322	// 			spaceBetween: 90,
323	// 			slidesPerView: 1.5,
324	// 		},
325	// 		1100: {
326	// 			spaceBetween: 90,
327	// 			slidesPerView: 2.09,
328	// 		}
329	// 	}
330	// });
331
332	// const swiperP = new Swiper('.portfolio-slide', {
333	// 	loop: false,
334	// 	spaceBetween: 0,
335	// 	slidesPerView: 1.4,
336	// 	autoplay: {
337	// 		delay: 1500,
338	// 		disableOnInteraction: false,
339	// 		pauseOnMouseEnter: true,
340	// 	},
341	// 	speed: 150,
342	// 	scrollbar: {
343	// 		el: '.swiper-scrollbar',
344	// 		draggable: true,
345	// 		hide: false,
346	// 	},
347	// 	breakpoints: {
348	// 		769: {
349	// 			spaceBetween: 0,
350	// 			slidesPerView: 3,
351	// 		}
352	// 	}
353	// });
354
355	const swiperP = new Swiper('.portfolio-slide', {
356		loop: true,
357		spaceBetween: 0,
358		slidesPerView: 1.4,
359		autoplay: {
360			delay: 0,
361			disableOnInteraction: false,
362			pauseOnMouseEnter: true,
363		},
364		speed: 3000,
365		freeMode: true,
366		loopAdditionalSlides: 2,
367		// scrollbar: {
368		// 	el: '.swiper-scrollbar',
369		// 	draggable: true,
370		// 	hide: false,
371		// },
372		breakpoints: {
373			769: {
374				spaceBetween: 0,
375				slidesPerView: 3,
376			}
377		}
378	});
379
380
381	
382
383	// child and parent slides
384	// swiperQ.controller.control = swiperQI;  
385	// swiperQI.controller.control = swiperQ;
386
387	$('.swiper-wrapper').each(function(){
388		$(this).parents('.swiper').css('overflow', 'visible');
389		$(this).wrap('<div class="swiper-wrapper-con" style="overflow: hidden;"></div>');
390	});
391
392	$('.portfolio-slide .top').matchHeight({ property: 'min-height' });
393
394	$('.n-item h3').matchHeight({ property: 'min-height' });
395
396	$('.text-area').fitVids();
397});

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.