PageSourceSearch

https://www.swapon-group.com/js/main.js

js swapon-group.com collected 2026-09-29 12:55:04 UTC 6,638 bytes, 318 lines download raw bytes

1 AOS.init({
2 	duration: 800,
3 	easing: 'slide'
4 });
5
6(function($) {
7
8	"use strict";
9
10	$(window).stellar({
11    responsive: true,
12    parallaxBackgrounds: true,
13    parallaxElements: true,
14    horizontalScrolling: false,
15    hideDistantElements: false,
16    scrollProperty: 'scroll',
17    horizontalOffset: 0,
18	  verticalOffset: 0
19  });
20
21  // Scrollax
22  $.Scrollax();
23
24
25	var fullHeight = function() {
26
27		$('.js-fullheight').css('height', $(window).height());
28		$(window).resize(function(){
29			$('.js-fullheight').css('height', $(window).height());
30		});
31
32	};
33	fullHeight();
34
35	// loader
36	var loader = function() {
37		setTimeout(function() { 
38			if($('#ftco-loader').length > 0) {
39				$('#ftco-loader').removeClass('show');
40			}
41		}, 1);
42	};
43	loader();
44
45	// Scrollax
46   $.Scrollax();
47
48	var carousel = function() {
49		$('.home-slider').owlCarousel({
50	    loop:true,
51	    autoplay: true,
52	    margin:0,
53	    animateOut: 'fadeOut',
54	    animateIn: 'fadeIn',
55	    nav:false,
56	    autoplayHoverPause: false,
57	    items: 1,
58	    navText : ["<span class='ion-md-arrow-back'></span>","<span class='ion-chevron-right'></span>"],
59	    responsive:{
60	      0:{
61	        items:1,
62	        nav:false
63	      },
64	      600:{
65	        items:1,
66	        nav:false
67	      },
68	      1000:{
69	        items:1,
70	        nav:false
71	      }
72	    }
73		});
74		$('.carousel-work').owlCarousel({
75			autoplay: true,
76			center: true,
77			loop: true,
78			items:1,
79			margin: 30,
80			stagePadding:0,
81			nav: true,
82			navText: ['<span class="ion-ios-arrow-back">', '<span class="ion-ios-arrow-forward">'],
83			responsive:{
84				0:{
85					items: 1,
86					stagePadding: 0
87				},
88				600:{
89					items: 2,
90					stagePadding: 50
91				},
92				1000:{
93					items: 3,
94					stagePadding: 100
95				}
96			}
97		});
98		$('.carousel-testimony').owlCarousel({
99			center: true,
100			loop: true,
101			items:1,
102			margin: 30,
103			stagePadding: 0,
104			nav: false,
105			navText: ['<span class="ion-ios-arrow-back">', '<span class="ion-ios-arrow-forward">'],
106			responsive:{
107				0:{
108					items: 1
109				},
110				600:{
111					items: 3
112				},
113				1000:{
114					items: 3
115				}
116			}
117		});
118
119	};
120	carousel();
121
122	$('nav .dropdown').hover(function(){
123		var $this = $(this);
124		// 	 timer;
125		// clearTimeout(timer);
126		$this.addClass('show');
127		$this.find('> a').attr('aria-expanded', true);
128		// $this.find('.dropdown-menu').addClass('animated-fast fadeInUp show');
129		$this.find('.dropdown-menu').addClass('show');
130	}, function(){
131		var $this = $(this);
132			// timer;
133		// timer = setTimeout(function(){
134			$this.removeClass('show');
135			$this.find('> a').attr('aria-expanded', false);
136			// $this.find('.dropdown-menu').removeClass('animated-fast fadeInUp show');
137			$this.find('.dropdown-menu').removeClass('show');
138		// }, 100);
139	});
140
141
142	$('#dropdown04').on('show.bs.dropdown', function () {
143	  console.log('show');
144	});
145
146	// scroll
147	var scrollWindow = function() {
148		$(window).scroll(function(){
149			var $w = $(this),
150					st = $w.scrollTop(),
151					navbar = $('.ftco_navbar'),
152					sd = $('.js-scroll-wrap');
153
154			if (st > 150) {
155				if ( !navbar.hasClass('scrolled') ) {
156					navbar.addClass('scrolled');	
157				}
158			} 
159			if (st < 150) {
160				if ( navbar.hasClass('scrolled') ) {
161					navbar.removeClass('scrolled sleep');
162				}
163			} 
164			if ( st > 350 ) {
165				if ( !navbar.hasClass('awake') ) {
166					navbar.addClass('awake');	
167				}
168				
169				if(sd.length > 0) {
170					sd.addClass('sleep');
171				}
172			}
173			if ( st < 350 ) {
174				if ( navbar.hasClass('awake') ) {
175					navbar.removeClass('awake');
176					navbar.addClass('sleep');
177				}
178				if(sd.length > 0) {
179					sd.removeClass('sleep');
180				}
181			}
182		});
183	};
184	scrollWindow();
185
186	
187	var counter = function() {
188		
189		$('#section-counter').waypoint( function( direction ) {
190
191			if( direction === 'down' && !$(this.element).hasClass('ftco-animated') ) {
192
193				var comma_separator_number_step = $.animateNumber.numberStepFactories.separator(',')
194				$('.number').each(function(){
195					var $this = $(this),
196						num = $this.data('number');
197						console.log(num);
198					$this.animateNumber(
199					  {
200					    number: num,
201					    numberStep: comma_separator_number_step
202					  }, 7000
203					);
204				});
205				
206			}
207
208		} , { offset: '95%' } );
209
210	}
211	counter();
212
213	var contentWayPoint = function() {
214		var i = 0;
215		$('.ftco-animate').waypoint( function( direction ) {
216
217			if( direction === 'down' && !$(this.element).hasClass('ftco-animated') ) {
218				
219				i++;
220
221				$(this.element).addClass('item-animate');
222				setTimeout(function(){
223
224					$('body .ftco-animate.item-animate').each(function(k){
225						var el = $(this);
226						setTimeout( function () {
227							var effect = el.data('animate-effect');
228							if ( effect === 'fadeIn') {
229								el.addClass('fadeIn ftco-animated');
230							} else if ( effect === 'fadeInLeft') {
231								el.addClass('fadeInLeft ftco-animated');
232							} else if ( effect === 'fadeInRight') {
233								el.addClass('fadeInRight ftco-animated');
234							} else {
235								el.addClass('fadeInUp ftco-animated');
236							}
237							el.removeClass('item-animate');
238						},  k * 50, 'easeInOutExpo' );
239					});
240					
241				}, 100);
242				
243			}
244
245		} , { offset: '95%' } );
246	};
247	contentWayPoint();
248
249
250	// navigation
251	var OnePageNav = function() {
252		$(".smoothscroll[href^='#'], #ftco-nav ul li a[href^='#']").on('click', function(e) {
253		 	e.preventDefault();
254
255		 	var hash = this.hash,
256		 			navToggler = $('.navbar-toggler');
257		 	$('html, body').animate({
258		    scrollTop: $(hash).offset().top
259		  }, 700, 'easeInOutExpo', function(){
260		    window.location.hash = hash;
261		  });
262
263
264		  if ( navToggler.is(':visible') ) {
265		  	navToggler.click();
266		  }
267		});
268		$('body').on('activate.bs.scrollspy', function () {
269		  console.log('nice');
270		})
271	};
272	OnePageNav();
273
274
275	// magnific popup
276	$('.image-popup').magnificPopup({
277    type: 'image',
278    closeOnContentClick: true,
279    closeBtnInside: true,
280    fixedContentPos: true,
281    mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
282     gallery: {
283      enabled: true,
284      navigateByImgClick: true,
285      preload: [0,1] // Will preload 0 - before current, and 1 after the current image
286    },
287    image: {
288      verticalFit: true
289    },
290    zoom: {
291      enabled: true,
292      duration: 300 // don't foget to change the duration also in CSS
293    }
294  });
295
296  $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
297    disableOn: 700,
298    type: 'iframe',
299    mainClass: 'mfp-fade',
300    removalDelay: 160,
301    preloader: false,
302
303    fixedContentPos: false
304  });
305
306
307  $('.appointment_date').datepicker({
308	  'format': 'm/d/yyyy',
309	  'autoclose': true
310	});
311
312	$('.appointment_time').timepicker();
313
314
315
316
317})(jQuery);
318

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.