PageSourceSearch

https://www.themedemo.co/hawa/js/all.js

js themedemo.co collected 2026-10-04 15:26:17 UTC 35,648 bytes, 1,218 lines download raw bytes

1/*
2 * jQuery throttle / debounce - v1.1 - 3/7/2010
3 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
4 * 
5 * Copyright (c) 2010 "Cowboy" Ben Alman
6 * Dual licensed under the MIT and GPL licenses.
7 * http://benalman.com/about/license/
8 */
9(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
10
11;(function($, window, document, undefined) {
12	"use strict";
13
14	if($("#video").length) {
15		$.getScript('js/jquery.youtubebackground.js', function() {
16	  		//postpone execution not the end of execution queue.
17	  		if ($(window).width() >= 1200) {
18	  			setTimeout(function() {
19	  				$('#video').YTPlayer({
20	  					fitToBackground: true,
21	  					videoId: 'wJF5NXygL4k',
22	  					playerVars: {
23	  						modestbranding: 0,
24	  						autoplay: 1,
25	  						controls: 0,
26	  						showinfo: 0,
27	  						branding: 0,
28	  						rel: 0,
29	  						autohide: 1,
30	  						start: 0
31	  					}
32	  				});
33	  			}, 0);
34	  		}
35	  	});
36	}
37
38	var swipers = [],
39		_ismobile = navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i),
40		_isIOS = navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i);
41	/*------------------------------------*/ 
42	/*   FUNCTION  PAGECALCULATIONS    */ 
43	/*------------------------------------*/
44
45	if (typeof pageCalculations !== 'function') { 
46
47		  var $win, winW, winH, winS, pageCalculations;
48
49		  pageCalculations = function (func){
50			$win = $(window);
51			winW = $win.width();
52			winH = $win.height();
53			winS = $win.scrollTop();
54
55			if (func) {
56
57				$win
58					.on('load',function(){
59						func();
60					})
61					.on('resize',function(){
62						func();
63					});
64
65				window.addEventListener("orientationchange", 
66					function() {
67						func();
68					}, false);
69
70			}
71
72		  }
73
74		  pageCalculations(function(){
75			pageCalculations();
76			izotope_portfolio();
77		  });
78
79	}
80
81	if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){
82		$('body').addClass('firefox');
83	}
84	
85	/*============================*/
86	/* Header navigation show */
87	/*============================*/
88	$(".hawa-nav-menu-icon").on( 'click', function () {
89		
90		if($('header').hasClass( 'header-animate')){
91			$('.hawa-navigation').css('overflow','hidden');
92			$('header').removeClass( 'header-animate');
93			$("nav").on("transitionend webkitTransitionendEnd oTransitionendEnd MSTransitionendEnd", function(){ 
94				$('.hawa-navigation').css('overflow','hidden');
95			});
96		}
97		else {
98			$('header').addClass( 'header-animate');
99			$("nav").on("transitionend webkitTransitionendEnd oTransitionendEnd MSTransitionendEnd", function(){ 
100				$('.hawa-navigation').css('overflow','visible');
101			});
102		}
103
104	});
105
106
107	/*==================================================*/
108	/* TIMES */
109	/*==================================================*/
110
111	if( $('#comming-soon').length ) {
112
113		var end_date = $('#comming-soon').attr('data-time');
114
115		$('#comming-soon').ClassyCountdown({
116			theme: "flat-colors",
117			end:  end_date,
118			now: $.now() / 1000,
119			style: {
120				  element: '',
121				  labels: false,
122				  days: {gauge: {fgColor: 'rgba(255,255,255,0)'}},
123				  hours: {gauge: {fgColor: 'rgba(255,255,255,0)'}},
124				  minutes: {gauge: {fgColor: 'rgba(255,255,255,0)'}},
125				  seconds: {gauge: {fgColor: 'rgba(255,255,255,0)'}}
126				}
127		});
128	}
129
130	/*============================*/
131	/*           SKILLS           */
132	/*============================*/
133
134	var run_skills = function () {
135		if ($('.skill-line').length) {
136			$('.skill-line').not('.animated').each(function(){
137				if($(window).scrollTop() >= $(this).offset().top-$(window).height()*0.7 ) {
138
139					$(this).addClass('animated').find('.timer').countTo();
140
141					$(this).find('div').each(function(){
142						var objel = $(this);
143						var pb_width = objel.attr('data-width-pb');
144						objel.css({'width':pb_width});
145					});
146				}
147			});
148		}
149	}
150
151	/***********************************/
152	/* BACKGROUND*/
153	/**********************************/
154
155	//sets child image as a background
156	function wpc_add_img_bg( img_sel, parent_sel){
157
158		if (!img_sel) {
159			console.info('no img selector');
160			return false;
161		}
162
163		var $parent, $imgDataHidden, _this;
164
165		$(img_sel).each(function(){
166			_this = $(this);
167			$imgDataHidden = _this.data('s-hidden');
168			$parent = _this.closest( parent_sel );
169			$parent = $parent.length ? $parent : _this.parent();
170			$parent.css( 'background-image' , 'url(' + this.src + ')' ).addClass('s-back-switch');
171			if ($imgDataHidden) {
172				_this.css('visibility', 'hidden');
173			} else {
174				_this.hide();
175			}
176		});
177
178	}
179
180
181	/*============================*/
182	/*           COUNTERS         */
183	/*============================*/
184	var counters = function() {
185		$(".hawa-counter .timer").not('.animated').each(function(){
186			if($(window).scrollTop() >= $(this).offset().top-$(window).height()*0.7 ) {
187				$(this).text($(this).attr("data-to"));
188				$(this).addClass('animated').countTo({speed: $(this).attr("data-speed")});
189			}
190			
191		});
192	}
193
194
195	/*============================*/
196	/*           IZOTOPE         */
197	/*============================*/
198
199	var izotope_portfolio = function () {
200		
201		if ( $('.izotope-container').length ) { 
202
203			$('.izotope-container').each(function(){
204
205				var $container = $(this).find('.pc');
206				var $filter = $(this).find('.filters');
207
208				if ($container.hasClass('hawa_masonry') && $container.hasClass('gutter')){
209					$container.isotope({
210						itemSelector: '.pi',
211						layoutMode: 'masonry'
212					});
213				} else if( $container.hasClass('hawa_masonry') ) {
214					$container.isotope({
215						itemSelector: '.pi',
216						layoutMode: 'masonry'
217					});
218				} else {
219					$container.isotope({
220						itemSelector: '.pi',
221						layoutMode: 'fitRows'
222					});
223				}
224
225				/* Filter */
226				$filter.on('click', '.but', function() {
227
228					$filter.find('.but').removeClass('activbut');
229					$(this).addClass('activbut');
230
231					var filterValue = $(this).attr('data-filter');
232						$container.isotope({filter: filterValue});
233					return false;
234				});
235			});
236		}
237	}
238	
239
240	/*============================*/
241	/*          BUTTON TOP        */
242	/*============================*/
243
244	var offset = 300,
245		offset_opacity = 1200,
246		scroll_top_duration = 700,
247		$back_to_top = $('#scroll-top');
248
249	$back_to_top.hide();
250
251	//hide or show the "back to top" link
252	$(window).scroll(function(){
253		if ( $(this).scrollTop() > 500 ) {
254			$back_to_top.fadeIn();
255		} else {
256			$back_to_top.fadeOut();
257		}
258	});
259
260
261	//smooth scroll to top
262	$back_to_top.on('click', function(event){
263		event.preventDefault();
264		$('body,html').animate({
265			scrollTop: 0 ,
266			}, scroll_top_duration
267		);
268	});
269
270
271	$('.scroll-link').on('click', function() {
272		event.preventDefault();
273		$('body, html').animate({
274			scrollTop: $( '.' + $(this).attr('data-scroll-to') ).offset().top
275		}, 1500);
276	});
277
278
279	/*============================*/
280	/*            TABS            */
281	/*============================*/
282
283	$('.tabs-header').on('click', 'li:not(.active)', function(event) {
284		
285		event.preventDefault();
286
287		var index_el = $(this).index();
288
289		$(this).addClass('active').siblings().removeClass('active');
290		$(this).closest('.hawa-tabs').find('.tabs-item').removeClass('active').eq(index_el).addClass('active');
291
292	});
293
294	// Tabs detail blog
295
296	$('.categ-comments').find('li').on('click', function() {
297		
298		var index_el = $(this).index();
299
300		$(this).addClass('active').siblings().removeClass('active');
301		$('.tabs-comments').find('.tab-comment').removeClass('active').eq(index_el).addClass('active');
302
303	});
304	
305
306	/*=================================*/
307	/*   		GOOGLE MAP             */
308	/*=================================*/
309
310	if ($('.hawa-map').length) {
311		$('.hawa-map').each(function() {
312			initialize(this);
313		});
314	}
315
316	function initialize(_this) {
317
318		var stylesArray = {
319			//style 1
320			'style-1': [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#ffffff"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"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":"#ffffff"},{"lightness":17},{"weight":1.2}]},{"featureType":"administrative","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"administrative.country","elementType":"geometry","stylers":[{"visibility":"simplified"}]},{"featureType":"administrative.country","elementType":"labels.text","stylers":[{"visibility":"simplified"}]},{"featureType":"administrative.province","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"all","stylers":[{"visibility":"simplified"},{"saturation":"-100"},{"lightness":"30"}]},{"featureType":"administrative.neighborhood","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"administrative.land_parcel","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"visibility":"simplified"},{"gamma":"0.00"},{"lightness":"74"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#010101"},{"lightness":20}]},{"featureType":"landscape.man_made","elementType":"all","stylers":[{"lightness":"3"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road","elementType":"geometry","stylers":[{"visibility":"simplified"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#262626"},{"lightness":17}]}]
321		};
322
323		var styles, map, marker, infowindow,
324			lat = $(_this).attr("data-lat"),
325			lng = $(_this).attr("data-lng"),
326			contentString = $(_this).attr("data-string"),
327			image = $(_this).attr("data-marker"),
328			styles_attr = $(_this).attr("data-style"),
329			zoomLevel = parseInt($(_this).attr("data-zoom"), 10),
330			myLatlng = new google.maps.LatLng(lat, lng);
331
332
333		// style_1
334		if (styles_attr == 'style-1') {
335			styles = stylesArray[styles_attr];
336		}
337		// custom
338		if (typeof hawa_style_map != 'undefined' && styles_attr == 'custom') {
339			styles = hawa_style_map;
340		}
341		// or default style
342
343		var styledMap = new google.maps.StyledMapType(styles, { name: "Styled Map" });
344
345		var mapOptions = {
346			zoom: zoomLevel,
347			disableDefaultUI: true,
348			center: myLatlng,
349			scrollwheel: false,
350			mapTypeControlOptions: {
351				mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']
352			}
353		};
354
355		map = new google.maps.Map(_this, mapOptions);
356
357		map.mapTypes.set('map_style', styledMap);
358		map.setMapTypeId('map_style');
359
360		infowindow = new google.maps.InfoWindow({
361			content: contentString
362		});
363
364
365		marker = new google.maps.Marker({
366			position: myLatlng,
367			map: map,
368			icon: image
369		});
370
371		google.maps.event.addListener(marker, 'click', function() {
372			infowindow.open(map, marker);
373		});
374
375	}
376
377
378	/*=================================*/
379	/*   		SEARCH POPUP           */
380	/*=================================*/
381
382	$('.hawa-search-btn, .hawa-search-btn .fa').on('click', function() {
383		
384		if( ! $('.layer-dark').length ) {
385			var search_form = $('.popup-search-wrapper > .search-form');
386
387			search_form.addClass('popup-search');
388			
389			if( ! $('.close-search').length ) {
390				search_form.append('<span class="close-search"></span>');
391			}
392
393			$('body').append('<div class="layer-dark"></div>').addClass('act');
394
395
396		}
397
398		return false;
399
400	});
401
402	$('body').on('click', '.close-search, .layer-dark', function() {
403
404		$('.search-form').removeClass('popup-search');
405		$('body').removeClass('act');
406		$('.layer-dark').remove();
407
408		return false;
409
410	});
411
412	$(".search-submit").on('click', function(e) {
413		e.preventDefault();
414	});
415
416	$(".gallery-icon > a").on('click', function(e) {
417		e.preventDefault();
418	});
419
420
421
422	/*=================================*/
423	/* 			SWIPER SLIDER          */
424	/*=================================*/
425	var xsPoint = 700, smPoint = 991, mdPoint = 1199; 
426	var xsValue, smValue, mdValue, lgValue;
427
428	$(window).on('resize orientationchange', function () {
429		resizeCall();
430	});
431
432	function resizeCall() {
433		pageCalculations();
434		$('.swiper-container.initialized[data-slides-per-view="responsive"]').each(function () {
435			var thisSwiper = swipers['swiper-' + $(this).attr('id')],
436				$t = $(this),
437				centerVar = thisSwiper.params.centeredSlides,
438				slidesPerViewVar = $t.attr('data-slides-per-view');
439
440			if( slidesPerViewVar == 'responsive' ){ 
441				xsValue = parseInt($t.attr('data-xs-slides'),10);
442				smValue = parseInt($t.attr('data-sm-slides'),10);
443				mdValue = parseInt($t.attr('data-md-slides'),10);
444				lgValue = parseInt($t.attr('data-lg-slides'),10);
445				slidesPerViewVar = updateSlidesPerView(xsValue, smValue, mdValue, lgValue);
446			}
447
448			thisSwiper.params.slidesPerView = slidesPerViewVar;
449			
450			thisSwiper.reInit();
451			if (!centerVar) {
452				var paginationSpan = $t.find('.pagination span');
453				var paginationSlice = paginationSpan.hide().slice(0, (paginationSpan.length + 1 - slidesPerViewVar));
454				if (paginationSlice.length <= 1 || slidesPerViewVar >= $t.find('.swiper-slide').length) $t.addClass('pagination-hidden');
455				else $t.removeClass('pagination-hidden');
456				paginationSlice.show();
457			}
458		});
459	}
460
461	function initSwiper() {
462		var initIterator = 0;
463		$('.swiper-container').each(function() {
464			var $t = $(this);
465			var $wrapper = $t.closest('.hawa-slider');
466			var count_item = $t.find('.swiper-slide').length;
467			var index = 'swiper-unique-id-' + initIterator;
468
469			$t.find('.swiper-slide').each(function(l, i){
470				$(this).attr('data-val', l);
471			});
472 
473			$t.addClass('swiper-' + index + ' initialized').attr('id', index);
474			$t.find('.pagination').addClass('pagination-' + index);
475
476			var setThumb = function(activeIndex){
477				var url_thumb,
478					left_img = $t.find('.slide-prev'),
479					right_img = $t.find('.slide-next'),
480					activeIndexLeft, activeIndexRight;
481
482				activeIndexLeft = ( activeIndex - 1 >= 0 ) ? activeIndex - 1 :  count_item - 1;
483				activeIndexRight = ( activeIndex + 1 < count_item ) ? activeIndex+1 :  0;
484
485				url_thumb = $t.find('.swiper-slide[data-val="' + activeIndexLeft + '"] img').attr('src');
486				left_img.find('span').attr('style', 'background-image: url(' + url_thumb + ')' );
487
488				url_thumb = $t.find('.swiper-slide[data-val="' + activeIndexRight + '"] img').attr('src');
489				right_img.find('span').attr('style', 'background-image: url(' + url_thumb + ')' );
490
491			}
492 
493			var autoPlayVar = parseInt($t.attr('data-autoplay'), 10);
494			var mode = $t.attr('data-mode');
495			var centerVar = parseInt($t.attr('data-center'), 10);
496			var simVar = ($t.closest('.circle-description-slide-box').length) ? false : true;
497			var xsValue, smValue, mdValue, lgValue;
498			var slidesPerViewVar = $t.attr('data-slides-per-view');
499			if( slidesPerViewVar == 'responsive' ){
500				xsValue = parseInt($t.attr('data-xs-slides'),10);
501				smValue = parseInt($t.attr('data-sm-slides'),10);
502				mdValue = parseInt($t.attr('data-md-slides'),10);
503				lgValue = parseInt($t.attr('data-lg-slides'),10);
504				slidesPerViewVar = updateSlidesPerView(xsValue, smValue, mdValue, lgValue);
505			} else if( slidesPerViewVar == 'auto' ){
506				slidesPerViewVar = 'auto';
507				centerVar = true;
508
509			} else { slidesPerViewVar = parseInt(slidesPerViewVar,10); }
510 
511			var loopVar = parseInt($t.attr('data-loop'), 10);
512			var speedVar = parseInt($t.attr('data-speed'), 10);
513 
514			swipers['swiper-' + index] = new Swiper('.swiper-' + index, {
515				speed: speedVar,
516				pagination: '.pagination-' + index,
517				loop: loopVar,
518				loopedSlides: 4,
519				paginationClickable: true,
520				autoplay: autoPlayVar,
521				slidesPerView: slidesPerViewVar,
522				keyboardControl: true,
523				calculateHeight: true,
524				simulateTouch: simVar,
525				centeredSlides: centerVar,
526				roundLengths: true,
527				mode: mode || 'horizontal',
528				onInit: function(swiper) {
529					if( $wrapper.hasClass( 'show-preview' ) ) {
530						setThumb( 0 );
531					}
532				},
533				onSlideChangeEnd: function(swiper) {
534					var activeIndex = (loopVar === 1) ? swiper.activeLoopIndex : swiper.activeIndex;
535					swiper.startAutoplay();
536				},
537				onSlideChangeStart: function(swiper) {
538					var activeIndex = (loopVar=== 1)?swiper.activeIndex:swiper.activeLoopIndex;
539					$t.find('.slider-counter span i').text(activeIndex+1);
540					$t.find('.swiper-slide.active').removeClass('active');
541 
542					var activeIndex = (loopVar === 1) ? swiper.activeLoopIndex : swiper.activeIndex;
543					if( $wrapper.hasClass('show-preview') ) {
544						setThumb( activeIndex );
545					}
546				}
547 
548			});
549 
550			swipers['swiper-' + index].reInit();
551			if (!centerVar) {
552				if ($t.attr('data-slides-per-view') == 'responsive') {
553					var paginationSpan = $t.find('.pagination span');
554					var paginationSlice = paginationSpan.hide().slice(0, (paginationSpan.length + 1 - slidesPerViewVar));
555					if (paginationSlice.length <= 1 || slidesPerViewVar >= $t.find('.swiper-slide').length) $t.addClass('pagination-hidden');
556					else $t.removeClass('pagination-hidden');
557					paginationSlice.show();
558				}
559			}
560			initIterator++;
561		});
562 
563	}
564 
565	$('.slide-prev').on('click', function() {
566		swipers['swiper-' + $(this).closest('.hawa-slider, .hawa-image-slider').find('.swiper-container').attr('id')].swipePrev();
567		swipers['swiper-' + $(this).parent().attr('id')].startAutoplay();
568		return false;
569	});
570 
571	$('.slide-next').on('click', function() {
572		swipers['swiper-' + $(this).closest('.hawa-slider, .hawa-image-slider').find('.swiper-container').attr('id')].swipeNext();
573		swipers['swiper-' + $(this).parent().attr('id')].startAutoplay();
574		return false;
575	});
576 
577	function updateSlidesPerView(xsValue, smValue, mdValue, lgValue){
578		if(winW > mdPoint) return lgValue;
579		else if(winW>smPoint) return mdValue;
580		else if(winW>xsPoint) return smValue;
581		else return xsValue;
582	}   
583
584
585	// Count Swiper Slide 
586
587	var count_slide = $('.hawa-image-slider').find('.swiper-slide').length;
588	$('.hawa-image-slider').find('.count-slide').html( count_slide );
589
590	/*=================================*/
591	/*          Contact Form    		   */
592	/*=================================*/
593	$('.js-contact-form, .hawa-contact-form').submit(function(e){
594
595        $('.ajax-loader').show();
596
597        var url = 'mail.php',
598            form = this;
599
600        $(form).find('[name="fields[code]"]').remove();
601
602        function result(class_key, data){
603          setTimeout(function(){
604            $('.ajax-loader').hide();
605            $('.ajax-result').find(class_key).show().text(data);
606          },500);
607        }
608
609        $.ajax({
610          type: "POST",
611          url: url,
612          data: $(form).serialize(),
613        })
614        .done(function(data) {
615          result('.success', data);
616        }).error(function(data){
617          result('.error', data);
618        })
619
620        e.preventDefault(); 
621
622      });
623
624
625	/*=================================*/
626	/*             BG BLOCK 		   */
627	/*=================================*/
628
629	// bg banner
630	$('.img-page-header').each(function() {
631		var bgSrc = $(this).attr('src');
632		$(this).parent().addClass('background-page-header').css({
633			'background-image': 'url(' + bgSrc + ')'
634		});
635		$(this).hide();
636	});
637
638
639	/*=================================*/
640	/*    POPUP VIDEO AND PORTFOLIO	   */
641	/*=================================*/
642
643	$('.video-btn').magnificPopup({
644			type: 'iframe'
645	});
646
647	$(".gallery-icon > a").on('click', function(e){
648		console.log("test");
649		e.preventDefault();
650	})
651
652	
653	$('.blog .format-image .post-header .gallery, .single-format-image .post-header .gallery').each(function(){
654		$(this).addClass('popup-gallery');
655		$(this).find('a').addClass('view-item').attr('data-effect', 'zoomIn');
656		$(this).find('a').each(function(){
657			$(this).attr('href', $(this).find('img').attr('src'));
658		});
659	});
660
661	// Popup Gallery
662	
663	$('.popup-gallery').magnificPopup({
664		delegate: '.view-item',
665		type: 'image',
666		removalDelay: 100,
667		tLoading: 'Loading image #%curr%...',
668		mainClass: 'mfp-fade',
669		closeBtnInside: false,
670		gallery: {
671			enabled: true,
672		},
673		callbacks: {
674			beforeOpen: function() {
675				this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure animated ' + this.st.el.attr('data-effect'));
676			}
677		}
678
679	});
680
681
682	/*=================================*/
683	/*          ALERT MESSAGES         */
684	/*=================================*/
685	
686	$('.hawa-msg').on('click', '.close', function() {
687		
688		$(this).parent().hide();
689
690	});
691
692	/*=================================*/
693	/*          PARALLAX EFFECT        */
694	/*=================================*/
695
696	function paralax_scroling() {
697
698		if( $('.img-paralax, .paralax-slider').length ) {
699			var scrollPosition = $(window).scrollTop() / 4;
700			$('.img-paralax, .paralax-slider').css('bottom', '-' + scrollPosition + 'px');
701		}
702
703	}
704
705
706	// Shop button product
707	$('.hover-product .add_to_cart_button, .hover-product .add_to_wishlist').html('');
708
709	$('.color-item').css('width','auto');
710
711
712
713	/*============================*/
714	/* WINDOW LOAD                */
715	/*============================*/
716	izotope_portfolio();
717
718	$(window).on('load', function(){
719		
720		/* add  left retreat for block skills */ 
721		$(".hawa-skill-block.modern .title").each(function(){
722			$(this).siblings().children().children().css("left", $(this).width()+15);
723		});
724
725		run_skills();
726
727		$('#loading').hide();
728
729		counters();
730
731		izotope_portfolio();
732
733		wpc_add_img_bg('.s-img-switch', '.s-back-switch');
734
735		$('.masonry .hawa-blog-content').masonry({
736
737			itemSelector: '.hawa-post',
738			columnWidth: '.hawa-post'
739
740		});
741
742		initSwiper();
743
744
745		if( $('.img-fixed').length ) {
746			$('.img-fixed').each(function(){
747				$(this).closest('.hawa-banner').css({
748					'background-image' : 'url(' + $(this).attr('src') + ')',
749					'background-attachment' : 'fixed',
750					'background-size' : 'cover',
751					'background-position' : 'center',
752					'height' : $(this).height()
753				});
754				if (_isIOS) {
755					$(this).closest('.hawa-banner').css({
756						'background-attachment' : 'initial'
757					});
758				}
759				$(this).hide();
760			});
761		}
762
763		hawaResponsiveMenu();
764	});
765
766	/*============================*/
767	/* WINDOW RESIZE              */
768	/*============================*/
769	
770	$(window).on('resize', function(){
771
772		run_skills();
773
774		izotope_portfolio();
775
776		counters();
777
778		$('.masonry').masonry({
779
780			itemSelector: '.hawa-post',
781			columnWidth: '.hawa-post'
782
783		});
784
785		hawaResponsiveMenu();
786
787	});
788	
789	
790	/*============================*/
791	/* WINDOW SCROLL              */
792	/*============================*/
793
794	
795	$(window).scroll(function() {
796	   
797		run_skills();
798
799		counters();
800			
801		paralax_scroling();
802			
803	});
804	
805	/*=============================*/
806	/* Add background image footer */
807	/*=============================*/
808
809	var srcImg = $(".main-footer");
810	if( srcImg.attr('data-src') != undefined ) {
811		srcImg.css("background-image", "url("+srcImg.attr('data-src')+")");
812	}
813
814	function wpc_add_img_bg( img_sel, parent_sel){
815		
816		if (!img_sel) {
817			console.info('no img selector');
818			return false;
819		}
820
821		var $parent, _this;
822
823		$(img_sel).each(function(){
824			_this = $(this);
825			$parent = _this.closest( parent_sel );
826			$parent = $parent.length ? $parent : _this.parent();
827			$parent.css( 'background-image' , 'url(' + this.src + ')' );
828			_this.hide()
829		});
830
831	}
832
833	wpc_add_img_bg('.bg_img','.bg_img_parent');
834
835	/*====================================*/
836	/* Add background image pricing block */
837	/*====================================*/
838	
839	$(".hawa-price-block .price").each(function(){
840		$(this).css("background-image", "url("+$(this).attr('data-img')+")");
841	});
842
843	/*====================================*/
844	/*        Add background qoute        */
845	/*====================================*/
846
847	$(".format-quote .hawa-qoute-post").css("background-image", "url("+$(".format-quote .post-header img").attr('src')+")");
848
849	/*============================*/
850	/* Enable responsive video    */
851	/*============================*/
852
853	$(".container").fitVids();
854
855	/*============================*/
856	/*           SLIDER           */
857	/*============================*/
858
859	$(".format-gallery .post-header").prepend("<button class='sliderbut prev'></button><button class='sliderbut next'></button>");
860
861
862	;(function( $ ){
863
864	$.fn.prodSlider = function(options) {
865
866		var set = $.extend( {
867		  'list'        : '> ul',
868		  'listItem'    : '> li',
869		  'margin' : 0,
870		  'button'      : '.sliderbut',
871		  'classButR' : 'next',
872		  'classButL' : 'prev',
873		  'elemImg'     : 'img',
874		  'effect'      : 'fade',
875		  'timePreload' : '3000',
876		  'delay'       : '2000',
877		  'bebug'       : 0,
878		  'autoplay'    : true
879		}, options);
880
881		this.each(function(i,el) {
882
883			var _this = $(el);
884
885			var elThis, elActive, timer,
886				elUl = _this.find(set.list),
887				button = _this.find(set.button);
888
889
890			_this.css({
891				'position' : 'relative'
892			});
893			elUl.css({
894				'position' : 'relative'
895			});
896
897			if (set.bebug) {
898				console.log('/// debug init ///');
899				//console.log(this);
900				console.log('element list:'+elUl[0]);
901				console.log('element button: '+set.button);
902				console.log('/// debug init ///');
903			}
904
905		var timeout = function(time){
906				timer = setTimeout(function() { sliderRun('',set.effect); }, time);
907			},
908			sliderRun = function(th,effect) {
909				set.bebug && console.log('');
910				set.bebug && console.log('/// debug play ///');
911				set.bebug && console.log('effect: '+effect);
912				set.bebug && console.log(elUl[0]);
913
914				effect = set.effect;
915
916				clearTimeout(timer);
917
918				var elLi = elUl.find(set.listItem).removeClass('active');
919
920				if(!elUl.is(':animated')){
921
922					var direct = (th && $(th).hasClass(set.classButL)) ? 'left' : 'right';
923
924					elLi.length > 1 && elUl.animate({left: ( direct == 'left' ? ((elLi.width())+(set.margin)) : -((elLi.width())+(set.margin)) ) }, 700, function(){
925
926						if(direct == 'left'){
927				
928							elLi.length > 1 && elUl.prepend(elLi.last());
929							set.bebug && console.log('direct: '+direct);
930						} else {
931							elLi.length > 1 && elUl.append(elLi[0]);
932							set.bebug && console.log('direct: '+direct);
933						}
934
935						elUl.css('left', 0 );
936
937						set.autoplay && timeout(set.delay);
938
939					});
940					elLi.length == 1 && $(th).parent().find(set.button).hide();
941				}
942
943				set.bebug && console.log('/// debug play ///');
944				set.bebug && console.log('');
945			}
946
947			if (set.effect == 'slide') {
948				elLi = elUl.find(set.listItem);
949				elLi.length > 1 && elUl.css({'left':0});
950				elLi.removeClass('active');
951			}
952
953			set.autoplay &&  timeout(set.timePreload);
954
955			_this.mouseover(function(){
956				clearTimeout(timer);
957			});
958			_this.mouseleave(function(){
959				set.autoplay && timeout(1000);
960			});
961
962			button.click(function(){
963				sliderRun(this,set.effect);
964				return false;
965			})
966
967		});
968
969		return this;
970
971	}
972
973
974	})( jQuery );
975
976	$(".format-gallery").prodSlider({
977		'list'        : '.gallery',
978		'listItem'    : '.gallery-item',
979		'button'      : '.sliderbut',
980		'classButR' : 'next',
981		'classButL' : 'prev',
982		'autoplay'  : false
983	});
984
985	
986	/*============================*/
987	/*    ADD BACKGROUND IMAGE    */
988	/*============================*/ 
989
990	$(".format-gallery .gallery-icon").each(function(){
991		$(this).css("background-image", "url("+$(this).children().children().attr('src')+")");
992	});
993
994
995	/*============================*/
996	/* Absolute image position    */
997	/*============================*/
998
999	if( $('.absolute-image').length ) {
1000		$('.absolute-image').each(function(){
1001			$(this).closest('.wpb_wrapper').css('position','relative');
1002			var $image = $(this).find('img');
1003			$(this).css({
1004				'position': 'absolute',
1005				'width': $image.attr("width")
1006			});
1007		});
1008	}
1009
1010	$('.menu-item-has-children > a').find('span').click(function(e) {
1011		$(this).closest('li').toggleClass('active');
1012		return false;
1013	});
1014
1015	$('.hawa-navigation a').on('click', function(e){
1016		var href = $(this).attr('href');
1017		if( href == '#'){
1018			return false;
1019		}
1020
1021	});
1022
1023	function hawaResponsiveMenu(){
1024		var containerWidth = $('.top-header').outerWidth() - 30;
1025		var logoWidth = $('.top-header .hawa-logo').outerWidth();
1026		var menuIcon = $('.top-header .hawa-nav-menu-icon').outerWidth();
1027
1028		$('.top-header .hawa-logo').outerWidth(logoWidth);
1029		$('.top-header .hawa-navigation').width( containerWidth - logoWidth);
1030		$('.hawa-main-header .hawa-navigation nav').css('width', containerWidth - logoWidth - menuIcon);
1031	}
1032
1033	function hawaUniqueArray(list) {
1034		var array = list, i = array.length, result = [];
1035		array.sort(function(a,b) {
1036			return b-a;
1037		});
1038		while(i--){
1039			if( result.join().search(array[i]+'\\b') == '-1' ) {
1040				result.push(array[i]);
1041			}
1042		}
1043		return result;
1044	}
1045
1046	if( $(window).width() > 976 ) {
1047		/* Second level menu */
1048		$('.main-menu > .menu-item-has-children').mouseover(function(){
1049			var $child = $(this).children('.sub-menu'),
1050				$left_position;
1051			if( $child.length ) {
1052				$left_position = ( $(window).width() - ( $child.offset().left + $child.outerWidth() ) );
1053
1054				if( $left_position < 0 ) {
1055					$child.css('left', ( $left_position - 10 ) );
1056				}
1057			}
1058		});
1059
1060		/* Third level menu  */
1061		$('.main-menu .sub-menu .menu-item-has-children').mouseover(function(){
1062			var $child = $(this).children('.sub-menu'),
1063				$left_position;
1064				if( $child.length ) {
1065					$left_position = ( $(window).width() - ( $child.offset().left + $child.outerWidth() ) );
1066
1067				if( $left_position < 0 ) {
1068					$child.addClass('reverse');
1069				}
1070			}
1071		});
1072	}
1073
1074
1075	if( $('.hawa-process .hawa-process-item').length ) {
1076		var el_height = 0;
1077		$('.hawa-process .hawa-process-item').each(function(){
1078			if( $(this).height() > el_height ) {
1079				el_height = $(this).height();
1080			}
1081		});
1082		$('.hawa-process .hawa-process-item').height( el_height );
1083	}
1084
1085	if( $('.wpb_wrapper .hawa-icon-text').length ) {
1086		var el_height = 0;
1087		$('.wpb_wrapper').find('.hawa-icon-text').each(function(){
1088			if( $(this).height() > el_height ) {
1089				$('.wpb_wrapper').find('.hawa-icon-text').height($(this).height());
1090			}
1091		});
1092	}
1093
1094	/* OnePage menu scroll */
1095	$('.menu-scroll').on('click', 'a', function() {
1096		$('.main-menu li').removeClass('active');
1097		var $hash = $(this).attr('href').split('#');
1098		if( $hash.length > 1 ) {
1099			$('html, body').animate({
1100				scrollTop: $("#" + $hash[1]).offset().top
1101			}, 600);
1102			$(this).closest('li').addClass('active');
1103			return false;
1104		}
1105	}); 
1106
1107	// function hideVideoText() {
1108	// 	if( $('.hawa-video-banner.background-enable').length && _ismobile ) {
1109	// 		$('.hawa-video-banner.background-enable').each(function(){
1110	// 			$(this).find('.video-content').hide();
1111	// 		});
1112	// 	}
1113	// }
1114	// hideVideoText();
1115
1116	/***********************************/
1117	/*ANIMSITION PLUGIN FOR PAGE TRANSITION*/
1118	/**********************************/
1119		
1120	if($(".animsition").length){
1121	   $(".animsition").animsition({
1122			inClass               :   'zoom-in-sm',
1123			outClass              :   'zoom-out-sm',
1124			inDuration            :    700,
1125			outDuration           :    700,
1126			linkElement           :   'a[href]:not([target="_blank"]):not([href^="#"]):not([data-rel="prettyPhoto[product-gallery]"]):not(.animsition-link)',
1127			loading               :    false,
1128			loadingParentElement  :   'body', 
1129			loadingClass          :   'animsition-loading',
1130			unSupportCss          : [ 'animation-duration',
1131									  '-webkit-animation-duration',
1132									  '-o-animation-duration'
1133									],
1134			overlay               :   false,
1135
1136			overlayClass          :   'animsition-overlay-slide',
1137			overlayParentElement  :   'body'
1138		});
1139	}
1140
1141	/* Show menu on page load - only for desktops */ 
1142	if( $('.hawa-show-menu').length && ! _ismobile ) {
1143		$('.hawa-nav-menu-icon').trigger('click');
1144	}
1145
1146	
1147								(function() {
1148									if (!window.mc4wp) {
1149										window.mc4wp = {
1150											listeners: [],
1151											forms    : {
1152												on: function (event, callback) {
1153													window.mc4wp.listeners.push({
1154														event   : event,
1155														callback: callback
1156													});
1157												}
1158											}
1159										}
1160									}
1161								})();
1162
1163	$('.country_select').selectpicker({
1164		style: 'billing_country_field',
1165		size: 'auto',
1166		width: '100%'
1167	});
1168
1169	$('input').on('click',function () {
1170		if ($('.input-checkbox').is(':checked')) {
1171			$(".woocommerce-billing-fields div.create-account").slideDown();
1172		}
1173		else {
1174			$(".woocommerce-billing-fields div.create-account").slideUp();
1175		}
1176	});
1177
1178	var sliderPrice = document.getElementById('price_slider');
1179	
1180	if (sliderPrice) {
1181		noUiSlider.create(sliderPrice, {
1182			start: [40, 840],
1183			connect: true,
1184			range: {
1185				'min': 0,
1186				'max': 1200
1187			},
1188			format: wNumb({
1189				decimals: 2,
1190				thousand: '.',
1191				prefix: '£',
1192			})
1193		});
1194
1195		var marginMin = document.getElementById('slider-margin-value-min'),
1196		marginMax = document.getElementById('slider-margin-value-max');
1197
1198		sliderPrice.noUiSlider.on('update', function ( values, handle ) {
1199			if ( handle ) {
1200				marginMax.innerHTML = values[handle];
1201			} else {
1202				marginMin.innerHTML = values[handle];
1203			}
1204		});
1205	}
1206
1207	$(".product-color > span").on('click', function (){
1208		$(".product-color > span.active").removeClass('active');
1209		$(this).addClass('active');
1210	})
1211
1212	if ($(".hawa-logo a img").length) {
1213		$(".hawa-logo a").css("border-bottom", "none");
1214		$(".hawa-logo").css("padding", "0");
1215		$(".hawa-lines").css("display", "none");
1216	}
1217
1218})(jQuery, window, document);

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.