PageSourceSearch

https://honcavepress.com/js/main.js

js honcavepress.com collected 2026-09-27 12:06:13 UTC 5,822 bytes, 276 lines download raw bytes

1;(function () {
2	
3	'use strict';
4
5	var isMobile = {
6		Android: function() {
7			return navigator.userAgent.match(/Android/i);
8		},
9			BlackBerry: function() {
10			return navigator.userAgent.match(/BlackBerry/i);
11		},
12			iOS: function() {
13			return navigator.userAgent.match(/iPhone|iPad|iPod/i);
14		},
15			Opera: function() {
16			return navigator.userAgent.match(/Opera Mini/i);
17		},
18			Windows: function() {
19			return navigator.userAgent.match(/IEMobile/i);
20		},
21			any: function() {
22			return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
23		}
24	};
25
26	var mobileMenuOutsideClick = function() {
27
28		$(document).click(function (e) {
29	    var container = $("#colorlib-offcanvas, .js-colorlib-nav-toggle");
30	    if (!container.is(e.target) && container.has(e.target).length === 0) {
31
32	    	if ( $('body').hasClass('offcanvas') ) {
33
34    			$('body').removeClass('offcanvas');
35    			$('.js-colorlib-nav-toggle').removeClass('active');
36				
37	    	}
38	    
39	    	
40	    }
41		});
42
43	};
44
45
46	var offcanvasMenu = function() {
47
48		$('#page').prepend('<div id="colorlib-offcanvas" />');
49		$('#page').prepend('<a href="#" class="js-colorlib-nav-toggle colorlib-nav-toggle colorlib-nav-white"><i></i></a>');
50		var clone1 = $('.menu-1 > ul').clone();
51		$('#colorlib-offcanvas').append(clone1);
52		var clone2 = $('.menu-2 > ul').clone();
53		$('#colorlib-offcanvas').append(clone2);
54
55		$('#colorlib-offcanvas .has-dropdown').addClass('offcanvas-has-dropdown');
56		$('#colorlib-offcanvas')
57			.find('li')
58			.removeClass('has-dropdown');
59
60		// Hover dropdown menu on mobile
61		$('.offcanvas-has-dropdown').mouseenter(function(){
62			var $this = $(this);
63
64			$this
65				.addClass('active')
66				.find('ul')
67				.slideDown(500, 'easeOutExpo');				
68		}).mouseleave(function(){
69
70			var $this = $(this);
71			$this
72				.removeClass('active')
73				.find('ul')
74				.slideUp(500, 'easeOutExpo');				
75		});
76
77
78		$(window).resize(function(){
79
80			if ( $('body').hasClass('offcanvas') ) {
81
82    			$('body').removeClass('offcanvas');
83    			$('.js-colorlib-nav-toggle').removeClass('active');
84				
85	    	}
86		});
87	};
88
89	var burgerMenu = function() {
90
91		$('body').on('click', '.js-colorlib-nav-toggle', function(event){
92			var $this = $(this);
93
94
95			if ( $('body').hasClass('overflow offcanvas') ) {
96				$('body').removeClass('overflow offcanvas');
97			} else {
98				$('body').addClass('overflow offcanvas');
99			}
100			$this.toggleClass('active');
101			event.preventDefault();
102
103		});
104	};
105	
106
107	var contentWayPoint = function() {
108		var i = 0;
109		$('.animate-box').waypoint( function( direction ) {
110
111			if( direction === 'down' && !$(this.element).hasClass('animated-fast') ) {
112				
113				i++;
114
115				$(this.element).addClass('item-animate');
116				setTimeout(function(){
117
118					$('body .animate-box.item-animate').each(function(k){
119						var el = $(this);
120						setTimeout( function () {
121							var effect = el.data('animate-effect');
122							if ( effect === 'fadeIn') {
123								el.addClass('fadeIn animated-fast');
124							} else if ( effect === 'fadeInLeft') {
125								el.addClass('fadeInLeft animated-fast');
126							} else if ( effect === 'fadeInRight') {
127								el.addClass('fadeInRight animated-fast');
128							} else {
129								el.addClass('fadeInUp animated-fast');
130							}
131
132							el.removeClass('item-animate');
133						},  k * 200, 'easeInOutExpo' );
134					});
135					
136				}, 100);
137				
138			}
139
140		} , { offset: '85%' } );
141	};
142
143
144	var dropdown = function() {
145
146		$('.has-dropdown').mouseenter(function(){
147
148			var $this = $(this);
149			$this
150				.find('.dropdown')
151				.css('display', 'block')
152				.addClass('animated-fast fadeInUpMenu');
153
154		}).mouseleave(function(){
155			var $this = $(this);
156
157			$this
158				.find('.dropdown')
159				.css('display', 'none')
160				.removeClass('animated-fast fadeInUpMenu');
161		});
162
163	};
164
165
166	var goToTop = function() {
167
168		$('.js-gotop').on('click', function(event){
169			
170			event.preventDefault();
171
172			$('html, body').animate({
173				scrollTop: $('html').offset().top
174			}, 500, 'easeInOutExpo');
175			
176			return false;
177		});
178
179		$(window).scroll(function(){
180
181			var $win = $(window);
182			if ($win.scrollTop() > 200) {
183				$('.js-top').addClass('active');
184			} else {
185				$('.js-top').removeClass('active');
186			}
187
188		});
189	
190	};
191
192
193	// Loading page
194	var loaderPage = function() {
195		$(".colorlib-loader").fadeOut("slow");
196	};
197
198
199	var parallax = function() {
200
201		if ( !isMobile.any() ) {
202			$(window).stellar({
203				horizontalScrolling: false,
204				hideDistantElements: false, 
205				responsive: true
206
207			});
208		}
209	};
210
211	var counter = function() {
212		$('.js-counter').countTo({
213			 formatter: function (value, options) {
214	      return value.toFixed(options.decimals);
215	    },
216		});
217	};
218
219
220	var counterWayPoint = function() {
221		if ($('#colorlib-counter').length > 0 ) {
222			$('#colorlib-counter').waypoint( function( direction ) {
223										
224				if( direction === 'down' && !$(this.element).hasClass('animated') ) {
225					setTimeout( counter , 400);					
226					$(this.element).addClass('animated');
227				}
228			} , { offset: '90%' } );
229		}
230	};
231
232	// Owl Carousel
233	var owlCrouselFeatureSlide = function() {
234		var owl = $('.owl-carousel');
235		owl.owlCarousel({
236			animateOut: 'fadeOut',
237		   animateIn: 'fadeIn',
238			autoplay: true,
239			items: 1,
240		   loop: true,
241		   margin: 0,
242		   responsiveClass: true,
243		   nav: false,
244		   dots: true,
245		   autoplayHoverPause: true,
246		   smartSpeed: 500,
247		   navText: [
248		      "<i class='icon-arrow-left3 owl-direction'></i>",
249		      "<i class='icon-arrow-right3 owl-direction'></i>"
250	     	]
251		});
252
253	};
254
255	var bgVideo = function() {
256		$('.player').mb_YTPlayer();
257	};
258
259	
260	$(function(){
261		mobileMenuOutsideClick();
262		offcanvasMenu();
263		burgerMenu();
264		contentWayPoint();
265		dropdown();
266		goToTop();
267		loaderPage();
268		parallax();
269		counter();
270		counterWayPoint();
271		owlCrouselFeatureSlide();
272		bgVideo();
273	});
274
275
276}());

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.