PageSourceSearch

https://restorangaruda.com/_template/js/main.js

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

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.