PageSourceSearch

https://thanhphongauto.com/wp-content/themes/thanhphongauto/assets/js/global.js

js thanhphongauto.com collected 2026-09-24 12:29:45 UTC 23,299 bytes, 887 lines download raw bytes

1;(function($, window, document, undefined) {
2	"use strict";
3
4	$('body').fitVids();
5
6	/*============================*/
7	/* SWIPER SLIDE */
8	/*============================*/
9	
10	 var swipers = [], winW, winH, winScr, _isresponsive, smPoint = 768, mdPoint = 992, lgPoint = 1200, addPoint = 1600, _ismobile = navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i);
11 
12 
13	 /*========================*/
14	 /* 02 - PAGE CALCULATIONS */
15	 /*========================*/
16	 function pageCalculations(){
17	 winW = $(window).width();
18	 winH = $(window).height();
19	 }
20	    
21	 
22	 /*=================================*/
23	 /* 03 - FUNCTION ON DOCUMENT READY */
24	 /*=================================*/
25	 pageCalculations();
26	 
27	 
28	 /*============================*/
29	 /* 04 - RUN FUNCTION ON LOAD  */
30	 /*============================*/
31	 
32	 $(window).load(function(){ 
33	     initSwiper();
34	     topWrapper();
35	     // menuHeight();
36	     mechanicMobileMenu();
37	     
38	     if($(".lx-preloader").length) {
39			$(".lx-preloader").fadeOut();
40	     }
41	 }); 
42
43
44
45
46	 /*============================*/
47	 /* 04 -      MENU             */
48	 /*============================*/
49
50 	function topWrapper() {
51 		$(".lx-main-wrapper").each(function() {
52			if($(this).offset().top==0) {
53				$(this).addClass('top-wrapper');
54			}
55		});
56 	}
57
58
59 	
60
61 	$(".lx-main-menu .menu-item .sub-menu").addClass('active');
62 	function mechanicMobileMenu() {
63		if($(window).width() < 992) {
64			$(".lx-main-menu .menu-item.menu-item-has-children > a").on("click", function() {
65				$(this).next().toggleClass('active');
66			});
67		}	
68 	}
69
70 	$(".lx-main-menu .menu-item:not(.menu-item-has-children) > a[href^='#']").on("click", function() {
71 		setTimeout(function() {
72 			$(".lx-btn-menu").trigger('click');
73 		},1000)
74 	});
75
76 	$(".lx-header .menu-icon").on("click", function() {
77 		$(".lx-main-menu.slide_menu").addClass('active');
78		$(".lx-header .menu-icon").addClass('no');
79 	});
80
81 	$(".slide_menu .close-icon").on("click", function() {
82 		$(this).closest('.slide_menu').removeClass('active');
83		$(".lx-header .menu-icon").removeClass('no');
84 	});
85
86
87 	
88
89
90 
91 
92	 /*==============================*/
93	 /* 05 - FUNCTION ON PAGE RESIZE */
94	 /*==============================*/
95 	var swipers = [], winW, winH, winScroll, _isresponsive, smPoint = 768, mdPoint = 992, lgPoint = 1200, addPoint = 1600;
96	function initSwiper(){
97		var initIterator = 0;
98		$('.swiper-container').each(function(){
99			var $t = $(this);
100
101			var index = 'swiper-unique-id-'+initIterator;
102
103			$t.addClass('swiper-'+index + ' initialized').attr('id', index);
104			$t.find('.pagination').addClass('pagination-'+index);
105
106			var autoPlayVar = parseInt($t.attr('data-autoplay'));
107			var centerVar = parseInt($t.attr('data-center'));
108			var simVar = ($t.closest('.circle-description-slide-box').length)?false:true;
109			var slidesPerViewVar = $t.attr('data-slides-per-view');
110			if(slidesPerViewVar == 'responsive'){
111				slidesPerViewVar = updateSlidesPerView($t);
112			}
113			else slidesPerViewVar = parseInt(slidesPerViewVar,10);
114			var loopVar = parseInt($t.attr('data-loop'));
115			var speedVar = parseInt($t.attr('data-speed'));
116
117
118
119			swipers['swiper-'+index] = new Swiper('.swiper-'+index,{
120				speed: speedVar,
121				pagination: '.pagination-'+index,
122				loop: loopVar,
123				paginationClickable: true,
124				autoplay: autoPlayVar,
125				slidesPerView: slidesPerViewVar,
126				keyboardControl: true,
127				calculateHeight: true,
128				simulateTouch: simVar,
129				centeredSlides: centerVar,
130				onInit: function(swiper){
131					if($t.attr('data-slides-per-view')=='responsive')   updateSlidesPerView($t);
132					if($t.find('.swiper-slide').length>swiper.params.slidesPerView) $t.removeClass('hide-pagination');
133					else $t.addClass('hide-pagination');
134					changeTeamSlides();
135					equalSlideHeight();
136				},
137				onSlideChangeStart: function(swiper){
138					var activeIndex = (loopVar===true)?swiper.activeIndex:swiper.activeLoopIndex;
139					changeTeamSlides();
140					
141				},
142				onSlideClick: function(swiper){
143					if($t.closest('.circle-slide-box').length) swiper.swipeTo(swiper.clickedSlideIndex);
144				}
145			});
146			swipers['swiper-'+index].reInit();
147
148			//swipers['swiper-'+index].resizeFix();
149			if($t.find('.default-active').length) swipers['swiper-'+index].swipeTo($t.find('.swiper-slide').index($t.find('.default-active')), 0);
150
151
152			if($t.attr('data-slides-per-view')=='responsive'){
153				var countSlides = $t.find(".swiper-slide:not(.swiper-slide-duplicate)").length;
154				setTimeout(function(){
155					$(".swiper-pagination-switch:nth-child(n+"+(countSlides+1)+")").remove();
156				}, 0);
157			}
158
159			initIterator++;
160		});
161	}
162
163
164	function updateSlidesPerView(swiperContainer) {
165		if (winW >= addPoint) return parseInt(swiperContainer.attr('data-add-slides'), 10);
166		else if (winW >= lgPoint) return parseInt(swiperContainer.attr('data-lg-slides'), 10);
167		else if (winW >= mdPoint) return parseInt(swiperContainer.attr('data-md-slides'), 10);
168		else if (winW >= smPoint) return parseInt(swiperContainer.attr('data-sm-slides'), 10);
169		else return parseInt(swiperContainer.attr('data-xs-slides'), 10);
170	}
171	//swiper arrows
172	$('.swiper-arrow.left, .swiper-arrow-left').click(function(){
173		swipers['swiper-'+$(this).closest('.swiper-container').attr('id')].swipePrev();
174	});
175
176	$('.swiper-arrow.right, .swiper-arrow-right').click(function(){
177		swipers['swiper-'+$(this).closest('.swiper-container').attr('id')].swipeNext();
178	});
179
180	$('.testimonials-arrow.left').click(function(){
181		swipers['swiper-'+$(this).closest('.testimonials-wrapper').find('.fx-testimonials-container .swiper-container').attr('id')].swipePrev();
182	});
183
184	$('.testimonials-arrow.right').click(function(){
185		swipers['swiper-'+$(this).closest('.testimonials-wrapper').find('.fx-testimonials-container .swiper-container').attr('id')].swipeNext();
186	});
187
188	$('.testimonials-arrow-wrap .left').click(function(){
189		swipers['swiper-'+$(this).closest('.block.type-15.style-classic').find('.swiper-container').attr('id')].swipePrev();
190	});
191
192	$('.testimonials-arrow-wrap .right').click(function(){
193		swipers['swiper-'+$(this).closest('.block.type-15.style-classic').find('.swiper-container').attr('id')].swipeNext();
194	});
195
196
197
198
199	/***********************************/
200	/* BACKGROUND*/
201	/**********************************/
202
203	//sets child image as a background
204	$('.s-back-switch').each(function(){
205        var $img = $(this).find('.s-img-switch');
206        var $imgSrc =  $img.attr('src');
207        var $imgDataHidden =  $img.data('s-hidden');
208        if($imgSrc) {
209        	$(this).css('background-image' , 'url(' + $imgSrc + ')');
210        }
211        if($imgDataHidden){
212        	$img.css('visibility', 'hidden');
213        }else{
214        	$img.hide();
215        }
216
217    });
218
219
220	
221	/***********************************/
222	/*IZOTOPE*/
223	/**********************************/
224
225	function isotopeBarbershop() {
226		if ($('.izotope-container').length) { 
227			$('.izotope-container').each(function(index, el) {
228				var self = $(this)
229				var $container = self;
230	        	$container.isotope({
231		            itemSelector: '.item',
232		            layoutMode: 'masonry',
233		        });
234				$(this).closest(".lx-portfolio").find('#filters').on('click', '.but', function() {
235					// alert(1);
236				 	var izotope_container = self;
237
238				 	for (var i = izotope_container.length - 1; i >= 0; i--) {
239				 		$(izotope_container[i]).find('.item').removeClass('animated');
240					}
241
242					$('#filters .but').removeClass('activbut');
243					$(this).addClass('activbut');
244					var filterValue = $(this).attr('data-filter');
245					$container.isotope({filter: filterValue});
246
247					return false;
248				});
249			});
250	    }
251	}
252
253
254
255
256	/***********************************/
257	/*ERROR PAGE MIN-HEIGHT*/
258	/**********************************/
259	function error_page_min_height() {
260		var minheight = $('.not-found-title').outerHeight() + 300;
261		if($('.error-page').length){
262			$('footer.lx-footer').hide();
263
264		}
265		if($('.error-page.style2').length){
266			var height = $(window).height() - $('header.lx-header').outerHeight();
267			$('.error-page.style2').css({'height' : height});
268		}
269		$('.error-page').css({'min-height' : minheight});
270	}
271
272	// $("body").addClass($("body").attr("data-style"));
273
274
275	/***********************************/
276	/*COUNTERS
277	/**********************************/
278
279	var counters = function() {
280		$(".wpc-counter.animation .counter").not('.animated').each(function(){
281			if($(window).scrollTop() >= $(this).offset().top-$(window).height()*0.7 ) {
282				$(this).addClass('animated').countTo();
283			}
284		});
285	}
286
287	$(".wpc-counter .counter").each(function() {
288		if($(this).attr('data-to')=='') {
289			$(this).remove();
290		}
291	});
292
293	$(".wpc-counter.staff .title").each(function() {
294		if($(this).text().length>18) {
295			$(this).closest('.wpc-counter').addClass('long');
296		}
297	});
298
299	
300
301	counters();
302
303
304	/*--------------------------------------*/
305    /*               OVERLAY                */
306    /*--------------------------------------*/
307
308    $(".enable_overlay").parent().css("position", "relative");
309
310
311
312
313
314
315    /*--------------------------------------*/
316    /*               ICONS                 */
317    /*--------------------------------------*/
318
319    $(".text-icon").each(function() {
320    	if($(this).length) {
321    		$(this).closest('.lx-text-icon').addClass('label-icon');
322    	}
323    });
324
325    
326
327    // add wrapper z-index
328	$(".lx-img-bg.absolute").closest('.lx-main-wrapper').css("z-index", "999");
329
330
331
332
333
334	/***********************************/
335	/*RUN FUNCTIONS ON SCROLL
336	/**********************************/
337
338	$(window).on('scroll',function(){
339	 	counters();
340	});
341
342
343
344	/***********************************/
345	/*RUN FUNCTIONS ON LOAD
346	/**********************************/
347	
348	$(window).on('load', function(){
349		isotopeBarbershop();
350
351		$('#loading').hide();
352
353
354
355	});
356
357
358	/***********************************/
359	/*LIMIT SLIDES/
360	/**********************************/
361
362
363	
364	$(".lx-clients").each(function() {
365		$(this).find(".swiper-slide:nth-child(n+"+(1+Number($(this).attr("data-lg-slides")))+")").remove();
366	});
367
368
369
370
371
372	/***********************************/
373	/*TOGGLE ACTIVE CLASSES MENU
374	/**********************************/
375
376	$(".current-menu-item").prev().addClass('current-menu-item-prev');
377
378	$(".lx-main-menu .menu-item").on("click", function() {
379		$('current-menu-item-prev').each(function() {
380			$(this).removeClass('current-menu-item-prev');
381		});
382		$(this).prev().addClass('current-menu-item-prev');
383	});
384
385
386
387	function bodyOverlow() {
388		if($(".lx-btn-menu").hasClass('active') && $(window).width() < 992){
389			$('body').addClass('bodyOverflow');
390		}else{
391			$('body').removeClass('bodyOverflow');
392		}
393	}
394
395
396
397	$(".lx-btn-menu").on("click", function() {
398		$(".lx-main-menu").toggleClass('active');
399		$(".lx-btn-menu").toggleClass('active');
400
401		bodyOverlow();
402	});
403
404
405
406	// Image popups
407	$('.lx-gallery, .lx-product-image, .product .mechanic_images').magnificPopup({
408	  delegate: 'a',
409	  type: 'image',
410	  removalDelay: 500, //delay removal by X to allow out-animation
411	  gallery: { enabled:true },
412	  callbacks: {
413	    beforeOpen: function() {
414	      // just a hack that adds mfp-anim class to markup 
415	       this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
416	       this.st.mainClass = this.st.el.attr('data-effect');
417	    }
418	  },
419	  closeOnContentClick: true,
420	  midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source.
421	});
422
423
424	// Hinge effect popup
425	$('#glink').magnificPopup({
426	  mainClass: 'mfp-with-fade',
427	  removalDelay: 1000, //delay removal by X to allow out-animation
428	  callbacks: {
429	    beforeClose: function() {
430	        this.content.addClass('hinge');
431	    }, 
432	    close: function() {
433	        this.content.removeClass('hinge'); 
434	    }
435	  },
436	  midClick: true
437	});
438
439
440
441	/***********************************/
442	/*VIDEO
443	/**********************************/
444
445
446	function videoBg() {
447		if($('.lx-video iframe').length) {	
448
449			$('.lx-video').each(function() {
450				var iframe = $(this).find("iframe"),
451				src = iframe.attr("src"),
452				controls = $(this).attr("data-controls"),
453				start = $(this).attr('data-start'),
454				autoplay = $(this).attr('data-autoplay');
455
456				if(controls==0) {
457					controls='&controls=0&rell=0&showinfo=0';
458				} else {
459					controls='';
460				}
461				iframe.attr("src", src+"?&autoplay="+autoplay+controls+'&start='+start);
462				$(this).find('.play-video').on('click', function() {
463					$(this).closest('.lx-video').find('iframe').attr("src", src+"?&autoplay=1"+controls+'&start='+start);
464					$(this).parent().fadeOut();
465				});
466
467			});
468
469
470	
471		}
472	}
473
474	videoBg();
475
476
477
478	/***********************************/
479	/*TABS
480	/**********************************/
481
482
483	$('.lx-nav-tabs').on('click', 'li:not(.active)', function() {
484
485	    var index_el = $(this).index();
486
487	    $(this).addClass('active').siblings().removeClass('active');
488	    var selector = $(this).closest('.lx-tabs').find('.tab-pane').removeClass('active').removeClass("in").eq(index_el);
489    	selector.addClass('active');
490    	setTimeout( function() {
491    		selector.addClass('in');
492    	},300);
493
494	});
495
496
497	/***********************************/
498	/*ACCORDION
499	/**********************************/
500
501	var wpcRemoveClass = function( el, _class ){
502	    if (el.classList)
503	        el.classList.remove( _class ? _class : 'active' );
504	    else
505	        el.className = panel.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
506	}
507	$('.wpc-accordion').on('click', '.panel-title', function(){
508	    
509	        var panel_parent = this.parentNode,
510	            panel_container = panel_parent.parentNode,
511	            panels_wrap = panel_container.querySelectorAll('.panel-wrap');
512	 
513	        Array.prototype.forEach.call(panels_wrap, function(panel, i){
514	            if(panel !== panel_parent) {
515	               wpcRemoveClass(panel);
516	            }
517	        });
518
519	        if ( -1 !== this.parentNode.className.indexOf( 'active' ) ) {
520	            wpcRemoveClass(panel_parent);
521	        } else {
522	            panel_parent.className += ' active';
523	            // setTimeout( function() {
524	            // 	panel_parent.className += ' in';
525	            // } ,300);
526	        }
527	        
528	});
529
530	
531
532
533
534
535	
536	/***********************************/
537	/*RESPONISVE FONT
538	/**********************************/
539
540
541
542	var attrs=[];
543
544	function attrsData() {
545		var i=0;
546		$('.mechanic_heading .title.custom').each(function() {
547			attrs.push($(this).attr('style'));			
548			if(i<attrs.length) {
549				i++;
550			} else {
551				i=0;
552			}
553			
554		});
555		
556	}
557	attrsData();
558
559
560	function responsiveFont() {
561
562		if($(window).width()<1199) {
563			$('.mechanic_heading .title.custom').removeAttr('style');
564
565			
566		} else {
567
568			var i=0;
569			$('.mechanic_heading .title.custom').each(function() {
570				$(this).attr('style', attrs[i]);
571					if(i<attrs.length) {
572					i++;
573				} else {
574					i=0;
575				}
576			});
577			
578		}
579		
580	}
581
582
583	/***********************************/
584	/* TEAM SLIDER
585	/**********************************/
586
587
588
589	function activeTeamSlider() {
590		$('.lx-team-slider').each(function () {
591			$(this).find('.big-image').css("background-image", "url("+ $(this).find('.swiper-slide.swiper-slide-active .img-team').attr("src")+")");
592		});
593	}
594
595
596	function changeTeamSlides() {
597		$(".lx-team-slider").each(function () {
598			var team = $(this);
599			team.find(".swiper-slide").on("click", function() {
600
601				if($(this).hasClass('swiper-slide-active')) {
602					return false;
603				}
604
605				$(this).closest('.lx-team-slider').find('.big-image').css('opacity', '0').css("background-image", $(this).find('.img-wrap').css("background-image")).css('opacity', '1');
606
607				var numbSlide = Number($(this).index());
608				$(this).closest(".lx-team-slider").find(".info-wrap").each(function() {
609					$(this).removeClass('active');
610				});
611
612				team.find(".swiper-slide").each(function() {
613					$(this).removeClass('swiper-slide-active');
614				});
615
616				$(this).addClass('swiper-slide-active');
617
618				$(this).closest('.lx-team-slider').find('.info-wrap:nth-child('+(1+numbSlide)+')').addClass('active');
619				swipers['swiper-'+$(this).closest('.swiper-container').attr('id')].swipeTo(numbSlide);
620			});
621		});
622	}
623
624
625	/***********************************/
626	/*HOVER ICONS
627	/**********************************/
628	
629
630	
631	if($(".small-hover .icon img").length) {
632		var bigSrc = $(".small-hover .big-circle-wrap .bg-wrap").css("background-image");
633		$(".small-hover .lx-text-icon").on("mouseenter", function() {
634			$(".small-hover .big-circle-wrap .bg-wrap").css("background-image", $(this).find(".icon").css("background-image"));
635		});
636		$(".small-hover .lx-text-icon").on("mouseleave", function() {
637			$(".small-hover .big-circle-wrap .bg-wrap").css("background-image", bigSrc);
638		});
639	}
640
641
642	/***********************************/
643	/*ADD CLASS BLOG SHORTCODE PAGE
644	/**********************************/
645
646
647    if(window.location.href.indexOf("blog")!=-1) {
648        $("body").addClass("blog");
649    }
650
651
652
653    /***********************************/
654	/*ANIMATE ON CLICK LINK
655	/**********************************/
656
657
658
659	$(".lx-button[href^='#']").click(function() {
660	    $('html, body').animate({
661	        scrollTop: $($(this).attr('href')).offset().top
662	    }, 2000);
663	});
664
665
666
667	/***********************************/
668	/*SPACE LEFT
669	/**********************************/
670
671
672
673	function spaceLeftToContainer() {
674    	if($(".left-space-container").length) {
675    		if($(window).width() >= 1199) {
676	    		$(".left-space-container").css({
677		    		"margin-left" : ($(window).width() - $(".container").width()) / 2 - 10
678		    	});
679	    	} else {
680	    		$(".left-space-container").css({
681		    		"margin-left" : 0
682		    	});
683	    	}
684	    }
685    }
686
687    spaceLeftToContainer();
688
689
690    // equal height slides
691    function equalSlideHeight() {
692    	$(".t-customer .lx-testimonials").equalHeights();
693    }
694    
695
696    //add class style calendar for body 
697    if($(".lx-calendar").length) {
698    	$("body").addClass("booked-"+$(".lx-calendar").attr("data-style"));
699    }
700
701
702    /***********************************/
703	/*ONE SCROLL PAGE
704	/**********************************/
705
706
707	var scrollSelector = '.home .menu-item a', // selector menu link
708		active_class = 'current-menu-item',
709		time = 1000,
710		contentTop = {},
711		contentOffset = 87,
712		currentAnchor = window.location.hash,
713		scrollFlag = 0;
714
715	// Fill object with scroll blocks data (offset and height)
716	window.setContentTopObject = function(){
717		contentTop = {};
718		if(scrollSelector.length) {
719			$(scrollSelector).each(function(){
720				if (this.hash && $(this.hash).length) {
721					$(this).attr('data-hash', this.hash);
722					self = $( this.hash );
723					var offset_top = self.offset().top;
724					contentTop[this.hash] = {'top': Math.round(offset_top - contentOffset), 'bottom': Math.round(offset_top  - contentOffset + self.outerHeight() )};
725				}
726			});
727		}
728	}
729	
730	$(window).on('load', function(){
731		setContentTopObject();
732	});
733
734	$(window).on('resize', function(){
735		setContentTopObject();
736		bodyOverlow();
737	});
738
739	// Animate scroll after clicking menu link
740	$(scrollSelector).on('click', function(e){
741
742		//check dom element
743		if ( !this.hash && !$(this.hash).length ) { 
744			return true; 
745		}
746
747		setImmediateAnchor(this, time);
748		e.preventDefault();
749	});
750
751	function setImmediateAnchor(anchor, time){
752		if( anchor && $(anchor.hash).length){
753			scrollFlag = 1;
754			var link_hash = anchor.hash;
755
756			$('html, body').stop().animate({ 'scrollTop' : contentTop[link_hash].top }, time, function(){
757
758				if(history.pushState) {
759				    history.pushState(null, null, link_hash);
760				}
761				else {
762				    location.hash = link_hash;
763				}
764
765				currentAnchor = link_hash;
766				scrollFlag = 0;
767				$(scrollSelector).parent().removeClass(active_class);
768				$(scrollSelector+'[data-hash="' + currentAnchor + '"]').parent().addClass(active_class);
769			});			
770
771		} 
772	}
773
774	$(window).on('load', function(){
775		if ( $(window).scrollTop() > 0 && location.hash ) {
776			setImmediateAnchor(location,1000);
777		};
778	});
779
780	//setImmediateAnchor($(scrollSelector+'[href="'+location.href.split('#')[0]+currentAnchor+'"]')[0], 1);
781	
782	function setScrollAnchor(){
783		if(!scrollFlag){
784			var scrollPositionTop = $(window).scrollTop();
785			for(var p in contentTop){
786				if(contentTop[p].top <= scrollPositionTop && contentTop[p].bottom > scrollPositionTop && currentAnchor != p){
787
788					$(scrollSelector).parent().removeClass(active_class);
789					if(history.pushState) {
790					    history.pushState(null, null, p);
791					}
792					else {
793					    location.hash = p;
794					}
795					$(scrollSelector).parent().removeClass(active_class);
796					$(scrollSelector+'[data-hash="' + p + '"]').parent().addClass(active_class);
797					currentAnchor = p;
798					break;
799				}
800			}
801		}
802	}
803
804	$('html, body').on('scroll mousedown DOMMouseScroll mousewheel keyup', function(e){
805			if ( (e.which > 0 || e.type == 'mousedown' || e.type == 'mousewheel') && scrollFlag ){
806				//console.log(e);
807				$('html,body').stop();
808				scrollFlag = 0;
809				setScrollAnchor();
810			} else {
811				if (!scrollFlag) {
812					scrollFlag = 0;
813					setScrollAnchor();
814				};
815			}
816	});
817
818	function fixedMenu() {
819       if ($(window).scrollTop() > 75) {
820           $('.lx-header').addClass('fixed');
821       } else {
822           $('.lx-header').removeClass('fixed');
823       }
824    }
825
826
827    
828
829    /***********************************/
830	/*ANIMATION ON SCROLL
831	/**********************************/
832
833	// if($(window).width()>1199) {
834		// AOS.init({
835		// 	easing: 'ease-out-cubic',
836		// 	offset: 50
837
838		// });
839	// }
840    
841
842	$(window).on('resize', function() {
843		pageCalculations();
844		initSwiper();
845		responsiveFont();
846		// menuHeight();
847		spaceLeftToContainer();
848		error_page_min_height();
849		bodypadd();
850	});
851
852
853	$(window).on("load", function() {
854		responsiveFont();
855		activeTeamSlider();
856		error_page_min_height();
857		bodypadd();
858		fixedMenu();
859	});
860
861
862	$(window).on('scroll', function() {
863		fixedMenu();
864	});
865
866
867	function bodypadd() {
868		if($('.empty-banner').length || $('.no-vc-content').length){
869			var height = $('header.lx-header').outerHeight();
870			if($(window).width()>991) {
871				$('body').css('padding-top', height + 50 );
872			} else {
873				$('body').css('padding-top', height + 15);
874				if($('.lx-header').hasClass('no-menu-wrap')) {
875					$('body').css('padding-top', height - 60);
876				}
877			}
878			
879		}
880	}
881
882	$( window ).on( "orientationchange", function(  ) {
883		bodyOverlow();
884	});
885
886
887})(jQuery, window, 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.