PageSourceSearch

https://keylargofishingadventures.com/wp-content/themes/specular/js/main.js?ver=1

js keylargofishingadventures.com collected 2026-10-04 10:44:25 UTC 56,977 bytes, 1,973 lines download raw bytes

1var $ = jQuery.noConflict();
2var $window_width = $(window).width();
3var stickyNavTop = $('header#header').offset().top;
4var codelessSlider, msnry_blog, msnry_portfolio;
5$(document).ready(function () {
6	"use strict";
7	
8	/* ToolTip Activate */
9	$('[rel=tooltip]').tooltip();
10
11	/* PlaceHolder fix for IE */
12	$('input, textarea').placeholder();
13	$('#mc_mv_EMAIL').attr('placeholder', 'Type your email address');
14
15	/* Page Header */
16	pageHeader();
17
18	/* Set Icon for list elements. (1 icon for all list) */
19	codelessSetIconList();
20
21	
22
23	/* Styling VC section */
24	codelessSectionStyle();
25
26
27
28	/* Initialize Navigation JS Part */
29	if(!$('body').hasClass('header_5'))
30	codelessNavigation();
31
32	/* Fullwidth Google Map */
33	codelessFullwidthMap();
34
35	/* IFRAME height in grid blog */
36	codelessIFrameHeight();
37
38	/* Search Button in Header */
39	codelessSearchButton();
40
41	/* Scroll Up Binding */
42	scrollUpBinding();
43
44	/* Accordion Toggle Binding */
45	accordionBinding();
46
47	/* Top Navigation Widget */
48	codelessTopNavWidget();
49
50	/* LightBox */
51	codelessLightBoxInit();
52
53	/* $("audio,video").mediaelementplayer(); */  
54
55	/* Twitter Footer Carousel */
56	twitterFooterCarousel();
57
58	/* Clients Carousel Init */
59	if($('.clients_caro').length > 0)
60    	clientsCarousel();
61
62    /* Testimonials Carousel Init */
63    if($('.testimonial_carousel').length > 0)
64    	testimonialsCarousel();
65
66    /* Testimonial Cycle */
67    if($('.testimonial_cycle').length > 0)
68    	testimonialsCycle();
69
70
71    /* Flexslider Init */
72	if($('.flexslider').length > 0)
73    	flexsliderInit();
74
75    /* Portfolio Page Isotope Filter */
76    codelessPortfolioPageIsotope();
77
78    /* FAQ filter */
79    codelessFaqFilter();
80
81    /* Staff Carousel */
82    codelessStaffCarousel();
83
84    /* Portfolio Carousel */
85    codelessPortfolioCarousel();
86
87    /* Blog Latest Post */
88    codelessLatestBlogCarousel();
89
90    /* Codeless Slider Init */
91    if($('.codeless_slider').length > 0)
92		$('.codeless_slider').codelessSliderInit();  
93
94	/* Left Navigation */
95	codelessLeftNavtion();
96
97	/* Smoothscroll */
98	if( $("body").hasClass('nicescroll') )
99		codeless_smoothScroll();
100
101	if($('#blogmasonry').length > 0)
102		codeless_blogmasonry();
103
104	if($('#fullpage').length > 0)
105		codeless_fullscreen_section();
106
107	codeless_backgroundcheck(); 
108
109	if($('.fixed_sidebar').length > 0)
110		codeless_single_portfolio_floating();
111
112	codelessExtraNav();
113
114	codelessCustomSelect();
115
116	codelessTabsactive();
117
118	codelessMobileMenu();
119
120	codelessOverallButton();
121
122	if($('body').hasClass('header_5'))
123		codelessMenuOverlay(); 
124
125	codelessLayoutChanges();
126
127	codelessOnlineFunctions();
128
129	if($('body').hasClass('one_page'))
130	codelessOnePage();
131
132	if($('body').hasClass('sticky_active') && $window_width >= 980) 
133		codelessStickyNav();
134    
135    codelessGalleryCarouselInit();	
136
137    codelessPostShares();
138
139    if($('.infinite_scroll_pag').length > 0 && $('#posts_container').length > 0)
140    	codelessBlogInfiniteScroll();
141    
142    
143});
144
145
146
147$(window).load(function () { 
148	codelessInitParallax();
149});
150
151
152
153$(window).scroll(function(){ 
154	"use strict";
155
156	
157});
158
159
160
161$(window).resize(function(){
162	"use strict";	
163	/*var width = 1100;
164	if($('.swiper_slider').length > 0){
165		var slide_per_view = $('.swiper_slider').data('slidenr');
166
167		if ($(".container").css("max-width") == "940px" ){
168			slide_per_view = 4;
169		}else if ($(".container").css("max-width") == "420px" ){
170			slide_per_view = 1;
171		}else if ($(".container").css("width") == "724px" ){
172			slide_per_view = 2;
173		}else if ($(".container").css("max-width") == "300px" ){
174			slide_per_view = 1;
175		}
176		var swiperParent = new Swiper('.swiper_slider',{
177		    slidesPerView: slide_per_view,
178		    paginationClickable: true,
179		    pagination: '.pagination'
180		});
181		
182	}	*/
183	//codelessPortfolioPageIsotope();
184
185
186	codeless_single_portfolio_floating();
187	codelessLayoutChanges();
188	testimonialsCycle();
189	codelessInitParallax();
190});
191
192
193
194
195/*-------------------------------------------------------------------------------------------------------------*/
196/*------------------------------------------ FUNCTIONS BEGIN --------------------------------------------------*/
197/*-------------------------------------------------------------------------------------------------------------*/
198
199/*------------------------------ Page Header ------------------------- */
200
201function pageHeader(){
202	"use strict";
203	var self = $('.header_page.centered');
204	if(self.length == 0)
205		return false;
206	var height = self.height();
207		self.height(0);
208
209	setTimeout(function(){
210		self.animate({
211			opacity: 1,
212			height: height+'px'
213		}, 800); 
214	}, 600);
215				
216	var top = self.offset().top;
217	var bottom = self.offset().top + height;
218	var op_test = 1;
219
220	$(window).scroll(function(){
221		var scrollTop = $(window).scrollTop();
222					
223		if($('.fixed_header').length > 0)
224			scrollTop += $('.fixed_header').height();
225		if (jQuery('#wpadminbar').length > 0)
226			scrollTop += 32;
227		if($(window).scrollTop() == 0)
228			scrollTop = 0;
229		var opacity1 = 1 - ( scrollTop / bottom );
230		op_test = opacity1;
231		var new_height = height;
232		if(scrollTop > top){
233			new_height = bottom - scrollTop;
234		}
235		//self.css({opacity: opacity1});
236		if(!self.hasClass('with_subtitle'))
237			self.find('h1').css('line-height', new_height+'px').css('height', new_height+'px').css('padding-top', (height-new_height)+'px').css('opacity', opacity1);
238		else{
239			self.find('.titles').css('opacity', opacity1).css('padding-top', (height-new_height)+'px');
240		}
241
242	});
243
244
245}
246
247
248
249/*------------------------------ Lists ----------------------------- */
250
251function codelessSetIconList(){
252	"use strict";
253	if($('.list').length > 0){
254		$('.list').each(function(){
255			var icon = $(this).find('ul').data('icon');
256			$('i', $(this)).addClass(icon);
257		});
258	}
259}
260
261/* Parallax Init */
262
263function codelessInitParallax(){
264	if($('.section-style.parallax_section').length || $(".header_page:not('.no_parallax')").length){
265		$(".section-style.parallax_section, .header_page:not('.no_parallax')").each(function(){
266			var self = $(this); 
267			$(this).parallax("50%", 0.4); 
268		});
269	}
270}
271
272
273/*------------------------------ Sections ----------------------------- */
274function codelessSectionStyle(){
275	"use strict";
276	$('.section-style').each(function(){
277		if($(this).prev().hasClass('section-style')){
278			$(this).css('margin-top', '0px');
279			$(this).prev().css('margin-bottom', '0px');
280		}
281
282		if($(this).is(':last-child') && ( $(this).parent().hasClass('composer_content') || $(this).parent().hasClass('content_portfolio') )){
283			$(this).parent().css('padding-bottom', '0px');
284		}
285		if($(this).is(':first-child') && ( $(this).parent().hasClass('composer_content') || $(this).parent().hasClass('content_portfolio') ) ){
286			var style = $(this).parent().attr('style');
287			if(typeof style == "undefined")
288				style = ''; 
289			$(this).parent().attr('style', style+'padding-top:0px !important');
290		}
291	});
292
293	$('.transparency_section').each(function(){
294		var height = $(this).outerHeight();
295		$(this).css('margin-top', '-'+height+'px');
296	});
297
298	
299
300	if($window_width > 979){
301		$('.full-width-content.section-style ').each(function(){
302			var max_height = 0;
303			var full_width_section = $(this);
304			if($('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).length > 1){ 
305				$('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).each(function(){
306					var this_ = $(this);
307					if(this_.innerHeight() > max_height)
308						max_height = this_.innerHeight(); 
309				});
310				$('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).innerHeight(max_height+'px');
311			}
312			
313		});
314	}else{
315		$('.full-width-content.section-style .wpb_column:not(.wpb_column .wpb_column)').height('auto');
316	}
317
318	$('.section-style').each(function(){
319		var self = $(this);
320		if(self.css('padding-bottom') == '0px'){
321			var pad = $('.wpb_column', self).last().css('padding-bottom');
322			if($window_width < 768){
323				$('.wpb_column', self).last().css('padding-bottom', '40px');
324			}else{
325				$('.wpb_column', self).last().css('padding-bottom', pad);
326			}
327		}
328	});
329
330	$(window).resize(function(){
331		$window_width = $(this).width();
332		$('.full-width-content.section-style .wpb_column:not(.wpb_column .wpb_column)').height('auto');
333		if($window_width > 979){
334			$('.full-width-content.section-style ').each(function(){
335				var max_height = 0;
336				var full_width_section = $(this);
337				if($('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).length > 1){ 
338					$('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).each(function(){
339						var this_ = $(this);
340						if(this_.innerHeight() > max_height)
341							max_height = this_.innerHeight(); 
342					}); 
343					$('.wpb_column:not(.wpb_column .wpb_column)', full_width_section).innerHeight(max_height+'px');
344				}
345				
346			});
347		}else{
348			$('.full-width-content.section-style .wpb_column:not(.wpb_column .wpb_column)').height('auto');
349		}
350
351		$('.section-style').each(function(){
352			var self = $(this);
353			if(self.css('padding-bottom') == '0px'){
354				var pad = $('.wpb_column', self).last().css('padding-bottom');
355				
356				if($window_width < 768){
357					$('.wpb_column', self).last().css('padding-bottom', '40px');
358				}else{
359					$('.wpb_column', self).last().css('padding-bottom', pad);
360				}
361			}
362		});
363
364	});
365	
366
367}
368		
369/*------------------------------ Navigation -------------------------- */
370function codelessNavigation(){
371	"use strict";
372	
373	$('nav .menu li').each(function(){
374		var self = $(this);
375		if($('.codeless_mega4', self).length > 0){
376			self.css('position', 'static');
377		}
378
379		if($('.codeless_mega5', self).length > 0){
380			self.css('position', 'static');
381		}
382	});
383
384	$('nav .menu li .sub-menu').each(function(){
385		$(this).parent().first().addClass('hasSubMenu');
386	});
387
388
389	$('nav .menu, .sticky_menu .menu').mouseleave(function(event) {
390		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').fadeOut(400).css('display', 'none');
391		$(this).find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
392	});
393
394	$('nav .menu li ul .hasSubMenu, .sticky_menu .menu li ul .hasSubMenu').mouseleave(function(event) {
395		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').fadeOut(400).css('display', 'none');
396		$(this).find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
397	});
398
399	$('nav .menu > li, .sticky_menu .menu > li').mouseenter(function() {
400		$(this).parent().find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').fadeOut(400).css('display', 'none');
401		$('header#header .cart .content').fadeOut(400).css('display', 'none');
402
403		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').first().fadeIn(400).css('display', 'block');
404
405		$(this).parent().find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
406		$(this).find('.codeless_custom_menu_mega_menu').first().fadeIn(400).css('display', 'block');
407	});
408
409	$('nav .menu > li ul > li, .sticky_menu .menu > li ul > li').mouseenter(function() {
410		
411
412		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').first().fadeIn(400).css('display', 'block');
413
414		$(this).parent().find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
415		$(this).find('.codeless_custom_menu_mega_menu').first().fadeIn(400).css('display', 'block');
416	});
417
418	$('.codeless_custom_menu_mega_menu').each(function(){
419		var bg = $(this).parent('li').data('bg');
420		$(this).css('background-image', 'url('+bg+')');
421	});
422
423	$('header#header .container').live('mouseleave', function(event) {
424		$(this).find('.cart .content').stop().fadeOut(400).css('display', 'none');
425	}); 
426
427	$('header#header .cart_icon').live('mouseenter', function() {
428		$(this).parents('header#header').first().find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').stop().fadeOut(400).css('display', 'none');
429		$(this).parent().find('.content').first().stop().fadeIn(400).css('display', 'block'); 
430	});
431
432	$('header#header .vert_mid > a').live('mouseenter', function() {
433		$(this).parent().find('.cart .content').first().stop().fadeOut(400).css('display', 'none'); 
434	});
435
436
437	if($('.header_10').length > 0){
438		var container_left = $('.full_nav_menu').offset().left;
439		var nav = $('.full_nav_menu nav').offset().left;
440		$('.codeless_custom_menu_mega_menu').each(function(){
441			var minus = nav - container_left; 
442			$(this).css('left', '-'+minus+'px');
443		});
444	}
445
446	$(window).resize(function(){
447		if($('.header_10').length > 0){
448			var container_left = $('.full_nav_menu').offset().left;
449			var nav = $('.full_nav_menu nav').offset().left;
450			$('.codeless_custom_menu_mega_menu').each(function(){
451				var minus = nav - container_left; 
452				$(this).css('left', '-'+minus+'px');
453			});
454		}
455
456
457	});
458	$(window).resize(function(){
459		if($('.header_8').length > 0){
460			var container_left = $('.full_nav_menu').offset().left;
461			var nav = $('.full_nav_menu nav').offset().left;
462			$('.codeless_custom_menu_mega_menu').each(function(){
463				var minus = nav - container_left; 
464				$(this).css('left', '-'+minus+'px');
465			});
466		}
467	});
468}
469		
470
471/*------------------------------ Fullwidth Google MAP ----------------------------- */	
472
473function codelessFullwidthMap(){
474	"use strict";
475	if($('.googlemap.fullwidth_map').length > 0){
476		$('.googlemap.fullwidth_map').each(function(){
477			var $parent = $(this).parents('.row-dynamic-el').first();
478			if($parent.next().hasClass('section-style'))
479				$parent.css('margin-bottom', '0px');
480		}); 
481		$('.row-google-map').each(function(){
482			if($('.fullwidth_map', $(this)).length > 0){
483				var $parent = $(this).parents('.row-dynamic-el').first();
484				$parent.css('margin-top', '0px');
485			}
486				
487		});
488	}
489}
490
491 
492/*------------------------------ Change IFRAME GRID height -------------------------- */   
493
494function codelessIFrameHeight(){
495	"use strict";
496	$('.blog-article.grid .media img').first().imagesLoaded(function(){
497		var first_height = $('.blog-article.grid .media img').first().height();
498			
499		$('.blog-article.grid iframe').each(function(){
500			$(this).css('height', first_height+'px');
501			$(this).parent('.media').css('height', first_height+'px');
502		});
503	});
504}
505
506 
507/*------------------------------ HEader Search Button ------------------------------ */  
508
509function codelessSearchButton(){
510	"use strict";
511	$('.open_search_button').click(function(){
512		if($('body').hasClass('open_search')){
513			$('body').removeClass('open_search');
514		}else
515			$('body').addClass('open_search');
516
517	});
518
519	
520	/*$(window).scroll(function() {
521		if($('body').hasClass('open_search')){
522			$('body').removeClass('open_search');
523		}
524	});
525	
526		
527   	$('html').click(function(e) {
528       	if((e.target.id != 's')) { 
529        	$('.right_search_container').hide();
530    	}
531   	});*/
532}
533
534/*------------------------------ Side navigation --------------------------- */  
535
536function codelessExtraNav(){
537	"use strict";
538	$('.extra_navigation_button').click(function(){
539		if($('body').hasClass('open_extra_nav')){
540			$('body').removeClass('open_extra_nav');
541		}else
542			$('body').addClass('open_extra_nav');
543
544	});
545
546	$('.extra_navigation .close').click(function(){
547		$('body').removeClass('open_extra_nav');
548	});
549
550	/*$(window).scroll(function() {
551		if($('body').hasClass('open_extra_nav')){
552			$('body').removeClass('open_extra_nav');
553		}
554	});*/
555
556}
557		
558
559/*------------------------------ Scroll Up binding ------------------------------ */  
560
561function scrollUpBinding(){
562	"use strict";
563	$('.scrollup').click(function(){
564        $("html, body").animate({ scrollTop: 0 }, 600);
565        return false;
566    });
567}
568        
569		
570/*------------------------------ Accordion Toggle Binding ------------------------------ */  
571
572function accordionBinding(){
573	"use strict";
574	$(".accordion-group .accordion-toggle").live('click', function(){
575		var $self = $(this).parent().parent();
576		if($self.find('.accordion-heading').hasClass('in_head')){
577			$self.parent().find('.accordion-heading').removeClass('in_head');
578		}else{  
579			$self.parent().find('.accordion-heading').removeClass('in_head');
580			$self.find('.accordion-heading').addClass('in_head');
581		}
582	});
583}
584
585/*------------------------------ Top Navtion Widget ------------------------------ */ 
586function codelessTopNavWidget(){
587	"use strict";
588	$('.small_widget a').not('.aaaa a').toggle(function(e){
589		$('.small_widget').removeClass('active'); 
590              e.preventDefault();
591		var box = $(this).data('box');
592		$('.top_nav_sub').hide();
593		$('.top_nav_sub.'+box).fadeIn("400");
594              $(this).parent().addClass('active'); 
595
596	}, function(e){
597		e.preventDefault();
598		var box = $(this).data('box');
599              $('.small_widget').removeClass('active');  
600		$('.top_nav_sub').fadeOut('400');
601		$('.top_nav_sub.'+box).fadeOut('slow');
602            
603              
604	});
605}	
606
607	
608/*------------------------------ LightBox -------------------------------------- */ 
609
610function codelessLightBoxInit(){
611	"use strict";
612	$(".lightbox-gallery").fancybox();
613	$('.show_review_form').fancybox();
614	$('.lightbox-media').fancybox({
615		openEffect  : 'none',
616		closeEffect : 'none',
617		helpers : {
618			media : {}
619		}
620	});
621}
622
623
624/*------------------------------ Tweeter Footer Carousel ------------------------ */ 
625
626function twitterFooterCarousel(){
627	"use strict";
628	$("#tweet_footer").each(function(){
629		var $self = $(this);
630		$self.carouFredSel({
631			circular : true,
632			infinite : true,
633			auto : false,
634			scroll : {
635				items : 1,
636				fx : "fade"
637			},
638			prev : {
639				button : $self.parent().parent().find('.back')
640			},
641
642			next : {
643				button : $self.parent().parent().find('.next')
644			}
645	
646		});
647	});
648}
649
650
651/*------------------------------ Blog Carousel ------------------------ */ 
652
653function codelessBlogCarousel(){
654	"use strict";
655	$(".carousel_blog").each(function(){
656	    var $self = $(this);
657	    if( $('li img', $self).size() ) {
658	  		$('li img', $self).one("load", function(){
659		       	$self.carouFredSel( {		
660					circular: true,
661					infinite: true,
662					auto 	: false,
663
664					scroll  : {
665			        	items : 1
666			        },
667
668					prev : {
669						button : $self.parents('.latest_blog').find('.prev')
670					},
671
672					next : {
673						button : $self.parents('.latest_blog').find('.next')
674					}
675			
676				});
677			}).each(function() {
678	  		    if(this.complete) $(this).trigger("load");
679	  		});
680		}else{
681			$self.carouFredSel( {		
682				circular: true,
683				infinite: true,
684				auto 	: false,
685
686				scroll  : {
687			        items : 1
688			    },
689
690				prev : {
691					button : $self.parents('.latest_blog').find('.prev')
692				},
693
694				next : {
695					button : $self.parents('.latest_blog').find('.next')
696				}
697			
698			});
699		}  	         
700	});		
701}
702
703     
704/*------------------------------ Clients Carousel ------------------------ */ 
705
706function clientsCarousel(){
707	"use strict";
708
709	var $self = $('.clients_caro');
710	if($self.length){
711		$self.css('display', 'none');
712		$self.imagesLoaded(function(){
713			$self.css('display', 'block');
714			$self.carouFredSel( 
715			{
716						items:4,
717						auto: false, 
718						scroll: { items : 1 },
719						prev : {
720							button : $self.parents('.clients_el').first().find('.prev')
721						},
722
723						next : {
724							button : $self.parents('.clients_el').first().find('.next')
725						}
726			});
727		})
728	}
729	
730	
731
732}
733
734
735/*------------------------------ Testimonials Carousel ------------------------ */ 
736    	
737function testimonialsCarousel(){
738	"use strict";
739	$('.testimonial_carousel').each(function(){
740		var $self = $(this);
741		var c_duration = $self.data('duration');
742		if(c_duration == 'undefined')
743			c_duration = 500;
744		$(this).carouFredSel({
745						
746			auto: true,
747			scroll: { items : 1, fx: 'fade', duration: c_duration },
748			prev : {
749				button : $self.parent('.testimonial_carousel_element').find('.prev')
750			},
751
752			next : {
753				button : $self.parent('.testimonial_carousel_element').find('.next')
754			}
755
756		});
757		var max_height = 0;
758		$('.item', $self).each(function(){
759			if($(this).height() > max_height)
760				max_height = $(this).height();
761		});
762
763		$self.parents('.testimonial_carousel_element').first().height(max_height+'px');
764
765	});
766
767
768}
769
770/* ---------------------------- Testimonial Cycle ----------------------------- */
771
772function testimonialsCycle(){
773	"use strict";
774
775	$('.testimonial_cycle').each(function(){
776		var $self = $(this);
777		var container_width = $self.parents('.wpb_wrapper').first().width();
778		$('.item', $self).width(container_width+'px');
779
780		$self.carouFredSel({
781						
782			auto: true,
783			scroll: { items : 1, fx: 'fade' },
784
785		});
786
787	});
788}
789
790
791/*------------------------------ Flexslider Init ------------------------ */ 
792function flexsliderInit(){
793	"use strict";
794	$('.flexslider').each(function(){ 
795		var $s = $(this);
796		$s.flexslider({
797			slideshowSpeed: 6000,
798			animationSpeed: 800,
799                     
800			controlNav: true,
801			pauseOnAction: true,
802			pauseOnHover: false,
803			start: function(slider) {
804
805				$s.find(" .slides > li .flex-caption").each(function(){
806					var effect_in = $(this).attr("data-effect-in");
807					var effect_out = $(this).attr("data-effect-out");
808					$(this).addClass("animated " + effect_in);
809					
810
811				});
812			},
813			before: function(slider) {
814				var current_slide = $s.find(".slides > li").eq(slider.currentSlide);
815				$s.find(".slides > li .flex-caption").removeClass('animated');				
816				$(".flex-caption", current_slide).each(function(){
817					var effect_in = $(this).attr("data-effect-in");
818					var effect_out = $(this).attr("data-effect-out");
819
820					$(this).removeClass("animated "+effect_in).addClass("animated " + effect_out);
821				});
822			},
823			after: function(slider) {
824				var current_slide = $s.find(".slides > li").eq(slider.currentSlide);
825				$s.find(".slides > li .flex-caption").removeClass('animated');				
826				$(".flex-caption", current_slide).each(function(){
827					var effect_in = $(this).attr("data-effect-in");
828					var effect_out = $(this).attr("data-effect-out");
829
830					$(this).removeClass("animated "+effect_out).addClass("animated " + effect_in);
831				});
832			}		
833		});
834	});
835}
836
837
838/*------------------------------ Portfolio Page Isotope filter ------------------------ */ 
839
840function codelessPortfolioPageIsotope(){
841	"use strict";
842	if($('#portfolio-preview-items .filterable').length > 0){
843		var $container = $('#portfolio-preview-items .filterable');
844		$container.imagesLoaded(function(){
845			var state = $container.mixItUp();
846		});
847	}
848
849	if($('.masonry').length > 0){
850		$container = $('.masonry');
851		imagesLoaded( $container, function() {
852				
853				msnry_portfolio = new Masonry( '.masonry', {
854					"columnWidth": ".grid-size",
855	  				itemSelector: '.portfolio-item'
856				});
857
858				$('#portfolio-filter li a').click(function(){
859					var filter = $(this).data('filter');
860					if(filter != 'all'){
861
862						msnry_portfolio.destroy();
863
864						$container.mixItUp();
865						$container.removeClass('masonry').addClass('filterable');
866						
867						$container.mixItUp('filter', filter); 
868						
869					}else{
870						$container.removeClass('filterable').addClass('masonry');
871						$container.mixItUp('destroy', false);
872						$('#portfolio-filter li').removeClass('active');
873						$('#portfolio-filter li a').removeClass('active');
874						$(this).addClass('active');
875						$(this).parent().addClass('active');
876						msnry_portfolio = new Masonry( '.masonry', {
877							"columnWidth": ".grid-size",
878			  				itemSelector: '.portfolio-item'
879						});
880					}
881					
882				});
883				
884		
885		});
886		
887	}
888	
889}
890	
891    
892/*------------------------------ FAQ Isotope filter ------------------------ */ 
893
894function codelessFaqFilter(){
895	"use strict";
896	$('nav#faq-filter li a').click(function(e){
897		e.preventDefault();
898
899		var selector = $(this).attr('data-filter');
900
901		$('.faq .accordion-group').fadeOut();
902		$('.faq .accordion-group'+selector).fadeIn();
903
904		$(this).parents('ul').find('li').removeClass('active');
905		$(this).parent().addClass('active');
906	});
907}	
908
909
910/*------------------------------ Staff Carousel ------------------------------ */ 
911
912function codelessStaffCarousel(){
913	"use strict";
914	if($('.staff_slider').length > 0){
915
916		$('.staff_slider').parents('.span_12').first().css('display', 'block');
917	  
918	    var slide_per_view = $('.staff_slider').data('slidenr');
919
920
921		if ($window_width >= 979 && $window_width < 1100 ){
922			slide_per_view = 3;
923		}else if ($window_width >= 421 && $window_width < 768 ){ 
924			slide_per_view = 2;
925		}else if ($window_width <= 420){
926			slide_per_view = 1;
927		}else if ($window_width >= 768 && $window_width < 979 ){
928			slide_per_view = 2;
929		}else if($window_width > 1100){
930			slide_per_view = $('.staff_slider').data('slidenr');
931		} 
932
933	  
934	  var staff_slider = new Swiper('.staff_slider',{
935	    slidesPerView: slide_per_view, 
936	    paginationAsRange: false,
937	  });
938	  var $pag_wrapper = $('.staff_carousel').parents('.wpb_row').first().prev();
939	  if($('.staff_carousel').length > 0){
940	  		if($('.staff_carousel .swiper_pagination').length > 0){
941	  			$pag_wrapper.find('.wpb_wrapper .block_title').append( '<div class="swiper_pagination nav-fillpath">' + $('.staff_carousel .swiper_pagination').html() + '</div>' );
942	  			$('.staff_carousel .swiper_pagination').remove();
943	  		}
944	  		
945
946	  		var height = $('.staff_carousel .single_staff').height();
947	  		$('.staff_carousel .swiper-wrapper').css({height: height+'px'});
948	  }
949	  
950	  if($pag_wrapper.find('.swiper_pagination').length > 0){
951		  $('.swiper_pagination .next', $pag_wrapper ).on('click', function(e){
952		  		e.preventDefault();
953		  		staff_slider.swipeNext();
954		  });
955
956		  $('.swiper_pagination .prev', $pag_wrapper).on('click', function(e){
957		  		e.preventDefault();
958		  		staff_slider.swipePrev();
959		  });
960	  }
961
962	  $(window).resize(function(){
963	  	$window_width = $(window).width();
964	  	if ($window_width >= 979 && $window_width < 1100 ){
965			slide_per_view = 3;
966		}else if ($window_width >= 421 && $window_width < 768 ){ 
967			slide_per_view = 2;
968		}else if ($window_width <= 420){
969			slide_per_view = 1;
970		}else if ($window_width >= 768 && $window_width < 979 ){
971			slide_per_view = 2;
972		}else if($window_width > 1100){
973			slide_per_view = $('.staff_slider').data('slidenr');
974		} 
975
976		var staff_slider = new Swiper('.staff_slider',{
977		    slidesPerView: slide_per_view, 
978		    paginationAsRange: false,
979		});
980		var height = $('.staff_carousel .single_staff').height();
981	  	$('.staff_carousel .swiper-wrapper').css({height: height+'px'});
982	  });
983	  
984	}
985}
986
987
988/*------------------------------ Portfolio Carousel ------------------------------ */ 
989
990function codelessPortfolioCarousel(){
991	"use strict";
992	if($('.portfolio_slider').length > 0){
993	  
994	    var slide_per_view = $('.portfolio_slider').data('slidenr');
995
996		if ($(".container").css("max-width") == "940px" ){
997			slide_per_view = 4;
998		}else if ($(".container").css("max-width") == "420px" ){
999			slide_per_view = 1;
1000		}else if ($(".container").css("width") == "724px" ){
1001			slide_per_view = 2;
1002		}else if ($(".container").css("max-width") == "300px" ){
1003			slide_per_view = 1;
1004		} 
1005	  
1006	  var portfolio_slider = new Swiper('.portfolio_slider',{ 
1007	    slidesPerView: slide_per_view, 
1008	    paginationAsRange: false, 
1009	  });
1010	  var $pag_wrapper = $('.recent_portfolio').parents('.wpb_row').first().prev();
1011	  if($('.portfolio_slider').length > 0){
1012	  		$pag_wrapper.find('.wpb_wrapper .block_title').append( '<div class="swiper_pagination nav-fillpath">' + $('.recent_portfolio .swiper_pagination').html() + '</div>' );
1013	  		$('.recent_portfolio .swiper_pagination').remove();
1014
1015	  		
1016	  		if( $('.recent_portfolio .portfolio-item img').size() ) {
1017				
1018				$('.recent_portfolio .portfolio-item img').one("load", function(){
1019					var height = $(this).parents('.portfolio-item').first().height();
1020					$('.portfolio_slider .swiper-wrapper').css({height: height+'px'});  
1021				});
1022			}
1023	  		
1024	  }
1025	  
1026
1027	  $('.swiper_pagination .next', $pag_wrapper ).live('click', function(e){ 
1028	  		e.preventDefault();
1029	  		portfolio_slider.swipeNext();
1030	  });
1031
1032	  $('.swiper_pagination .prev', $pag_wrapper).live('click', function(e){
1033	  		e.preventDefault();
1034	  		portfolio_slider.swipePrev();
1035	  });
1036	  
1037	}
1038}
1039
1040
1041/*------------------------------ Portfolio Carousel ------------------------------ */ 
1042
1043function codelessLatestBlogCarousel(){
1044	"use strict";
1045	if($('.blog_slider').length > 0){
1046	  
1047	    var slide_per_view = $('.blog_slider').data('slidenr');
1048
1049		if ($(".container").css("max-width") == "940px" ){
1050			slide_per_view = 4;
1051		}else if ($(".container").css("max-width") == "420px" ){
1052			slide_per_view = 1;
1053		}else if ($(".container").css("width") == "724px" ){
1054			slide_per_view = 2;
1055		}else if ($(".container").css("max-width") == "300px" ){
1056			slide_per_view = 1;
1057		} 
1058	  
1059	  var blog_slider = new Swiper('.blog_slider',{ 
1060	    slidesPerView: slide_per_view, 
1061	    paginationAsRange: false, 
1062	  });
1063	  var $pag_wrapper = $('.latest_blog').parents('.wpb_row').first().prev();
1064	  if($('.blog_slider').length > 0){
1065	  		$pag_wrapper.find('.wpb_wrapper .block_title').append( '<div class="swiper_pagination nav-fillpath">' + $('.latest_blog .swiper_pagination').html() + '</div>' );
1066	  		$('.latest_blog .swiper_pagination').remove();
1067	  }
1068	  
1069
1070	  $('.swiper_pagination .next', $pag_wrapper ).live('click', function(e){ 
1071	  		e.preventDefault();
1072	  		portfolio_slider.swipeNext();
1073	  });
1074
1075	  $('.swiper_pagination .prev', $pag_wrapper).live('click', function(e){
1076	  		e.preventDefault();
1077	  		portfolio_slider.swipePrev();
1078	  });
1079	  
1080	}
1081}
1082	
1083
1084/*------------------------------ Codeless Slider ------------------------------ */ 
1085
1086$.fn.codelessSliderInit = function () {
1087    "use strict";
1088    var slider = this;
1089    var parent = this.parents('.codeless_slider_swiper').first();
1090    var slide_per_view = slider.data('slidenumber');
1091	var height = slider.data('height');
1092
1093	if(height == 'fullscreen')
1094		height = $(window).height();
1095
1096	var $loading = $('.loading', parent);
1097
1098	if($('body').hasClass('header_7')  && $(window).width() > 970 && $('.codeless_slider_wrapper', parent).css('position') == 'fixed' ){
1099		var pad = $('.header_wrapper').innerWidth();
1100		var pos = 'left'
1101		if($('.pos--right').length > 0)
1102			pos = 'right'
1103		$('.codeless_slider_wrapper', parent).css('padding-'+pos, pad+'px');
1104		$('.codeless_slider_wrapper', parent).width( $('#slider-fullwidth').width() +'px' );
1105	}
1106
1107
1108
1109	parent.height(height+'px');
1110	slider.height(height+'px');
1111	$('.codeless_slider_wrapper', parent).css('min-height', height+'px');
1112	parent.css('min-height', height+'px');
1113
1114/* ----uncomment this if you want a min height for slider on responsive */
1115/*
1116	if($(window).width() < 767){
1117		var window_width = $(window).width();
1118		var new_height = (window_width * height) / 767;
1119		$('.codeless_slider_wrapper', parent).css('min-height', new_height+'px');
1120		parent.css('min-height', new_height+'px');
1121
1122		parent.height(new_height+'px');
1123		slider.height(new_height+'px');
1124	}
1125	*/
1126
1127	$('.codeless_slider').imagesLoaded(function(){
1128		$loading.css('display', 'none');
1129		var c_speed = $('.codeless_slider').data('speed');
1130		if(c_speed == 'undefined')
1131			c_speed = 800;
1132		codelessSlider = new Swiper('.codeless_slider',{ 
1133			slidesPerView: slide_per_view,
1134			paginationAsRange: false,
1135			loop: false,
1136			touchRatio: 0.7,
1137			autoplay: 5000,
1138			speed: c_speed,
1139			noSwiping: true,
1140			updateOnImagesReady:true,
1141			onSwiperCreated: function(swiper){
1142			   	var $h1 = $(swiper.activeSlide()).find('h1');
1143			   	var $p =  $(swiper.activeSlide()).find('p');
1144			   	var $buttons =  $(swiper.activeSlide()).find('.buttons');
1145			   	var slide_color = $(swiper.activeSlide()).data('color');
1146			   	$h1.removeClass('with_animation').addClass($h1.data('animation'));
1147			    $p.removeClass('with_animation').addClass($p.data('animation'));
1148			    $buttons.removeClass('with_animation').addClass($buttons.data('animation'));
1149			    if( $('.header_wrapper').hasClass('header_1'))
1150			    	$('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color);
1151			},
1152			onSlideChangeEnd: function(swiper){
1153			    var $h1 = $(swiper.activeSlide()).find('h1');
1154			    var $p =  $(swiper.activeSlide()).find('p');
1155			    var $buttons =  $(swiper.activeSlide()).find('.buttons');
1156			    var slide_color = $(swiper.activeSlide()).data('color');
1157			    $h1.removeClass('with_animation').addClass($h1.data('animation'));
1158			    $p.removeClass('with_animation').addClass($p.data('animation'));
1159			    $buttons.removeClass('with_animation').addClass($buttons.data('animation'));
1160
1161
1162			    $h1 = $(swiper.activeSlide()).next().find('h1');
1163			    $p =  $(swiper.activeSlide()).next().find('p');
1164			    $buttons =  $(swiper.activeSlide()).next().find('.buttons');
1165			    $h1.addClass('with_animation').removeClass($h1.data('animation'));
1166			    $p.addClass('with_animation').removeClass($p.data('animation'));
1167			    $buttons.addClass('with_animation').removeClass($buttons.data('animation'));
1168
1169			    $h1 = $(swiper.activeSlide()).prev().find('h1');
1170			    $p =  $(swiper.activeSlide()).prev().find('p');
1171			    $buttons =  $(swiper.activeSlide()).prev().find('.buttons');
1172			    $h1.addClass('with_animation').removeClass($h1.data('animation'));
1173			    $p.addClass('with_animation').removeClass($p.data('animation'));
1174			    $buttons.addClass('with_animation').removeClass($buttons.data('animation'));
1175			    if( $('.header_wrapper').hasClass('header_1') && !$('.header_wrapper').hasClass('open'))
1176			    	$('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color);
1177			},
1178			onSlideChangeStart: function(swiper){
1179			    var $h1 = $(swiper.activeSlide()).find('h1');
1180			    var $p =  $(swiper.activeSlide()).find('p');
1181			    var $buttons =  $(swiper.activeSlide()).find('.buttons');
1182			    var slide_color = $(swiper.activeSlide()).data('color');
1183			    $h1.addClass('with_animation').removeClass($h1.data('animation'));
1184			    $p.addClass('with_animation').removeClass($p.data('animation'));
1185			    $buttons.addClass('with_animation').removeClass($buttons.data('animation'));
1186			    if( $('.header_wrapper').hasClass('header_1') && !$('.header_wrapper').hasClass('open'))
1187			    	$('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color);
1188			}
1189		});
1190
1191		$('.nav-slider .next', parent ).live('click', function(e){ 
1192	  		e.preventDefault();
1193	  		codelessSlider.swipeNext();
1194		});
1195
1196		$('.nav-slider .prev', parent).live('click', function(e){
1197		  		e.preventDefault();
1198		  		codelessSlider.swipePrev();
1199		});
1200	});
1201
1202	
1203
1204	if(parent.hasClass('parallax_slider') && $('.container').width() > 724 && $window_width != 1024 && ($.browserSelector() && !$("html").hasClass("safari")) ){
1205		var skrollr_slider = skrollr.init({
1206            edgeStrategy: 'set', 
1207            smoothScrolling: true, 
1208            forceHeight: false
1209        }); 
1210        skrollr_slider.refresh()
1211	}
1212
1213	if($("html").hasClass("safari")){
1214		$('.codeless_slider_wrapper', parent).css('-webkit-perspective', 'none').css('-webkit-transform', 'none');
1215	}
1216	
1217
1218	if($('.swiper-slide', slider).length == 1)
1219		$('.nav-slider', parent).hide();
1220
1221	$(window).resize(function(){
1222		if($('body').hasClass('header_7') && $(window).width() > 970 ){
1223			var pad = $('.header_wrapper').innerWidth();
1224			var pos = 'left'
1225			if($('.pos--right').length > 0)
1226				pos = 'right'
1227			$('.codeless_slider_wrapper', parent).css('padding-'+pos, pad+'px');
1228			$('.codeless_slider_wrapper', parent).width( $('#slider-fullwidth').width() +'px' );
1229		}else{ 
1230			var pos = 'left'
1231			if($('.pos--right').length > 0)
1232				pos = 'right'
1233			$('.codeless_slider_wrapper', parent).css('padding-'+pos, 0+'px');
1234			$('.codeless_slider_wrapper', parent).width( $('#slider-fullwidth').width() +'px' );
1235		}
1236
1237		height = slider.data('height');
1238
1239		if(height == 'fullscreen'){
1240			height = $(window).height();
1241			$('.codeless_slider_wrapper', parent).css('min-height', height+'px');
1242			parent.css('min-height', height+'px');
1243		}
1244		parent.height(height+'px');
1245		slider.height(height+'px');
1246
1247		if($(window).width() < 767){
1248			var window_width = $(window).width();
1249			var new_height = (window_width * height) / 767;
1250			$('.codeless_slider_wrapper', parent).css('min-height', new_height+'px');
1251			parent.css('min-height', new_height+'px');
1252
1253			parent.height(new_height+'px');
1254			slider.height(new_height+'px');
1255		}
1256
1257	});  
1258	
1259
1260};
1261
1262
1263/*------------------------------ Woocommerce Functions ------------------------------ */ 
1264	
1265function codelessWoocommerceInit(){
1266	"use strict";
1267	if($('.add_to_cart_button').length > 0){
1268		
1269		$('body').on('adding_to_cart', function(event, param1, param2){
1270			var $thisbutton = param1;
1271			var $product = $thisbutton.parents('.product').first();
1272			var $load = $product.find('.loading_ef');
1273			$load.css('opacity', 1);
1274			$('body').on('added_to_cart', function(event, param1, param2){
1275				
1276				$load.css('opacity', 0);
1277				
1278				setTimeout(function(){$load.html('<i class="moon-checkmark"></i>'); $load.css('opacity', 1);}, 500);
1279				setTimeout(function(){$load.css('opacity', 1);}, 400);
1280				setTimeout(function(){$load.css('opacity', 0);}, 2000);
1281				$product.addClass('product_added_to_cart');
1282			});
1283		});
1284	}
1285}
1286
1287
1288/*------------------------------ Left Navigation ------------------------------ */ 
1289
1290function codelessLeftNavtion(){
1291	"use strict";
1292	$(".page_item_has_children").each(function(){
1293    	$(this).click(function(){
1294	        $(this).find('.children').toggle(400);
1295	        $(this).toggleClass('open-child');
1296       
1297    	});
1298  	});
1299
1300   $('li.current_page_item').parents('.children').css({ display: 'block' });
1301   $('.current_page_ancestor').addClass('open-child');
1302}
1303    
1304
1305/*------------------------------ Mobile Menu ---------------------------- */ 
1306
1307function codelessMobileMenu(){
1308	"use strict";
1309	var height = $('header#header .row-fluid:first-child .span12, .header_wrapper').height();
1310	var padding = $('.top_wrapper').css('padding-top');
1311
1312	$('.mobile_small_menu').click(function(){
1313		
1314		if($(this).hasClass('open')){
1315			$('.header_wrapper').height('auto');
1316			$('header#header .row-fluid:first-child .span12').css('position', 'relative');
1317
1318			$('header#header .row-fluid:first-child .span12').height(height);
1319			$('.menu-small').slideDown(400);
1320			if(!$('body').hasClass('header_3')) 
1321				$('.top_wrapper').css('float', 'none').css('width', 'inherit').css('display', 'block');
1322
1323			if($('body').hasClass('header_4'))
1324				$('.top_wrapper').css('padding-top', '0'); 
1325			$('.tparrows').hide();
1326			
1327			$(this).removeClass('open').addClass('close');
1328		}else if($(this).hasClass('close')){
1329
1330			$('.menu-small').slideUp(400);
1331			$('.tparrows').show();
1332			if(!$('body').hasClass('header_3'))
1333				$('.top_wrapper').css('float', 'none').css('width', 'inherit').css('display', 'block');
1334
1335			if($('body').hasClass('header_4'))
1336				$('.top_wrapper').css('padding-top', padding);
1337			$(this).removeClass('close').addClass('open'); 
1338			$('.header_wrapper').height('auto');
1339		}
1340	});
1341
1342	$('#mobile-menu li').each(function(){
1343		var id = $(this).attr('id');
1344		$(this).attr('id', 'responsive-'+id);
1345	});
1346
1347	$(window).resize(function(){
1348		var height = $('header#header .row-fluid:first-child .span12, .header_wrapper').height();
1349		var padding = $('.top_wrapper').css('padding-top');
1350		if($(window).width() > 980){
1351			$('.header_7 .header_wrapper').height('100%');
1352			$('.menu-small').slideUp(400);
1353			$('.tparrows').show();
1354			if(!$('body').hasClass('header_3'))
1355				$('.top_wrapper').css('float', 'none').css('width', 'inherit').css('display', 'block');
1356
1357			if($('body').hasClass('header_4'))
1358				$('.top_wrapper').css('padding-top', padding);
1359			$('.mobile_small_menu').removeClass('close').addClass('open'); 
1360			$('.header_wrapper').height('auto');
1361		}
1362	});
1363}
1364	
1365
1366
1367
1368/*-------------------------------------------------------------------------------------------------------------*/
1369/*------------------------------------------ FUNCTIONS END ----------------------------------------------------*/
1370/*-------------------------------------------------------------------------------------------------------------*/
1371
1372
1373
1374    
1375      
1376/*------------------------------ Switcher Toggle Button ------------------------ */ 
1377    
1378function codelessSwitcherToggle(){
1379	"use strict";
1380	$("#switcher-head .button").toggle(function(){
1381		$("#style-switcher").animate({
1382			left: 0
1383		}, 500);
1384	}, function(){
1385		$("#style-switcher").animate({
1386			left: -263
1387		}, 500);
1388	});
1389}  
1390
1391
1392/* ----------------------------- SmoothScroll ---------------------------- */
1393
1394function codeless_smoothScroll(){
1395	"use strict";
1396	try {
1397		$.browserSelector();
1398		if($("html").hasClass("chrome")) {
1399			$.smoothScroll();
1400		}
1401	} catch(err) {
1402
1403	}
1404}
1405
1406/* ----------------------------- End SmoothScroll ------------------------ */
1407
1408
1409/* ----------------------------- BLOG Masonry ---------------------------- */
1410
1411function codeless_blogmasonry(){
1412	"use strict";
1413	var container = $('#blogmasonry .filterable');
1414		container.imagesLoaded(function(){
1415
1416				msnry_blog = new Masonry( '#blogmasonry .filterable', {
1417					"columnWidth": ".grid-size", 
1418	  				itemSelector: '.blog-article'
1419				});
1420				
1421			});
1422}
1423
1424/* ----------------------------- End BLOG Masonry ------------------------ */
1425
1426
1427/* ----------------------------- Codeless Post Share --------------------- */
1428function codelessPostShares(){
1429	"use strict";
1430	$('.blog-article .share_link').each(function(){
1431		var link = $(this);
1432		link.live('click',function(){
1433			var cont = $(this).parents('.blog-article').find('.shares');
1434			var parent = $(this).parents('.blog-article').parent();
1435			if(link.hasClass('opened')){
1436				cont.css('opacity', 0).css('visibility', 'hidden');
1437				link.removeClass('opened');
1438			}else{
1439				parent.find('.share_link').removeClass('opened');
1440				parent.find('.shares').css('opacity', 0).css('visibility', 'hidden');
1441				link.addClass('opened');
1442				cont.css('visibility', 'visible').css('opacity', 1);
1443				
1444			}
1445		});
1446
1447	});
1448	
1449}
1450/* ----------------------------- End Codeless Post Share ----------------- */
1451
1452
1453/* ----------------------------- Background Check ------------------------ */
1454
1455function codeless_backgroundcheck(){
1456	"use strict";
1457	if($('.header_1').length > 0 || $('.header_4').length > 0){
1458		if($('.page_header_centered').length > 0 && $('.auto_color_check').length > 0){
1459			$('.header_wrapper').addClass('background--dark');
1460			BackgroundCheck.init({
1461				targets: '.header_wrapper',
1462				images: '.header_page',
1463				classes: { dark: 'background--dark', light: 'background--light', complex: 'background--dark' }
1464			});
1465			setTimeout(function(){ BackgroundCheck.refresh(); }, 400);
1466		}
1467
1468		if($('#fullpage').length > 0 && $('.auto_color_check').length > 0){
1469			$('.header_wrapper').addClass('background--dark');
1470			BackgroundCheck.init({
1471				targets: '.header_wrapper', 
1472				images: '.section'
1473			});
1474			setTimeout(function(){
1475				if($('.header_wrapper').hasClass('background--light'))
1476					$('.section:first-child .content').addClass('background--light');
1477				else if($('.header_wrapper').hasClass('background--dark'))
1478					$('.section:first-child .content').addClass('background--dark');
1479			}, 800);
1480		}
1481
1482		if($('.fullscreen-single').length > 0 && $('.auto_color_check').length > 0){
1483			$('.header_wrapper').addClass('background--dark');
1484			var ca = Array.prototype.slice.call(document.querySelectorAll(".header_wrapper")).concat(Array.prototype.slice.call(document.querySelectorAll(".fullscreen-single")));
1485			BackgroundCheck.init({
1486				targets: ca, 
1487				images: '.header_fullscreen_single img',
1488				windowEvents: false
1489			});
1490		}
1491			
1492			 		
1493	}
1494} 
1495
1496/* ----------------------------- End Background Check -------------------- */
1497
1498/* ----------------------------- Fullscreen Section ---------------------- */
1499
1500function codeless_fullscreen_section(){
1501	"use strict";
1502	if($('.fullscreen-blog-article').length > 0){
1503		$('#fullpage .section .content').each(function(){
1504			var height = $(this).height();
1505			$(this).css('margin-top', '-'+(height/2)+'px' );	
1506		});
1507	}
1508	
1509	$('#fullpage').fullpage({
1510		verticalCentered: false,
1511		navigation: true,
1512		navigationPosition: 'right',
1513		resize: false,
1514		afterLoad: function(anchorLink, index){
1515			if($('.auto_color_check').length > 0){
1516				BackgroundCheck.refresh();
1517				if($('.header_wrapper').hasClass('background--light'))
1518					$('.section:nth-child('+index+') .content').addClass('background--light');
1519				else if($('.header_wrapper').hasClass('background--dark'))
1520					$('.section:nth-child('+index+') .content').addClass('background--dark');
1521			}
1522			$('#fullpage .section .with_animation').animate_on_appear();
1523			
1524
1525
1526        },
1527        afterRender: function(){
1528        	$('#fullpage .section .with_animation').animate_on_appear();
1529        }
1530        /*onLeave: function(index, nextIndex){
1531            var current = $('#fullpage .section:nth-child('+index+') .content') ;
1532            var next = $('#fullpage .section:nth-child('+nextIndex+') .content');
1533            current.removeClass('with_animation').removeClass(current.data('animation'));
1534            next.addClass('with_animation').delay(current.data('delay')).queue( function() {
1535            	$(this).addClass(current.data('animation'));
1536            });
1537        }*/
1538
1539	});	
1540}
1541
1542/* ----------------------------- End Fullscreen Section ------------------- */
1543
1544/* ----------------------------- SINGLE PORTFOLIO FLOATING----------------- */
1545
1546function codeless_single_portfolio_floating(){
1547	"use strict";
1548	var $sidebar   = $(".fixed_sidebar"), 
1549        $window    = $(window),
1550        offset     = $sidebar.offset(),
1551        topPadding = 15;
1552
1553    if( $('.container').width() > 420 && $sidebar.length > 0){
1554    	$window.scroll(function() {
1555	        if ($window.scrollTop() > offset.top) {
1556	            $sidebar.stop().animate({
1557	                marginTop: $window.scrollTop() - offset.top + topPadding
1558	            });
1559	        } else {
1560	            $sidebar.stop().animate({
1561	                marginTop: 0
1562	            });
1563	        }
1564	    });
1565    }else{
1566    	$(window).unbind('scroll');
1567    }
1568}
1569
1570
1571/* ----------------------------- END SINGLE PORTFOLIO FLOATING------------ */
1572
1573/* ----------------------------- Custom Select --------------------------- */
1574
1575function codelessCustomSelect(){
1576	"use strict";
1577	$('.woocommerce-ordering .orderby').select2();
1578}
1579
1580/* ----------------------------- End Custom Select ----------------------- */
1581
1582/* ----------------------------- Codeless gallery carousel --------------- */
1583
1584function codelessGalleryCarouselInit(){
1585	"use strict";
1586	var gallery = $('.codeless_gallery_carousel');
1587	
1588	var slider = gallery.find('.codeless_swiper_gallery');
1589	slider.hide();
1590	if(gallery.length > 0){
1591		
1592		var height = gallery.data('height');
1593
1594		if(height == 'fullscreen')
1595			height = $(window).height();
1596
1597		var $loading = $('.loading', gallery);
1598
1599		gallery.height(height+'px');
1600		slider.height(height+'px');
1601
1602		$('.codeless_swiper_gallery').imagesLoaded(function(){
1603			$loading.css('display', 'none');
1604			var centered = false;
1605			var VslidesPerView = 'auto';
1606			if($('.codeless_gallery_carousel').hasClass('simple'))
1607				centered = false;
1608			else{
1609				centered = true;
1610			}
1611			
1612			if($(window).width() > 979){
1613				codelessSlider = new Swiper('.codeless_swiper_gallery',{ 
1614						slidesPerView:'auto',
1615						paginationAsRange: false,
1616						loop: centered,
1617						initialSlide:-1,
1618						centeredSlides: centered, 
1619						touchRatio: 0.7,
1620						autoplay: 5000, 
1621						speed: 800,
1622						noSwiping: true,
1623						updateOnImagesReady:true
1624					});
1625				
1626				
1627			}else{
1628
1629				codelessSlider = new Swiper('.codeless_swiper_gallery',{ 
1630					slidesPerView:1,
1631					paginationAsRange: false,
1632					touchRatio: 0.7,
1633					autoplay: 5000, 
1634					speed: 800,
1635					noSwiping: true,
1636					updateOnImagesReady:true
1637				});
1638
1639				gallery.addClass('mobile_gallery');
1640				
1641			}
1642
1643			slider.fadeIn('slow');
1644				$('.nav-slider .next', gallery ).live('click', function(e){ 
1645			  		e.preventDefault();
1646			  		codelessSlider.swipeNext();
1647				});
1648
1649				$('.nav-slider .prev', gallery).live('click', function(e){
1650				  	e.preventDefault();
1651				  	codelessSlider.swipePrev();
1652				});
1653			codelessSlider.resizeFix();
1654				
1655
1656		});
1657
1658		if($('.swiper-slide', slider).length == 1)
1659			$('.nav-slider', gallery).hide();
1660
1661		$(window).resize(function(){
1662
1663			if($('body').hasClass('header_7') && $(window).width() > 970 ){
1664				var pad = $('.header_wrapper').innerWidth();
1665				var pos = 'left'
1666				if($('.pos--right').length > 0)
1667					pos = 'right'
1668				$('.codeless_slider_wrapper', gallery).css('padding-'+pos, pad+'px');
1669				$('.codeless_slider_wrapper', gallery).width( $('#slider-fullwidth').width() +'px' );
1670			}else{ 
1671				var pos = 'left'
1672				if($('.pos--right').length > 0)
1673					pos = 'right'
1674				$('.codeless_slider_wrapper', gallery).css('padding-'+pos, 0+'px');
1675				$('.codeless_slider_wrapper', gallery).width( $('#slider-fullwidth').width() +'px' );
1676				
1677			}
1678
1679			if($(window).width() < 970){
1680				codelessSlider = new Swiper('.codeless_swiper_gallery',{ 
1681					slidesPerView:1,
1682					paginationAsRange: false,
1683					touchRatio: 0.7,
1684					autoplay: 5000, 
1685					speed: 800,
1686					noSwiping: true,
1687					updateOnImagesReady:true
1688				});
1689
1690				gallery.addClass('mobile_gallery');
1691			}
1692		});
1693
1694
1695
1696	}
1697}
1698
1699/* ----------------------------- End Codeless gallery carousel ----------- */
1700
1701
1702
1703/* ----------------------------- Tabs ------------------------------------ */
1704
1705function codelessTabsactive(){
1706	"use strict";
1707	if($('.tabbable').length > 0){
1708		$('.tabbable').each(function(){
1709			var id = $(this).find('.nav-tabs li.active a').attr('href');
1710			$(this).find(id).addClass('active');
1711		});
1712	}
1713}
1714
1715/* ----------------------------- End Tabs -------------------------------- */
1716
1717/* ----------------------------- Buttons Style --------------------------- */
1718
1719function codelessOverallButton(){
1720	"use strict";
1721	var extra = codeless_global.button_style;
1722
1723	if($('.wpcf7-form p input[type="submit"]').length > 0){
1724		$('.wpcf7-form p input[type="submit"]').addClass('btn-bt').addClass(extra);
1725	}
1726	if($('#respond input[type="submit"]').length > 0){
1727		$('#respond input[type="submit"]').addClass('btn-bt').addClass(extra);
1728	}
1729
1730	if($('.woocommerce .button, #woocommerce .button').length > 0){
1731		$('.woocommerce .button, #woocommerce .button').addClass('btn-bt').addClass(extra);
1732	}
1733
1734	if($('.not_found .search_field').length > 0){
1735		$('.not_found .search_field button').addClass('btn-bt').addClass(extra);
1736	}
1737
1738	if($('.post-password-form input[type="submit"]').length > 0){
1739		$('.post-password-form input[type="submit"]').addClass('btn-bt').addClass(extra);
1740	}
1741
1742	if($('.mc_signup_submit input').length > 0){
1743		$('.mc_signup_submit input').addClass('btn-bt').addClass(extra);
1744	}
1745
1746	$("body").bind("added_to_cart", function() {
1747		$('.added_to_cart').addClass('btn-bt').addClass(extra);
1748	});
1749}
1750
1751/* ----------------------------- End Buttons Style ----------------------- */
1752
1753/* ----------------------------- Header5 Overlay ------------------------- */
1754
1755	function codelessMenuOverlay(){
1756
1757		var triggerBttn = document.getElementById( 'trigger-overlay' ),
1758			overlay = document.querySelector( 'div.overlay_menu' ),
1759			closeBttn = overlay.querySelector( 'button.overlay-close' );
1760			transEndEventNames = {
1761				'WebkitTransition': 'webkitTransitionEnd',
1762				'MozTransition': 'transitionend',
1763				'OTransition': 'oTransitionEnd',
1764				'msTransition': 'MSTransitionEnd',
1765				'transition': 'transitionend'
1766			},
1767			transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
1768			support = { transitions : Modernizr.csstransitions };
1769
1770			triggerBttn.addEventListener( 'click', toggleOverlay ); 
1771			closeBttn.addEventListener( 'click', toggleOverlay );
1772
1773			function toggleOverlay(){
1774				if( classie.has( overlay, 'open' ) ) {
1775					classie.remove( overlay, 'open' );
1776					classie.add( overlay, 'close' );
1777
1778					var onEndTransitionFn = function( ev ) {
1779						if( support.transitions ) {
1780							if( ev.propertyName !== 'visibility' ) return;
1781							this.removeEventListener( transEndEventName, onEndTransitionFn );
1782						}
1783						classie.remove( overlay, 'close' );
1784					};
1785					if( support.transitions ) {
1786						overlay.addEventListener( transEndEventName, onEndTransitionFn );
1787					}
1788					else {
1789						onEndTransitionFn();
1790					}
1791				}
1792				else if( !classie.has( overlay, 'close' ) ) {
1793					classie.add( overlay, 'open' );
1794				}
1795			}
1796
1797			$('.overlay_menu .menu-item-has-children').hover(function(){
1798
1799				var height = $(this).find('.sub-menu li').height();
1800				height *= $(this).find('.sub-menu li').length;
1801				$(this).find('.sub-menu').height(height+'px');
1802
1803			}, function(){
1804				$(this).find('.sub-menu').height(0);
1805			});
1806
1807
1808	}
1809
1810
1811/* ----------------------------- End Header 5 Overlay -------------------- */
1812
1813
1814/* ----------------------------- Layout Changes -------------------------- */
1815
1816function codelessLayoutChanges(){
1817	"use strict";
1818	var container = $('.container').width();
1819	$('.testimonial_carousel .item').each(function(){
1820
1821		var self = $(this);
1822		var wpb_column = self.parents('.wpb_column').first().width();
1823		self.innerWidth(wpb_column+'px');
1824		self.height(self.height()+'px');
1825		self.parents('.caroufredsel_wrapper').first().height(self.height()+'px');
1826		self.parents('.testimonial_carousel').first().height(self.height()+'px');
1827		
1828	});
1829
1830	$('.clients_caro .item').each(function(){
1831		var self = $(this);
1832		var wpb_column = self.parents('.wpb_column').first().width();
1833		if(container > 420 && container <= 724)
1834			self.innerWidth( (wpb_column/3)+'px');
1835		if(container > 724 && container < 940)
1836			self.innerWidth( (wpb_column/4)+'px');
1837		if(container > 940) 
1838			self.innerWidth( (wpb_column/5)+'px'); 
1839	});
1840
1841	clientsCarousel();
1842}
1843
1844/* ----------------------------- End Layout Changes ---------------------- */
1845
1846
1847/* ----------------------------- One Page -------------------------------- */
1848
1849function codelessOnePage(){
1850	"use strict";
1851	if(window.location.hash) {
1852	  	$('nav .menu li a:not([href="'+window.location+'"])').parent().removeClass('current-menu-item');
1853	} else {
1854	  // Fragment doesn't exist
1855	}
1856	$('nav .menu').onePageNav({
1857	    currentClass: 'current-menu-item',
1858	    changeHash: false,
1859	    scrollSpeed: 750,
1860	    scrollThreshold: 0.5,
1861	});
1862}
1863
1864/* ----------------------------- End One Page ---------------------------- */
1865
1866/* ----------------------------- Sticky Nav ------------------------------ */
1867
1868function codelessStickyNav(){
1869	"use strict";
1870	var opened = false;
1871	var position = $('.header_wrapper').css('position'); 
1872	var bool_test = false;
1873	$('.logo_only_sticky .header_wrapper #logo').css('opacity', 0).css('visibility', 'hidden'); 
1874	$(window).scroll(function(){
1875		var top = $(this).scrollTop(); 
1876
1877		if(top > stickyNavTop + 300 && !opened){
1878			
1879			$('body').addClass('sticky_header'); 
1880
1881			setTimeout(function(){
1882				if($('.header_wrapper').hasClass('background--dark')){
1883					$('.header_wrapper').removeClass('background--dark');
1884					bool_test = true;
1885				}
1886				$('.header_wrapper').css('position', 'fixed').css('visibility', 'visible').addClass('open');
1887				opened = true; 
1888
1889			}, 200);
1890
1891			$('.logo_only_sticky .header_wrapper #logo').css('visibility', 'visible').css('opacity', 1); 
1892			
1893		}else if(top == 0){ 
1894			if( ($('.header_wrapper').hasClass('header_1') || $('.header_wrapper').hasClass('header_4') ) && bool_test){
1895				$('.header_wrapper').addClass('background--dark');
1896			}
1897
1898			
1899			    
1900			$('body').removeClass('sticky_header');
1901			$('.header_wrapper').removeClass('open').css('position', position); 
1902			
1903			if(codelessSlider){
1904				var slide_color = codelessSlider.activeSlide().data('color');
1905				if( $('.header_wrapper').hasClass('header_1') && !$('.header_wrapper').hasClass('open'))
1906			    	$('.header_wrapper').removeClass('background--light').removeClass('background--dark').addClass('background--'+slide_color);
1907			}
1908			opened = false;
1909			$('.logo_only_sticky .header_wrapper #logo').css('opacity', 0).css('visibility', 'hidden'); 
1910			
1911		}
1912
1913
1914		
1915			
1916	});
1917
1918	$(window).resize(function(){
1919		$window_width = $(this).width();
1920		if($window_width < 980){ 
1921			$('body').removeClass('sticky_header');
1922			$('.header_wrapper').removeClass('open').css('position', position); 
1923			opened = false;
1924		}
1925	});
1926}
1927
1928/* ----------------------------- End Sticky Nav -------------------------- */
1929
1930/* ----------------------------- Blog Infinite Scroll -------------------- */
1931function codelessBlogInfiniteScroll(){
1932	"use strict";
1933	var container = '#posts_container';
1934	var behavior = '';
1935	if($('#blogmasonry').length > 0){
1936		container = '#blogmasonry .filterable';
1937		behavior = 'masonry_blog';
1938	}else
1939		container = '#posts_container';
1940
1941	$(container).infinitescroll({
1942 
1943	    navSelector  : "div.p_pagination",            
1944	                   // selector for the paged navigation (it will be hidden)
1945	    nextSelector : "div.p_pagination a.next_link",    
1946	                   // selector for the NEXT link (to page 2)
1947	    itemSelector : "#posts_container article.post",          
1948	                   // selector for all items you'll retrieve
1949	    animate      : true,
1950
1951	    loading : {
1952	    	img: '',
1953	    	msgText: ''
1954	    },
1955
1956	    behavior : behavior
1957	});
1958
1959	//codeless_blogmasonry();
1960	
1961
1962}
1963/* ----------------------------- End Blog Infinite Scroll ---------------- */
1964
1965
1966
1967/*------------------------------ Online Functions ------------------------ */ 
1968function codelessOnlineFunctions(){
1969	"use strict";
1970
1971	if($('.sidebar_right #blogmasonry').hasClass('cols3') )
1972		$('.sidebar_right #blogmasonry').removeClass('cols3').addClass('cols2');
1973}

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.