PageSourceSearch

https://www.opcina-preseka.hr/wp-content/themes/egovenz/assets/js/theme.js?ver=1.0

js opcina-preseka.hr collected 2026-10-03 01:52:01 UTC 72,548 bytes, 1,823 lines download raw bytes

1/*
2 * Egovenz Theme Js 
3 */ 
4
5(function( $ ) {
6
7	"use strict";	
8	
9	var egovenz_body_atts = egovenz_ajax_var.body_atts;
10	var responsive_width = egovenz_body_atts && egovenz_body_atts.res_width ? egovenz_body_atts.res_width : 360;
11	
12	/* Page Loader */
13	$( window ).load(function() {
14		
15		/* Header Bar Center Item Margin Fun */
16		setTimeout( egovenzCenterMenuMargin, 300 );
17		
18		/* Set Sticky Height for Menu Bars */
19		egovenzSetStickyOuterHeight();
20		
21		/* Sticky Menu */
22		if($('.header-inner .sticky-head').length){
23			egovenzStickyPart( '.header-inner' );
24		}
25		
26		/* Scroll Sticky */
27		if($('.header-inner .sticky-scroll').length){
28			egovenzStickyScrollUpPart( '.header-inner', 'header' );
29		}
30		
31		/* Mobile Header Sticky Menu */
32		if($('.mobile-header-inner .sticky-head').length){
33			egovenzStickyPart( '.mobile-header-inner' );
34		}
35		
36		/* Mobile Header Scroll Sticky */
37		if($('.mobile-header-inner .sticky-scroll').length){
38			egovenzStickyScrollUpPart( '.mobile-header-inner', '.mobile-header' );
39		}
40
41		if( $(".page-loader").length ){
42			$(".page-loader").fadeOut("slow");
43		}else if( $("body.opacity-zero").length ){
44			$("body").removeClass("opacity-zero");
45			$("body").addClass("opacity-one");
46		}
47		
48	});
49		  
50	$( document ).ready(function() {
51	
52		/* Set Header Height */
53		var $window = $(window);
54		var $header_cont = $('.portfolio-single-wrapper .portfolio-single-slide .item');
55		$header_cont.height( $window.height() );
56		$window.resize(function() {
57			$header_cont.height( $window.height() );
58		});
59		
60		/* Shortcode CSS Append */
61		var css_out = '';
62		$( ".egovenz-inline-css" ).each(function() {
63			var shortcode = $( this );
64			if( shortcode.attr("data-css") ){
65				var shortcode_css = shortcode.attr("data-css");		
66				css_out += ($).parseJSON( shortcode_css );
67				shortcode.removeAttr("data-css");
68			}	
69		});
70		
71		/* VC Row Custom Style */
72		$( ".egovenz-vc-row" ).each(function() {
73			var shortcode = $( this );
74			var row_class = shortcode.attr("data-class");
75			if( shortcode.attr("data-color") ){
76				var row_color = shortcode.attr("data-color");		
77				css_out += "." + row_class + "{ color:" + row_color + ";}"; 
78				shortcode.removeAttr("data-color");
79			}
80			if( shortcode.attr("data-bg-overlay") ){
81				var row_overlay = shortcode.attr("data-bg-overlay");
82				css_out += "." + row_class + "{ position: relative; }";
83				css_out += "." + row_class + " > span.row-overlay { background-color:" + row_overlay + ";}";
84				shortcode.removeAttr("data-bg-overlay");				
85			}
86			shortcode.removeAttr("data-class");
87		});
88		if( css_out != '' ){
89			$('head').append( '<style id="egovenz-shortcode-styles">'+ css_out +'</style>' );
90		}				
91		
92
93		/* Secondary Toggle */
94		$( document ).on( "click", ".secondary-space-toggle", function() {
95			$('.secondary-space-toggle').toggleClass('active');
96			$('body').toggleClass('secondary-active');
97			var sec_width = $( ".secondary-menu-area" ).width();
98			var sec_pos = $( ".secondary-menu-area" ).data('pos') ? $( ".secondary-menu-area" ).data('pos') : 'left';
99			
100			if( sec_pos == 'overlay' ){
101				$( ".secondary-menu-area" ).fadeToggle(500);
102			}else if( $('body').hasClass('secondary-active') ){
103				if( sec_pos == 'left' ){
104					if( $( ".secondary-menu-area" ).hasClass('left-overlay') ){
105						$( ".secondary-menu-area" ).animate( { left : "0" }, { duration: 500, specialEasing: { left: "easeInOutExpo" } } );
106					}else{
107						$('body').toggleClass('secondary-push-actived');
108						$( ".secondary-menu-area" ).animate( { left : "0" }, { duration: 500 } );
109						$( "body" ).css('overflow','hidden');
110						$( "body .egovenz-wrapper" ).animate( { left : sec_width +"px" }, 500 );
111						if( $( ".sticky-outer" ).length ) {
112							$( ".sticky-outer .header-sticky, .sticky-outer .show-menu" ).animate( { left : sec_width +"px", right: "-" + sec_width +"px" }, 500 );
113						}
114					}
115				}else{
116					if( $( ".secondary-menu-area" ).hasClass('right-overlay') ){
117						$( ".secondary-menu-area" ).animate( { right : "0" }, { duration: 500, specialEasing: { right: "easeInOutExpo" } } );
118					}else{
119						$('body').toggleClass('secondary-push-actived');
120						$( ".secondary-menu-area" ).animate( { right : "0" }, { duration: 500 } );
121						$( "body" ).css('overflow','hidden');
122						$( "body .egovenz-wrapper" ).animate( { right : sec_width +"px" }, 500 );
123						if( $( ".sticky-outer" ).length ){
124							$( ".sticky-outer .header-sticky, .sticky-outer .show-menu" ).animate( { right : sec_width +"px", left : "-" + sec_width +"px" }, 500 );
125						}
126					}
127				}
128			}else{
129				if( sec_pos == 'left' ){
130					if( $( ".secondary-menu-area" ).hasClass('left-overlay') ){
131						$( ".secondary-menu-area" ).animate( { left : "-"+ sec_width +"px" }, { duration: 500, specialEasing: { left: "easeInOutExpo" } } );
132					}else{
133						$('body').toggleClass('secondary-push-actived');
134						$( ".secondary-menu-area" ).animate( { left : "-"+ sec_width +"px" }, { duration: 500 } );
135						$( "body .egovenz-wrapper" ).animate( { left : 0 }, 500, function(){ $( "body" ).css('overflow-y','scroll'); } );
136						if( $( ".sticky-outer" ).length ){
137							$( ".sticky-outer .header-sticky, .sticky-outer .show-menu" ).animate( { left : 0, right: 0 }, 500 );
138						}
139					}
140				}else{
141					if( $( ".secondary-menu-area" ).hasClass('right-overlay') ){
142						$( ".secondary-menu-area" ).animate( { right : "-"+ sec_width +"px" }, { duration: 500, specialEasing: { right: "easeInOutExpo" } } );
143					}else{
144						$('body').toggleClass('secondary-push-actived');
145						$( ".secondary-menu-area" ).animate( { right : "-"+ sec_width +"px" }, { duration: 500 } );
146						$( "body .egovenz-wrapper" ).animate( { right : 0 }, 500, function(){ $( "body" ).css('overflow-y','scroll'); } );
147						if( $( ".sticky-outer" ).length ){
148							$( ".sticky-outer .header-sticky, .sticky-outer .show-menu" ).animate( { right: 0, left : 0 }, 500 );
149						}
150					}
151				}
152			}
153			
154			/* Slider Revolution Issue Fixed */
155			if( $(".rev_slider_wrapper").length ){
156				$(".rev_slider_wrapper").css("left" , "inherit");    
157			}
158			
159			return false;
160		});
161			
162		/* Sticky Header Space Menu to Modern Toggle Menu Convert */
163		if( $('.sticky-header-space').length ){
164			
165			//Add toggle dropdown icon
166			$( ".sticky-header-space .egovenz-main-menu" ).find('.menu-item-has-children').append( '<span class="zmm-dropdown-toggle ti-plus"></span>' );
167			$( ".sticky-header-space .egovenz-main-menu" ).find('.sub-menu').slideToggle();
168			
169			//zmm dropdown toggle
170			$( ".sticky-header-space .zmm-dropdown-toggle" ).on( "click", function() {
171				var parent = $( this ).parent('li').children('.sub-menu');
172				$( this ).parent('li').children('.sub-menu').slideToggle();
173				$( this ).toggleClass('ti-minus');
174				if( $( parent ).find('.sub-menu').length ){
175					$( parent ).find('.sub-menu').slideUp();
176					$( parent ).find('.zmm-dropdown-toggle').removeClass('ti-minus');
177				}
178			});
179			
180		}
181		
182		//Custom Responsive Width
183		var win_width = $(window).width();
184		if( responsive_width ){
185			egovenzSetCustomHiddenElements( win_width, responsive_width );
186		}
187		
188		/* Full Search Toggle */
189		$( document ).on( "click", ".full-search-toggle", function() {
190			$('.full-search-wrapper').toggleClass("search-wrapper-opened");
191			$('.full-search-wrapper').fadeToggle(500);
192			var search_in = $('.search-wrapper-opened').find("input.form-control");
193			search_in.focus();			
194			return false;
195		});	
196		
197		/* Mobile Bar Animate Toggle */
198		$( document ).on( "click", ".mobile-bar-toggle", function() {
199			$( ".mobile-bar" ).toggleClass('active');
200			$( "body" ).toggleClass('mobile-bar-active');
201			if( $( ".mobile-bar" ).hasClass('animate-from-left') ){
202				if( $( ".mobile-bar" ).hasClass('active') )
203					$( ".mobile-bar" ).animate( { left : 0 }, { duration: 500, specialEasing: { left: "easeInOutExpo" } } );
204				else
205					$( ".mobile-bar" ).animate( { left : "-100%" }, { duration: 500, specialEasing: { left: "easeInOutExpo" } } );
206			}
207			if( $( ".mobile-bar" ).hasClass('animate-from-right') ){
208				if( $( ".mobile-bar" ).hasClass('active') )
209					$( ".mobile-bar" ).animate( { right : 0 }, { duration: 500, specialEasing: { right: "easeInOutExpo" } } );
210				else
211					$( ".mobile-bar" ).animate( { right : "-100%" }, { duration: 500, specialEasing: { right: "easeInOutExpo" } } );
212			}
213			if( $( ".mobile-bar" ).hasClass('animate-from-top') ){
214				if( $( ".mobile-bar" ).hasClass('active') )
215					$( ".mobile-bar" ).animate( { top : 0 }, { duration: 500, specialEasing: { top: "easeInOutExpo" } } );
216				else
217					$( ".mobile-bar" ).animate( { top : "-100%" }, { duration: 500, specialEasing: { top: "easeInOutExpo" } } );
218			}
219			if( $( ".mobile-bar" ).hasClass('animate-from-bottom') ){
220				if( $( ".mobile-bar" ).hasClass('active') )
221					$( ".mobile-bar" ).animate( { bottom : 0 }, { duration: 500, specialEasing: { bottom: "easeInOutExpo" } } );
222				else
223					$( ".mobile-bar" ).animate( { bottom : "-100%" }, { duration: 500, specialEasing: { bottom: "easeInOutExpo" } } );
224			}
225			return false;
226		});
227		
228		/* Mobile Bar Menu to Modern Toggle Menu Convert */
229		if( $('.mobile-bar').length ){
230			
231			if( $( ".egovenz-main-menu" ).length || $( ".secondary-menu-area-inner ul.menu" ).length ){
232			
233				var main_menu = ".egovenz-main-menu";
234				if( !$( ".egovenz-main-menu" ).length ){
235					$( ".secondary-menu-area-inner ul.menu" ).addClass( "egovenz-main-menu" );
236				}
237				
238				var mobile_menu = ".mobile-bar .egovenz-mobile-main-menu";
239				var find_classes = ".dropdown, .mega-dropdown, .dropdown-toggle, .dropdown-menu, .mega-dropdown-menu, .mega-child-heading, .mega-child-dropdown, .mega-child-dropdown-menu, .hidden-xs-up, .row, .mega-sub-dropdown, .mega-sub-dropdown-menu, .mega-sub-child, .mega-sub-child-inner, .left-side";
240				var removable_classes = "dropdown mega-dropdown dropdown-toggle dropdown-menu mega-dropdown-menu mega-child-heading mega-child-dropdown mega-child-dropdown-menu hidden-xs-up row mega-sub-dropdown mega-sub-dropdown-menu mega-sub-child mega-sub-child-inner left-side";
241				
242				//Mobile menu copy from main menu
243				if( $(mobile_menu).html() == '' ) $(main_menu).clone().appendTo( mobile_menu );
244				
245				//Add main class name
246				$( mobile_menu + " " + main_menu ).addClass( "flex-column" );
247				
248				//Remove unwanted item from mobile menu
249				$( mobile_menu + " .mega-child-widget" ).parent( "li.menu-item" ).remove();
250				$( mobile_menu + " .mega-child-divider" ).remove();
251				$( mobile_menu + " .menu-item-logo" ).remove();
252				$( mobile_menu + " li.menu-item" ).removeClass (function (index, css) {
253					return ( css.match (/\bcol-\S+/g) || [] ).join(' ');
254
255				});
256				$( mobile_menu + " li.menu-item" ).removeClass (function (index, css) {
257					return ( css.match (/\bmax-col-\S+/g) || [] ).join(' ');
258				});
259				
260				//Change class name
261				$( mobile_menu ).find( ".dropdown-menu, .mega-child-dropdown-menu, .mega-sub-child-inner" ).toggleClass( "sub-menu" );
262				
263				//Content reform
264				$( mobile_menu + " .mega-child-item-disabled" ).replaceWith( "<a class='nav-link' href='#'>" + $( mobile_menu + " .mega-child-item-disabled" ).html() + "</a>" );
265				
266				//Remove unwanted classes
267				$( mobile_menu ).find( find_classes ).removeClass( removable_classes );
268				
269				//Remove Background
270				$( mobile_menu + " .sub-menu" ).css('background','none');
271				
272				//Add toggle dropdown icon
273				$( ".mobile-bar " + main_menu ).find('.menu-item-has-children').append( '<span class="zmm-dropdown-toggle ti-plus"></span>' );
274				$( ".mobile-bar " + main_menu ).find('.sub-menu').slideToggle();
275				
276				$( ".mobile-bar " + main_menu ).removeClass('egovenz-main-menu').addClass('egovenz-mobile-menu');
277				
278				//dropdown toggle
279				$( ".mobile-bar .zmm-dropdown-toggle" ).on( "click", function() {
280					var parent = $( this ).parent('li').children('.sub-menu');
281					$( this ).parent('li').children('.sub-menu').slideToggle();
282					$( this ).toggleClass('ti-minus');
283					if( $( parent ).find('.sub-menu').length ){
284						$( parent ).find('.sub-menu').slideUp();
285						$( parent ).find('.zmm-dropdown-toggle').removeClass('ti-minus');
286					}
287				});
288			}// check page have main menu or not
289			
290		}
291		
292		/* Mobile Bar Menu to Modern Toggle Menu Convert */
293		if( $('.secondary-menu-area-inner ul.menu').length ){
294				
295				var sec_menu = ".secondary-menu-area-inner ul.menu";
296				//Add main class name
297				$( sec_menu ).addClass( "flex-column" );
298				
299				//Add toggle dropdown icon
300				$( sec_menu ).find('.menu-item-has-children').append( '<span class="zmm-dropdown-toggle ti-plus"></span>' );
301				$( sec_menu ).find('.sub-menu').slideToggle();
302				
303				//dropdown toggle
304				$( sec_menu + " .zmm-dropdown-toggle" ).on( "click", function() {
305					var parent = $( this ).parent('li').children('.sub-menu');
306					$( this ).parent('li').children('.sub-menu').slideToggle();
307					$( this ).toggleClass('ti-minus');
308					if( $( parent ).find('.sub-menu').length ){
309						$( parent ).find('.sub-menu').slideUp();
310						$( parent ).find('.zmm-dropdown-toggle').removeClass('ti-minus');
311					}
312				});
313			
314		}
315		
316		/* Twitter Widget Slider(newsticker) */
317		if( $( ".twitter-slider" ).length ){
318			$( ".twitter-slider" ).each(function() {
319				var twit_slider = $(this);	
320				var slide = twit_slider.attr( "data-show" );
321				twit_slider.easyTicker({
322					direction: 'up',
323					visible: parseInt(slide),
324					easing: 'swing',
325					interval: 4000
326				});
327			});
328		}
329		
330		/* Menu Scroll */
331		var cur_offset = 0;
332		
333		var o_stat = 0; // One Page Menu Status
334		$( '.egovenz-main-menu li.menu-item, .egovenz-mobile-menu li.menu-item' ).each(function( index ) {
335			var cur_item = this;
336			var target = $(cur_item).children("a").attr("href");
337			if( target && target.indexOf("#section-") != -1 ){
338				o_stat = 1;
339				var res = target.split("#");
340				if( res.length == 2 ){
341					$(cur_item).children("a").attr("data-target", res[0]);
342					$(cur_item).children("a").attr("href", "#"+res[1]);
343				}	
344			}
345		});
346		
347		if( o_stat ){
348		
349			if( $('.egovenz-main-menu .menu-item').find('a[href="#section-top"]').length ){
350				$("body").attr("id","section-top");
351			}
352			
353			$( '.egovenz-main-menu li.menu-item, .egovenz-mobile-menu li.menu-item' ).removeClass("current-menu-item");
354			
355			$(window).on('scroll', function () {
356				var minus_height = $("#wpadminbar").length ? $("#wpadminbar").outerHeight() : 0;
357				minus_height += win_width >= egovenz_body_atts.res_width ? parseInt( egovenz_body_atts.menu_offset ) + 1 : parseInt( egovenz_body_atts.mobile_menu_offset );
358				$('section.elementor-section[id*="section-"], body').each(function () {
359					var anchored = $(this).attr("id"),
360						targetOffset = $(this).offset().top - minus_height;
361						
362					if ($(window).scrollTop() > targetOffset) {
363						$('.egovenz-main-menu .menu-item').find("a").removeClass("active");
364						$('.egovenz-main-menu .menu-item').find('a[href="#'+ anchored +'"]').addClass("active");
365						
366						//Mobile menu scroll spy active
367						$('.egovenz-mobile-menu .menu-item').find("a").removeClass("active");
368						$('.egovenz-mobile-menu .menu-item').find('a[href="#'+ anchored +'"]').addClass("active");
369					}
370				});
371			});
372			
373			$( '.egovenz-main-menu .menu-item > a[href^="#section-"], .egovenz-mobile-main-menu .menu-item > a[href^="#section-"]' ).on('click',function (e) {
374				
375				var cur_item = this;
376				var target = $(cur_item).attr("href");
377				
378				if( $(cur_item).parents(".egovenz-mobile-main-menu").length ) {
379					$(".mobile-bar-toggle.close").trigger( "click" );
380				}
381				if( $( ".secondary-menu-area" ) ){
382					$( ".secondary-menu-area .secondary-space-toggle.active" ).trigger( "click" );
383				}
384				
385				var target_id = target.slice( target.indexOf("#"), ( target.length ) );
386				var cur_url = location.protocol + '//' + location.host + location.pathname; //window.location.href;
387				var data_targ = $(cur_item).attr("data-target");
388				var another_page = false;
389				if( target_id == '#section-top' && data_targ != '' ){
390					if( cur_url != data_targ ){
391						another_page = true;
392					}
393				}
394
395				if( $( target_id ).length && !another_page ){
396					
397					var minus_height = $("#wpadminbar").length ? $("#wpadminbar").outerHeight() : 0;
398					minus_height += win_width >= egovenz_body_atts.res_width ? parseInt( egovenz_body_atts.menu_offset ) : parseInt( egovenz_body_atts.mobile_menu_offset );
399					var offs = $(target_id).offset().top - minus_height;						
400					var sec_ani_call = 1;
401					if( target_id == '#section-top' ){
402						sec_ani_call = 1;
403						offs = 0;
404					}
405					$('html,body').animate({ 'scrollTop': offs }, 1000, 'easeInOutExpo' );
406					
407					return false;
408				}else{
409					
410					if( target_id == '#section-top' && cur_url == data_targ ){
411						$('html,body').animate({ 'scrollTop': 0 }, 1000, 'easeInOutExpo' );
412						return false;
413					}else{
414						if( cur_url != data_targ && target_id != '#' ){
415							window.location.href = data_targ + target;
416						}else{
417							window.location.href = target;
418						}
419					}
420
421				}
422			
423			});	
424			
425		}
426		
427		/*Back to top*/
428		if( $( ".back-to-top" ).length ){
429			$( document ).on('click', '#back-to-top', function(){
430				$('html,body').animate({ 'scrollTop': 0 }, 1000, 'easeInOutExpo' );
431				return false;
432			});
433			$( document ).scroll(function() {
434				var y = $( this ).scrollTop();
435				if ( y > 300 )
436					$( '#back-to-top' ).addClass("back-to-top-on");
437				else
438					$( '#back-to-top' ).removeClass("back-to-top-on");
439			});
440		}
441				
442		/* Top Sliding Bar */
443		if( $( ".top-sliding-bar" ).length ){
444			$( document ).on('click', '.top-sliding-toggle', function(){
445				$( ".top-sliding-bar-inner" ).slideToggle();
446				$( ".top-sliding-toggle" ).toggleClass( "fa-minus" );
447				return false;
448			});
449		}
450		
451		/* Sticky Header Space */
452		if( $('.sticky-header-space').length ){
453			var elem_pos = $('.sticky-header-space').hasClass('left-sticky') ? 'left' : 'right';
454			var elem_width = $('.sticky-header-space').outerWidth();
455			
456			egovenzStickyHeaderAdjust(elem_pos, elem_width);
457			$( window ).resize(function() {
458				egovenzStickyHeaderAdjust(elem_pos, elem_width);
459			});
460		}
461		
462		/* Toggle Search Modal Triggers */
463		if( $( ".textbox-search-toggle" ).length ){
464			$( document ).on('click', '.textbox-search-toggle', function(){
465				$(this).parents('.search-toggle-wrap').toggleClass('active');
466				setTimeout(function(){ $('.search-toggle-wrap').find("input.form-control").focus(); }, 500 );
467				return false;
468			});
469		}else if( $( ".full-bar-search-toggle" ).length ){
470			$( document ).on('click', '.full-bar-search-toggle', function(){
471				$('.full-bar-search-wrap').toggleClass('active');
472				setTimeout(function(){ $('.full-bar-search-wrap').find("input.form-control").focus(); }, 500 );
473				return false;
474			});
475		}else if( $( ".bottom-search-toggle" ).length ){
476			$( document ).on('click', '.bottom-search-toggle', function(){
477				$(this).parents('.search-toggle-wrap').toggleClass('active');
478				setTimeout(function(){ $('.search-toggle-wrap').find("input.form-control").focus(); }, 500 );
479				return false;
480			});
481		}
482		
483		/* Sticky Footer */
484		if( $( ".footer-fixed" ).length ){
485			if( $( window ).width() > 1023 ){
486				$( ".egovenz-wrapper" ).css({ 'margin-bottom' : $( ".footer-fixed" ).outerHeight() + 'px' });
487			}else{
488				$( ".egovenz-wrapper" ).css({ 'margin-bottom' : '0' });
489			}
490		}else if( $( ".footer-bottom-fixed" ).length ){
491			if( $( window ).width() > 1023 ){
492				$( ".egovenz-wrapper" ).css({ 'margin-bottom' : $( ".footer-bottom-fixed" ).outerHeight() + 'px' });
493			}else{
494				$( ".egovenz-wrapper" ).css({ 'margin-bottom' : '0' });
495			}
496		}
497		$( window ).resize(function() {
498			if( $( ".footer-fixed" ).length ){
499				if( $( window ).width() > 1023 ){
500					$( ".egovenz-wrapper" ).css({ 'margin-bottom' : $( ".footer-fixed" ).outerHeight() + 'px' });
501				}else{
502					$( ".egovenz-wrapper" ).css({ 'margin-bottom' : '0' });
503				}
504			}else if( $( ".footer-bottom-fixed" ).length ){
505				if( $( window ).width() > 1023 ){
506					$( ".egovenz-wrapper" ).css({ 'margin-bottom' : $( ".footer-bottom-fixed" ).outerHeight() + 'px' });
507				}else{
508					$( ".egovenz-wrapper" ).css({ 'margin-bottom' : '0' });
509				}
510			}
511		});							
512		
513		/* Stellar Parallax */
514		if( $(".parallax-item").length ){
515			$.stellar({
516				horizontalScrolling: false,
517				verticalOffset: 40
518			});
519		}
520
521		/* Post Like */
522		$( document ).on( 'click', ".post-like, .post-dislike", function( event) {
523	
524			var current = $(this);
525			var like_stat = current.data("stat");
526			var post_id = current.data("id");
527			var parent = current.parents('.post-like-wrap');
528
529			//return false;
530			if( like_stat != '' ){
531				
532				if( like_stat == '1' ){
533					parent.find('.post-disliked').removeClass('fa-thumbs-down post-disliked').addClass('fa-thumbs-o-down post-dislike');
534					current.removeClass('fa-thumbs-o-up post-like').addClass('fa-thumbs-up post-liked');
535				}else{
536					parent.find('.post-liked').removeClass('fa-thumbs-up post-liked').addClass('fa-thumbs-o-up post-like');
537					current.removeClass('fa-thumbs-o-down post-dislike').addClass('fa-thumbs-down post-disliked');
538				}
539				
540				// Ajax call
541				$.ajax({
542					type: "post",
543					url: egovenz_ajax_var.admin_ajax_url,
544					data: "action=post_like_act&nonce="+egovenz_ajax_var.like_nonce+"&like_stat="+like_stat+"&post_id="+post_id,
545					success: function(res){
546						$( parent ).html(res);
547						$('body').tooltip({
548							container: 'body',
549							trigger: 'hover',
550							html: true,
551							animation: false,
552							selector: '[data-toggle="tooltip"]'
553						});
554					},
555					error: function (jqXHR, exception) {
556						console.log(jqXHR);
557					}
558				});
559			}
560			return false;
561		});
562		$( document ).on( 'click', ".post-liked, .post-disliked, .post-fav-done", function( event) {
563			return false;
564		});															 
565																		 
566		
567		/* Post Favourite */
568		$( document ).on( 'click', ".post-favourite", function( event) {
569	
570			var current = $(this);
571			var post_id = current.data("id");
572			var parent = current.parents('.post-fav-wrap');
573
574			if( post_id != '' ){
575				// Ajax call
576				$.ajax({
577					type: "post",
578					url: egovenz_ajax_var.admin_ajax_url,
579					data: "action=post_fav_act&nonce="+egovenz_ajax_var.fav_nonce+"&post_id="+post_id,
580					success: function(res){
581						$( parent ).html(res);
582						$('body').tooltip({
583							container: 'body',
584							trigger: 'hover',
585							html: true,
586							animation: false,
587							selector: '[data-toggle="tooltip"]'
588						});
589					},
590					error: function (jqXHR, exception) {
591						console.log(jqXHR);
592					}
593				});
594			}
595			return false;
596		});
597
598		/* Magnific Zoom Gallery Code */
599		if( $('.zoom-gallery').length ){
600			$('.zoom-gallery').magnificPopup({
601			  delegate: 'a',
602			  type: 'image',
603			  closeOnContentClick: false,
604			  closeBtnInside: false,
605			  mainClass: 'mfp-with-zoom mfp-img-mobile',
606			  gallery: {
607				enabled: true
608			  },
609			  zoom: {
610				enabled: true,
611				duration: 300, // don't foget to change the duration also in CSS
612				opener: function(element) {
613				  return element.find('img');
614				}
615			  }
616			});
617		}
618		
619		if( $('.image-gallery .image-gallery-link').length ){
620			$('.image-gallery').magnificPopup({
621				delegate: '.image-gallery-link',
622				type: 'image',
623				closeOnContentClick: false,
624				closeBtnInside: false,
625				mainClass: 'mfp-with-zoom mfp-img-mobile',
626				gallery: {
627					enabled: true
628				},
629			});
630		}
631		
632		if( $('.popup-video-post').length ){	
633			/* Magnific Popup Code */
634			$('.popup-video-post').magnificPopup({
635				disableOn: 700,
636				type: 'iframe',
637				mainClass: 'mfp-fade',
638				removalDelay: 160,
639				preloader: false,
640				fixedContentPos: false
641			});
642		}
643		
644		if( $('.popup-with-zoom-anim').length ){	
645			$('.popup-with-zoom-anim').magnificPopup({
646				disableOn: 700,
647				type: 'inline',
648				mainClass: 'mfp-fade',
649				removalDelay: 160,
650				preloader: false,
651				fixedContentPos: false,
652				callbacks: {
653					open: function() {
654						// Play video on open:
655						if( !$( this.content ).find('video').length ){
656							var parent = $( this.content ).parent( "post-video-wrap" );
657							var url = $( this.content ).find('span').data( "url" );
658							var video = '<video width="100%" height="450" preload="true" style="max-width:100%;" autoplay="true"><source src="'+ url +'" type="video/mp4"></video>';
659							$( this.content ).find('span').replaceWith( video );
660						}else{
661							$(this.content).find('video')[0].load();
662						}
663					},
664					close: function() {
665						// Reset video on close:
666						$(this.content).find('video')[0].pause();
667			
668					}
669				}
670			});
671		}
672		
673		//Modal popup
674		if( $('.modal-popup-content').length ){	
675			/* Magnific Popup Code */
676			$('.modal-box-trigger').magnificPopup({
677				type: 'inline',
678				preloader: false,
679				focus: '#username',
680				modal: true,
681				mainClass: 'mfp-fade',
682				removalDelay: 300
683			});
684			$(document).on('click', '.popup-modal-dismiss', function (e) {
685				e.preventDefault();
686				$.magnificPopup.close();
687			});
688		}
689		
690		//Egovenz Popup
691		if( $('.egovenz-popup-wrapper').length ){	
692			$('.egovenz-popup-trigger').magnificPopup({
693				type: 'inline',
694				preloader: false,
695				//focus: '#username',
696				modal: true,
697				mainClass: 'mfp-fade',
698				removalDelay: 300
699			});
700			$(document).on('click', '.egovenz-popup-dismiss', function (e) {
701				e.preventDefault();
702				$.magnificPopup.close();
703			});
704		}
705		
706		/* Set Blockquote Background */
707		if( $( ".post-quote-wrap, .post-link-wrap" ).length ){
708			$( ".post-quote-wrap, .post-link-wrap" ).each(function() {
709				var img_url = $(this).data('url');
710				if( img_url ){
711					$(this).css( 'background-image','url('+ img_url +')' );	
712				}
713			});
714		}
715		
716		/* Set Background Image */
717		if( $( ".set-bg-img" ).length ){
718			$( ".set-bg-img" ).each(function() {
719				var img_url = $(this).data('src');
720				if( img_url ){
721					$(this).css( 'background-image','url('+ img_url +')' );	
722				}
723			});
724		}
725		
726		/* Sticky Element */
727		if( $( ".egovenz-sticky-wrapper" ).length ){
728			$("a.egovenz-sticky-trigger").on( "click", function(e){
729				$(this).parent(".egovenz-sticky-wrapper").toggleClass("active");
730				return false;
731			});
732		}
733		
734		if( $('a.onclick-video-post').length ){
735			$(document).on( "click", "a.onclick-video-post", function(){
736
737				var parent = $(this).parent('.post-video-wrap');
738				var frame = '<iframe src="'+ $(this).attr("href") +'?autoplay=1" width="100%" height="'+ parent.height() +'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
739				$(this).fadeOut(300);
740				$(this).replaceWith( frame );
741				return false;
742			});
743		}
744		
745		if( $('a.onclick-custom-video').length ){
746			$(document).on( "click", ".onclick-custom-video", function(){
747		
748				var parent = $(this).parent('.post-video-wrap');
749				var video = '<video width="100%" height="'+ parent.height() +'" preload="true" style="max-width:100%;" autoplay="true"><source src="'+ $(this).data("url") +'" type="video/mp4"></video>';
750				$(this).fadeOut(300);
751				$(this).replaceWith( video );
752				return false;
753			});
754		}
755		
756		/* Page Title Background Video */
757		if( $( "#page-title-bg .page-title-wrap-inner" ).length ){
758			$( "#page-title-bg .page-title-wrap-inner" ).YTPlayer();
759		}
760		
761		/* Comments Like/Dislike */
762		if( $(".comment-like-wrapper").length ){
763			$( document ).on( 'click', ".comment-like", function( event) {
764		
765				var cmt_cur = $(this);
766				var cmt_meta = cmt_cur.data('id');
767				var cmt_id = cmt_cur.data('cmt-id');
768				var parent = cmt_cur.parents('.comment-like-wrapper');
769				if( cmt_meta == '1' ){
770					cmt_cur.parents('.list-inline').find('.comment-liked').removeClass('theme-color comment-liked').addClass('comment-like');
771					cmt_cur.removeClass('comment-like').addClass('theme-color comment-liked');
772				}else{
773					cmt_cur.parents('.list-inline').find('.comment-liked').removeClass('theme-color comment-liked').addClass('comment-like');
774					cmt_cur.removeClass('comment-like').addClass('theme-color comment-liked');	
775				}
776				
777				if( cmt_id != '' && cmt_meta != '' ){
778					// Ajax call
779					(jQuery).ajax({
780						type: "post",
781						url: egovenz_ajax_var.admin_ajax_url,
782						data: "action=comment_like&nonce="+egovenz_ajax_var.cmt_nonce+"&cmt_id="+cmt_id+"&cmt_meta="+cmt_meta,
783						success: function(res){
784							$( parent ).html(res);
785						},
786						error: function (jqXHR, exception) {
787							console.log(jqXHR);
788						}
789					});
790				}
791				return false;
792			});
793		}
794		
795		/*Mailchimp Code*/
796		if( $('.zozo-mc').length ){
797			$('.zozo-mc').on( "click", function () {
798				
799				var c_btn = $(this);
800				var mc_wrap = $( this ).parents('.mailchimp-wrapper');
801				var mc_form = $( this ).parents('.zozo-mc-form');
802				
803				if( mc_form.find('input[name="zozo_mc_email"]').val() == '' ){
804					mc_wrap.find('.mc-notice-msg').text( zoacres_ajax_var.must_fill );
805				}else{
806					c_btn.attr( "disabled", "disabled" );
807					$.ajax({
808						type: "POST",
809						url: egovenz_ajax_var.admin_ajax_url,
810						data: 'action=zozo-mc&nonce='+egovenz_ajax_var.mc_nounce+'&'+mc_form.serialize(),
811						success: function (data) {
812							//Success
813							c_btn.removeAttr( "disabled" );
814							if( data == 'success' ){
815								mc_wrap.find('.mc-notice-msg').text( mc_wrap.find('.mc-notice-group').attr('data-success') );
816							}else{
817								mc_wrap.find('.mc-notice-msg').text( mc_wrap.find('.mc-notice-group').attr('data-fail') );
818							}
819						},error: function(xhr, status, error) {
820							c_btn.removeAttr( "disabled" );
821							mc_wrap.find('.mc-notice-msg').text( mc_wrap.find('.mc-notice-group').attr('data-fail') );
822						}
823					});
824				}
825			});
826		} // if mailchimp exists
827		
828		/* Facbook Comment Width Resize */
829		if( $( '.fb-comments-wrapper' ).length ){
830			$( window ).resize(function() {
831				setTimeout(function(){
832					if($( window ).width() <= 768 ){
833						$( ".fb-comments-wrapper iframe" ).width( $( ".content-area" ).width() );
834					}else{
835						$( ".fb-comments-wrapper iframe" ).width( $( ".content-area .fb-comments" ).data('width') );
836					}
837				}, 200);
838			});
839		}
840	
841		if( $('.popover-wrapper .popover-trigger').length ){
842			$(".popover-trigger").each(function( index ) {
843				var _evnt_name = $(this).attr("data-event") ? $(this).attr("data-event") : 'hover';
844				if( _evnt_name == 'hover' ){
845					$(this).on( "mouseenter mouseleave", function ( e ) {
846						e.preventDefault();
847						$(this).parent(".popover-wrapper").toggleClass("popover-active");
848					});
849				}else{
850					$(this).on( "click", function ( e ) {
851						e.preventDefault();
852						$(this).parent(".popover-wrapper").toggleClass("popover-active");
853					});
854				}
855			});
856		}
857		
858		$(window).scroll(function(){
859			egovenz_scroll_animation();
860		});		
861
862	}); // doc ready end
863	
864	
865	$( window ).load(function() {
866							  
867		if( $( ".header-slider-wrapper" ).length ){
868			$( ".header-slider-wrapper" ).css({ 'height' : 'auto' });
869		}
870		
871		/* Grid Layout Set Width for Owl and Isotope */
872		if( $( ".grid-layout.grid-normal" ).length ){
873			
874			$( ".grid-layout.grid-normal" ).each(function() {
875			
876				var c_elem = $( this );
877				var parent_width = c_elem.width();
878				var gutter_size = c_elem.data( "gutter" );
879				var grid_cols = c_elem.data( "cols" );
880				
881				var net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols );
882				var gn_ele = 1; // grid normal element variable
883				c_elem.children("article").each(function() {
884					if( gn_ele % grid_cols == 0 ){
885						$( this ).css({'width':net_width+'px', 'margin-right': '0', 'margin-bottom': gutter_size+'px'});
886					}else{
887						$( this ).css({'width':net_width+'px', 'margin-right': gutter_size+'px', 'margin-bottom': gutter_size+'px'});
888					}
889					gn_ele++;
890				});		
891				
892				c_elem.children("article").addClass("grid-dyno-visible");
893
894				$( window ).resize(function() {
895					setTimeout(function(){ 
896						parent_width = c_elem.width();
897						var mgrid_cols = 1;
898						if( $(window).width() < 768 ){
899							mgrid_cols = 1;						
900						}else{
901							mgrid_cols = grid_cols;	
902						}
903						var net_width = Math.floor( ( parent_width - ( gutter_size * ( mgrid_cols - 1 ) ) ) / mgrid_cols );
904						var gn_ele = 1; // grid normal element variable
905						c_elem.children("article").each(function() {
906							if( gn_ele % mgrid_cols == 0 ){
907								$( this ).css({'width':net_width+'px', 'margin-right': '0', 'margin-bottom': gutter_size+'px'});
908							}else{
909								$( this ).css({'width':net_width+'px', 'margin-right': gutter_size+'px', 'margin-bottom': gutter_size+'px'});
910							}
911							gn_ele++;
912						});									
913					}, 200);					
914				});	
915				
916				c_elem.find( ".top-standard-post article" ).css({'width':'auto'});
917			
918			});	// each end		
919		} // .grid-layout
920		
921		/* Theme Owl Carousel Code */
922		$( ".owl-carousel" ).each(function() {
923			if( !$( this ).parents( ".isotope" ).length ){
924				egovenzOwlSettings( $( this ) );
925			}
926		});
927	
928		/* Isotope Grid Layout */
929		if( $( ".grid-layout > .isotope" ).length ){
930			$( ".grid-layout > .isotope" ).each(function() {
931			
932				var c_elem = $( this );
933				var parent_width = c_elem.width();
934				var gutter_size = c_elem.data( "gutter" );
935				var grid_cols = c_elem.data( "cols" );
936
937				var layoutmode = c_elem.is('[data-layout]') ? c_elem.data( "layout" ) : '';
938				
939				layoutmode = layoutmode ? layoutmode : 'masonry';
940				
941				if( $(window).width() < 768 ) grid_cols = 1;
942				
943				var net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols );
944				c_elem.find( "article" ).css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'});
945				if( $( ".top-standard-post" ).length ){
946					$( ".top-standard-post article" ).css({'margin-bottom':gutter_size+'px'});	
947				}
948				
949				c_elem.find( ".owl-carousel" ).each(function() {
950					egovenzOwlSettings( $( this ) );
951				});
952				
953				c_elem.find( "video" ).each(function( index ) {
954					$( this ).attr( "src", $( this ).find( "source" ).attr( "src" ) );
955					$( this ).css({ 'height':'200px' });
956				});
957				
958				var filter = "*";
959				var isot_parent = c_elem.parent(".grid-layout");
960				if( $( isot_parent ).attr("data-filter-stat") == 0 ){
961					filter = $( isot_parent ).attr("data-first-cat") ? "." + $( isot_parent ).attr("data-first-cat") : '*';
962				}
963				
964				c_elem.imagesLoaded( function(){
965					c_elem.isotope({
966						itemSelector: 'article',
967						layoutMode: layoutmode,
968						filter: filter,
969						masonry: {
970							gutter: gutter_size
971						},
972						fitRows: {
973						  gutter: gutter_size
974						}
975					});
976				});
977				
978				c_elem.children("article").addClass("grid-dyno-visible");
979				
980				/* Portfolio Filter Item */
981				if( $(".portfolio-filter").length ){
982					$( ".portfolio-filter-item" ).on( 'click', function() {
983						$( this ).parents("ul.nav").find("li").removeClass("active");
984						$( this ).parent("li").addClass("active");
985						var filterValue = $( this ).attr( "data-filter" );
986						c_elem = $( this ).parents( ".portfolio-wrapper" ).find( ".grid-layout .isotope" );
987						c_elem.isotope({ 
988							filter: filterValue
989						});
990						return false;
991					});
992				}
993
994				$( window ).resize(function() {
995
996					setTimeout(function(){ 
997						grid_cols = c_elem.data( "cols" );
998						if( $(window).width() < 768 ) grid_cols = 1;
999						
1000						var parent_width = c_elem.width();
1001						net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols );
1002						c_elem.find( "article" ).css({'width':net_width+'px'});
1003						c_elem.imagesLoaded( function(){
1004							var $isot = c_elem.isotope({
1005								itemSelector: 'article',
1006								masonry: {
1007									gutter: gutter_size
1008								}
1009							});
1010							$isot.on( 'arrangeComplete', isotopeArrange );
1011						});
1012						
1013					}, 200);
1014					
1015				});	
1016				
1017				// Isotope Grid Infinite
1018				if( c_elem.data( "infinite" ) == 1 && $(".post-pagination").length ){
1019
1020					c_elem.infinitescroll({
1021						navSelector  : '.post-pagination',//'#page_nav',    // selector for the paged navigation 
1022						nextSelector : 'a.next-page',//'#page_nav a',  // selector for the NEXT link (to page 2)
1023						itemSelector : 'article',     // selector for all items you'll retrieve
1024						loading: {
1025							msgText : egovenz_ajax_var.load_posts,
1026							finishedMsg: egovenz_ajax_var.no_posts,
1027							img: egovenz_ajax_var.infinite_loader
1028						}
1029					},
1030					// call Isotope as a callback
1031					function( newElements ) {
1032						
1033						var elems = $(newElements);
1034						
1035						var net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols );
1036						c_elem.find( "article" ).css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'});
1037						if( $( ".top-standard-post" ).length ){
1038							$( ".top-standard-post article" ).css({'margin-bottom':gutter_size+'px'});	
1039						}
1040						
1041						c_elem.find( ".owl-carousel" ).each(function() {
1042							egovenzOwlSettings( $( this ) );
1043						});
1044						
1045						elems.find( "video" ).each(function( index ) {
1046							$( this ).attr( "src", $( this ).find( "source" ).attr( "src" ) );
1047							$( this ).css({ 'height':'200px' });
1048						});
1049						
1050						elems.imagesLoaded( function(){
1051							c_elem.isotope( 'appended', elems );
1052							elems.addClass("grid-dyno-visible");
1053						});
1054						
1055						if( c_elem.find( "article" ).hasClass( "egovenz-animate" ) ){
1056							egovenz_scroll_animation();
1057						}
1058
1059					});
1060				}
1061			}); // each end
1062		}
1063
1064		/* Related Slider Empty Post Image Height Set */
1065		if( $( ".related-slider .empty-post-image" ).length ){
1066			if( $( ".related-slider .item .wp-post-image" ).length ){
1067				$( ".related-slider .item .empty-post-image" ).height( $( ".related-slider .item .wp-post-image" ).height() );	
1068			}
1069		}
1070		
1071		/* Featured Slider Empty Post Image Height Set */
1072		if( $( ".featured-slider .empty-post-image" ).length ){
1073			if( $( ".featured-slider .item .wp-post-image" ).length ){
1074				$( ".featured-slider .item .empty-post-image" ).height( $( ".featured-slider .item .wp-post-image" ).height() );	
1075			}
1076		}
1077		
1078		/* Sticky Sidebar */
1079		if( $( ".egovenz-sticky-obj" ).length ){
1080			var $sticky_sidebars = $( ".egovenz-sticky-obj" );
1081			if( $( window ).width() > 767 ) {
1082				$sticky_sidebars.stick_in_parent();
1083			}
1084			$( window ).resize(function() {
1085				if( $( window ).width() > 767 ) {
1086					$sticky_sidebars.trigger( "sticky_kit:detach" );	
1087					$sticky_sidebars.stick_in_parent();
1088					$sticky_sidebars.trigger( "sticky_kit:recalc" );
1089				}else{
1090					$sticky_sidebars.trigger( "sticky_kit:detach" );
1091				}
1092			});
1093		}
1094
1095		/* Circle Counter Shortcode Script */
1096		if( $( '.circle-progress-circle' ).length ){
1097			var circle = $( '.circle-progress-circle' );
1098			circle.appear(function() {
1099							  
1100				var c_circle = $( this );
1101				var c_value = c_circle.attr( "data-value" );
1102				var c_size = c_circle.attr( "data-size" );
1103				var c_thickness = c_circle.attr( "data-thickness" );
1104				var c_duration = c_circle.attr( "data-duration" );
1105				var c_empty = c_circle.attr( "data-empty" ) != '' ? c_circle.attr( "data-empty" ) : 'transparent';
1106				var c_scolor = c_circle.attr( "data-scolor" );
1107				var c_ecolor = c_circle.attr( "data-ecolor" ) != '' ? c_circle.attr( "data-ecolor" ) : c_scolor;
1108									
1109				c_circle.circleProgress({
1110					value: Math.floor( c_value ) / 100,
1111					size: Math.floor( c_size ),
1112					thickness: Math.floor( c_thickness ),
1113					emptyFill: c_empty,
1114					animation: {
1115						duration: Math.floor( c_duration )
1116					},
1117					lineCap: 'round',
1118					fill: {
1119						gradient: [c_scolor, c_ecolor]
1120					}
1121				}).on( 'circle-animation-progress', function( event, progress ) {
1122					$( this ).find( '.progress-value' ).html( Math.round( c_value * progress ) + '%' );
1123				});
1124			});
1125		}
1126		
1127		/* Day Counter Shortcode Script */
1128		if( $( '.day-counter' ).length ){
1129			$( '.day-counter' ).each(function() {
1130				var day_counter = $( this );
1131				var dprogress = $(day_counter).hasClass("day-counter-progress") ? true : false;
1132				var c_date = day_counter.attr('data-date');
1133				day_counter.countdown( c_date, function(event) {
1134					if( day_counter.find('.counter-day').length ){
1135						day_counter.find('.counter-day h3').text( event.strftime('%D') );
1136						if( dprogress ){
1137							var yr = parseInt( event.strftime('%D') );
1138							yr = yr ? parseInt( yr / 365 * 100 ) : 100;
1139							egovenzDayCircle( day_counter.find('.counter-day'), yr );
1140						}
1141					}
1142					if( day_counter.find('.counter-hour').length ){
1143						day_counter.find('.counter-hour h3').text( event.strftime('%H') );
1144						if( dprogress ){
1145							var hur = parseInt( event.strftime('%H') );
1146							hur = hur ? parseInt( hur / 24 * 100 ) : 100;
1147							egovenzDayCircle( day_counter.find('.counter-hour'), hur );
1148						}
1149					}
1150					if( day_counter.find('.counter-min').length ){
1151						day_counter.find('.counter-min h3').text( event.strftime('%M') );
1152						if( dprogress ){
1153							var mnth = parseInt( event.strftime('%M') );
1154							mnth = mnth ? parseInt( mnth / 60 * 100 ) : 100;
1155							egovenzDayCircle( day_counter.find('.counter-min'), mnth );
1156						}
1157					}
1158					if( day_counter.find('.counter-sec').length ){
1159						day_counter.find('.counter-sec h3').text( event.strftime('%S') );
1160						if( dprogress ){
1161							var tme = parseInt( event.strftime('%S') );
1162							tme = tme ? parseInt( tme / 60 * 100 ) : 100;
1163							egovenzDayCircle( day_counter.find('.counter-sec'), tme );
1164						}
1165					}
1166					if( day_counter.find('.counter-week').length ){
1167						day_counter.find('.counter-week h3').text( event.strftime('%w') );
1168						if( dprogress ){
1169							var wk = parseInt( event.strftime('%S') );
1170							wk = wk ? parseInt( wk / 60 * 100 ) : 100;
1171							egovenzDayCircle( day_counter.find('.counter-week'), wk );
1172						}
1173					}
1174				});
1175			});
1176		}
1177
1178		/* Canvas Shapes */
1179		if( $(".canvas_agon").length ){
1180			$( '.canvas_agon' ).each(function() {
1181				egovenzAgon( $(this) );
1182			});
1183		}
1184		
1185		if( $(".vc_chart").length ){
1186			$(".vc_chart").trigger( "resize" );
1187		}
1188		
1189		//Elementor RTL issue
1190		if( $("body.rtl").length && $("section.elementor-section-stretched").length ){
1191			egovenz_for_elementor_row();
1192		}
1193
1194	});
1195	
1196	// Using window smartresize instead of resize function
1197	$( window ).smartresize(function() {
1198		
1199		//Elementor RTL issue
1200		if( $("body.rtl").length && $("section.elementor-section-stretched").length ){
1201			egovenz_for_elementor_row();
1202		}
1203		
1204		/* Custom Responsive Width */
1205		var win_width = $(window).width();		
1206		if( responsive_width ){
1207			egovenzSetCustomHiddenElements( win_width, responsive_width );
1208		}
1209		
1210		/* Mobile Bar Toggle  */
1211		setTimeout( function(){ $(".mobile-bar.active").length ?  $( ".mobile-header .mobile-bar-toggle" ).trigger( "click" ) : ''; }, 100 ); 
1212				
1213		/* Pull Center Reset  */
1214		setTimeout( egovenzCenterMenuMargin, 300 );
1215		
1216		/* Sticky Menu */
1217		if($('.header-inner .sticky-head').length){
1218			setTimeout( egovenzStickyPart( '.header-inner' ), 100 ); 
1219		}
1220		
1221		/* Scroll Sticky */
1222		if($('.header-inner .sticky-scroll').length){
1223			setTimeout( egovenzStickyScrollUpPart( '.header-inner', 'header' ), 100 ); 
1224		}
1225		
1226		/* Mobile Header Sticky Menu */
1227		if($('.mobile-header-inner .sticky-head').length){
1228			setTimeout( egovenzStickyPart( '.mobile-header-inner' ), 100 ); 
1229		}
1230		
1231		/* Mobile Header Scroll Sticky */
1232		if($('.mobile-header-inner .sticky-scroll').length){
1233			setTimeout( egovenzStickyScrollUpPart( '.mobile-header-inner', '.mobile-header' ), 100 ); 
1234		}
1235		
1236		egovenz_scroll_animation();
1237		
1238	});
1239	
1240	$( window ).load(function() {
1241		if( $( ".egovenzgmap" ).length ){
1242			initEgovenzGmap();
1243		}
1244		
1245		egovenz_scroll_animation();
1246	});
1247	
1248	//Day Counter Progress
1249	function egovenzDayCircle( ele, value ){
1250		var c_circle = $( ele );
1251		var parent_ele = $( ele ).parent( ".day-counter-progress" );
1252		var c_value = value;
1253		var c_size = $( parent_ele ).attr("data-size") ? $( parent_ele ).attr("data-size") : 100;
1254		var c_thickness = $( parent_ele ).attr("data-thick") ? $( parent_ele ).attr("data-thick") : 10;
1255		var c_duration = 0;
1256		var c_empty = $( parent_ele ).attr("data-empty-color") ? $( parent_ele ).attr("data-empty-color") : '#eee';
1257		var c_scolor = $( parent_ele ).attr("data-fill-color") ? $( parent_ele ).attr("data-fill-color") : '#333';
1258		var c_ecolor = c_scolor;
1259							
1260		c_circle.circleProgress({
1261			value: Math.floor( c_value ) / 100,
1262			size: Math.floor( c_size ),
1263			thickness: Math.floor( c_thickness ),
1264			emptyFill: c_empty,
1265			animation: {
1266				duration: Math.floor( c_duration )
1267			},
1268			lineCap: 'round',
1269			fill: {
1270				gradient: [c_scolor, c_ecolor]
1271			}
1272		});
1273	}
1274
1275	
1276
1277	
1278	function isotopeArrange() {
1279		$( ".grid-layout > .isotope" ).find( "audio, video" ).each(function( index ) {
1280			$( this )[0].play();
1281			$( this )[0].pause();
1282		});
1283	}
1284	
1285	function egovenz_for_elementor_row(){
1286		$("body.rtl section.elementor-section-stretched").each(function() {
1287			var left_pos = $(this).css( "left" );
1288			left_pos = Math.abs( parseFloat(left_pos) );
1289			if( left_pos ) $(this).css( "left", left_pos );
1290		});
1291	}
1292	
1293	function egovenzSetCustomHiddenElements( win_width, responsive_width ){
1294		if( win_width > responsive_width ){
1295			$(".header-inner").show();
1296			$(".mobile-header-inner, .mobile-topbar-wrap").hide();
1297		}else{
1298			$(".header-inner").hide();
1299			$(".mobile-header-inner, .mobile-topbar-wrap").show();
1300		}
1301	}
1302	
1303	function egovenzStickyHeaderAdjust(elem_pos, elem_width){
1304		var win_width = $(window).width();
1305		var compare_wdth;
1306		if( $('.egovenz-header .header-inner.hidden-md-land-down' ).length ){
1307			compare_wdth = 1024;    
1308		}else{
1309			compare_wdth = 991; 
1310		}
1311		if( win_width <= compare_wdth ){
1312			if( elem_pos == 'left' ){
1313				$('.sticky-header-space').css( 'left', '-'+ elem_width +'px' );
1314				$('body, .top-sliding-bar').css( 'padding-left', '0' );
1315			}else{
1316				$('.sticky-header-space').css( 'right', '-'+ elem_width +'px' );
1317				$('body, .top-sliding-bar').css( 'padding-right', '0' );
1318			}
1319		}else{
1320			if( elem_pos == 'left' ){
1321				$('.sticky-header-space').css( 'left', 0 );
1322				$('body, .top-sliding-bar').css( 'padding-left', elem_width +'px' );
1323			}else{
1324				$('.sticky-header-space').css( 'right', 0 );
1325				$('body, .top-sliding-bar').css( 'padding-right', elem_width +'px' );
1326			}	
1327		}	
1328	}
1329
1330	function egovenzCenterMenuMargin(){
1331		//Center item margin fixing
1332		$.each([ 'topbar', 'logobar', 'navbar', 'mobile-header', 'footer-bottom' ], function( index, margin_key ) {
1333			
1334			var left_width = 0,
1335				right_width = 0,
1336				center_width = 0,
1337				margin_left = 0,
1338				parent_width = 0;
1339
1340			if( $('.'+ margin_key +' .'+ margin_key +'-inner').length ){
1341			
1342				if( margin_key == 'mobile-header' )
1343					parent_width = $('.'+ margin_key +' .'+ margin_key +'-inner .container').width();
1344				else
1345					parent_width = $('.'+ margin_key +' .'+ margin_key +'-inner').width();
1346				
1347				if( $('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-left').length ){
1348					left_width = $('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-left').width();
1349				}
1350				if( $('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-right').length ){
1351					right_width = $('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-right').width();
1352				}
1353				if( $('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-center').length ){
1354					center_width = $('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-center').width();
1355				}
1356					
1357				if( left_width + center_width + right_width ){
1358				
1359					if( margin_key == 'mobile-header' ){
1360						parent_width -= ( left_width + center_width + right_width );
1361						margin_left = parent_width / 2; 
1362					}else{
1363						parent_width = ( parent_width / 2 ) - ( center_width / 2 );
1364						margin_left = Math.floor( parent_width - left_width );
1365					}
1366					
1367					if( !$( "body.rtl" ).length ){
1368						$('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-center').css( 'margin-left', margin_left+'px' );
1369					}else{
1370						$('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-center').css( 'margin-right', margin_left+'px' );
1371					}
1372					
1373					$('.'+ margin_key +' .'+ margin_key +'-inner .'+ margin_key +'-items.pull-center').addClass("show-opacity");
1374					
1375				}
1376			}
1377		});
1378	}
1379		
1380	function egovenzStickyPart( main_class ){
1381
1382		var outer_class = '.sticky-outer';	
1383		var lastScrollTop = 0;
1384		var header_top = 0;
1385
1386		var t_header_h = $(main_class + ' ' + outer_class).data( "height" );
1387		$(main_class + ' ' + outer_class).css( 'height', t_header_h );
1388		header_top = $(main_class + ' ' + outer_class).offset().top;
1389		header_top += t_header_h;
1390
1391		$(window).scroll(function(event){
1392			
1393			var st = $(this).scrollTop();
1394			if( st > header_top ){
1395				$(main_class + ' .sticky-head').addClass('header-sticky');
1396			}else{
1397				$(main_class + ' .sticky-head').removeClass('header-sticky');
1398			}
1399			
1400			if( st == 0 ){
1401				$(main_class + ' .sticky-head').removeClass('header-sticky');
1402			}
1403			
1404			lastScrollTop = st;
1405		});	
1406	}
1407	
1408	function egovenzStickyScrollUpPart( main_class, sticky_div ){
1409		
1410		var outer_class = '.sticky-outer';	
1411		var out_height = '';
1412		var lastScrollTop = 0;
1413		var header_top = 0;
1414	
1415		$(main_class + ' ' + outer_class).css( 'height', $(main_class + ' ' + outer_class).data( "height" ) );
1416		out_height = '-' + $(main_class + ' ' + outer_class).outerHeight() + 'px';
1417		header_top = $(main_class + ' ' + outer_class).offset().top;
1418		sticky_div = $(sticky_div).height();
1419		
1420		$(window).scroll(function(event){
1421
1422			var st = $(this).scrollTop();
1423			
1424			if( st < lastScrollTop && header_top < lastScrollTop ){
1425				// upscroll code
1426				$(main_class + ' .sticky-scroll').addClass('show-menu');
1427				$(main_class + ' .sticky-scroll.show-menu').css({'transform': 'translate3d(0px, 0px, 0px)'});
1428			}else{
1429				// downscroll code
1430				if( st < sticky_div ){
1431					$(main_class + ' .sticky-scroll').css({'transform': ''});
1432					$(main_class + ' .sticky-scroll.show-menu').removeClass('show-menu');
1433				}else{
1434					$(main_class + ' .sticky-scroll').css({'transform': 'translate3d(0px, '+ out_height +', 0px)'});
1435				}
1436			}
1437			
1438			if( st == 0 ){
1439				$(main_class + ' .sticky-scroll').css({'transform': ''});
1440				$(main_class + ' .sticky-scroll.show-menu').removeClass('show-menu');
1441			}
1442			
1443			lastScrollTop = st;
1444		});
1445		
1446	}
1447	
1448	function egovenzSetStickyOuterHeight(){
1449		$( ".sticky-outer" ).each(function() {
1450
1451			var class_name = '';
1452			var sticky_parent = $( this ).parent( "div" );
1453			
1454			if( $( sticky_parent ).is('[class*=hidden-]') ){
1455				class_name = $( sticky_parent ).attr("class");
1456				var t_stat = '';
1457				if( $( sticky_parent ).hasClass( "mobile-header-inner" ) ){
1458					class_name = class_name.replace( "mobile-header-inner", "" );
1459					t_stat = 'm';
1460				}
1461				if( $( sticky_parent ).hasClass( "header-inner" ) ){
1462					class_name = class_name.replace( "header-inner", "" );
1463					t_stat = 'd';
1464				}
1465				$( sticky_parent ).attr("class", "");
1466				if( t_stat == 'm' ){
1467					$( sticky_parent ).attr("class", "mobile-header-inner");
1468				}
1469				if( t_stat == 'd' ){
1470					$( sticky_parent ).attr("class", "header-inner");
1471				}
1472			}
1473			
1474			$( this ).css({ 'position':'absolute', 'visibility':'hidden', 'display':'block', 'height':'auto' });
1475			$( this ).attr( "data-height", $( this ).outerHeight() );
1476
1477			if( class_name != '' ){
1478				$( sticky_parent ).addClass(class_name);
1479			}
1480			
1481			$( this ).css({ 'position':'', 'visibility':'', 'display':'', 'height': $( this ).data( "height" ) });
1482			
1483		});
1484	}
1485	
1486	function egovenzAgon( canvas_ele ){
1487		var canvas = document.getElementById("canvas_agon");
1488		var cxt = canvas.getContext("2d");
1489		var agon_size = canvas_ele.attr( "data-size" );
1490		var agon_side = canvas_ele.attr( "data-side" );
1491		var agon_color = canvas_ele.attr( "data-color" );
1492		var div_val = 1;
1493
1494		switch( parseInt( agon_side ) ){
1495			case 3:
1496				div_val = 6;
1497			break;
1498			case 4:
1499				div_val = 4;
1500			break;
1501			case 5:
1502				div_val = 3.3;
1503			break;
1504			case 6:
1505				div_val = 3;
1506			break;
1507			case 7:
1508				div_val = 2.8;
1509			break;
1510			case 8:
1511				div_val = 2.7;
1512			break;
1513			case 9:
1514				div_val = 2.6;
1515			break;
1516			case 10:
1517				div_val = 2.5;
1518			break;
1519		}
1520
1521		// hexagon
1522		var numberOfSides = parseInt( agon_side ),
1523			size = parseInt( agon_size ),
1524			Xcenter = parseInt( agon_size ),
1525			Ycenter = parseInt( agon_size ),
1526			step  = 2 * Math.PI / numberOfSides,//Precalculate step value
1527			shift = (Math.PI / div_val);//(Math.PI / 180.0);// * 44;//Quick fix ;)
1528
1529		cxt.beginPath();
1530
1531		for (var i = 0; i <= numberOfSides;i++) {
1532			var curStep = i * step + shift;
1533		   cxt.lineTo (Xcenter + size * Math.cos(curStep), Ycenter + size * Math.sin(curStep));
1534		}
1535
1536		/* Direct Output */
1537		cxt.fillStyle = agon_color;
1538		cxt.fill();
1539	}
1540	
1541	function egovenztesipagecallback(event){
1542		var current = event.item.index;
1543		$( event.target ).find(".owl-item.active").eq(0).addClass("current");
1544	}
1545	
1546	function egovenzOwlSettings(c_owlCarousel){
1547		
1548		var page_slide = false;
1549		var pagi_slide = false;
1550		if( c_owlCarousel.hasClass("egovenz-page-carousel") ){ page_slide = true; }
1551		if( c_owlCarousel.hasClass("egovenz-pagination-carousel") ){ pagi_slide = true; }
1552	
1553		// Data Properties
1554		var loop = c_owlCarousel.data( "loop" );
1555		var margin = c_owlCarousel.data( "margin" );
1556		var center = c_owlCarousel.data( "center" );
1557		var nav = c_owlCarousel.data( "nav" );
1558		var dots_ = c_owlCarousel.data( "dots" );
1559		var items = c_owlCarousel.data( "items" );
1560		var items_tab = c_owlCarousel.data( "items-tab" );
1561		var items_mob = c_owlCarousel.data( "items-mob" );
1562		var duration = c_owlCarousel.data( "duration" );
1563		var smartspeed = c_owlCarousel.data( "smartspeed" );
1564		var scrollby = c_owlCarousel.data( "scrollby" );
1565		var autoheight = c_owlCarousel.data( "autoheight" );
1566		var autoplay = c_owlCarousel.data( "autoplay" );
1567		var rtl = $( "body.rtl" ).length ? true : false;
1568
1569		$( c_owlCarousel ).owlCarousel({
1570			rtl : rtl,
1571			loop	: loop,
1572			autoplayTimeout	: duration,
1573			smartSpeed	: smartspeed,
1574			center: center,
1575			margin	: margin,
1576			nav		: nav,
1577			dots	: dots_,
1578			autoplay	: autoplay,
1579			autoheight	: autoheight,
1580			slideBy		: scrollby,
1581			responsive:{
1582				0:{
1583					items: items_mob
1584				},
1585				544:{
1586					items: items_tab
1587				},
1588				992:{
1589					items: items
1590				}
1591			},
1592			onInitialized: pagi_slide ? egovenztesipagecallback : ''
1593		});	
1594		
1595		if( pagi_slide ){
1596			var cur_testi_slide = $( c_owlCarousel ).parent("div").children(".egovenz-page-carousel");
1597			var cur_pagination_slide = $( c_owlCarousel );
1598			$( c_owlCarousel ).on('click', '.owl-item', function(event) {
1599				var current = $(this).index();
1600				$(cur_testi_slide).trigger("to.owl.carousel", [current, 500]);
1601			});
1602			$( c_owlCarousel ).on('dragged.owl.carousel', function(event) {
1603				var current = event.item.index;
1604				$(cur_testi_slide).trigger("to.owl.carousel", [current, 500]);
1605				cur_pagination_slide.find(".owl-item.current").removeClass("current");
1606				cur_pagination_slide.find(".owl-item").eq(current).addClass("current");
1607			});
1608		}
1609		if( page_slide ){
1610			var cur_pagination_slide = $( c_owlCarousel ).parent("div").children(".egovenz-pagination-carousel");
1611			$( c_owlCarousel ).on('changed.owl.carousel', function(event) {
1612				var current = event.item.index;
1613				$(cur_pagination_slide).trigger("to.owl.carousel", [current, 500]);
1614				$(cur_pagination_slide).find(".owl-item.current").removeClass("current");
1615				$(cur_pagination_slide).find(".owl-item").eq(current).addClass("current");
1616			});			
1617		}
1618		
1619	}
1620	
1621	function convert_time(duration) {
1622		var a = duration.match(/\d+/g);
1623	
1624		if (duration.indexOf('M') >= 0 && duration.indexOf('H') == -1 && duration.indexOf('S') == -1) {
1625			a = [0, a[0], 0];
1626		}
1627	
1628		if (duration.indexOf('H') >= 0 && duration.indexOf('M') == -1) {
1629			a = [a[0], 0, a[1]];
1630		}
1631		if (duration.indexOf('H') >= 0 && duration.indexOf('M') == -1 && duration.indexOf('S') == -1) {
1632			a = [a[0], 0, 0];
1633		}
1634	
1635		duration = 0;
1636	
1637		if (a.length == 3) {
1638			duration = duration + parseInt(a[0]) * 3600;
1639			duration = duration + parseInt(a[1]) * 60;
1640			duration = duration + parseInt(a[2]);
1641		}
1642	
1643		if (a.length == 2) {
1644			duration = duration + parseInt(a[0]) * 60;
1645			duration = duration + parseInt(a[1]);
1646		}
1647	
1648		if (a.length == 1) {
1649			duration = duration + parseInt(a[0]);
1650		}
1651		var h = Math.floor(duration / 3600);
1652		var m = Math.floor(duration % 3600 / 60);
1653		var s = Math.floor(duration % 3600 % 60);
1654		return ((h > 0 ? h + ":" + (m < 10 ? "0" : "") : "") + m + ":" + (s < 10 ? "0" : "") + s);
1655	}
1656	
1657	function egovenz_scroll_animation(){
1658		setTimeout( function() {
1659			var anim_time = 300;
1660			$('.egovenz-animate:not(.run-animate)').each( function() {
1661				
1662				var elem = $(this);
1663				var bottom_of_object = elem.offset().top;
1664				var bottom_of_window = $(window).scrollTop() + $(window).height();
1665				
1666				if( bottom_of_window > bottom_of_object ){
1667					setTimeout( function() {
1668						elem.addClass("run-animate");
1669					}, anim_time );
1670				}
1671				anim_time += 300;
1672				
1673			});
1674		}, 200 );
1675	}
1676	
1677	function initEgovenzGmap() {
1678		
1679		
1680		if( egovenz_ajax_var.gmap_stat == '0' ){
1681			return;
1682		}
1683		
1684		var map_styles = '{ "Aubergine" : [	{"elementType":"geometry","stylers":[{"color":"#1d2c4d"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#8ec3b9"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#1a3646"}]},{"featureType":"administrative.country","elementType":"geometry.stroke","stylers":[{"color":"#4b6878"}]},{"featureType":"administrative.land_parcel","elementType":"labels.text.fill","stylers":[{"color":"#64779e"}]},{"featureType":"administrative.province","elementType":"geometry.stroke","stylers":[{"color":"#4b6878"}]},{"featureType":"landscape.man_made","elementType":"geometry.stroke","stylers":[{"color":"#334e87"}]},{"featureType":"landscape.natural","elementType":"geometry","stylers":[{"color":"#023e58"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#283d6a"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#6f9ba5"}]},{"featureType":"poi","elementType":"labels.text.stroke","stylers":[{"color":"#1d2c4d"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#023e58"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#3C7680"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#304a7d"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#98a5be"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"color":"#1d2c4d"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#2c6675"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#255763"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#b0d5ce"}]},{"featureType":"road.highway","elementType":"labels.text.stroke","stylers":[{"color":"#023e58"}]},{"featureType":"transit","elementType":"labels.text.fill","stylers":[{"color":"#98a5be"}]},{"featureType":"transit","elementType":"labels.text.stroke","stylers":[{"color":"#1d2c4d"}]},{"featureType":"transit.line","elementType":"geometry.fill","stylers":[{"color":"#283d6a"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"color":"#3a4762"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#0e1626"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#4e6d70"}]}], "Silver" : [{"elementType":"geometry","stylers":[{"color":"#f5f5f5"}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#f5f5f5"}]},{"featureType":"administrative.land_parcel","elementType":"labels.text.fill","stylers":[{"color":"#bdbdbd"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#e5e5e5"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#ffffff"}]},{"featureType":"road.arterial","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#dadada"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]},{"featureType":"transit.line","elementType":"geometry","stylers":[{"color":"#e5e5e5"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#c9c9c9"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]}], "Retro" : [{"elementType":"geometry","stylers":[{"color":"#ebe3cd"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#523735"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#f5f1e6"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#c9b2a6"}]},{"featureType":"administrative.land_parcel","elementType":"geometry.stroke","stylers":[{"color":"#dcd2be"}]},{"featureType":"administrative.land_parcel","elementType":"labels.text.fill","stylers":[{"color":"#ae9e90"}]},{"featureType":"landscape.natural","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#93817c"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#a5b076"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#447530"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#f5f1e6"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#fdfcf8"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#f8c967"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#e9bc62"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry","stylers":[{"color":"#e98d58"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry.stroke","stylers":[{"color":"#db8555"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#806b63"}]},{"featureType":"transit.line","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"transit.line","elementType":"labels.text.fill","stylers":[{"color":"#8f7d77"}]},{"featureType":"transit.line","elementType":"labels.text.stroke","stylers":[{"color":"#ebe3cd"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#b9d3c2"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#92998d"}]}], "Dark" : [{"elementType":"geometry","stylers":[{"color":"#212121"}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#212121"}]},{"featureType":"administrative","elementType":"geometry","stylers":[{"color":"#757575"}]},{"featureType":"administrative.country","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]},{"featureType":"administrative.land_parcel","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text.fill","stylers":[{"color":"#bdbdbd"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#181818"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"featureType":"poi.park","elementType":"labels.text.stroke","stylers":[{"color":"#1b1b1b"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"color":"#2c2c2c"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#8a8a8a"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#373737"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#3c3c3c"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry","stylers":[{"color":"#4e4e4e"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"featureType":"transit","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#3d3d3d"}]}], "Night" : [{"elementType":"geometry","stylers":[{"color":"#242f3e"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#746855"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#242f3e"}]},{"featureType":"administrative.locality","elementType":"labels.text.fill","stylers":[{"color":"#d59563"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#d59563"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#263c3f"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#6b9a76"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#38414e"}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"color":"#212a37"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#9ca5b3"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#746855"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#1f2835"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#f3d19c"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#2f3948"}]},{"featureType":"transit.station","elementType":"labels.text.fill","stylers":[{"color":"#d59563"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#17263c"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#515c6d"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"color":"#17263c"}]}] }';
1685		
1686		var map_style_obj = JSON.parse(map_styles);
1687		
1688		var map_style_mode = [];
1689		var map_mode = '';
1690		var map_lang = '';
1691		var map_lat = '';
1692		var map_marker = '';
1693		var map_options = '';
1694		
1695		$( ".egovenzgmap" ).each(function( index ) {
1696			
1697			var gmap = this;
1698
1699			if( $( gmap ).attr( "data-map-style" ) ){
1700				map_mode = $( gmap ).data("map-style");
1701				map_lang = $( gmap ).data("map-lang");
1702				map_lat = $( gmap ).data("map-lat");
1703				map_marker = $( gmap ).data("map-marker");
1704				if( map_mode === 'aubergine' )
1705					map_style_mode = map_style_obj.Aubergine;
1706				else if( map_mode === 'silver' )
1707					map_style_mode = map_style_obj.Silver;
1708				else if( map_mode === 'retro' )
1709					map_style_mode = map_style_obj.Retro;
1710				else if( map_mode === 'dark' )
1711					map_style_mode = map_style_obj.Dark;
1712				else if( map_mode === 'night' )
1713					map_style_mode = map_style_obj.Night;
1714				else if( map_mode === 'custom' ){
1715					var c_style = $( gmap ).attr( "data-custom-style" ) && $( gmap ).attr( "data-custom-style" ) != '' ? JSON.parse( $( gmap ).attr( "data-custom-style" ) ) : '[]';
1716					map_style_mode = c_style;
1717				}else{
1718					map_style_mode = "[]";
1719				}
1720			}
1721			
1722			if( $( gmap ).attr( "data-multi-map" ) && $( gmap ).attr( "data-multi-map" ) == 'true' ){
1723				
1724				var map_values = JSON.parse( $( gmap ).attr( "data-maps" ) );
1725				var map_wheel = $( gmap ).attr( "data-wheel" ) && $( gmap ).attr( "data-wheel" ) == 'true' ? true : false;
1726				var map_zoom = $( gmap ).attr( "data-zoom" ) && $( gmap ).attr( "data-zoom" ) != '' ? parseInt( $( gmap ).attr( "data-zoom" ) ) : 14;
1727				var map;
1728
1729				var map_stat = 1;
1730
1731				map_values.forEach( function( map_value ) {
1732					map_lat = map_value.map_latitude;
1733					map_lang = map_value.map_longitude;
1734					var LatLng = new google.maps.LatLng( map_lat, map_lang );
1735					var mapProp= {
1736						center: LatLng,
1737						scrollwheel: map_wheel,
1738						zoom: map_zoom,
1739						styles: map_style_mode
1740					};
1741					
1742					//Create Map
1743					if( map_stat ){
1744						var t_gmap = $( gmap );
1745						map = new google.maps.Map( t_gmap[0], mapProp );
1746						
1747						google.maps.event.addDomListener( window, 'resize', function() {
1748							var center = map.getCenter();
1749							google.maps.event.trigger( map, "resize" );
1750							map.setCenter( LatLng );
1751						});
1752						
1753						map_stat = 0;
1754					}
1755					
1756					//Map Marker
1757					var marker = new google.maps.Marker({
1758						position: LatLng,
1759						icon: map_value.map_marker,
1760						map: map
1761					});
1762					
1763					//Info Window
1764					if( map_value.map_info_opt == 'on' ) {
1765						var info_title = map_value.map_info_title;
1766						var info_addr = map_value.map_info_address;
1767						var contentString = '<div class="gmap-info-wrap"><h3>'+ info_title +'</h3><p>'+ info_addr +'</p></div>';
1768						var infowindow = new google.maps.InfoWindow({
1769						  content: contentString
1770						});
1771						marker.addListener( 'click', function() {
1772						  infowindow.open( map, marker );
1773						});
1774					}
1775				});
1776				
1777			}else{
1778			
1779				var LatLng = {lat: parseFloat(map_lat), lng: parseFloat(map_lang)};
1780				
1781				var map_wheel = $( gmap ).attr( "data-wheel" ) && $( gmap ).attr( "data-wheel" ) == 'true' ? true : false;
1782				var map_zoom = $( gmap ).attr( "data-zoom" ) && $( gmap ).attr( "data-zoom" ) != '' ? parseInt( $( gmap ).attr( "data-zoom" ) ) : 14;
1783				
1784				var mapProp= {
1785					center: LatLng,
1786					scrollwheel: map_wheel,
1787					zoom: map_zoom,
1788					styles: map_style_mode
1789				};
1790				var t_gmap = $( gmap );
1791				var map = new google.maps.Map( t_gmap[0], mapProp ); //document.getElementById("egovenzgmap")
1792				
1793				var marker = new google.maps.Marker({
1794				  position: LatLng,
1795				  icon: map_marker,
1796				  map: map
1797				});
1798				
1799				if( $( gmap ).attr( "data-info" ) == 1 ){
1800					var info_title = $( gmap ).attr( "data-info-title" ) ? $( gmap ).attr( "data-info-title" ) : '';
1801					var info_addr = $( gmap ).attr( "data-info-addr" ) ? $( gmap ).attr( "data-info-addr" ) : '';
1802					var contentString = '<div class="gmap-info-wrap"><h3>'+ info_title +'</h3><p>'+ info_addr +'</p></div>';
1803					var infowindow = new google.maps.InfoWindow({
1804					  content: contentString
1805					});
1806					marker.addListener( 'click', function() {
1807					  infowindow.open( map, marker );
1808					});
1809				}
1810				
1811				google.maps.event.addDomListener( window, 'resize', function() {
1812					var center = map.getCenter();
1813					google.maps.event.trigger(map, "resize");
1814					map.setCenter(LatLng);
1815				});
1816				
1817			}// data multi map false part end
1818			
1819		}); // end map each
1820		
1821	}
1822
1823})( 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.