PageSourceSearch

https://kogotki.by/assets/js/main.js

js kogotki.by collected 2026-10-06 15:03:51 UTC 41,231 bytes, 1,271 lines download raw bytes

1(function($) {
2	"use strict";
3
4/*------------------------------------------------------------------
5[Table of contents]
6
7
8beautypress custom function
9menu fixed function 
10email patern
11prelaoder
12beautypress portfolio grid
13another beautypress portfolio grid 4 items
14beautypress popular service grid
15image comperasion
16Date Picker
17welcome section slider
18welcome section slider version 2
19testimonial slider
20simple image slider
21team slider
22sync slider
23video pop up
24image pop up
25Ajaxchimp init
26Booking form init
27Booking form select field focus
28numeric number counter init
29counter up appear init
30back to top
31button with mouse pointer
32button pulse effect
33contact form init
34instagram feeds
35beautypress accordion add class
36beautypress hover add class
37mouse over and add class remove class
38flicker gallery
39hover 3d init for tilt
40mega menu
41ScrollMagic
42parallax bg
43social tigger icon
44input number increase
45meun scroll and add class
46snazzy maps 1
47snazzy maps 2
48
49-------------------------------------------------------------------*/
50
51
52/*=============================================================
53				beautypress custom function
54=========================================================================*/
55function beautypress_function() {
56	var header_height = $('.header-height-calc-minus.beautypress-header-section'),
57		welcome_container = $('.welcome-height-calc-minus .beautypress-welcome-container'),
58		window_height = $(window).height(),
59		height_minus = window_height - header_height.height(),
60		comming_soon = $('.beautypress-comming-soon-content'),
61		owl_prev = $('.beautypress-welcome-slider .owl-nav .owl-prev'),
62		owl_next = $('.beautypress-welcome-slider .owl-nav .owl-next'),
63		header_height_calc = (header_height.height()) / 2,
64		welcome_wrapers = $('.beautypress-welcome-wraper');
65
66		welcome_wrapers.css('margin-top', header_height.height());
67
68		owl_prev.css('top', 'calc(50% + ' +header_height_calc+'px)');
69		owl_next.css('top', 'calc(50% + ' +header_height_calc+'px)');
70	
71
72		if (window_height >= 600) {
73			comming_soon.css('height', window_height);	
74		} else {
75			comming_soon.css('height', '600px');
76		}
77
78		if (window_height >= 600) {
79			welcome_container.css('height', window_height);
80		} else {
81			welcome_container.css('height', '600');
82		}
83}
84
85//  email patern 
86function email_pattern(email) {
87	var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
88
89	return regex.test(email);
90}
91
92// menu fixed function 
93function muneFixed() {
94
95	var scroll = $(document).scrollTop(),
96		this_item = $('.navbar-fixed'),
97		headerHeight = this_item.outerHeight(),
98		headerAnimation = $('.menu-skew'),
99		classList = ['off-canvas', 'fixed', 'swingInX', 'swingOutX'];
100
101		// console.log(classList);
102
103		$(window).scroll(function() {
104
105			var scrolled = $(document).scrollTop();
106
107			if (scrolled > headerHeight) {
108				this_item.addClass(classList[0]);
109			} else {
110				this_item.removeClass(classList[0]);
111			}
112
113			if (scrolled > scroll || headerAnimation.hasClass(classList[2][3])) {
114				this_item.removeClass(classList[1]);
115				headerAnimation.removeClass(classList[2]);
116				headerAnimation.addClass(classList[3]);
117			} else {
118				this_item.addClass(classList[1]);
119				headerAnimation.addClass(classList[2]);
120				headerAnimation.removeClass(classList[3]);
121			}
122			scroll = $(document).scrollTop();
123		});
124}
125
126// menu fixed anim class function 
127function menuFixedAnimClass() {
128
129	var scroll = $(document).scrollTop(),
130		this_item = $('.navbar-fixed'),
131		headerHeight = this_item.outerHeight(),
132		headerAnimation = $('.menu-skew'),
133		classList = ['off-canvas', 'fixed', 'swingInX', 'swingOutX'];
134
135		// console.log(classList);
136
137		function animationClassAdd() {
138
139			if (this_item.hasClass(classList[0][1]) || headerAnimation.hasClass(classList[2][3])) {
140				this_item.addClass(classList[0]);
141				this_item.removeClass(classList[1]);
142				headerAnimation.removeClass(classList[2]);
143				headerAnimation.addClass(classList[3]);
144			} else {
145				this_item.removeClass(classList[0]);
146				this_item.addClass(classList[1]);
147				headerAnimation.addClass(classList[2]);
148				headerAnimation.removeClass(classList[3]);
149			}
150		}
151
152		$(window).on('load', function() {
153			animationClassAdd();
154		});
155
156		$(window).on('resize', function() {
157			animationClassAdd();
158		});
159}
160
161
162$(window).on('load', function() {
163	// Beautypress custom function init
164	beautypress_function();
165
166	// menu fixed
167	muneFixed();
168
169	// menu fixed anim class function 
170	menuFixedAnimClass();
171
172/*=============================================================
173			prelaoder
174=========================================================================*/
175
176$('#preloader-cancel-btn').on('click', function (e) {
177	e.preventDefault();
178	$("#preloader").addClass('loaded');
179})
180setTimeout(function() {
181	$("#preloader").addClass('loaded');
182}, 500);
183
184/*=============================================================
185			beautypress portfolio grid
186=========================================================================*/
187if ($('.beautypress-photo-gallery-grid').length > 0) {
188	var $container = $('.beautypress-photo-gallery-grid'),
189		colWidth = function() {
190			var w = $container.width(),
191				columnNum = 1,
192				columnWidth = 0;
193			if (w > 1200) {
194				columnNum = 3;
195			} else if (w > 900) {
196				columnNum = 3;
197			} else if (w > 600) {
198				columnNum = 3;
199			} else if (w > 450) {
200				columnNum = 2;
201			} else if (w > 385) {
202				columnNum = 1;
203			}
204			columnWidth = Math.floor(w / columnNum);
205			$container.find('.beautypress-photo-gallery-grid-item').each(function() {
206				var $item = $(this),
207					multiplier_w = $item.attr('class').match(/beautypress-photo-gallery-grid-item-w(\d)/),
208					multiplier_h = $item.attr('class').match(/beautypress-photo-gallery-grid-item-h(\d)/),
209					width = multiplier_w ? columnWidth * multiplier_w[1] : columnWidth,
210					height = multiplier_h ? columnWidth * multiplier_h[1] * 0.4 - 12 : columnWidth * 0.5;
211				$item.css({
212					width: width
213					//height: height
214				});
215			});
216			return columnWidth;
217		},
218		isotope = function() {
219			$container.isotope({
220				resizable: false,
221				itemSelector: '.beautypress-photo-gallery-grid-item',
222				masonry: {
223					columnWidth: colWidth(),
224					gutterWidth: 3
225				}
226			});
227		};
228	isotope();
229	$(window).on('resize', isotope);
230	var $optionSets = $('.beautypress-portfolio-nav .option-set'),
231		$optionLinks = $optionSets.find('a');
232	$optionLinks.on('click', function() {
233		var $this = $(this);
234		var $optionSet = $this.parents('.option-set');
235		$optionSet.find('.selected').removeClass('selected');
236		$this.addClass('selected');
237
238		// make option object dynamically, i.e. { filter: '.my-filter-class' }
239		var options = {},
240			key = $optionSet.attr('data-option-key'),
241			value = $this.attr('data-option-value');
242		// parse 'false' as false boolean
243		value = value === 'false' ? false : value;
244		options[key] = value;
245		if (key === 'layoutMode' && typeof changeLayoutMode === 'function') {
246			// changes in layout modes need extra logic
247			changeLayoutMode($this, options)
248		} else {
249			// creativewise, apply new options
250			$container.isotope(options);
251		}
252		return false;
253	});
254}
255
256/*=============================================================
257			another beautypress portfolio grid 4 items
258=========================================================================*/
259if ($('.beautypress-photo-gallery-grid-v3').length > 0) {
260	var $container = $('.beautypress-photo-gallery-grid-v3'),
261		colWidth = function() {
262			var w = $container.width(),
263				columnNum = 1,
264				columnWidth = 0;
265			if (w > 1200) {
266				columnNum = 4;
267			} else if (w > 900) {
268				columnNum = 4;
269			} else if (w > 600) {
270				columnNum = 2;
271			} else if (w > 450) {
272				columnNum = 2;
273			} else if (w > 385) {
274				columnNum = 1;
275			}
276			columnWidth = Math.floor(w / columnNum);
277			$container.find('.beautypress-photo-gallery-grid-item-v3').each(function() {
278				var $item = $(this),
279					multiplier_w = $item.attr('class').match(/beautypress-photo-gallery-grid-item-v3-w(\d)/),
280					multiplier_h = $item.attr('class').match(/beautypress-photo-gallery-grid-item-v3-h(\d)/),
281					width = multiplier_w ? columnWidth * multiplier_w[1] : columnWidth,
282					height = multiplier_h ? columnWidth * multiplier_h[1] * 0.4 - 12 : columnWidth * 0.5;
283				$item.css({
284					width: width
285					//height: height
286				});
287			});
288			return columnWidth;
289		},
290		isotope = function() {
291			$container.isotope({
292				resizable: false,
293				itemSelector: '.beautypress-photo-gallery-grid-item-v3',
294				masonry: {
295					columnWidth: colWidth(),
296					gutterWidth: 3
297				}
298			});
299		};
300	isotope();
301	$(window).on('resize', isotope);
302	var $optionSets = $('.beautypress-portfolio-nav .option-set'),
303		$optionLinks = $optionSets.find('a');
304	$optionLinks.on('click', function() {
305		var $this = $(this);
306		var $optionSet = $this.parents('.option-set');
307		$optionSet.find('.selected').removeClass('selected');
308		$this.addClass('selected');
309
310		// make option object dynamically, i.e. { filter: '.my-filter-class' }
311		var options = {},
312			key = $optionSet.attr('data-option-key'),
313			value = $this.attr('data-option-value');
314		// parse 'false' as false boolean
315		value = value === 'false' ? false : value;
316		options[key] = value;
317		if (key === 'layoutMode' && typeof changeLayoutMode === 'function') {
318			// changes in layout modes need extra logic
319			changeLayoutMode($this, options)
320		} else {
321			// creativewise, apply new options
322			$container.isotope(options);
323		}
324		return false;
325	});
326}
327
328/*=============================================================
329			beautypress popular service grid
330=========================================================================*/
331if ($('.beautypress-popular-service-grid').length > 0) {
332	var $container = $('.beautypress-popular-service-grid'),
333		colWidth = function() {
334			var w = $container.width(),
335				columnNum = 1,
336				columnWidth = 0;
337			if (w > 1200) {
338				columnNum = 3;
339			} else if (w > 900) {
340				columnNum = 3;
341			} else if (w > 600) {
342				columnNum = 3;
343			} else if (w > 450) {
344				columnNum = 2;
345			} else if (w > 385) {
346				columnNum = 1;
347			}
348			columnWidth = Math.floor(w / columnNum);
349			$container.find('.beautypress-popular-service-grid-item').each(function() {
350				var $item = $(this),
351					multiplier_w = $item.attr('class').match(/beautypress-popular-service-grid-item-w(\d)/),
352					multiplier_h = $item.attr('class').match(/beautypress-popular-service-grid-item-h(\d)/),
353					width = multiplier_w ? columnWidth * multiplier_w[1] : columnWidth,
354					height = multiplier_h ? columnWidth * multiplier_h[1] * 0.4 - 12 : columnWidth * 0.5;
355				$item.css({
356					width: width
357					//height: height
358				});
359			});
360			return columnWidth;
361		},
362		isotope = function() {
363			$container.isotope({
364				resizable: false,
365				itemSelector: '.beautypress-popular-service-grid-item',
366				masonry: {
367					columnWidth: colWidth(),
368					gutterWidth: 3
369				}
370			});
371		};
372	isotope();
373	$(window).on('resize', isotope);
374}
375
376/*=============================================================
377				image comperasion
378=========================================================================*/
379
380if ($('.beautypress-before-after').length > 0) {
381	$('.beautypress-before-after').twentytwenty({
382		no_overlay: true ,
383		move_slider_on_hover: false ,
384		move_with_handle_only: true, 
385		click_to_move: false ,
386	});
387}
388
389}); // end on.load event
390
391$(document).ready(function() {
392
393
394$(document).on('click', '#color_red', function(event) {
395	event.preventDefault();
396	/* Act on the event */
397
398 	var colors = ['red','green'],
399 		colorVar = ['--color-purple','--color-cyan','--color-pink','--color-chocolate'];
400
401	document.documentElement.style.setProperty(colorVar[0], colors[0]);
402	document.documentElement.style.setProperty(colorVar[1], colors[0]);
403	document.documentElement.style.setProperty(colorVar[2], colors[1]);
404	document.documentElement.style.setProperty(colorVar[3], colors[1]);
405
406	$(this).after('<div class="color_code"><em>'+ colors[0] +'</em>,<em>'+ colors[1] +'</em></div>');
407
408	if ($(this).children().find('color_code')) {
409		$('.color_code').show();
410		$(this).parent().children('color_code').hide();
411	} else {
412		$('.color_code').hide();
413		$(this).parent().children('color_code').show();
414	}
415});
416
417$(document).on('click', '#color_green', function(event) {
418	event.preventDefault();
419	/* Act on the event */
420
421 	var colors = ['blue','purple'],
422 		colorVar = ['--color-purple','--color-cyan','--color-pink','--color-chocolate'];
423
424	document.documentElement.style.setProperty(colorVar[0], colors[0]);
425	document.documentElement.style.setProperty(colorVar[1], colors[0]);
426	document.documentElement.style.setProperty(colorVar[2], colors[1]);
427	document.documentElement.style.setProperty(colorVar[3], colors[1]);
428
429	$(this).after('<div class="color_code"><em>'+ colors[0] +'</em>,<em>'+ colors[1] +'</em></div>');
430
431	if ($(this).children().find('color_code')) {
432		$('.color_code').show();
433		$(this).parent().children('color_code').hide();
434	} else {
435		$('.color_code').hide();
436		$(this).parent().children('color_code').show();
437	}
438});
439
440// Beautypress custom function init
441beautypress_function();
442
443// menu fixed anim class function 
444menuFixedAnimClass();
445
446/*=============================================================
447				Date Picker
448=========================================================================*/
449if ($('.datepicker').length > 0) {
450	$('.datepicker').datepicker().on('changeDate', function() {
451		$(this).datepicker('hide');
452	});
453}
454
455/*=============================================================
456				welcome section slider
457=========================================================================*/
458
459if ($('.beautypress-welcome-slider').length > 0) {
460	var owl1 = $(".beautypress-welcome-slider");
461	owl1.owlCarousel({
462		items: 1,
463		loop: true,
464		mouseDrag: true,
465		touchDrag: true,
466		dots: false,
467		nav: true,
468		autoplay: true,
469		autoplayTimeout: 5000,
470		autoplayHoverPause: true,
471		navText: 
472			[ '<i class="xsicon icon-left-arrow"></i>',
473			'<i class="xsicon icon-right-arrow"></i>'],
474	});
475}
476
477/*=============================================================
478				welcome section slider version 2
479=========================================================================*/
480
481if ($('.beautypress-welcome-slider-v2').length > 0) {
482	var owl2 = $(".beautypress-welcome-slider-v2");
483	owl2.owlCarousel({
484		items: 1,
485		loop: true,
486		mouseDrag: true,
487		touchDrag: true,
488		dots: false,
489		nav: false,
490		autoplay: true,
491		autoplayTimeout: 5000,
492		autoplayHoverPause: true,
493	});
494
495	$("#prev").on('click', function() {
496		owl2.trigger('prev.owl.carousel');
497	});
498
499	$("#next").on('click', function() {
500		owl2.trigger('next.owl.carousel');
501	});
502}
503
504/*=============================================================
505				testimonial slider
506=========================================================================*/
507
508if ($('.beautypress-testimonial-slider').length > 0) {
509	var owl3 = $(".beautypress-testimonial-slider");
510	owl3.owlCarousel({
511		items: 1,
512		loop: true,
513		mouseDrag: true,
514		touchDrag: true,
515		dots: true,
516		nav: false,
517		autoplay: true,
518		autoplayTimeout: 5000,
519		autoplayHoverPause: true,
520	});
521}
522
523/*=============================================================
524				simple image slider
525=========================================================================*/
526
527if ($('.beautypress-image-slider').length > 0) {
528	var owl4 = $(".beautypress-image-slider");
529	owl4.owlCarousel({
530		items: 1,
531		loop: true,
532		mouseDrag: true,
533		touchDrag: true,
534		dots: true,
535		nav: false,
536		autoplay: true,
537		autoplayTimeout: 5000,
538		autoplayHoverPause: true,
539	});
540}
541
542/*=============================================================
543				simple image slider
544=========================================================================*/
545
546if ($('.beautypress-client-slider').length > 0) {
547	var owl5 = $(".beautypress-client-slider");
548	owl5.owlCarousel({
549		items: 6,
550		loop: true,
551		mouseDrag: true,
552		touchDrag: true,
553		dots: false,
554		nav: false,
555		autoplay: true,
556		autoplayTimeout: 5000,
557		autoplayHoverPause: true,
558		responsive : {
559		// breakpoint from 0 up
560		0 : {
561			items: 1,
562		},
563		// breakpoint from 480 up
564		480 : {
565			items: 2,
566		},
567		// breakpoint from 768 up
568		768 : {
569			items: 6,
570		}
571	}
572	});
573
574	$("#prev1").on('click', function() {
575		owl5.trigger('prev.owl.carousel');
576	});
577
578	$("#next1").on('click', function() {
579		owl5.trigger('next.owl.carousel');
580	});
581}
582
583/*=============================================================
584				team slider
585=========================================================================*/
586
587if ($('.beautypress-team-slider').length > 0) {
588	var owl6 = $(".beautypress-team-slider");
589	owl6.owlCarousel({
590		items: 1,
591		loop: true,
592		mouseDrag: true,
593		touchDrag: true,
594		dots: false,
595		nav: false,
596		autoplay: true,
597		autoplayTimeout: 5000,
598		autoplayHoverPause: true,
599	});
600}
601
602/*=============================================================
603				sync slider
604=========================================================================*/
605
606if (($('.beautypress-sync-slider-preview').length > 0) && ($('.beautypress-sync-slider-thumb').length > 0)) {
607	var sync1 = $(".beautypress-sync-slider-preview"),
608		sync2 = $(".beautypress-sync-slider-thumb"),
609		slidesPerPage = 3,
610		syncedSecondary = true;
611
612	sync1.owlCarousel({
613		items: 1,
614		slideSpeed: 2000,
615		nav: true,
616		autoplay: true,
617		dots: true,
618		loop: true,
619		responsiveRefreshRate: 200,
620		navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
621	}).on('changed.owl.carousel', syncPosition);
622
623	sync2
624		.on('initialized.owl.carousel', function() {
625			sync2.find(".owl-item").eq(0).addClass("current");
626		})
627		.owlCarousel({
628			items: slidesPerPage,
629			dots: true,
630			nav: false,
631			smartSpeed: 200,
632			slideSpeed: 500,
633			slideBy: slidesPerPage, //alternatively you can slide by 1, this way the active slide will stick to the first item in the second carousel
634			responsiveRefreshRate: 100
635		}).on('changed.owl.carousel', syncPosition2);
636
637	function syncPosition(el) {
638		//if you set loop to false, you have to restore this next line
639		//var current = el.item.index;
640
641		//if you disable loop you have to comment this block
642		var count = el.item.count - 1;
643		var current = Math.round(el.item.index - (el.item.count / 2) - .5);
644
645		if (current < 0) {
646			current = count;
647		}
648		if (current > count)  {
649			current = 0;
650		}
651
652		//end block
653
654		sync2
655			.find(".owl-item")
656			.removeClass("current")
657			.eq(current)
658			.addClass("current");
659		var onscreen = sync2.find('.owl-item.active').length - 1;
660		var start = sync2.find('.owl-item.active').first().index();
661		var end = sync2.find('.owl-item.active').last().index();
662
663		if (current > end) {
664			sync2.data('owl.carousel').to(current, 100, true);
665		}
666		if (current < start) {
667			sync2.data('owl.carousel').to(current - onscreen, 100, true);
668		}
669	}
670
671	function syncPosition2(el) {
672		if (syncedSecondary) {
673			var number = el.item.index;
674			sync1.data('owl.carousel').to(number, 100, true);
675		}
676	}
677
678	sync2.on("click", ".owl-item", function(e) {
679		e.preventDefault();
680		var number = $(this).index();
681		sync1.data('owl.carousel').to(number, 300, true);
682	});
683}
684
685
686/*=============================================================
687				video pop up
688=========================================================================*/
689if ($('.beautypress-video-popup').length > 0) {
690	$('.beautypress-video-popup').magnificPopup({
691		disableOn: 700,
692		type: 'iframe',
693		mainClass: 'mfp-fade',
694		removalDelay: 160,
695		preloader: false,
696		fixedContentPos: false
697	});
698}
699/*=============================================================
700				image pop up
701=========================================================================*/
702
703if ($('.beautypress-image-popup').length > 0) {
704	$('.beautypress-image-popup').magnificPopup({
705		type: 'image',
706		removalDelay: 500, //delay removal by X to allow out-animation
707		callbacks: {
708			beforeOpen: function () {
709				// just a hack that adds mfp-anim class to markup
710				this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
711				this.st.mainClass = 'mfp-zoom-in';
712			}
713		},
714		closeOnContentClick: true,
715		midClick: true,
716		gallery: {
717			enabled: true,
718		},
719		fixedContentPos: false,
720	});
721}
722
723/*=============================================================
724				Ajaxchimp init
725=========================================================================*/
726if ($('.mc-form').length > 0) {
727	$('.mc-form').ajaxChimp({
728		url: 'https://facebook.us8.list-manage.com/subscribe/post?u=85f515a08b87483d03fee7755&amp;id=66389dc38b'
729	});
730}
731
732/*=============================================================
733				Booking form init
734=========================================================================*/
735if ($('#beautypress-booking-form').length > 0) {
736	$("#beautypress-booking-form").on('submit', function() {
737		$('#beautypress-form-msg').addClass('hidden');
738		$('#beautypress-form-msg').removeClass('alert-success');
739		$('#beautypress-form-msg').removeClass('alert-danger');
740
741		$.ajax({
742			type: "POST",
743			url: "php/index.php",
744			data: $("#beautypress-booking-form").serialize(),
745			dataType: "json",
746			success: function(data) {
747
748				if ('success' == data.result) {
749					$('#beautypress-form-msg').css('visibility', 'visible').hide().fadeIn().removeClass('hidden').addClass('alert-success');
750					$('#beautypress-form-msg').html(data.msg[0]);
751					$('#beautypress-booking-form')[0].reset();
752				}
753
754				if ('error' == data.result) {
755					$('#beautypress-form-msg').css('visibility', 'visible').hide().fadeIn().removeClass('hidden').addClass('alert-danger');
756					$('#beautypress-form-msg').html(data.msg[0]);
757				}
758
759			}
760		});
761
762		return false;
763	});
764}
765
766/*=============================================================
767				Booking form select field focus
768=========================================================================*/
769
770$('#appointment-date ,#appointment-service, #appointment-time').on('focus', function() {
771	$(this).parent().addClass('actives');
772});
773$('#appointment-date, #appointment-service, #appointment-time').on('blur', function() {
774	$(this).parent().removeClass('actives');
775});
776
777/*=============================================================
778				numeric number counter init
779=========================================================================*/
780
781var number_animate = $(".number-animate");
782
783if (number_animate.length > 0) {
784	number_animate.appear();
785	$(document.body).on('appear', '.numeric-count', function() {
786		number_animate.each(function() {
787			$(this).animateNumbers($(this).attr("data-value"), true, parseInt($(this).attr("data-animation-duration"), 10));
788		});
789	});
790} // End exists
791
792/*=============================================================
793				counter up appear init
794=========================================================================*/
795
796var appear = $('.appear');
797appear.appear();
798$.fn.animateNumbers = function(stop, commas, duration, ease) {
799	return this.each(function() {
800		var $this = $(this);
801		var start = parseInt($this.text().replace(/,/g, ""), 10);
802		commas = (commas === undefined) ? true : commas;
803		$({
804			value: start
805		}).animate({
806			value: stop
807		}, {
808			duration: duration == undefined ? 500 : duration,
809			easing: ease == undefined ? "swing" : ease,
810			step: function() {
811				$this.text(Math.floor(this.value));
812				if (commas) {
813					$this.text($this.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
814				}
815			},
816			complete: function() {
817				if (parseInt($this.text(), 10) !== stop) {
818					$this.text(stop);
819					if (commas) {
820						$this.text($this.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
821					}
822				}
823			}
824		});
825	});
826};
827
828
829/*=============================================================
830				back to top
831=========================================================================*/
832if ($('.back-to-top').length > 0) {
833	$('.back-to-top').on('click', function(event) {
834		event.preventDefault();
835		
836		$('body, html').animate({
837			scrollTop: 0
838		}, 1000);
839	});
840}
841
842/*=============================================================
843				button with mouse pointer
844=========================================================================*/
845if ( $( '.xs-btn' ).length > 0 ) {
846	$('.xs-btn' ).on( 'mouseenter', function ( e ) {
847
848		var parentOffset = $( this ).offset(),
849			relX = e.pageX - parentOffset.left,
850			relY = e.pageY - parentOffset.top;
851
852		if ( $( this ).find( 'span' ) ) {
853			$( '.xs-btn span' ).css( {
854				top: relY,
855				left: relX,
856			} );
857		}
858	} );
859	$( '.xs-btn' ).on( 'mouseout', function ( e ) {
860
861		var parentOffset = $( this ).offset(),
862			relX = e.pageX - parentOffset.left,
863			relY = e.pageY - parentOffset.top;
864
865		if ( $( this ).find( 'span' ) ) {
866			$( '.xs-btn span' ).css( {
867				top: relY,
868				left: relX,
869			} );
870		}
871	} );
872}
873
874/*=============================================================
875				button pulse effect
876=========================================================================*/
877$('.pulse-btn').hover(function(e) {
878	e.preventDefault();
879
880	var btns = $(this).addClass('active');
881
882	setTimeout(function() {
883		btns.removeClass('active');
884	}, 500);
885});
886
887/*=============================================================
888				contact form init
889=========================================================================*/
890
891if ($('#beautypress-contact').length > 0) {
892	$('#beautypress-contact').on('submit', function(event) {
893
894		event.preventDefault();
895
896		var c_name = $('#c_name'),
897			c_email = $('#c_email'),
898			c_subject = $('#c_subject'),
899			c_massage = $('#c_massage'),
900			c_submit = $('#c_submit'),
901			c_error = false;
902
903			$('.c_error_massage , .beautypress_success_message , .beautypress_loader').hide().fadeOut(400);
904
905
906			if (c_name.val() === '') {
907				c_name.after('<p class="c_error_massage">'+ c_name.attr('placeholder') +' filed is not empty </p>').show().fadeIn(500);
908				c_error = true;
909				c_name.focus();
910			}
911			if (c_email.val() === '') {
912				c_email.after('<p class="c_error_massage">'+ c_email.attr('placeholder') +' filed is not empty </p>').show().fadeIn(500);
913				c_error = true;
914				c_email.focus();
915			} else if (!email_pattern(c_email.val().toLowerCase())) {
916				c_email.after('<p class="c_error_massage">'+ c_email.attr('placeholder') +' filed is not vaild </p>').show().fadeIn(500);
917				c_error = true;
918				c_email.focus();
919			}
920			if (c_subject.val() === '') {
921				c_subject.after('<p class="c_error_massage">'+ c_subject.attr('placeholder') +' filed is not empty </p>').show().fadeIn(500);
922				c_error = true;
923				c_subject.focus();
924			}
925			if (c_massage.val() === '') {
926				c_massage.after('<p class="c_error_massage">'+ c_massage.attr('placeholder') +' filed is not empty </p>').show().fadeIn(500);
927				c_error = true;
928				c_massage.focus();
929			}
930
931			if (c_error === false) {
932				c_submit.before().hide().fadeIn();
933				$.ajax({
934						type: "POST",
935						url: "php/contact-form.php",
936						data: {
937						'c_name' : c_name.val(),
938						'c_email' : c_email.val(),
939						'c_subject' : c_subject.val(),
940						'c_massage' : c_massage.val()
941					},
942					success: function(result){
943						c_submit.after('<span class="beautypress_success_message">' + result + '</span>').hide().fadeIn();
944
945						$(".beautypress_loader").fadeOut("normal", function() {
946							$(this).remove();
947						});
948
949						$('#beautypress-contact')[0].reset();
950					}
951				});
952			}
953	});
954}
955
956/*=============================================================
957				instagram feeds
958=========================================================================*/
959
960if ($('.beautypress-demoFeed').length > 0) {
961	$.fn.spectragram.accessData = {
962		accessToken: '1764162550.ba4c844.679392a432894982bf6a31ec20d8acb0',
963		clientID: '289a98508b934dd49a68144b79209813'
964	};
965	$('.beautypress-demoFeed').spectragram('getUserFeed',{
966		query: 'natgeo',
967		max: 9,
968		size: 'small',
969	});
970}
971
972/*=============================================================
973				beautypress accordion add class
974=========================================================================*/
975
976if ($('.beautypress-accordion .panel-heading').length > 0) {
977	$('.beautypress-accordion .panel-heading').on('click', function(event) {
978		event.preventDefault();
979		$(this).parent().addClass('active').siblings().removeClass('active');
980	});
981}
982
983/*=============================================================
984				beautypress hover add class
985=========================================================================*/
986
987if ($('.beautypress-single-team-v3').length > 0) {
988	$('.beautypress-single-team-v3').hover(function() {
989		if ($('.beautypress-single-team-v3').hasClass('hover')) {
990			$(this).removeClass('hover');
991		}else {
992			$('.beautypress-team-col-v3').children().removeClass('hover');
993			$(this).addClass('hover');
994		}
995	});
996}
997
998
999/*=============================================================
1000				mouse over and add class remove class
1001=========================================================================*/
1002
1003if ($('.beautypress-single-new-pricing.beautypress-pricing-footer').length > 0) {
1004	$('.beautypress-single-new-pricing.beautypress-pricing-footer').on('mouseover', function(){
1005		$(this).parent().addClass('active');
1006	}).on('mouseout', function(){
1007		$(this).parent().removeClass('active');
1008	});
1009}
1010
1011/*=============================================================
1012				flicker gallery
1013=========================================================================*/
1014
1015if ($('.beautypress-flickr').length > 0) {
1016	$('.beautypress-flickr').jflickrfeed({
1017		limit: 9,
1018		qstrings: { 
1019			id: '95098787@N06' 
1020		},
1021		itemTemplate: '<li>' + '<a rel="colorbox" href="{{image_b}}" title="{{title}}">' + '<img src="{{image_s}}" alt="{{title}}" />' + '</a>' + '</li>'
1022	});
1023}
1024
1025
1026/*=============================================================
1027				mega menu
1028=========================================================================*/
1029
1030if ($('.beautypress-mega-menu').length > 0) {
1031	$('.beautypress-mega-menu').xs_nav({
1032		mobileBreakpoint: 992,
1033	});
1034}
1035if ($('.xs_nav_2').length > 0) {
1036	$('.xs_nav_2').xs_nav({
1037		mobileBreakpoint: 992,
1038	});
1039}
1040if ($('.xs-navigation-middle-menu').length > 0) {
1041	$('.xs-navigation-middle-menu').xs_nav({
1042		mobileBreakpoint: 992,
1043	});
1044}
1045
1046/*=============================================================
1047				hover 3d init for tilt
1048=========================================================================*/
1049
1050/*if ($('.beautypress-3d-project-card').length > 0) {
1051	$('.beautypress-3d-project-card').tilt({
1052		maxTilt:20,
1053		perspective: 700,
1054		easing: "cubic-bezier(.03,.98,.52,.99)",
1055		scale:1,
1056		speed: 500,
1057		transition: true,
1058	});
1059}*/
1060
1061/*if ($('.beautypress-single-photo-gallery .beautypress-3d-project-card').length > 0) {
1062	$('.beautypress-single-photo-gallery .beautypress-3d-project-card').tilt({
1063		maxTilt:25,
1064		perspective: 700,
1065		easing: "cubic-bezier(.03,.98,.52,.99)",
1066		scale:1,
1067		speed: 400,
1068		transition: true,
1069	});
1070}*/
1071
1072/*=============================================================
1073				ScrollMagic
1074=========================================================================*/
1075
1076if ($('.beautypress-scoller-animation').length > 0) {
1077	var controller = new ScrollMagic.Controller();
1078
1079	new ScrollMagic.Scene({triggerElement: ".beautypress-scoller-animation"})
1080		.setVelocity(".scoller-image-1 img", {opacity: 1, bottom: "0"}, 800)
1081		.triggerHook("onEnter")
1082		.addTo(controller);
1083
1084	new ScrollMagic.Scene({triggerElement: ".beautypress-scoller-animation"})
1085		.setVelocity(".scoller-image-2 img", {opacity: 1, top: "270"}, 1000)
1086		.triggerHook(0.7)
1087		.addTo(controller);
1088}
1089
1090/*=============================================================
1091				parallax bg
1092=========================================================================*/
1093
1094if ($('.parallax-bg').length > 0) {
1095	$('.parallax-bg').parallax();
1096}
1097
1098/*=============================================================
1099				social tigger icon
1100=========================================================================*/
1101
1102$('.tigger-icon').on('click', function(event) {
1103	event.preventDefault();
1104	/* Act on the event */
1105
1106	var this_item = $('.beautypress-social-tigger');
1107
1108	if (this_item.hasClass('active')) {
1109		this_item.removeClass('active');
1110	} else {
1111		this_item.addClass('active');
1112	}
1113
1114});
1115
1116/*=============================================================
1117				input number increase
1118=========================================================================*/
1119
1120var thiss = $('.beautypress_input_number');
1121
1122	thiss.append('<span class="sub"><img src="img/minus-icon.png" alt="" /></span>');
1123	thiss.append('<span class="add"><img src="img/plus-icon.png" alt="" /></span>');
1124
1125$('.beautypress_input_number').each(function() {
1126	
1127	var spinner = $(this),
1128		input = spinner.find('input[type="number"]'),
1129		add = spinner.find('.add'),
1130		sub = spinner.find('.sub');
1131
1132		input.parent().on('click', '.sub', function(event) {
1133			event.preventDefault();
1134			/* Act on the event */
1135			if (input.val() > parseInt(input.attr('min')))
1136				input.val( function(i, oldval) { return --oldval; });
1137
1138		});
1139
1140		input.parent().on('click', '.add', function () {
1141			event.preventDefault();
1142
1143			if (input.val() < parseInt(input.attr('max')))
1144				input.val( function(i, oldval) { return ++oldval; });
1145		});
1146
1147});
1148
1149}
1149);
1150
1151$(window).on('scroll', function() {
1152
1153/*=============================================================
1154				meun scroll and add class
1155=========================================================================*/
1156
1157var w_height = $(window).height(),
1158	d_height = $(document).height(),
1159	h_calc = d_height - w_height;
1160
1161	// console.log(h_calc);
1162
1163var scrollTop = $(this).scrollTop();
1164
1165if (scrollTop >= h_calc) {
1166	$('.beautypress-back-to-top-wraper.show-last-pos').addClass('active');
1167} else {
1168	$('.beautypress-back-to-top-wraper.show-last-pos').removeClass('active');
1169}
1170
1171}); // END Scroll Function 
1172
1173$(window).on('resize', function() {
1174	// Beautypress custom function init
1175	beautypress_function();
1176}); // End Resize
1177
1178/*=============================================================
1179				snazzy maps 1
1180=========================================================================*/
1181
1182if ($('#beautypress_maps').length > 0) {
1183	// When the window has finished loading create our google map below
1184	google.maps.event.addDomListener(window, 'load', init);
1185
1186		function init() {
1187		// Basic options for a simple Google Map
1188		// For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
1189		var mapOptions = {
1190			// How zoomed in you want the map to start at (always required)
1191			zoom: 11,
1192			scrollwheel: false,
1193			navigationControl: false,
1194			mapTypeControl: true,
1195			scaleControl: false,
1196			draggable: true,
1197			disableDefaultUI: true,
1198
1199			// The latitude and longitude to center the map (always required)
1200			center: new google.maps.LatLng(40.6700, -73.9400), // New York
1201
1202			// How you would like to style the map. 
1203			// This is where you would paste any style found on Snazzy Maps.
1204			styles: [{"featureType":"administrative","elementType":"all","stylers":[{"saturation":"-100"}]},{"featureType":"administrative.province","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","elementType":"all","stylers":[{"saturation":-100},{"lightness":"50"},{"visibility":"simplified"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":"-100"}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"all","stylers":[{"lightness":"30"}]},{"featureType":"road.local","elementType":"all","stylers":[{"lightness":"40"}]},{"featureType":"transit","elementType":"all","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]},{"featureType":"water","elementType":"labels","stylers":[{"lightness":-25},{"saturation":-100}]}]
1205			};
1206
1207			// Get the HTML DOM element that will contain your map 
1208			// We are using a div with id="map" seen below in the <body>
1209			var mapElement = document.getElementById('beautypress_maps');
1210
1211			// Create the Google Map using our element and options defined above
1212			var map = new google.maps.Map(mapElement, mapOptions);
1213
1214			// Let's also add a marker while we're at it
1215			var marker = new google.maps.Marker({
1216			position: new google.maps.LatLng(40.6700, -73.9400),
1217			map: map,
1218			title: 'Beautypress'
1219		});
1220	}
1221}
1222
1223/*=============================================================
1224				snazzy maps 2
1225=========================================================================*/
1226
1227if ($("#beautypress_maps_2").length > 0) {
1228	// When the window has finished loading create our google map below
1229	google.maps.event.addDomListener(window, 'load', init);
1230
1231		function init() {
1232		// Basic options for a simple Google Map
1233		// For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
1234		var mapOptions = {
1235			// How zoomed in you want the map to start at (always required)
1236			zoom: 11,
1237			scrollwheel: false,
1238			navigationControl: false,
1239			mapTypeControl: true,
1240			scaleControl: false,
1241			draggable: true,
1242			disableDefaultUI: true,
1243
1244			// The latitude and longitude to center the map (always required)
1245			center: new google.maps.LatLng(40.6700, -73.9400), // New York
1246
1247			// How you would like to style the map. 
1248			// This is where you would paste any style found on Snazzy Maps.
1249			styles: [{"featureType":"all","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"all","elementType":"labels","stylers":[{"visibility":"off"},{"saturation":"-100"}]},{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40},{"visibility":"off"}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"off"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"landscape","elementType":"geometry.fill","stylers":[{"color":"#4d6059"}]},{"featureType":"landscape","elementType":"geometry.stroke","stylers":[{"color":"#4d6059"}]},{"featureType":"landscape.natural","elementType":"geometry.fill","stylers":[{"color":"#4d6059"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"lightness":21}]},{"featureType":"poi","elementType":"geometry.fill","stylers":[{"color":"#4d6059"}]},{"featureType":"poi","elementType":"geometry.stroke","stylers":[{"color":"#4d6059"}]},{"featureType":"road","elementType":"geometry","stylers":[{"visibility":"on"},{"color":"#7f8d89"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#7f8d89"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.local","elementType":"geometry.stroke","stylers":[{"color":"#7f8d89"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#2b3638"},{"visibility":"on"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#2b3638"},{"lightness":17}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#24282b"}]},{"featureType":"water","elementType":"geometry.stroke","stylers":[{"color":"#24282b"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.icon","stylers":[{"visibility":"off"}]}]
1250			};
1251
1252			// Get the HTML DOM element that will contain your map 
1253			// We are using a div with id="map" seen below in the <body>
1254			var mapElement = document.getElementById('beautypress_maps_2');
1255
1256			// Create the Google Map using our element and options defined above
1257			var map = new google.maps.Map(mapElement, mapOptions);
1258
1259		// Let's also add a marker while we're at it
1260		var marker = new google.maps.Marker({
1261			position: new google.maps.LatLng(40.6700, -73.9400),
1262			map: map,
1263			title: 'Beautypress!',
1264			icon: 'img/markar.png',
1265		});
1266		marker.setAnimation(google.maps.Animation.BOUNCE);
1267		setTimeout(function(){ marker.setAnimation(null); }, 750);
1268	}
1269}
1270
1271})(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.