PageSourceSearch

https://www.easternegypt.com/wp-content/themes/cookie/js/script.js

js easternegypt.com collected 2026-10-01 12:30:26 UTC 50,741 bytes, 1,324 lines download raw bytes

1// JavaScript Document
2(function($) {
3  "use strict";
4	// makes sure the whole site is loaded	
5	$(window).on('load', function() {
6		// will first fade out the loading animation
7		$(".preloader").fadeOut();
8		$("body").css({'visibility':'visible'});
9		// will fade out the whole DIV that covers the website.
10		$(".preloader").delay(500).slideUp('slow');
11		if(!(/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera)){
12			// youtube video
13			$(".player").each(function(){
14				$(this).YTPlayer();
15			});
16		}
17		else{
18			// youtube video fallback
19			$(".player").each(function(){
20				$(this).addClass('player-background');
21			});
22			$('.section-video-controls').css({'display':'none'});
23		}
24		if(!(/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera) ){
25			// skrollr
26			skrollr.init({
27				smoothScrolling: false,
28				mobileDeceleration: 0.004,
29				forceHeight: false
30			});	
31		}
32		else if($('body').hasClass('has-parallax-mobile') ){
33			// skrollr
34			skrollr.init({
35				mobileCheck: function() {
36		            //hack - forces mobile version to be off
37		            return false;
38		        },
39				smoothScrolling: false,
40				mobileDeceleration: 0.004,
41				forceHeight: false
42			});	
43			$(".agni-slides").css({"touch-action":"auto"});
44
45		}
46		else{
47			// skrollr fallback
48			$('html').addClass('no-Skrollr');	
49		}
50		
51	})
52	
53	jQuery(document).on('ready', function(){
54		$('body:not(.vc_editor) .preloader').each(function(){
55			if( $(this).data('preloader-style') == '1' ){
56				$('body').jpreLoader({
57					splashID: "#preloader-1",
58					loaderVPos: '50%',
59					autoClose: $(this).data('close-button'),
60					closeBtnText: $(this).data('close-button-text'),
61				});
62			}
63		})
64		$("body").css({'visibility':'visible'}); 
65
66		if((/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera) && !$('body').hasClass('has-animation-mobile') ){
67			$("div").removeClass('animate');
68		}
69		// browser check
70		var is_chrome = navigator.userAgent.indexOf('Chrome') > -1;
71		var is_explorer = navigator.userAgent.indexOf('MSIE') > -1 || navigator.appVersion.indexOf('Trident/') > 0 ;
72		var is_firefox = navigator.userAgent.indexOf('Firefox') > -1;
73		var is_safari = navigator.userAgent.indexOf("Safari") > -1;
74		var is_opera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;//navigator.userAgent.indexOf("Presto") > -1;
75		if ((is_chrome)&&(is_safari)) {is_safari=false;}
76		
77		if( is_safari ){
78			$('html').addClass('safari');	
79		}
80		else if( is_explorer ){
81			$('html').addClass('ie');
82		}
83		else if( is_firefox ){
84			$('html').addClass('firefox');	
85		}
86		else if( is_opera ){
87			$('html').addClass('opera');	
88		}
89		else {
90			$('html').addClass('chrome');
91		}
92
93		// spacer
94		//var $headerMenuHeight = $('.header-navigation-menu:not(.transparent-nav-menu, .side-header-menu)').height();
95		if( !$('.header-navigation-menu').hasClass('transparent-native') ){
96			var $headerMenuHeight = ( window.innerWidth < 1200 )?$('.header-navigation-menu:not(.transparent-nav-menu)').height():$('.header-navigation-menu:not(.transparent-nav-menu, .side-header-menu)').height();
97			var $headerTopHeight = ( $('.header-top-bar:not(.transparent-nav-menu)').is(":visible") )?$('.header-top-bar:not(.transparent-nav-menu)').height(): 0;
98			var $spacerHeight = $headerTopHeight + $headerMenuHeight;
99			$('.spacer').css({"height":$spacerHeight+"px"});
100			$(window).on('resize', function(){
101				var $headerMenuHeight = ( window.innerWidth < 1200 )?$('.header-navigation-menu:not(.transparent-nav-menu)').height():$('.header-navigation-menu:not(.transparent-nav-menu, .side-header-menu)').height();
102				var $headerTopHeight = ( $('.header-top-bar:not(.transparent-nav-menu)').is(":visible") )?$('.header-top-bar:not(.transparent-nav-menu)').height(): 0;
103				var $spacerHeight = $headerTopHeight + $headerMenuHeight;
104				$('.spacer').css({"height":$spacerHeight+"px"});
105			})
106		}
107		
108		// back to top			
109		$('#back-to-top').fadeOut(duration);
110		var offset = 220;
111		var duration = 1000;
112		$(window).on('scroll', function() {
113			if ($(this).scrollTop() > offset) {
114				$('.back-to-top').fadeIn(duration);
115			} else {
116				$('.back-to-top').fadeOut(duration);
117			}
118		});
119		
120		$('#back-to-top').on('click', function(event) {
121			event.preventDefault();
122			$('html, body').animate({scrollTop: 0}, duration);
123			return false;
124		})
125				
126		// one page scroll
127		$('.page-scroll a').on('click', function(event) {
128			$('html, body').stop().animate({
129				scrollTop: $('.header-sticky').height()?$(this.hash).offset().top - 60:$(this.hash).offset().top,
130			}, 1500, 'easeInOutExpo');
131			event.preventDefault();
132			return false;
133		});
134
135		// Header shrink
136		$.fn.agni_shrink = function($offset) {
137			($(window).scrollTop() < offset)?$(this).removeClass('shrink-header-menu'):$(this).addClass('shrink-header-menu');
138			return this;
139		};
140		$('.header-navigation-menu.header-sticky:not(.shrink-native)').agni_shrink(400);
141		$(window).on('scroll', function(){
142			$('.header-navigation-menu.header-sticky:not(.shrink-native)').agni_shrink(400);
143		});
144
145		$.fn.agni_transparent = function($offset) {
146			($(window).scrollTop() < offset)?$(this).addClass('transparent-nav-menu'):$(this).removeClass('transparent-nav-menu');
147			return this;
148		};
149		$('.header-navigation-menu.transparent-native').agni_transparent
149(400);
150		$(window).on('scroll', function(){
151			$('.header-navigation-menu.transparent-native').agni_transparent(400);
152		});
153		$.fn.agni_sticky = function($offset) {
154			($(window).scrollTop() < offset)?$(this).removeClass('top-sticky'):$(this).addClass('top-sticky');
155			return this;
156		};
157		$('.header-navigation-menu.header-sticky').agni_sticky(400);
158		$(window).on('scroll', function(){
159			$('.header-navigation-menu.header-sticky').agni_sticky(400);
160		});
161
162		$('.header-cart-toggle .cart-contents').on('click', function(c){
163			c.preventDefault();
164		})
165
166		// nav menu indicator
167		//$('.nav-menu-content >li.menu-item-has-children >a').append("<i class=\"nav-menu-indicator ion-ios-plus-empty\"></i>");
168		$('.nav-menu-content .sub-menu .menu-item-has-children:not(.megamenu, .col-md-2, .col-md-3, .col-md-4, .col-md-6) >a').append("<i class=\"nav-submenu-indicator ion-ios-plus-empty\"></i>");
169
170		// tab-nav-menu
171		//$(".header-navigation-menu:not('.side-header-menu') .tab-nav-menu-content").parent('.tab-nav-menu').slideUp(400);
172		if( window.innerWidth < 1200 ){
173			$(".header-navigation-menu").find('.tab-nav-menu').slideUp(400);
174		}
175		else{
176			$(".header-navigation-menu:not('.side-header-menu')").find('.tab-nav-menu').slideUp(400);
177		}
178		$(window).on('resize', function(){
179			if( window.innerWidth > 768 && window.innerWidth < 1200 ){
180				$(".header-navigation-menu").find('.tab-nav-menu').slideUp(400);
181			}
182			else{
183				$(".header-navigation-menu:not('.side-header-menu')").find('.tab-nav-menu').slideUp(400);
184				//$(".side-header-menu").find('.tab-nav-menu').slideDown(100);
185			}
186			if ( $('.side-header-menu').find('.tab-nav-menu-content').is(':hidden') && window.innerWidth < 768 ) {	
187				$(".side-header-menu").find('.tab-nav-menu').slideUp(100);
188			}
189			if ( window.innerWidth > 1200 ) {	
190				$(".side-header-menu").find('.tab-nav-menu').slideDown(100);
191				$(".side-header-menu").find('.tab-nav-menu-content').slideDown(100);
192			}
193		})
194		$(".tab-nav-menu-content li:not('.menu-item-has-children') a, .toggle-nav-menu").on('click', function(m){
195			m.preventDefault();			
196			$('.toggle-nav-menu').find('.burg').toggleClass('activeBurg');		
197		});
198
199		$('.toggle-nav-menu').on('click', function(m){
200			m.preventDefault();
201			
202			if ( $(this).parents('.header-navigation-menu').find('.tab-nav-menu-content').is(':hidden') ) {		
203				$(this).parents('.header-navigation-menu').find('.tab-nav-menu-content').slideDown(400);
204				if( window.innerWidth < 1200 ){
205					$(this).parents(".header-navigation-menu").find('.tab-nav-menu-content').parent('.tab-nav-menu').slideDown(400).fadeIn('slow');
206				}
207				else{
208					$(this).parents(".header-navigation-menu:not('.side-header-menu')").find('.tab-nav-menu-content').parent('.tab-nav-menu').slideDown(400).fadeIn('slow');
209				}
210			}
211			else{
212				$(this).parents('.header-navigation-menu').find('.tab-nav-menu-content').slideUp(400);
213				if( window.innerWidth < 1200 ){
214					$(this).parents(".header-navigation-menu").find('.tab-nav-menu-content').parent('.tab-nav-menu').slideUp(400).fadeOut('fast');
215				}
216				else{
217					$(this).parents(".header-navigation-menu:not('.side-header-menu')").find('.tab-nav-menu-content').parent('.tab-nav-menu').slideUp(400).fadeOut('fast');
218				}
219			}
220					
221		});
222		if( window.innerWidth < 1200 || $(".header-navigation-menu").hasClass("minimal-nav-menu") ){
223			$(".tab-nav-menu-content li:not('.menu-item-has-children') a").on('click', function(m){
224				
225				if ( $('.tab-nav-menu-content').is(':hidden') ) {		
226					$('.tab-nav-menu-content').slideDown(400);
227					$(".header-navigation-menu .tab-nav-menu-content").parent('.tab-nav-menu').slideDown(400).fadeIn('slow');
228
229				}
230				else{
231					$('.tab-nav-menu-content').slideUp(400);
232					$(".header-navigation-menu .tab-nav-menu-content").parent('.tab-nav-menu').slideUp(400).fadeOut('fast');			
233				}
234						
235			});
236		}
237		$(window).on('resize', function(){
238			if( window.innerWidth < 1200 || $(".header-navigation-menu").hasClass("minimal-nav-menu") ){
239				$(".tab-nav-menu-content li:not('.menu-item-has-children') a").on('click', function(m){
240					
241					if ( $('.tab-nav-menu-content').is(':hidden') ) {		
242						$('.tab-nav-menu-content').slideDown(400);
243						$(".header-navigation-menu .tab-nav-menu-content").parent('.tab-nav-menu').slideDown(400).fadeIn('slow');
244
245					}
246					else{
247						$('.tab-nav-menu-content').slideUp(400);
248						$(".header-navigation-menu .tab-nav-menu-content").parent('.tab-nav-menu').slideUp(400).fadeOut('fast');			
249					}
250							
251				});
252			}
253		});
254		
255		// mobile menu		
256		$('.tab-nav-menu-content .menu-item-has-children >a').append("<a class=indicator href=#><i class=\"ion-ios-plus-empty\"></i></a>");
257		$('.tab-nav-menu-content .menu-item-has-children a.indicator').click(function(m){
258			m.preventDefault();
259			m.stopImmediatePropagation();
260			if ( $(this).parent(' a ').parent(' li ').children('.sub-menu').is(':hidden')  ) {		
261				$(this).parent(' a ').parent(' li ').children('.sub-menu').slideDown(400);
262			}
263			else
264			{
265				$(this).parent(' a ').parent(' li ').children('.sub-menu').slideUp(400);
266			}		
267			
268		});		
269		
270		// Removing mega menu for mobile
271		$('.tab-nav-menu-content li').each(function(){
272			$(this).removeClass("megamenu col-md-2 col-md-3 col-md-4 col-md-6");
273		});
274
275		// Post Carousel
276		$('.agni-posts-carousel').each(function() {
277			$(this).owlCarousel({
278				autoplay : $(this).data('carousel-autoplay'),
279				autoplayTimeout:4000,
280				loop: $(this).data('carousel-loop'),
281				margin: $(this).data('carousel-margin'),
282				nav: $(this).data('carousel-navigation'),
283				pagination: $(this).data('carousel-navigation'),
284				navText: ['<i class="fa fa-angle-left">','<i class="fa fa-angle-right">'],
285				responsive:{
286					0:{
287						items:1
288					},
289					768:{
290						items:2
291					},
292					992:{
293						items:3
294					}
295				}			
296			})
297		});
298
299		// Custom height detection for Agni Slider & Page Header
300		$.fn.custom_height_detection = function(){
301			var $this = $(this);
302			if( $this.data('height-mobile') && $(window).width() < 768 ){
303				var $height_mobile = $this.data('height-mobile');
304				$this.css({'height':$height_mobile});
305			}
306			else if( $this.data('height-tab') && $(window).width() < 992 ){
307				var $height_tab = $this.data('height-tab');
308				$this.css({'height':$height_tab});
309			}
310			else{
311				var $height = $this.data('height');
312				$this.css({'height':$height});
313			}
314		}
315
316		// Page Header
317		$('.agni-page-header').each(function(){
318			var $slider = $(this);
319			var $inherited_height = window; 
320			if( $(this).data('inherited-height') ){
321				$inherited_height = $(this).data('inherited-height');
322
323				$slider.custom_height_detection();
324				$(window).on('resize', function(){
325					$slider.custom_height_detection();
326				});
327			}
328			$(this).superslides({
329				inherit_width_from: '.agni-page-header',
330        		inherit_height_from: $inherited_height //$(this).data('inherited-height')
331			});
332			
333		});
334
335		// Agni Slider
336		$('.agni-slides').each(function(){
337			var $slider = $(this);
338			// super slider	
339			//if(!(/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera)){
340			if(!(/Android/i).test(navigator.userAgent || navigator.vendor || window.opera)){
341				Hammer($(this)[0]).on("swipeleft", function(e) {
342					$(this).data('superslides').animate('next');
343				});
344				Hammer($(this)[0]).on("swiperight", function(e) {
345					$(this).data('superslides').animate('prev');
346				});	
347			}
348			var $inherited_height = window; 
349			if( $(this).data('inherited-height') ){
350				$inherited_height = $(this).data('inherited-height');
351
352				$slider.custom_height_detection();
353				$(window).on('resize', function(){
354					$slider.custom_height_detection();
355				});
356			}
357			$(this).superslides({
358				inherit_width_from: '.agni-slides',
359        		inherit_height_from: $inherited_height,
360				animation_easing: 'easeOutQuad',
361				animation_speed: $(this).data('slide-transition-speed'),
362				animation:  $(this).data('slide-animation'),
363				pagination: $(this).data('slide-pagination'),
364				play: $(this).data('slide-animation-speed')
365			});	
366							
367			$.fn.slideAnimation = function ( element, animation, speed ) {
368				var $element = $(element);
369				$(document).on('animating.slides', function() {
370					$element.addClass('animate');   
371					window.setTimeout( function(){
372						$element.removeClass('animate');
373					}, speed);       
374				});
375				$(document).on('animated.slides', function() {
376					$element.addClass('animated ' + animation);  
377					window.setTimeout( function(){
378						$element.removeClass('animated');
379					}, speed);       
380				});		
381			};
382								
383			$(this).find('.slide-title.animation').each(function(){
384				$.fn.slideAnimation(this, 'fadeIn', 1000);
385			})
386			$(this).find('.slide-divide-line.animation').each(function(){
387				$.fn.slideAnimation(this, 'fadeIn', 1000);
388			})
389			$(this).find('.slide-additional-title.animation').each(function(){
390				$.fn.slideAnimation(this, 'fadeInUp', 1500);
391			})
392			$(this).find('.slide-button.animation').each(function(){
393				$.fn.slideAnimation(this, 'fadeInDown', 1500);
394			})
395			
396		});
397		$('.agni-video').each(function(){	
398			var $slider = $(this);	
399			if(!(/Android/i).test(navigator.userAgent || navigator.vendor || window.opera)){
400				Hammer($(this)[0]).on("swipeleft", function(e) {
401					$(this).data('superslides').animate('next');
402				});
403				Hammer($(this)[0]).on("swiperight", function(e) {
404					$(this).data('superslides').animate('prev');
405				});	
406			}
407			var $inherited_height = window; 
408			if( $(this).data('inherited-height') ){
409				$inherited_height = $(this).data('inherited-height');
410
411				$slider.custom_height_detection();
412				$(window).on('resize', function(){
413					$slider.custom_height_detection();
414				});
415			}
416			$(this).superslides({
417				inherit_width_from: '.agni-video',
418				inherit_height_from: $inherited_height,
419				animation_speed: $('.agni-video').data('slide-transition-speed'),
420				animation:  $('.agni-video').data('slide-animation'),
421				pagination: $('.agni-video').data('slide-pagination'),
422				play:  $('.agni-video').data('slide-animation-speed')
423				
424			});
425		});
426		
427		// text rotator
428		$('.text-rotator').each(function() {
429			$(this).find('.rotate').textrotator({
430				animation: $(this).data('text-animation'),//animation: "spin",
431				separator: "|",
432				speed: $(this).data('text-animation-speed')
433			});
434		});
435
436		// mbYTPlayer controls 
437		$('.player').each(function() {
438			$(this).on("YTPStart",function(e){
439				$(this).siblings('div').children('.command-play').css({'display':'none'});	
440				$(this).siblings('div').children('.command-pause').css({'display':'inline-block'});
441			});
442			$(this).on("YTPPause",function(e){
443				$(this).siblings('div').children('.command-pause').css({'display':'none'});	
444				$(this).siblings('div').children('.command-play').css({'display':'inline-block'});
445			});
446
447			$(this).siblings('div').find('.command-play').click(function(event) {
448				event.preventDefault();
449				$(this).parent('div').parent('div').find(".player").playYTP();	
450			})
451			$(this).siblings('div').find('.command-pause').click(function(event) {
452				event.preventDefault();
453				$(this).parent('div').parent('div').find(".player").pauseYTP();	
454			})			
455			
456		});
457
458		// Self hosted controls
459		$('.custom-self-hosted-video').click(function() {
460	        $(this).get(0).paused ? $(this).get(0).play() : $(this).get(0).pause();
461	    });
462		
463		$.fn.countUp = function( options ) {
464			$('.mile-count .count').each( function() {
465				if( $(this).data('count-animation') == '1' ){
466					var defaults = {
467						startVal: 0,
468						endVal: $(this).attr( "data-count" ),
469						duration: 1.5,
470						options: {
471							useEasing: true,
472							useGrouping: true ,
473							/*decimals: '',
474							separator : '', 
475							prefix : '', 
476							suffix : '' */
477							decimals:'',
478							separator : $(this).attr( "data-sep" ),
479							prefix : $(this).attr( "data-pre" ), 
480							suffix : $(this).attr( "data-suf" )
481						}
482					},
483					options = $.extend({}, defaults, options);
484					var mile_count = new countUp( this, options.startVal, options.endVal, options.decimals, options.duration, options.options );
485					
486					var $element = $(this);
487					$element.waypoint(function() {
488						mile_count.start();
489						this.destroy();
490					}, {
491						offset: $element.data('animation-offset')
492					})		
493				}						
494			})		
495		};	
496		$('.mile-count .count').each( function() {
497			if( $(this).data('count-animation') == '1' ){
498				$(this).countUp();
499			}
500		});
501
502		// Custom Slider function
503		$.fn.custom_slider = function() {
504			$(this).owlCarousel({
505				autoplay : $(this).data('custom-slider-autoplay'),
506				autoplayTimeout: $(this).data('custom-slider-autoplay-timeout'),
507				autoplayHoverPause :  $(this).data('custom-slider-autoplay-hover'),
508				smartSpeed: $(this).data('custom-slider-autoplay-speed'),
509				dots : $(this).data('custom-slider-pagination'),
510				nav:true,
511				navText: ['<i class="ion-ios-arrow-left">','<i class="ion-ios-arrow-right">'],
512				loop: $(this).data('custom-slider-loop'),
513				items:1,
514			})
515			return this;
516		};
517		
518		// Carousel Gallery function
519		$.fn.carousel_gallery = function() {
520			$(this).owlCarousel({
521				autoplay : $(this).data('gallery-autoplay'),
522				autoplayTimeout: $(this).data('gallery-autoplay-timeout'),
523				autoplayHoverPause :  $(this).data('gallery-autoplay-hover'),
524				dots : $(this).data('gallery-pagination'),
525				loop: $(this).data('gallery-loop'),
526				center: $(this).data('gallery-center'),
527				margin: $(this).data('gallery-margin'),
528				responsive:{
529					0:{
530						items:$(this).data('gallery-0')
531					},
532					768:{
533						items:$(this).data('gallery-768')
534					},
535					992:{
536						items:$(this).data('gallery-992')
537					},
538					1200:{
539						items:$(this).data('gallery-1200')
540					}
541				}			
542			})
543		};
544
545		// Carousel Posts function	
546		$.fn.carousel_post = function() {
547			$(this).owlCarousel({
548				autoplay : $(this).data('posttype-autoplay'),
549				autoplayTimeout: $(this).data('posttype-autoplay-timeout'),
550				autoplayHoverPause :  $(this).data('posttype-autoplay-hover'),
551				smartSpeed: $(this).data('posttype-autoplay-speed'),
552				dots : $(this).data('posttype-pagination'),
553				loop: $(this).data('posttype-loop'),
554				responsive:{
555					0:{
556						items:$(this).data('post-0')
557					},
558					768:{
559						items:$(this).data('post-768')
560					},
561					992:{
562						items:$(this).data('post-992')
563					},
564					1200:{
565						items:$(this).data('post-1200')
566					}
567				}
568			
569			});
570		};
571
572		// Carousel Portfolio function
573		$.fn.carousel_portfolio = function() {
574			$(this).owlCarousel({
575				margin: $(this).data('posttype-margin'),
576				autoplay : $(this).data('posttype-autoplay'),
577				autoplayTimeout: $(this).data('posttype-autoplay-timeout'),
578				autoplayHoverPause :  $(this).data('posttype-autoplay-hover'),
579				smartSpeed: $(this).data('posttype-autoplay-speed'),
580				dots : $(this).data('posttype-pagination'),
581				loop: $(this).data('posttype-loop'),
582				center: $(this).data('posttype-center'), //true,
583				responsive:{
584					0:{
585						items:$(this).data('post-0')
586					},
587					768:{
588						items:$(this).data('post-768')
589					},
590					992:{
591						items:$(this).data('post-992')
592					},
593					1200:{
594						items:$(this).data('post-1200')
595					}
596				}
597			});
598		};
599		
600		// carousel clients	function	
601		$.fn.carousel_clients = function() {
602			$(this).owlCarousel({
603				autoplay : $(this).data('clients-autoplay'),
604				autoplayTimeout: $(this).data('clients-autoplay-timeout'),
605				autoplayHoverPause :  $(this).data('clients-autoplay-hover'),
606				dots : $(this).data('clients-pagination'),
607				loop: $(this).data('clients-loop'),
608				margin:30,
609				responsive:{
610					0:{
611						items:$(this).data('client-0')
612					},
613					768:{
614						items:$(this).data('client-768')
615					},
616					992:{
617						items:$(this).data('client-992')
618					},
619					1200:{
620						items:$(this).data('client-1200')
621					}
622				}			
623			})
624		};
625		
626		// carousel team function
627		$.fn.carousel_team = function() {
628			$(this).owlCarousel({
629				autoplay : $(this).data('team-autoplay'),
630				autoplayTimeout: $(this).data('team-autoplay-timeout'),
631				autoplayHoverPause :  $(this).data('team-autoplay-hover'),
632				dots : $(this).data('team-pagination'),
633				loop: $(this).data('team-loop'),
634				margin:30,
635				responsive:{
636					0:{
637						items:$(this).data('team-0')
638					},
639					768:{
640						items:$(this).data('team-768')
641					},
642					992:{
643						items:$(this).data('team-992')
644					},
645					1200:{
646						items:$(this).data('team-1200')
647					}
648				}			
649			})
650		};		
651		
652		// carousel testimonials function
653		$.fn.carousel_testimonials = function() {
654			$(this).owlCarousel({
655				autoplay : $(this).data('testimonial-autoplay'),
656				autoplayTimeout: $(this).data('testimonial-autoplay-timeout'),
657				autoplayHoverPause :  $(this).data('testimonial-autoplay-hover'),
658				smartSpeed: $(this).data('testimonial-autoplay-speed'),
659				dots : $(this).data('testimonial-pagination'),
660				loop: $(this).data('testimonial-loop'),
661				responsive:{
662					0:{
663						items:$(this).data('test-0')
664					},
665					768:{
666						items:$(this).data('test-768')
667					},
668					992:{
669						items:$(this).data('test-992')
670					},
671					1200:{
672						items:$(this).data('test-1200')
673					}
674				}
675			
676			})
677		};	
678
679		// carousel Service box function
680		$.fn.carousel_service_box = function(){
681			$(this).owlCarousel({
682				autoplay : $(this).data('service-autoplay'),
683				autoplayTimeout: $(this).data('service-autoplay-timeout'),
684				autoplayHoverPause :  $(this).data('service-autoplay-hover'),
685				dots : $(this).data('service-pagination'),
686				loop: $(this).data('service-loop'),
687				margin:30,
688				responsive:{
689					0:{
690						items:$(this).data('service-0')
691					},
692					768:{
693						items:$(this).data('service-768')
694					},
695					992:{
696						items:$(this).data('service-992')
697					},
698					1200:{
699						items:$(this).data('service-1200')
700					}
701				}
702			
703			})
704		};
705
706		// sharing popup function
707		$.fn.post_sharing_buttons = function(){
708			$(this).find('a').on('click', function(s){
709				s.preventDefault();
710				window.open( $(this).attr('href'), 'popUpWindow',  'height=700, width=800, left=10, top=10, resizable=yes, scrollbars=yes, toolbar=yes, menubar=no, location=no, directories=no, status=yes');
711			})		
712		};
713
714		// sharing popup
715		$('.post-sharing-buttons, .portfolio-sharing-buttons').each(function(){
716			$(this).post_sharing_buttons();		
717		});
718
719		// magnific popup portfolio thumbnail
720		$.fn.portfolio_attachment_magnific_popup = function(){
721			$(this).magnificPopup({
722				delegate: '.portfolio-column:not(.filterhide) a.portfolio-attachment', // the selector for gallery item
723				type: 'image',
724				mainClass: 'mfp-img-mobile mfp-portfolio-attachment-popup mfp-image-popup',
725				image: {
726					verticalFit: true
727				},
728				gallery:{
729					enabled:true,
730					navigateByImgClick: false
731				},
732			})
733		}
734
735		$('.page-portfolio').each(function(){
736			// Magnific popup portfolio attachment
737			$(this).portfolio_attachment_magnific_popup();
738			
739		});
740		
741		// Maginfic popup image
742		$('.custom-image').magnificPopup({
743			type: 'image',
744			mainClass: 'mfp-img-mobile',
745			showCloseBtn:false,
746			image: {
747				titleSrc: function(item) {
748					return item.el.children('img').attr('title');
749				},
750				verticalFit: true
751			},
752			zoom: {
753				enabled: true, // By default it's false, so don't forget to enable it
754				duration: 300, // duration of the effect, in milliseconds
755				easing: 'ease-in-out' // CSS transition easing function 
756			}
757		});
758
759		// Maginfic popup gallery
760		$('.custom-gallery').each(function() { // the containers for all your galleries
761			$(this).magnificPopup({
762				delegate: 'a', // the selector for gallery item
763				type: 'image',
764				mainClass: 'mfp-img-mobile mfp-image-popup',
765				image: {
766					verticalFit: true
767				},
768				gallery:{
769					enabled:true,
770					navigateByImgClick: false
771				},
772				zoom: {
773					enabled: true, // By default it's false, so don't forget to enable it
774					duration: 300, // duration of the effect, in milliseconds
775					easing: 'ease-in-out' // CSS transition easing function 
776				}
777			})
778		});
779
780		// Maginfic popup video
781		$('.custom-video-link a').each(function() { // the containers for all your galleries
782			$(this).magnificPopup({
783				type: 'iframe',
784				mainClass: 'mfp-iframe-mobile mfp-iframe-popup',
785				iframe: {
786				  markup: '<div class="mfp-iframe-scaler">'+
787				            '<div class="mfp-close"></div>'+
788				            '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
789				          '</div>', // HTML markup of popup, `mfp-close` will be replaced by the close button
790
791				  patterns: {
792				    youtube: {
793				      index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index).
794
795				      id: 'v=', // String that splits URL in a two parts, second part should be %id%
796				      // Or null - full URL will be returned
797				      // Or a function that should return %id%, for example:
798				      // id: function(url) { return 'parsed id'; }
799
800				      src: '//www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe.
801				    },
802				    vimeo: {
803				      index: 'vimeo.com/',
804				      id: '/',
805				      src: '//player.vimeo.com/video/%id%?autoplay=1'
806				    },
807
808				    // you may add here more sources
809
810				  },
811
812				  srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src".
813				}
814			})
815		});
816
817		// Gallery Isotope
818		var $gallery_container = $('.gallery-type-grid');
819		$gallery_container.imagesLoaded( function() {
820			if( $gallery_container.data('gallery-grid') == 'fitRows' ){
821				$gallery_container.isotope({
822					itemSelector: '.custom-gallery-item',
823					layoutMode: 'fitRows',
824					fitRows: {
825						columnWidth: '.custom-gallery-item',
826					}
827				});
828			}
829			else if( $gallery_container.data('gallery-grid') == 'masonry' ){
830				$gallery_container.isotope({
831					itemSelector: '.custom-gallery-item',
832					layoutMode: 'masonry',
833					masonry: {
834						columnWidth: '.custom-gallery-item',
835					}
836				});
837			}
838		});
839		
840		// bottom caption height detection
841		$('.has-bottom-caption').each(function(){
842			$(this).find(".portfolio-caption-content").css("bottom", $(this).find('.portfolio-bottom-caption').innerHeight() );
843		}) 
844
845		// portfolio isotope & filter 	
846		var $portfolio_container = $('.portfolio-container:not(.carousel-portfolio)');
847		$portfolio_container.imagesLoaded( function() {
848			if( $portfolio_container.data('grid') == 'fitRows' ){
849				$portfolio_container.isotope({
850					itemSelector: '.portfolio-column',
851					layoutMode: 'fitRows',
852					fitRows: {
853						columnWidth: '.portfolio-column',
854					}
855				});
856			}
857			else if( $portfolio_container.data('grid') == 'masonry' ){
858				var $colwidth = ($('.portfolio-column:not(.width2x)' )[0])?$('.portfolio-column:not(.width2x)' )[0].getBoundingClientRect().width:'';
859				$portfolio_container.isotope({
860					itemSelector: '.portfolio-column',
861					layoutMode: 'masonry',
862					masonry: {
863						columnWidth: $colwidth,
864					}
865				});
866				$(window).on('resize', function(){
867					var $colwidth = ($('.portfolio-column:not(.width2x)' )[0])?$('.portfolio-column:not(.width2x)' )[0].getBoundingClientRect().width:'';
868					$portfolio_container.isotope({
869						itemSelector: '.portfolio-column',
870						layoutMode: 'masonry',
871						masonry: {
872							columnWidth: $colwidth,
873						}
874					})
875				});
876			}
877
878			if( $portfolio_container.hasClass('has-infinite-scroll') == true ){
879				var $template_url = $('.page-portfolio-container').data('dir');
880				$portfolio_container.infinitescroll({
881				    loading: {
882					    finished: undefined,
883					    finishedMsg: "No more Items <script type='text/javascript'> jQuery('.load-more-button').hide(); </script>",
884					                img: $template_url+"/img/load_more.gif",
885					    msg: null,
886					    msgText: "Loading",
887					    selector: '.load-more',
888					    speed: 'fast',
889					    start: undefined
890					},
891					extraScrollPx: 70,
892				    navSelector  : "div.portfolio-number-navigation",      // selector for the paged navigation (it will be hidden) 
893				    nextSelector : "div.portfolio-number-navigation a:first",    // selector for the NEXT link (to page 2)
894				    itemSelector : ".portfolio-container div.portfolio-column",   // selector for all items 
894you'll retrieve
895				},
896				function ( newElements ) {
897					var $newElems = jQuery( newElements ).css({ opacity: 0 }); // hide to begin with
898					// ensure that images load before adding to masonry layout
899				  	$newElems.imagesLoaded(function(){
900					    $newElems.fadeIn().delay(40); // fade in when ready
901					    $portfolio_container.isotope( 'appended', $newElems, true );
902				    });
903				});
904
905				if( $('.page-portfolio-container').hasClass('has-load-more') == true ){
906			        $(window).unbind('.infscr');
907					$('.load-more-button a').on('click', function(i){
908						$portfolio_container.infinitescroll('retrieve');
909						return false;
910					})
911				}
912			}
913
914		});
915		
916		// filter
917		$('.filter a').on('click', function(e){
918			e.preventDefault();
919			$(this).addClass('active');
920			$(this).parent().siblings().find('a').removeClass('active');
921
922			var selector = $(this).attr('data-filter');
923			//var $colwidth = $('.portfolio-column:not(.width2x)' )[0].getBoundingClientRect().width;
924			$portfolio_container.isotope({ filter: selector })
925			$('.portfolio-column').each(function(){
926	            if( !$(this).hasClass(selector.replace(".", ""))){
927	                $(this).addClass('filterhide');
928	            }
929	            else{
930	                $(this).removeClass('filterhide');
931	            }
932
933	        });
934		});	
935
936		//Circle bar
937		$('.chart').each(function() {
938			var $element = $(this);
939
940			$element.waypoint(function() {
941				$element.easyPieChart({
942					barColor : $element.data('barcolor'),
943					trackColor : $element.data('trackcolor'),
944					scaleColor : $element.data('scalecolor'),
945					easing: $element.data('animation'),
946					scaleLength: $element.data('scalelength') ,
947					lineCap: $element.data('linecap'),
948					lineWidth: $element.data('linewidth'),
949					size: $element.data('size'),
950					onStep: function(from, to, percent) {
951						$(this.el).find('.percent').text(Math.round(percent));
952					}
953				}); 
954				this.destroy();
955			}, {
956				offset: $element.data('animation-offset')
957			});
958		});
959
960
961		$('.progress-bar-animate').each(function() {
962			var $element = $(this);
963
964			$element.waypoint(function() {
965				if( $element.attr('role') == 'progressbar' ){
966					$element.css({'width':$element.attr( 'aria-valuenow' )+'%'});
967				}
968				this.destroy();
969			}, {
970				offset: $element.data('animation-offset')
971			});
972		});
973
974		// Custom Slider	
975		$('.custom-slider').each(function() {
976			$(this).custom_slider();
977		});
978
979		// Carousel Gallery	
980		$('.carousel-gallery').each(function() {
981			$(this).carousel_gallery();
982		});
983
984		// Carousel Posts	
985		$('.carousel-post').each(function() {
986			$(this).carousel_post();
987		});
988
989		// Carousel Portfolio	
990		$('.carousel-portfolio').each(function() {
991			$(this).carousel_portfolio();
992		});
993		
994		// carousel clients		
995		$('.carousel-clients').each(function() {
996			$(this).carousel_clients();
997		});
998		
999		// bottom caption height detection
1000		$('.has-bottom-caption').each(function(){
1001			$(this).find(".member-caption-content").css("bottom", $(this).find('.member-bottom-caption').innerHeight() );
1002		}) 
1003		// carousel team	
1004		$('.carousel-team').each(function() {
1005			$(this).carousel_team();
1006		});		
1007		
1008		// carousel testimonials	
1009		$('.carousel-testimonials').each(function() {
1010			$(this).carousel_testimonials();
1011		});	
1012
1013		// carousel Service box
1014		$('.carousel-service-box').each(function() {
1015			$(this).carousel_service_box();
1016		});
1017		
1018		// Blog Masonry
1019		$.fn.blog_isotope = function(){
1020			var $blog_container = $(this);
1021			var $blog_post_content = $(this).find('.blog-post-content:not(.carousel-blog-post-content)');
1022			$blog_post_content.find('.site-main').imagesLoaded( function() {
1023				if( $blog_post_content.data('blog-grid') == 'fitRows' ){
1024					var $colwidth = ($blog_post_content.find('article.grid-item')[0])?$blog_post_content.find('article.grid-item')[0].getBoundingClientRect().width:'';
1025					$blog_post_content.find('.site-main').isotope({
1026						itemSelector: 'article',
1027						layoutMode: 'fitRows',
1028						fitRows: {
1029							columnWidth: $colwidth,
1030						}
1031					});
1032				}
1033				else if( $blog_post_content.data('blog-grid') == 'masonry' ){
1034					var $colwidth = ($blog_post_content.find('article.grid-item')[0])?$blog_post_content.find('article.grid-item')[0].getBoundingClientRect().width:'';
1035					$blog_post_content.find('.site-main').isotope({
1036						itemSelector: 'article',
1037						layoutMode: 'masonry',
1038						masonry: {
1039							columnWidth: $colwidth,
1040						}
1041					});
1042					$(window).on('resize', function(){
1043						var $colwidth = ($blog_post_content.find('article.grid-item')[0])?$blog_post_content.find('article.grid-item')[0].getBoundingClientRect().width:'';
1044						$blog_post_content.find('.site-main').isotope({
1045							itemSelector: '.article',
1046							layoutMode: 'masonry',
1047							masonry: {
1048								columnWidth: $colwidth,
1049							}
1050						})
1051					});
1052				}
1053
1054				if( $blog_container.hasClass('has-infinite-scroll') == true ){
1055					var $template_url = $blog_container.data('dir');
1056					$blog_post_content.find('.site-main').infinitescroll({
1057					   loading: {
1058						    finished: undefined,
1059						    finishedMsg: "No more Items <script type='text/javascript'> jQuery('.load-more-button').hide(); </script>",
1060						                img: $template_url+"/img/load_more.gif",
1061						    msg: null,
1062						    msgText: "Loading",
1063						    selector: '.load-more',
1064						    speed: 'fast',
1065						    start: undefined
1066						},
1067						extraScrollPx: 70,
1068					    navSelector  : "div.post-number-navigation",      // selector for the paged navigation (it will be hidden) 
1069					    nextSelector : "div.post-number-navigation a:first",    // selector for the NEXT link (to page 2)
1070					    itemSelector : ".blog-container .site-main article",   // selector for all items you'll retrieve
1071					},
1072
1073					function ( newElements ) {
1074					var $newElems = jQuery( newElements ).css({ opacity: 0 }); // hide to begin with
1075					// ensure that images load before adding to masonry layout
1076					  $newElems.imagesLoaded(function(){
1077					    $newElems.fadeIn().delay(40); // fade in when ready
1078					    $blog_post_content.find('.site-main').isotope( 'appended', $newElems, true );
1079					     });
1080					    }
1081					);
1082
1083					if( $blog_container.hasClass('has-load-more') == true ){
1084				        $(window).unbind('.infscr');
1085						$blog_container.find('.load-more-button a').on('click', function(i){
1086							$blog_post_content.find('.site-main').infinitescroll('retrieve');
1087							return false;
1088						})
1089					}
1090				}
1091
1092			});
1093		}
1094		$('.blog-container').each(function(){
1095			$(this).blog_isotope();
1096		})
1097		
1098		// Icon 
1099		$('.icon-has-border.hover-icon-has-background').hover(function(){
1100			$(this).parent('.agni-icon').removeClass('icon-background-transparent');
1101		},function(){
1102			$(this).parent('.agni-icon').addClass('icon-background-transparent');
1103		})
1104		
1105
1106		// coming soon countdown
1107		$('.countdown').each(function () { 
1108			// Coming Soon
1109			var $date = $(this).data( 'counter' );		
1110			var $label = $(this).data( 'label' );	
1111			$(this).countdown({
1112				date: $date, // add the countdown's end date (i.e. 3 november 2012 12:00:00)
1113				format: "on", // on (03:07:52) | off (3:7:52) - two_digits set to ON maintains layout consistency
1114				label: $label // add the countdown's label (i.e Day|Days|Hour|Hours|Minute|Minutes|Second|Seconds)
1115			});
1116		}); 
1117
1118		// Waypoint Animation
1119		$('.animate').each(function() {
1120			var $element = $(this);
1121
1122			$element.waypoint(function() {
1123				$element.addClass('animated').addClass($element.data('animation')).css('visibility', 'visible');
1124				this.destroy();
1125			}, {
1126				offset: $element.data('animation-offset')
1127			});
1128		});
1129		
1130		$.fn.initializeMap = function(lat, lang, desc, lat_2, lang_2, desc_2, showImage, imageTitle, divId, mapstyle, mapcolor, mapdrag, mapzoom) {
1131			switch( mapstyle ){
1132				case '2' :
1133					var styles = [{"stylers":[{"hue":"#ff1a00"},{"invert_lightness":true},{"saturation":-100},{"lightness":33},{"gamma":0.5}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#2D333C"}]}];
1134					break;
1135				case '3' :
1136					var styles = [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":mapcolor},{"visibility":"on"}]}];
1137					break;
1138				case '4' :
1139					var styles = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}]; 
1140					break;
1141				default :
1142					var styles = [{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"stylers":[{"hue":"#00aaff"},{"saturation":-100},{"gamma":2.15},{"lightness":12}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"lightness":24}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":57}]}];
1143			}
1144			
1145			var locations = [
1146				[desc, lat,lang],
1147				[desc_2, lat_2, lang_2],
1148		    ];
1149
1150		    var map = new google.maps.Map(document.getElementById(divId), {
1151			    zoom: mapzoom,
1152			    center: new google.maps.LatLng(lat,lang),
1153			    mapTypeControl: false,
1154				scrollwheel: false,
1155				draggable: mapdrag,
1156				mapTypeControlOptions: {  
1157					mapTypeIds: ['Styled']  
1158				},    
1159				navigationControl: true,
1160				navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
1161				mapTypeId: 'Styled', 
1162		    });
1163		    var styledMapType = new google.maps.StyledMapType(styles, { name: 'Styled' });  
1164			map.mapTypes.set('Styled', styledMapType);
1165
1166		    var infowindow = new google.maps.InfoWindow();
1167
1168			var markerIcon = new google.maps.MarkerImage(showImage,
1169				new google.maps.Size(48,48),
1170				new google.maps.Point(0,0)
1171			);
1172		    var marker, i;
1173
1174		    for (i = 0; i < locations.length; i++) {  
1175				marker = new google.maps.Marker({
1176					position: new google.maps.LatLng(locations[i][1], locations[i][2]),
1177					map: map,
1178					icon: markerIcon,
1179					title:imageTitle,
1180					zIndex: 3
1181				});
1182
1183				google.maps.event.addListener(marker, 'click', (function(marker, i) {
1184					return function() {
1185						infowindow.setContent(locations[i][0]);
1186						infowindow.open(map, marker);
1187					}
1188				})(marker, i));
1189		    }
1190		}
1191		$.fn.initializeMap_v2 = function($args) {
1192			
1193			switch( $args[3] ){
1194				case 0 :
1195					var styles = '';
1196					break;
1197				case 2 :
1198					var styles = [{"stylers":[{"hue":"#ff1a00"},{"invert_lightness":true},{"saturation":-100},{"lightness":33},{"gamma":0.5}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#2D333C"}]}];
1199					break;
1200				case 3 :
1201					var styles = [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":$args[4]},{"visibility":"on"}]}];
1202					break;
1203				case 4 :
1204					var styles = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}]; 
1205					break;
1206				default :
1207					var styles = [{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"stylers":[{"hue":"#00aaff"},{"saturation":-100},{"gamma":2.15},{"lightness":12}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"lightness":24}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":57}]}];
1208			}
1209			
1210			//var locations = jQuery.parseJSON( $args[1] );
1211			var locations = $args[1];
1212
1213		    var map = new google.maps.Map(document.getElementById($args[0]), {
1214			    zoom: $args[6],
1215			    center: new google.maps.LatLng(locations[0].lat,locations[0].lng),
1216			    mapTypeControl: false,
1217				scrollwheel: false,
1218				draggable: $args[5],
1219				mapTypeControlOptions: {  
1220					mapTypeIds: ['Styled']  
1221				},    
1222				navigationControl: true,
1223				navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
1224				mapTypeId: 'Styled', 
1225		    });
1226		    var styledMapType = new google.maps.StyledMapType(styles, { name: 'Styled' });  
1227			map.mapTypes.set('Styled', styledMapType);
1228
1229		    var infowindow = new google.maps.InfoWindow();
1230
1231			/*var markerIcon = new google.maps.MarkerImage($args[2],
1232				new google.maps.Size(48,48),
1233				new google.maps.Point(0,0)
1234			);*/
1235		    var marker, i;
1236
1237		    for (i = 0; i < locations.length; i++) {  
1238		    	if( locations[i].icon ){
1239		    		var location_marker = locations[i].icon;
1240		    	}
1241		    	else{
1242		    		var location_marker = $args[2];
1243				}
1244				var markerIcon = new google.maps.MarkerImage(location_marker,
1245					new google.maps.Size(48,48),
1246					new google.maps.Point(0,0)
1247				);
1248				marker = new google.maps.Marker({
1249					position: new google.maps.LatLng(locations[i].lat, locations[i].lng),
1250					map: map,
1251					icon: markerIcon,
1252					title:locations[i].name,
1253					zIndex: 3
1254				});
1255
1256				google.maps.event.addListener(marker, 'click', (function(marker, i) {
1257					return function() {
1258						infowindow.setContent("<h6>"+locations[i].name+"</h6>"+locations[i].address);
1259						infowindow.open(map, marker);
1260					}
1261				})(marker, i));
1262		    }
1263		}
1264
1265		// google map
1266		$('.map-canvas').each(function(){
1267			var $element = $(this);
1268			var mapstyle = $element.attr( 'data-map-style' );
1269			var mapcolor = $element.attr( 'data-map-accent-color' );
1270			var mapdrag = ((/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera) && $element.attr( 'data-map-drag' ) == '1')?false:true;
1271			var mapzoom = $element.data( 'map-zoom' );
1272			var template_url = $element.attr( 'data-dir' );
1273			var map_icon = $element.attr( 'data-map' );
1274			var get_id = $element.attr( 'id' );
1275
1276			var get_lat = $element.attr( 'data-lat' );
1277			var get_lng = $element.attr( 'data-lng' );
1278			var get_add1 = $element.attr( 'data-add1' );
1279			var get_add2 = $element.attr( 'data-add2' );
1280			var get_add3 = $element.attr( 'data-add3' );		
1281			var lat = get_lat;   // Latitude of location
1282			var lang = get_lng;  // Longitude  of location
1283			var desc = '<div>'+
1284						  '<h6>'+get_add1+'</h6>'+
1285						  '<p>'+get_add2+'</p>'+
1286						  '<p>'+get_add3+'</p>'+
1287					 '</div>';
1288
1289			var get_lat_2 = $element.attr( 'data-lat-2' );
1290			var get_lng_2 = $element.attr( 'data-lng-2' );
1291			var get_add1_2 = $element.attr( 'data-add1-2' );
1292			var get_add2_2 = $element.attr( 'data-add2-2' );
1293			var get_add3_2 = $element.attr( 'data-add3-2' );
1294			var lat_2 = get_lat_2;   // Latitude of location
1295			var lang_2 = get_lng_2;  // Longitude  of location
1296			var desc_2 = '<div>'+
1297						  '<h6>'+get_add1_2+'</h6>'+
1298						  '<p>'+get_add2_2+'</p>'+
1299						  '<p>'+get_add3_2+'</p>'+
1300					 '</div>';
1301			var showImage = map_icon; //template_url+'/img/marker.png';
1302			var imageTitle = get_add1;
1303			var divId = get_id;			
1304			$element.initializeMap(lat, lang, desc, lat_2, lang_2, desc_2, showImage, imageTitle, divId, mapstyle, mapcolor, mapdrag, mapzoom);
1305		})
1306		// Gmap v2
1307		$('.map-canvas-v2').each(function(){
1308			var $element = $(this);
1309			var mapstyle = $element.data( 'map-style' );
1310			var mapcolor = $element.data( 'map-accent-color' );
1311			var mapdrag = ((/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera) && $element.data( 'map-drag' ) == '1')?false:true;
1312			var mapzoom = $element.data( 'map-zoom' );
1313			var template_url = $element.data( 'dir' );
1314			var showImage = $element.data( 'map' );
1315			var divId = $element.attr( 'id' );
1316			var get_loc = $element.data( 'map-locations' );
1317
1318			var $args = [ divId, get_loc, showImage, mapstyle, mapcolor, mapdrag, mapzoom];
1319			$element.initializeMap_v2($args);
1320		})
1321		
1322	});
1323
1324})(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.