PageSourceSearch

https://hristo.one/js/script.js

js hristo.one collected 2026-10-07 01:01:47 UTC 6,203 bytes, 282 lines download raw bytes

1(function($) {
2	
3	"use strict";
4	
5	
6	//Hide Loading Box (Preloader)
7	function handlePreloader() {
8		if($('.preloader').length){
9			$('.preloader').delay(200).fadeOut(500);
10		}
11	}
12	
13	
14	//Update Header Style and Scroll to Top
15	function headerStyle() {
16		if($('.main-header').length){
17			var windowpos = $(window).scrollTop();
18			var siteHeader = $('.main-header');
19			var scrollLink = $('.scroll-to-top');
20			if (windowpos >= 200) {
21				siteHeader.addClass('fixed-header');
22				scrollLink.fadeIn(300);
23			} else {
24				siteHeader.removeClass('fixed-header');
25				scrollLink.fadeOut(300);
26			}
27		}
28	}
29	
30	headerStyle();
31	
32	//Submenu Dropdown Toggle
33	if($('.main-header li.dropdown ul').length){
34		$('.main-header li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>');
35		
36		//Dropdown Button
37		$('.main-header li.dropdown .dropdown-btn').on('click', function() {
38			$(this).prev('ul').slideToggle(500);
39		});
40		
41		//Disable dropdown parent link
42		$('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function(e) {
43			e.preventDefault();
44		});
45	}
46	
47	
48	//Hidden Bar Menu Config
49	function hiddenBarMenuConfig() {
50		var menuWrap = $('.hidden-bar .side-menu');
51		// hidding submenu 
52		menuWrap.find('.dropdown').children('ul').hide();
53		// toggling child ul
54		menuWrap.find('li.dropdown > a').each(function () {
55			$(this).on('click', function (e) {
56				e.preventDefault();
57				$(this).parent('li.dropdown').children('ul').slideToggle();
58	
59				// adding class to item container
60				$(this).parent().toggleClass('open');
61	
62				return false;
63	
64			});
65		});
66	}
67	
68	hiddenBarMenuConfig();
69	
70	
71	//Hidden Sidebar
72	if ($('.hidden-bar').length) {
73		var hiddenBar = $('.hidden-bar');
74		var hiddenBarOpener = $('.hidden-bar-opener');
75		var hiddenBarCloser = $('.hidden-bar-closer');
76		$('.hidden-bar-wrapper').mCustomScrollbar();
77		
78		//Show Sidebar
79		hiddenBarOpener.on('click', function () {
80			hiddenBar.addClass('visible-sidebar');
81		});
82		
83		//Hide Sidebar
84		hiddenBarCloser.on('click', function () {
85			hiddenBar.removeClass('visible-sidebar');
86		});
87		
88	}
89	
90	
91	//Panels Toggle (Shopping Cart Page)
92	if ($('.toggle-panel').length) {
93		var targetPanel = $('.toggle-content');
94		
95		//Show Panel
96		$('.toggle-panel').on('click', function () {
97			$(this).toggleClass('active-panel');
98			$(this).next(targetPanel).fadeToggle(300);
99		});
100	}
101	
102	
103	//Masonary
104	function enableMasonry() {
105		if($('.masonry-items-container').length){
106	
107			var winDow = $(window);
108			// Needed variables
109			var $container=$('.masonry-items-container');
110	
111			$container.isotope({
112				itemSelector: '.masonry-item',
113				 masonry: {
114					columnWidth : '.gallery-block'
115				 },
116				animationOptions:{
117					duration:500,
118					easing:'linear'
119				}
120			});
121	
122			winDow.on('resize', function(){
123
124				$container.isotope({ 
125					itemSelector: '.masonry-item',
126					animationOptions: {
127						duration: 500,
128						easing	: 'linear',
129						queue	: false
130					}
131				});
132			});
133		}
134	}
135	
136	enableMasonry();
137	
138	
139	//Four Item Carousel
140	if ($('.four-item-carousel').length) {
141		$('.four-item-carousel').owlCarousel({
142			loop:true,
143			margin:5,
144			nav:true,
145			smartSpeed: 700,
146			autoplay: 4000,
147			navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ],
148			responsive:{
149				0:{
150					items:1
151				},
152				600:{
153					items:2
154				},
155				800:{
156					items:3
157				},
158				1024:{
159					items:4
160				},
161				1200:{
162					items:4
163				}
164			}
165		});    		
166	}
167
168
169	// Sponsors Carousel
170	if ($('.sponsors-carousel').length) {
171		$('.sponsors-carousel').owlCarousel({
172			loop:true,
173			margin:10,
174			nav:true,
175			smartSpeed: 500,
176			autoplay: 4000,
177			navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ],
178			responsive:{
179				0:{
180					items:1
181				},
182				480:{
183					items:2
184				},
185				600:{
186					items:3
187				},
188				800:{
189					items:4
190				},
191				1024:{
192					items:4
193				}
194			}
195		});    		
196	}
197	
198	
199	//LightBox / Fancybox
200	if($('.lightbox-image').length) {
201		$('.lightbox-image').fancybox({
202			openEffect  : 'fade',
203			closeEffect : 'fade',
204			helpers : {
205				media : {}
206			}
207		});
208	}
209	
210	
211	//Contact Form Validation
212	if($('#contact-form').length){
213		$('#contact-form').validate({
214			rules: {
215				username: {
216					required: true
217				},
218				email: {
219					required: true,
220					email: true
221				},
222				subject: {
223					required: true
224				},
225				message: {
226					required: true
227				}
228			}
229		});
230	}
231	
232	
233	// Scroll to a Specific Div
234	if($('.scroll-to-target').length){
235		$(".scroll-to-target").on('click', function() {
236			var target = $(this).attr('data-target');
237		   // animate
238		   $('html, body').animate({
239			   scrollTop: $(target).offset().top
240			 }, 1500);
241	
242		});
243	}
244	
245	
246	// Keep the footer copyright year current
247	$('.copyright .year').text(new Date().getFullYear());
248	
249	
250	// Elements Animation
251	if($('.wow').length){
252		var wow = new WOW(
253		  {
254			boxClass:     'wow',      // animated element css class (default is wow)
255			animateClass: 'animated', // animation css class (default is animated)
256			offset:       0,          // distance to the element when triggering the animation (default is 0)
257			mobile:       true,       // trigger animations on mobile devices (default is true)
258			live:         true       // act on asynchronously loaded content (default is true)
259		  }
260		);
261		wow.init();
262	}
263
264
265/* ==========================================================================
266   When document is Scrollig, do
267   ========================================================================== */
268	
269	$(window).on('scroll', function() {
270		headerStyle();
271	});
272	
273/* ==========================================================================
274   When document is loading, do
275   ========================================================================== */
276	
277	$(window).on('load', function() {
278		handlePreloader();
279		enableMasonry();
280	});	
281
282})(window.jQuery);

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.