PageSourceSearch

https://www.depecheguinee.com/wp-content/themes/independent/assets/js/theme.js?ver=1.0

js depecheguinee.com collected 2026-10-02 22:27:28 UTC 73,772 bytes, 1,863 lines download raw bytes

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