PageSourceSearch

https://www.ehsrestoration.com/wp-content/themes/specular/js/codeless-main.js

js ehsrestoration.com collected 2026-09-30 11:06:51 UTC 37,856 bytes, 1,347 lines download raw bytes

1var $ = jQuery.noConflict();
2var $window_width = $(window).width();
3var stickyNavTop = 0;
4if( $('header#header').length )
5	stickyNavTop = $('header#header').length && $('header#header').offset().top;
6var codelessSlider, msnry_blog, msnry_portfolio;
7// Load dynamic scripts
8var _loadedDependencies = [];
9var _inQueue = {};
10$(document).ready(function () {
11	"use strict";
12	var $ = jQuery.noConflict();
13
14	/* ToolTip Activate */
15	if( $('[rel=tooltip]').length > 0 ){
16		loadDependencies( codeless_global.FRONT_LIB_JS, ['tooltip.js'], function(){ 
17			$('[rel=tooltip]').tooltip();
18		} );
19	}
20	
21
22	/* PlaceHolder fix for IE */
23	if( $('input', 'textarea').length > 0 ){
24		loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.placeholder.min.js'], function(){ 
25			$('input, textarea').placeholder();
26		} );
27	}
28	$('#mc_mv_EMAIL').attr('placeholder', 'Type your email address');
29
30	/* Page Header */
31	pageHeader();
32
33	
34
35	/* Initialize Navigation JS Part */
36	if(!$('body').hasClass('header_5'))
37	codelessNavigation();
38
39	
40
41	/* IFRAME height in grid blog */
42	codelessIFrameHeight();
43
44	/* Search Button in Header */
45	codelessSearchButton();
46
47	/* Scroll Up Binding */
48	scrollUpBinding();
49
50	
51
52	/* Top Navigation Widget */
53	codelessTopNavWidget();
54
55	/* LightBox */
56	codelessLightBoxInit();
57
58	setTimeout( function(){ codelessLightBoxInit() }, 100 );
59
60	/* Twitter Footer Carousel */
61	twitterFooterCarousel();
62
63	
64
65
66    /* Flexslider Init */
67	if($('.flexslider').length > 0)
68    	flexsliderInit();
69
70    /* Portfolio Page Isotope Filter */
71    codelessPortfolioPageIsotope();
72
73    
74
75	/* Left Navigation */
76	codelessLeftNavtion();
77
78	/* Smoothscroll */
79	if( $("body").hasClass('nicescroll') )
80		codeless_smoothScroll();
81
82	if($('#blogmasonry').length > 0)
83		codeless_blogmasonry();
84
85	if($('#fullpage').length > 0)
86		codeless_fullscreen_section();
87
88	codeless_backgroundcheck(); 
89
90	/*if($('.fixed_sidebar').length > 0)
91		codeless_single_portfolio_floating();*/
92
93	codelessExtraNav();
94
95	//codelessCustomSelect();
96
97	
98
99	codelessMobileMenu();
100
101	codelessOverallButton();
102
103	if($('body').hasClass('header_5'))
104		codelessMenuOverlay(); 
105
106	
107
108	codelessOnlineFunctions();
109
110	if($('body').hasClass('one_page'))
111	codelessOnePage();
112
113	if( ($('body').hasClass('sticky_active') && $window_width >= 980 ) || ( $('body').hasClass('sticky_active') && $('body').hasClass('sticky_on_mobile') ) ) 
114		codelessStickyNav();
115    
116
117    codelessPostShares();
118    
119    
120});
121
122
123
124$(window).on('load', function () { 
125	
126	codelessLightBoxInit();
127});
128
129
130
131$(window).scroll(function(){ 
132	"use strict";
133
134	
135});
136
137
138
139$(window).resize(function(){
140	"use strict";	
141	/*var width = 1100;
142	if($('.swiper_slider').length > 0){
143		var slide_per_view = $('.swiper_slider').data('slidenr');
144
145		if ($(".container").css("max-width") == "940px" ){
146			slide_per_view = 4;
147		}else if ($(".container").css("max-width") == "420px" ){
148			slide_per_view = 1;
149		}else if ($(".container").css("width") == "724px" ){
150			slide_per_view = 2;
151		}else if ($(".container").css("max-width") == "300px" ){
152			slide_per_view = 1;
153		}
154		var swiperParent = new Swiper('.swiper_slider',{
155		    slidesPerView: slide_per_view,
156		    paginationClickable: true,
157		    pagination: '.pagination'
158		});
159		
160	}	*/
161	//codelessPortfolioPageIsotope();
162
163
164	
165
166});
167
168
169
170
171/*-------------------------------------------------------------------------------------------------------------*/
172/*------------------------------------------ FUNCTIONS BEGIN --------------------------------------------------*/
173/*-------------------------------------------------------------------------------------------------------------*/
174
175/*------------------------------ Page Header ------------------------- */
176
177function pageHeader(){
178	"use strict";
179	var $ = jQuery.noConflict();
180	var self = $('.header_page.centered');
181	if(self.length == 0)
182		return false;
183	var height = self.height();
184		self.height(0);
185
186	setTimeout(function(){
187		self.animate({
188			opacity: 1,
189			height: height+'px'
190		}, 800); 
191	}, 600);
192				
193	var top = self.offset().top;
194	var bottom = self.offset().top + height;
195	var op_test = 1;
196
197	$(window).scroll(function(){
198		var scrollTop = $(window).scrollTop();
199					
200		if($('.fixed_header').length > 0)
201			scrollTop += $('.fixed_header').height();
202		if (jQuery('#wpadminbar').length > 0)
203			scrollTop += 32;
204		if($(window).scrollTop() == 0)
205			scrollTop = 0;
206		var opacity1 = 1 - ( scrollTop / bottom );
207		op_test = opacity1;
208		var new_height = height;
209		if(scrollTop > top){
210			new_height = bottom - scrollTop;
211		}
212		//self.css({opacity: opacity1}
212);
213		if(!self.hasClass('with_subtitle'))
214			self.find('h1').css('line-height', new_height+'px').css('height', new_height+'px').css('padding-top', (height-new_height)+'px').css('opacity', opacity1);
215		else{
216			self.find('.titles').css('opacity', opacity1).css('padding-top', (height-new_height)+'px');
217		}
218
219	});
220
221
222}
223
224
225		
226/*------------------------------ Navigation -------------------------- */
227function codelessNavigation(){
228	"use strict";
229	var $ = jQuery.noConflict();
230	$('nav .menu li').each(function(){
231		var self = $(this);
232		if($('.codeless_mega4', self).length > 0){
233			self.css('position', 'static');
234		}
235
236		if($('.codeless_mega5', self).length > 0){
237			self.css('position', 'static');
238		}
239	});
240
241	$('nav .menu li .sub-menu').each(function(){
242		$(this).parent().first().addClass('hasSubMenu');
243	});
244
245
246	$('nav .menu, .sticky_menu .menu').mouseleave(function(event) {
247		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').fadeOut(400).css('display', 'none');
248		$(this).find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
249	});
250
251	$('nav .menu li ul .hasSubMenu, .sticky_menu .menu li ul .hasSubMenu').mouseleave(function(event) {
252		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').fadeOut(400).css('display', 'none');
253		$(this).find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
254	});
255
256	$('nav .menu > li, .sticky_menu .menu > li').mouseenter(function() {
257		$(this).parent().find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').fadeOut(400).css('display', 'none');
258		$('header#header .cart .content').fadeOut(400).css('display', 'none');
259
260		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').first().fadeIn(400).css('display', 'block');
261
262		$(this).parent().find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
263		$(this).find('.codeless_custom_menu_mega_menu').first().fadeIn(400).css('display', 'block');
264	});
265
266	$('nav .menu > li ul > li, .sticky_menu .menu > li ul > li').mouseenter(function() {
267		
268
269		$(this).find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').first().fadeIn(400).css('display', 'block');
270
271		$(this).parent().find('.codeless_custom_menu_mega_menu').fadeOut(400).css('display', 'none');
272		$(this).find('.codeless_custom_menu_mega_menu').first().fadeIn(400).css('display', 'block');
273	});
274
275	$('.codeless_custom_menu_mega_menu').each(function(){
276		var bg = $(this).parent('li').data('bg');
277		$(this).css('background-image', 'url('+bg+')');
278	});
279
280	$('header#header .container').on('mouseleave', function(event) {
281		$(this).find('.cart .content').stop().fadeOut(400).css('display', 'none');
282	}); 
283
284	$('header#header .cart_icon').on('mouseenter', function() {
285		$(this).parents('header#header').first().find('.sub-menu').not('.codeless_custom_menu_mega_menu .sub-menu').stop().fadeOut(400).css('display', 'none');
286		$(this).parent().find('.content').first().stop().fadeIn(400).css('display', 'block'); 
287	});
288
289	$('header#header .vert_mid > a').on('mouseenter', function() {
290		$(this).parent().find('.cart .content').first().stop().fadeOut(400).css('display', 'none'); 
291	});
292
293
294	if($('.header_10').length > 0){
295		var container_left = $('.full_nav_menu').offset().left;
296		var nav = $('.full_nav_menu nav').offset().left;
297		$('.codeless_custom_menu_mega_menu').each(function(){
298			var minus = nav - container_left; 
299			$(this).css('left', '-'+minus+'px');
300		});
301	}
302
303	$(window).resize(function(){
304		if($('.header_10').length > 0){
305			var container_left = $('.full_nav_menu').offset().left;
306			var nav = $('.full_nav_menu nav').offset().left;
307			$('.codeless_custom_menu_mega_menu').each(function(){
308				var minus = nav - container_left; 
309				$(this).css('left', '-'+minus+'px');
310			});
311		}
312
313
314	});
315$(window).resize(function(){
316
317	if($('.header_8').length > 0 && $('.full_nav_menu').length > 0){
318		var container_left = $('.full_nav_menu').offset().left;
319		var nav = $('.full_nav_menu nav').offset().left;
320		$('.codeless_custom_menu_mega_menu').each(function(){
321			var minus = nav - container_left;
322			$(this).css('left', '-'+minus+'px');
323		});
324	}
325
326});
327
328	if($('#slider-fullwidth > .default').length > 0 && $('.header_wrapper').hasClass('header_wrapper')){
329		$('.header_wrapper').removeClass('background--dark').addClass('background--light');
330	}
331}
332		
333
334
335 
336
337
338 
339/*------------------------------ HEader Search Button ------------------------------ */  
340
341function codelessSearchButton(){
342	"use strict";
343	var $ = jQuery.noConflict();
344	$('.open_search_button').on( 'click', function(){
345		if($('body').hasClass('open_search')){
346			$('body').removeClass('open_search');
347		}else
348			$('body').addClass('open_search');
349
350	});
351
352}
353
354/*------------------------------ Side navigation --------------------------- */  
355
356function codelessExtraNav(){
357	"use strict";
358	var $ = jQuery.noConflict();
359	$('.extra_navigation_button').on( 'click', function(){
360		if($('body').hasClass('open_extra_nav')){
361			$('body').removeClass('open_extra_nav');
362		}else
363			$('body').addClass('open_extra_nav');
364
365	});
366
367	$('.extra_navigation .close').on( 'click', function(){
368		$('body').removeClass('open_extra_nav');
369	});
370
371	/*$(window).scroll(function() {
372		if($('body').hasClass('open_extra_nav')){
373			$('body').removeClass('open_extra_nav');
374		}
375	});*/
376
377}
378
379/*------------------------------ Change IFRAME GRID height -------------------------- */   
380
381function codelessIFrameHeight(){
382	"use strict";
383	var $ = jQuery.noConflict();
384	$('.blog-article.grid .media img').first().imagesLoaded(function(){
385		var first_height = $('.blog-article.grid .media img').first().height();
386			
387		$('.blog-article.grid iframe').each(function(){
388			$(this).css('height', first_height+'px');
389			$(this).parent('.media').css('height', first_height+'px');
390		});
391	});
392}
393		
394
395/*------------------------------ Scroll Up binding ------------------------------ */  
396
397function scrollUpBinding(){
398	"use strict";
399	var $ = jQuery.noConflict();
400	$('.scrollup').on( 'click', function(){
401        $("html, body").animate({ scrollTop: 0 }, 600);
402        return false;
403    });
404}
405        
406		
407
408
409/*------------------------------ Top Navtion Widget ------------------------------ */ 
410function codelessTopNavWidget(){
411	"use strict";
412	var $ = jQuery.noConflict();
413	$('.small_widget a').not('.aaaa a').toggle(function(e){
414		$('.small_widget').removeClass('active'); 
415              e.preventDefault();
416		var box = $(this).data('box');
417		$('.top_nav_sub').hide();
418		$('.top_nav_sub.'+box).fadeIn("400");
419              $(this).parent().addClass('active'); 
420
421	}, function(e){
422		e.preventDefault();
423		var box = $(this).data('box');
424              $('.small_widget').removeClass('active');  
425		$('.top_nav_sub').fadeOut('400');
426		$('.top_nav_sub.'+box).fadeOut('slow');
427            
428              
429	});
430}	
431
432	
433/*------------------------------ LightBox -------------------------------------- */ 
434
435function codelessLightBoxInit(){
436	"use strict";
437	var $ = jQuery.noConflict();
438	if( $('.lightbox-gallery').length > 0 || $('.show_review_form').length > 0 || $('.lightbox-media').length > 0 || $('.video_lightbox_button .lightbox').length > 0){
439		loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.fancybox.min.js'], function(){
440			$(".lightbox-gallery").fancybox();
441			$('.show_review_form').fancybox();
442
443			
444			$('.lightbox-media').fancybox({
445				openEffect  : 'none',
446				closeEffect : 'none',
447				helpers : {
448					media : {}
449				}
450			});
451
452
453			$('.video_lightbox_button .lightbox').fancybox({
454				openEffect  : 'none',
455				closeEffect : 'none',
456				helpers : {
457					media : {}
458				}
459			});
460		});
461	}
462	
463}
464
465
466/*------------------------------ Tweeter Footer Carousel ------------------------ */ 
467
468function twitterFooterCarousel(){
469	"use strict";
470	var $ = jQuery.noConflict();
471	$("#tweet_footer").each(function(){
472		var $self = $(this);
473		loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.carouFredSel-6.1.0-packed.js'], function(){
474			$self.carouFredSel({
475				circular : true,
476				infinite : true,
477				auto : false,
478				scroll : {
479					items : 1,
480					fx : "fade"
481				},
482				prev : {
483					button : $self.parent().parent().find('.back')
484				},
485
486				next : {
487					button : $self.parent().parent().find('.next')
488				}
489		
490			});
491		});
492	});
493}
494
495
496
497
498
499/*------------------------------ Flexslider Init ------------------------ */ 
500function flexsliderInit(){
501	"use strict";
502	var $ = jQuery.noConflict();
503	$('.flexslider').each(function(){ 
504		var $s = $(this);
505
506		loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.flexslider-min.js'], function(){
507			$s.flexslider({
508				slideshowSpeed: 6000,
509				animationSpeed: 800,
510						
511				controlNav: true,
512				pauseOnAction: true,
513				pauseOnHover: false,
514				start: function(slider) {
515
516					$s.find(" .slides > li .flex-caption").each(function(){
517						var effect_in = $(this).attr("data-effect-in");
518						var effect_out = $(this).attr("data-effect-out");
519						$(this).addClass("animated " + effect_in);
520						
521
522					});
523				},
524				before: function(slider) {
525					var current_slide = $s.find(".slides > li").eq(slider.currentSlide);
526					$s.find(".slides > li .flex-caption").removeClass('animated');				
527					$(".flex-caption", current_slide).each(function(){
528						var effect_in = $(this).attr("data-effect-in");
529						var effect_out = $(this).attr("data-effect-out");
530
531						$(this).removeClass("animated "+effect_in).addClass("animated " + effect_out);
532					});
533				},
534				after: function(slider) {
535					var current_slide = $s.find(".slides > li").eq(slider.currentSlide);
536					$s.find(".slides > li .flex-caption").removeClass('animated');				
537					$(".flex-caption", current_slide).each(function(){
538						var effect_in = $(this).attr("data-effect-in");
539						var effect_out = $(this).attr("data-effect-out");
540
541						$(this).removeClass("animated "+effect_out).addClass("animated " + effect_in);
542					});
543				}		
544			});
545		});
546	});
547}
548
549
550/*------------------------------ Portfolio Page Isotope filter ------------------------ */ 
551
552function codelessPortfolioPageIsotope(){
553	"use strict";
554	var $ = jQuery.noConflict();
555	if($('#portfolio-preview-items > .row').length > 0){
556		loadDependencies(codeless_global.FRONT_LIB_JS, ['isotope.js'], function(){
557			var $container = $('#portfolio-preview-items > .row');
558			var masonry = false;
559			var column_width = '.portfolio-item';
560
561
562			if( $container.hasClass('masonry') ){
563				masonry = true;
564				column_width = '.grid-size'
565			}
566
567
568			$container.imagesLoaded(function(){
569				$container.isotope({
570						itemSelector: '.portfolio-item',
571						percentPosition: true,
572						masonry: {
573						  // use outer width of grid-sizer for columnWidth
574						  columnWidth: column_width
575						}
576				});
577				if($('.infinite_scroll_pag').length > 0 && $('#portfolio-preview-items').length > 0)
578					codelessPortfolioInfiniteScroll();
579
580			});
581
582
583			
584			if( $( '#portfolio-filter' ).length > 0 ){
585				$('#portfolio-filter li a').on( 'click', function(e){
586					e.preventDefault();
587	
588					var filterValue = $(this).attr('data-filter');
589					console.log(filterValue);
590					if( filterValue != 'all' )
591						$container.isotope({
592							filter: filterValue,
593							sortBy: 'random'
594						}); 
595					else
596						$container.isotope({
597								filter: '*',
598								sortBy: 'original-order'
599						}); 
600					
601					$container.isotope('arrange');
602	
603					$(this).closest('ul').find('li.active').removeClass('active');
604					$(this).parent().addClass('active');
605					
606				});
607			}
608		});
609
610		
611	}
612}
613
614
615function codelessPortfolioInfiniteScroll(){
616	"use strict";
617	var $ = jQuery.noConflict();
618	var container = '#portfolio-preview-items > .row';
619	var behavior = '';
620	
621	loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.infinitescroll.min.js'], function(){
622		var iso = $(container).data('isotope');
623		console.log(iso);
624		$(container).infiniteScroll({
625	
626
627			path : ".p_pagination a.next_link",    
628						// selector for the NEXT link (to page 2)
629			append : "#portfolio-preview-items > .row .portfolio-item",          
630						// selector for all items you'll retrieve
631			loadOnScroll: true,
632			outlayer: iso,
633			status: '.p_pagination .page-load-status'
634		});
635
636
637		$(container).on( 'append.infiniteScroll', function( event, response, path, items ) {
638           
639            setTimeout(function(){
640                $(container).isotope('arrange');
641        	}, 50);
642                        
643        });
644	});
645}
646	
647    
648
649	
650
651
652
653
654/*------------------------------ Woocommerce Functions ------------------------------ */ 
655	
656function codelessWoocommerceInit(){
657	"use strict";
658	var $ = jQuery.noConflict();
659	if($('.add_to_cart_button').length > 0){
660		
661		$('body').on('adding_to_cart', function(event, param1, param2){
662			var $thisbutton = param1;
663			var $product = $thisbutton.parents('.product').first();
664			var $load = $product.find('.loading_ef');
665			$load.css('opacity', 1);
666			$('body').on('added_to_cart', function(event, param1, param2){
667				
668				$load.css('opacity', 0);
669				
670				setTimeout(function(){$load.html('<i class="moon-checkmark"></i>'); $load.css('opacity', 1);}, 500);
671				setTimeout(function(){$load.css('opacity', 1);}, 400);
672				setTimeout(function(){$load.css('opacity', 0);}, 2000);
673				$product.addClass('product_added_to_cart');
674			});
675		});
676	}
677}
678
679
680/*------------------------------ Left Navigation ------------------------------ */ 
681
682function codelessLeftNavtion(){
683	"use strict";
684	var $ = jQuery.noConflict();
685	$(".page_item_has_children").each(function(){
686    	$(this).on( 'click',function(){
687	        $(this).find('.children').toggle(400);
688	        $(this).toggleClass('open-child');
689       
690    	});
691  	});
692
693   $('li.current_page_item').parents('.children').css({ display: 'block' });
694   $('.current_page_ancestor').addClass('open-child');
695}
696    
697
698/*------------------------------ Mobile Menu ---------------------------- */ 
699
700function codelessMobileMenu(){
701	"use strict";
702	var $ = jQuery.noConflict();
703	var height = $('header#header .row-fluid:first-child .span12, .header_wrapper').height();
704	var padding = $('.top_wrapper').css('padding-top');
705
706	$('.mobile_small_menu').on( 'click', function(){
707		
708		if($(this).hasClass('open')){
709			$('.header_wrapper').height('auto');
710			$('header#header .row-fluid:first-child .span12').css('position', 'relative');
711
712			$('header#header .row-fluid:first-child .span12').height(height);
713			$('.menu-small').slideDown(400);
714			if(!$('body').hasClass('header_3')) 
715				$('.top_wrapper').css('float', 'none').css('width', 'inherit').css('display', 'block');
716
717			if($('body').hasClass('header_4'))
718				$('.top_wrapper').css('padding-top', '0'); 
719			$('.tparrows').hide();
720			
721			$(this).removeClass('open').addClass('close');
722		}else if($(this).hasClass('close')){
723
724			$('.menu-small').slideUp(400);
725			$('.tparrows').show();
726			if(!$('body').hasClass('header_3'))
727				$('.top_wrapper').css('float', 'none').css('width', 'inherit').css('display', 'block');
728
729			if($('body').hasClass('header_4'))
730				$('.top_wrapper').css('padding-top', padding);
731			$(this).removeClass('close').addClass('open'); 
732			$('.header_wrapper').height('auto');
733		}
734	});
735
736	$('#mobile-menu li').each(function(){
737		var id = $(this).attr('id');
738		$(this).attr('id', 'responsive-'+id);
739	});
740
741	$(window).resize(function(){
742		var height = $('header#header .row-fluid:first-child .span12, .header_wrapper').height();
743		var padding = $('.top_wrapper').css('padding-top');
744		if($(window).width() > 980){
745			$('.header_7 .header_wrapper').height('100%');
746			$('.menu-small').slideUp(400);
747			$('.tparrows').show();
748			if(!$('body').hasClass('header_3'))
749				$('.top_wrapper').css('float', 'none').css('width', 'inherit').css('display', 'block');
750
751			if($('body').hasClass('header_4'))
752				$('.top_wrapper').css('padding-top', padding);
753			$('.mobile_small_menu').removeClass('close').addClass('open'); 
754			$('.header_wrapper').height('auto');
755		}
756	});
757}
758	
759
760
761
762/*-------------------------------------------------------------------------------------------------------------*/
763/*------------------------------------------ FUNCTIONS END ----------------------------------------------------*/
764/*-------------------------------------------------------------------------------------------------------------*/
765
766
767
768    
769      
770/*------------------------------ Switcher Toggle Button ------------------------ */ 
771    
772function codelessSwitcherToggle(){
773	"use strict";
774	var $ = jQuery.noConflict();
775	$("#switcher-head .button").toggle(function(){
776		$("#style-switcher").animate({
777			left: 0
778		}, 500);
779	}, function(){
780		$("#style-switcher").animate({
781			left: -263
782		}, 500);
783	});
784}  
785
786
787/* ----------------------------- SmoothScroll ---------------------------- */
788
789function codeless_smoothScroll(){
790	"use strict";
791	var $ = jQuery.noConflict();
792	try {
793		$.browserSelector();
794		if($("html").hasClass("chrome")) {
795			$.smoothScroll();
796		}
797	} catch(err) {
798
799	}
800}
801
802/* ----------------------------- End SmoothScroll ------------------------ */
803
804
805/* ----------------------------- BLOG Masonry ---------------------------- */
806
807function codeless_blogmasonry(){
808	"use strict";
809	var $ = jQuery.noConflict();
810	loadDependencies(codeless_global.FRONT_LIB_JS, ['isotope.js'], function(){
811		var container = $('#blogmasonry .filterable');
812			container.imagesLoaded(function(){
813
814					container.isotope({
815						itemSelector: '.blog-article',
816						percentPosition: true,
817						masonry: {
818						  // use outer width of grid-sizer for columnWidth
819						  columnWidth: '.grid-size'
820						}
821					});
822					if($('.infinite_scroll_pag').length > 0 && $('#posts_container').length > 0)
823						codelessBlogInfiniteScroll();
824					
825				});
826	});
827}
828
829/* ----------------------------- End BLOG Masonry ------------------------ */
830
831
832/* ----------------------------- Codeless Post Share --------------------- */
833function codelessPostShares(){
834	"use strict";
835	var $ = jQuery.noConflict();
836	$('.blog-article .share_link').each(function(){
837		var link = $(this);
838		link.on('click',function(){
839			var cont = $(this).parents('.blog-article').find('.shares');
840			var parent = $(this).parents('.blog-article').parent();
841			if(link.hasClass('opened')){
842				cont.css('opacity', 0).css('visibility', 'hidden');
843				link.removeClass('opened');
844			}else{
845				parent.find('.share_link').removeClass('opened');
846				parent.find('.shares').css('opacity', 0).css('visibility', 'hidden');
847				link.addClass('opened');
848				cont.css('visibility', 'visible').css('opacity', 1);
849				
850			}
851		});
852
853	});
854	
855}
856/* ----------------------------- End Codeless Post Share ----------------- */
857
858
859/* ----------------------------- Background Check ------------------------ */
860
861function codeless_backgroundcheck(){
862	"use strict";
863	var $ = jQuery.noConflict();
864	if($('.header_1').length > 0 || $('.header_4').length > 0){
865		if($('.page_header_centered').length > 0 && $('.auto_color_check').length > 0){
866			$('.header_wrapper').addClass('background--dark');
867			BackgroundCheck.init({
868				targets: '.header_wrapper',
869				images: '.header_page',
870				classes: { dark: 'background--dark', light: 'background--light', complex: 'background--dark' }
871			});
872			setTimeout(function(){ BackgroundCheck.refresh(); }, 400);
873		}
874
875		if($('#fullpage').length > 0 && $('.auto_color_check').length > 0){
876			$('.header_wrapper').addClass('background--dark');
877			BackgroundCheck.init({
878				targets: '.header_wrapper', 
879				images: '.section'
880			});
881			setTimeout(function(){
882				if($('.header_wrapper').hasClass('background--light'))
883					$('.section:first-child .content').addClass('background--light');
884				else if($('.header_wrapper').hasClass('background--dark'))
885					$('.section:first-child .content').addClass('background--dark');
886			}, 800);
887		}
888
889		if($('.fullscreen-single').length > 0 && $('.auto_color_check').length > 0){
890			$('.header_wrapper').addClass('background--dark');
891			var ca = Array.prototype.slice.call(document.querySelectorAll(".header_wrapper")).concat(Array.prototype.slice.call(document.querySelectorAll(".fullscreen-single")));
892			BackgroundCheck.init({
893				targets: ca, 
894				images: '.header_fullscreen_single img',
895				windowEvents: false
896			});
897		}
898			
899			 		
900	}
901} 
902
903/* ----------------------------- End Background Check -------------------- */
904
905/* ----------------------------- Fullscreen Section ---------------------- */
906
907function codeless_fullscreen_section(){
908	"use strict";
909	var $ = jQuery.noConflict();
910	if($('.fullscreen-blog-article').length > 0){
911		$('#fullpage .section .content').each(function(){
912			var height = $(this).height();
913			$(this).css('margin-top', '-'+(height/2)+'px' );	
914		});
915	}
916	loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.fullPage.js'], function(){
917		$('#fullpage').fullpage({
918			verticalCentered: false,
919			navigation: true,
920			navigationPosition: 'right',
921			resize: false,
922			afterLoad: function(anchorLink, index){
923				if($('.auto_color_check').length > 0){
924					BackgroundCheck.refresh();
925					if($('.header_wrapper').hasClass('background--light'))
926						$('.section:nth-child('+index+') .content').addClass('background--light');
927					else if($('.header_wrapper').hasClass('background--dark'))
928						$('.section:nth-child('+index+') .content').addClass('background--dark');
929				}
930				$('#fullpage .section .with_animation').animate_on_appear();
931				
932
933
934			},
935			afterRender: function(){
936				$('#fullpage .section .with_animation').animate_on_appear();
937			}
938			/*onLeave: function(index, nextIndex){
939				var current = $('#fullpage .section:nth-child('+index+') .content') ;
940				var next = $('#fullpage .section:nth-child('+nextIndex+') .content');
941				current.removeClass('with_animation').removeClass(current.data('animation'));
942				next.addClass('with_animation').delay(current.data('delay')).queue( function() {
943					$(this).addClass(current.data('animation'));
944				});
945			}*/
946
947		});	
948	});
949}
950
951/* ----------------------------- End Fullscreen Section ------------------- */
952
953/* ----------------------------- SINGLE PORTFOLIO FLOATING----------------- */
954
955function codeless_single_portfolio_floating(){
956	"use strict";
957	var $ = jQuery.noConflict();
958	var $sidebar   = $(".fixed_sidebar"), 
959        $window    = $(window),
960        offset     = $sidebar.offset(),
961        topPadding = 15;
962
963    if( $('.container').width() > 420 && $sidebar.length > 0){
964    	$window.scroll(function() {
965	        if ($window.scrollTop() > offset.top) {
966	            $sidebar.stop().animate({
967	                marginTop: $window.scrollTop() - offset.top + topPadding
968	            });
969	        } else {
970	            $sidebar.stop().animate({
971	                marginTop: 0
972	            });
973	        }
974	    });
975    }else{
976    	$(window).unbind('scroll');
977    }
978}
979
980
981/* ----------------------------- END SINGLE PORTFOLIO FLOATING------------ */
982
983/* ----------------------------- Custom Select --------------------------- */
984
985function codelessCustomSelect(){
986	"use strict";
987	var $ = jQuery.noConflict();
988	if( $('.woocommerce-ordering .orderby').length > 0 )
989	loadDependencies(codeless_global.FRONT_LIB_JS, ['select2.min.js'], function(){
990		$('.woocommerce-ordering .orderby').select2();
991	});
992}
993
994/* ----------------------------- End Custom Select ----------------------- */
995
996
997
998
999
1000
1001
1002/* ----------------------------- End Tabs -------------------------------- */
1003
1004/* ----------------------------- Buttons Style --------------------------- */
1005
1006function codelessOverallButton(){
1007	"use strict";
1008	var $ = jQuery.noConflict();
1009	var extra = codeless_global.button_style;
1010
1011	if($('.wpcf7-form p input[type="submit"]').length > 0){
1012		$('.wpcf7-form p input[type="submit"]').addClass('btn-bt').addClass(extra);
1013	}
1014	if($('#respond input[type="submit"]').length > 0){
1015		$('#respond input[type="submit"]').addClass('btn-bt').addClass(extra);
1016	}
1017
1018	if($('.woocommerce .button, #woocommerce .button, #place_order').length > 0){
1019		$('.woocommerce .button, #woocommerce .button, #place_order').addClass('btn-bt').addClass(extra);
1020	}
1021
1022	if($('.not_found .search_field').length > 0){
1023		$('.not_found .search_field button').addClass('btn-bt').addClass(extra);
1024	}
1025
1026	if($('.post-password-form input[type="submit"]').length > 0){
1027		$('.post-password-form input[type="submit"]').addClass('btn-bt').addClass(extra);
1028	}
1029
1030	if($('.mc_signup_submit input').length > 0){
1031		$('.mc_signup_submit input').addClass('btn-bt').addClass(extra);
1032	}
1033
1034	$("body").on("added_to_cart", function() {
1035		$('.added_to_cart').addClass('btn-bt').addClass(extra);
1036	});
1037}
1038
1039/* ----------------------------- End Buttons Style ----------------------- */
1040
1041/* ----------------------------- Header5 Overlay ------------------------- */
1042
1043	function codelessMenuOverlay(){
1044		var $ = jQuery.noConflict();
1045		
1046			var triggerBttn = document.getElementById( 'trigger-overlay' ),
1047				overlay = document.querySelector( 'div.overlay_menu' ),
1048				closeBttn = overlay.querySelector( 'button.overlay-close' );
1049				transEndEventNames = {
1050					'WebkitTransition': 'webkitTransitionEnd',
1051					'MozTransition': 'transitionend',
1052					'OTransition': 'oTransitionEnd',
1053					'msTransition': 'MSTransitionEnd',
1054					'transition': 'transitionend'
1055				},
1056				transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
1057				support = { transitions : Modernizr.csstransitions };
1058
1059				triggerBttn.addEventListener( 'click', toggleOverlay ); 
1060				closeBttn.addEventListener( 'click', toggleOverlay );
1061
1062				function toggleOverlay(){
1063					if( classie.has( overlay, 'open' ) ) {
1064						classie.remove( overlay, 'open' );
1065						classie.add( overlay, 'close' );
1066
1067						var onEndTransitionFn = function( ev ) {
1068							if( support.transitions ) {
1069								if( ev.propertyName !== 'visibility' ) return;
1070								this.removeEventListener( transEndEventName, onEndTransitionFn );
1071							}
1072							classie.remove( overlay, 'close' );
1073						};
1074						if( support.transitions ) {
1075							overlay.addEventListener( transEndEventName, onEndTransitionFn );
1076						}
1077						else {
1078							onEndTransitionFn();
1079						}
1080					}
1081					else if( !classie.has( overlay, 'close' ) ) {
1082						classie.add( overlay, 'open' );
1083					}
1084				}
1085
1086				$('.overlay_menu .menu-item-has-children').on({ 
1087					
1088					mouseenter:	function(){
1089
1090						var height = $(this).find('.sub-menu li').height();
1091						height *= $(this).find('.sub-menu li').length;
1092						$(this).find('.sub-menu').height(height+'px');
1093
1094					}, 
1095					
1096					mouseleave: function(){
1097						$(this).find('.sub-menu').height(0);
1098					}
1099				});
1100	}
1101
1102
1103/* ----------------------------- End Header 5 Overlay -------------------- */
1104
1105
1106
1107
1108/* ----------------------------- End Layout Changes ---------------------- */
1109
1110
1111/* ----------------------------- One Page -------------------------------- */
1112
1113function codelessOnePage(){
1114	"use strict";
1115	var $ = jQuery.noConflict();
1116	console.log(window.location.hash);
1117	if(window.location.hash) {
1118		
1119	  	$('nav .menu li a:not([href="'+window.location+'"])').parent().removeClass('current-menu-item');
1120	} else {
1121	  // Fragment doesn't exist
1122	}
1123
1124	loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.onepage.js'], function(){
1125
1126		$('nav .menu').onePageNav({
1127			currentClass: 'current-menu-item',
1128			changeHash: false,
1129			scrollSpeed: 750,
1130			scrollThreshold: 0.5,
1131		});
1132	
1133	});
1134}
1135
1136/* ----------------------------- End One Page ---------------------------- */
1137
1138/* ----------------------------- Sticky Nav ------------------------------ */
1139
1140function codelessStickyNav(){
1141	"use strict";
1142	var $ = jQuery.noConflict();
1143	var opened = false;
1144	var position = $('.header_wrapper').css('position'); 
1145	var bool_test = false;
1146	$('.logo_only_sticky .header_wrapper #logo').css('opacity', 0).css('visibility', 'hidden'); 
1147	$(window).scroll(function(){
1148		var top = $(this).scrollTop(); 
1149
1150		if(top > stickyNavTop + 300 && !opened){
1151			$('body').addClass('sticky_header'); 
1152
1153			setTimeout(function(){
1154				if($('.header_wrapper').hasClass('background--dark')){
1155					$('.header_wrapper').removeClass('background--dark');
1156					bool_test = true;
1157				}
1158				$('.header_wrapper').css('position', 'fixed').css('visibility', 'visible').addClass('open');
1159				opened = true; 
1160
1161			}, 200);
1162
1163			$('.logo_only_sticky .header_wrapper #logo').css('visibility', 'visible').css('opacity', 1); 
1164			
1165		}else if(top == 0){ 
1166			if( ($('.header_wrapper').hasClass('header_1') || $('.header_wrapper').hasClass('header_4') || $('.header_wrapper').hasClass('header_9') ) && bool_test){
1167				$('.header_wrapper').addClass('background--dark');
1168			}
1169
1170			$('body').removeClass('sticky_header');
1171			$('.header_wrapper').removeClass('open').css('position', position); 
1172			
1173			if(codelessSlider){
1174				var slide_color = $(codelessSlider.slides[codelessSlider.activeIndex]).data('color');
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			opened = false;
1179			$('.logo_only_sticky .header_wrapper #logo').css('opacity', 0).css('visibility', 'hidden'); 
1180			
1181		}
1182
1183
1184		
1185			
1186	});
1187
1188	$(window).resize(function(){
1189		$window_width = $(this).width();
1190		if($window_width < 980){ 
1191			$('body').removeClass('sticky_header');
1192			$('.header_wrapper').removeClass('open').css('position', position); 
1193			opened = false;
1194		}
1195	});
1196}
1197
1198/* ----------------------------- End Sticky Nav -------------------------- */
1199
1200/* ----------------------------- Blog Infinite Scroll -------------------- */
1201function codelessBlogInfiniteScroll(){
1202	"use strict";
1203	var $ = jQuery.noConflict();
1204	var container = '#posts_container';
1205	var behavior = '';
1206	if($('#blogmasonry').length > 0){
1207		container = '#blogmasonry .filterable';
1208		behavior = 'masonry_blog';
1209	}else
1210		container = '#posts_container';
1211	
1212	loadDependencies(codeless_global.FRONT_LIB_JS, ['jquery.infinitescroll.min.js'], function(){
1213		var iso = $(container).data('isotope');
1214		console.log(iso);
1215		$(container).infiniteScroll({
1216	
1217
1218			path : ".p_pagination a.next_link",    
1219						// selector for the NEXT link (to page 2)
1220			append : "#posts_container article.post",          
1221						// selector for all items you'll retrieve
1222			loadOnScroll: true,
1223			outlayer: iso,
1224			status: '.p_pagination .page-load-status'
1225		});
1226
1227
1228		$(container).on( 'append.infiniteScroll', function( event, response, path, items ) {
1229           
1230            setTimeout(function(){
1231                $(container).isotope('arrange');
1232        	}, 50);
1233                        
1234        });
1235	});
1236}
1237/* ----------------------------- End Blog Infinite Scroll ---------------- */
1238
1239
1240
1241/*------------------------------ Online Functions ------------------------ */ 
1242function codelessOnlineFunctions(){
1243	"use strict";
1244    var $ = jQuery.noConflict();
1245	if($('.sidebar_right #blogmasonry').hasClass('cols3') )
1246		$('.sidebar_right #blogmasonry').removeClass('cols3').addClass('cols2');
1247}
1248
1249
1250	
1251
1252/*------------------------------ Load Dependency ------------------------ */ 
1253function loadDependencies( folder, dependencies, callback ) {
1254	"use strict";
1255	var $ = jQuery.noConflict();
1256	var _callback = callback || function() {};
1257	if ( !dependencies )
1258		return void _callback();
1259
1260	var newDeps = dependencies.map( function( dep ) {
1261		return -1 === _loadedDependencies.indexOf( dep ) ? "undefined" == typeof _inQueue[ dep ] ? dep : ( _inQueue[ dep ].push( _callback ), !0 ) : !1
1262	} );
1263
1264	if ( newDeps[ 0 ] !== !0 ) {
1265		if ( newDeps[ 0 ] === !1 )
1266			return void _callback();
1267		var queue = newDeps.map( function( script ) {
1268			_inQueue[ script ] = [ _callback ];
1269			return $.getCachedScript( script, folder );
1270		} );
1271
1272		var onLoad = function() {
1273			newDeps.map( function( loaded ) {
1274				_inQueue[ loaded ].forEach( function( callback ) {
1275					callback()
1276				} );
1277				delete _inQueue[ loaded ];
1278				_loadedDependencies.push( loaded )
1279			} );
1280		};
1281
1282		$.when.apply( null, queue ).done( onLoad )
1283	}
1284}
1285
1286		
1287
1288
1289
1290/*
1291Plugin Name: 	BrowserSelector
1292Written by: 	Crivos - (http://www.crivos.com)
1293Version: 		0.1
1294*/
1295
1296(function($) {
1297	$.extend({
1298
1299		browserSelector: function() {
1300
1301			var u = navigator.userAgent,
1302				ua = u.toLowerCase(),
1303				is = function (t) {
1304					return ua.indexOf(t) > -1;
1305				},
1306				g = 'gecko',
1307				w = 'webkit',
1308				s = 'safari',
1309				o = 'opera',
1310				h = document.documentElement,
1311				b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2 : '')) : is('konqueror') ? 'konqueror' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1 : '') : is('mozilla/') ? g : '', is('j2me') ? 'mobile' : is('iphone') ? 'iphone' : is('ipod') ? 'ipod' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js'];
1312
1313			c = b.join(' ');
1314			h.className += ' ' + c;
1315
1316		}
1317
1318	});
1319})(jQuery);
1320
1321
1322
1323(function($) {
1324	$.extend({
1325
1326		getCachedScript : function( url, folder, callback ) {
1327			url = folder + url;
1328			url = url.replace( /.*?:\/\//g, "" );
1329	
1330			if ( location.protocol === 'https:' )
1331				url = 'https://' + url;
1332			else
1333				url = 'http://' + url;
1334	
1335			var options = {
1336				dataType: "script",
1337				cache: false,
1338				url: url
1339			};
1340	
1341			return $.ajax( options ).done( callback );
1342		}
1343
1344	});
1345})(jQuery);
1346
1347

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.