PageSourceSearch

https://www.zazenkraftmark.com/wp-content/themes/nimva/js/custom.js?ver=2.2

js zazenkraftmark.com collected 2026-10-10 01:41:30 UTC 36,764 bytes, 1,195 lines download raw bytes

1var $ = jQuery.noConflict();
2
3function image_preload(selector, parameters) {
4	var params = {
5		delay: 200,
6		transition: 400,
7		easing: 'linear'
8	};
9	jQuery.extend(params, parameters);
10		
11	jQuery(selector).each(function() {
12		var image = $(this);
13		image.css({visibility:'hidden', opacity: 0, display:'block'});
14		image.wrap('<span class="preloader" />');
15		image.one("load", function(evt) {
16			$(this).delay(params.delay).css({visibility:'visible'}).animate({opacity: 1}, params.transition, params.easing, function() {
17				$(this).unwrap('<span class="preloader" />');
18			});
19		}).each(function() {
20			if(this.complete) $(this).trigger("load");
21		});
22	});
23}
24
25function imgFade(){
26	$('.image_fade,#top-menu li.top-menu-em a').hover(function(){
27		$(this).filter(':not(:animated)').animate({opacity: 0.6}, 400);
28	}, function () {
29		$(this).animate({opacity: 1}, 400);
30	});
31};
32
33
34function tab_widget(tabid) {
35    
36    var $sidebarWidgets = $('.sidebar-widgets-wrap');
37    var $footerWidgets = $('.footer-widgets-wrap');
38    
39    $( tabid + " .tab_content").hide();
40    $( tabid + " ul.tabs li:first").addClass("active").show();
41    $( tabid + " .tab_content:first").show();
42    $( tabid + " ul.tabs li").click(function() {    
43		
44        $( tabid + " ul.tabs li").removeClass("active");
45        $(this).addClass("active");		
46        $( tabid + " .tab_content").hide();
47        var activeTab = $(this).find("a").attr("data-href");
48        var $selectTab = $(this);
49        $(activeTab).fadeIn(600,function(){
50            if( $selectTab.parent().parent().hasClass("side-tabs") ) {
51                if( $(window).width() < 768 ) { if( $().scrollTo ) { jQuery.scrollTo( activeTab , 400, {offset:-20} ); } }
52            }            
53        });
54        return false;
55        
56	});
57    
58}
59
60function imgHoverlay(){
61	$('.portfolio-overlay').each( function() { $(this).hoverdir({
62		hoverDelay : 0
63	}); } );
64	$('.portfolio-image, .portfolio-image-round, .ipost-image, .entry_image_sh, .rpost-image, #portfolio-related-items li, .slide').hover(function(){
65		$(this).find('.portfolio-overlay,.portfolio-overlay-round').filter(':not(:animated)').animate({opacity: 'show'}, 400);
66	}, function () {
67		$(this).find('.portfolio-overlay,.portfolio-overlay-round').animate({opacity: 'hide'}, 200);
68	});
69	
70};
71
72function portfolioItemsFilter(){                        
73	var $container = $('#portfolio');
74                
75	$container.isotope();
76                
77    $('#portfolio-filter a').click(function(){
78                    
79    	$('#portfolio-filter li').removeClass('activeFilter');
80        $(this).parent('li').addClass('activeFilter');
81        var selector = $(this).attr('data-filter');
82        $container.isotope({ filter: selector });
83        return false;
84                    
85    });
86                
87    $(window).resize(function() {
88    	$container.isotope('reLayout');
89	});
90
91};
92
93function recent_works() {
94	$('.portfolio-wrapper').each(function() {
95		$(this).css('display','block');
96
97		var portSpeed = $(this).attr('data-speed');
98        var portPause = $(this).attr('data-pause');
99        var portAuto = $(this).attr('data-auto');
100		var portFX = $(this).attr('data-effect');
101        
102        if( !portSpeed ) { portSpeed = 300; }
103        if( !portPause ) { portPause = 8000; }
104        if( portAuto == 'true' ) { portAuto = Number(portPause); } else { portAuto = false; }
105        
106        $(this).find('#portfolio-shortcode').carouFredSel({
107        	width : "100%",
108			height : "auto",
109			circular : false,
110			responsive : true,
111			infinite : false,
112			auto : portAuto,
113			items : {
114				width : 290,
115				visible: {
116					min: 1,
117					max: 4
118				}
119			},
120			scroll : {						
121                fx : portFX,
122                duration : Number(portSpeed),
123				pauseOnHover: portPause,
124                wipe : true
125			},
126			
127			prev: jQuery(this).find('.widget-scroll-prev'),
128			next: jQuery(this).find('.widget-scroll-next'),
129			
130			onCreate : function () {
131				setTimeout (function() {
132					$(window).on('resize', function(){
133						$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
134					}).trigger('resize');
135				},100);
136			}
137        });
138    
139    });
140}
141
142
143
144// FAQs filtering
145function faqItemsFilter(){	
146	$('.faqs_wrap').each(function() {	
147		var faqName = $(this).attr('data-name');		
148		var $faqItems = $('#faqs' +faqName+ ' .toggle');              	
149		$('#faq-filter'+faqName+' a').click(function(){			
150			$('#faq-filter'+faqName+' li').removeClass('activeFilter');			
151			$(this).parent('li').addClass('activeFilter');			
152			var faqSelector = $(this).attr('data-filter');		
153			$faqItems.css('display', 'none');			
154			if( faqSelector != ('all'+faqName) ) {				
155				$( faqSelector ).fadeIn(500);				
156			} else {				
157				$faqItems.fadeIn(500);
158			}			
159			return false;			
160		}); 	
161	});           
162};
163
164function toggles_function(){ 
165	$(".togglec").hide();		
166	$(".togglec.open").show();	
167	$(".togglet").click(function(){		   
168	   var $this = $(this);          
169        if ( $this.hasClass('toggleta') ) {
170        	$this.removeClass('toggleta').next().slideUp(500);
171        } 
172        else {
173        	$this.addClass('toggleta').next().slideDown(500);
174        }
175	});
176}
177
178jQuery.fn.testimonials_carousel = function() {
179	$(this).css('display','block');
180	var testimonialSpeed = $(this).attr('data-speed');
181    var testimonialPause = $(this).attr('data-pause');
182    var testimonialAuto = $(this).attr('data-auto');
183	var testimonialFX = $(this).attr('data-effect');
184    
185    if( !testimonialSpeed ) { testimonialSpeed = 300; }
186    if( !testimonialPause ) { testimonialPause = 8000; }
187    if( testimonialAuto == 'true' ) { testimonialAuto = Number(testimonialPause); } else { testimonialAuto = false; }
188    
189    $(this).find('.testimonials').carouFredSel({
190        responsive : true,
191        auto : testimonialAuto,
192        items : 1,
193		width: "100%",
194    	scroll : {
195    		items : "page",
196            fx : testimonialFX,
197            duration : Number(testimonialSpeed),
198			pauseOnHover: testimonialPause,
199            wipe : true
200    	},					
201
202    	prev: jQuery(this).find('.widget-scroll-prev'),
203		next: jQuery(this).find('.widget-scroll-next'),
204		
205		onCreate : function () {
206			setTimeout (function() {
207				$(window).on('resize', function(){
208					$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
209				}).trigger('resize');
210			},100);
211		}
212    });
213}
214
215jQuery.fn.clients_carousel = function() {
216
217	$(this).css('display','block');
218	var clientsSpeed = $(this).attr('data-speed');
219    var clientsPause = $(this).attr('data-pause');
220    var clientsAuto = $(this).attr('data-auto');
221	var clientsFX = $(this).attr('data-effect');				
222    
223    if( !clientsSpeed ) { clientSpeed = 300; }
224    if( !clientsPause ) { clientPause = 8000; }
225    if( clientsAuto == 'true' ) { clientsAuto = Number(clientsPause); } else { clientsAuto = false; }
226    
227    $(this).find('#clients-scroller').carouFredSel({
228    	width : "100%",
229		height : "auto",
230		circular : false,
231		responsive : true,
232		infinite : true,
233		auto : clientsAuto,
234		items : {
235			width : 110,
236			visible: {
237				min: 1,
238				max: 6
239			}
240		},
241		scroll : {
242    		items : "page",
243            fx : clientsFX,
244            duration : Number(clientsSpeed),
245			pauseOnHover: clientsPause,
246            wipe : true
247    	},
248		
249		prev: jQuery(this).find('.widget-scroll-prev'),
250		next: jQuery(this).find('.widget-scroll-next'),
251		
252		onCreate : function () {
253			setTimeout (function() {
254				$(window).on('resize', function(){
255					$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
256				}).trigger('resize');
257			},100);
258		}
259    });
260}
261
262jQuery.fn.google_maps = function() {
263	
264	var geocoder;
265	var map;
266	var id = $(this).attr('data-id');
267	var address = $(this).attr('address');	
268	
269	var map_design = $(this).attr('data-map');
270	var zoomEl = $(this).attr('data-zoom');
271	var titleEl = $(this).attr('data-title'); 
272	var popupEl = ( $(this).attr('data-popup') === "true" );
273	var scrollwheelEl = ( $(this).attr('data-scrollwheel') === "true" );
274	var panEl = ( $(this).attr('data-pan') === "true" );
275	var zoom_controlEl = ( $(this).attr('data-zoom_control') === "true" );
276	var type_controlEl = ( $(this).attr('data-type_control') === "true" );
277	var streetviewEl = ( $(this).attr('data-streetview') === "true" );	
278	
279	mapEl = 'terrain';
280
281	if(titleEl) { 
282		titleEl = '<h3>'+titleEl+'</h3>';
283	}
284	var messageEl = $(this).attr('data-message');
285	if( messageEl ) {
286		messageEl = '<p>'+messageEl+'</p>';
287	}
288	var phoneEl = $(this).attr('data-phone');
289	if( phoneEl ) {
290		phoneEl = '<p class="nobottommargin"><icon class="fa fa-phone"></icon>&nbsp;&nbsp;'+phoneEl+'</p>';
291	}
292	var emailEl = $(this).attr('data-email');
293	if( emailEl ) {
294		emailEl = '<p><icon class="fa fa-envelope"></icon>&nbsp;&nbsp;'+emailEl+'</p>';
295	}
296
297	//function initialize() {
298	  	//var myLatlng = new google.maps.LatLng(lat,lng);
299	  
300	  	var mapOptions = {
301			zoom: parseInt(zoomEl),							
302			mapTypeId: google.maps.MapTypeId[map_design],				
303			scrollwheel: scrollwheelEl,				
304			panControl: panEl, //da
305			zoomControl: zoom_controlEl, //da
306			mapTypeControl: type_controlEl, //da
307			overviewMapControl: false, //da
308			streetViewControl: streetviewEl, //da
309	  	}
310	  	//var map = new google.maps.Map(document.getElementById(id), mapOptions);				
311	
312	  	//map.setMapTypeId(google.maps.MapTypeId[map_design]);	
313	  
314	  				
315	
316	  geocoder = new google.maps.Geocoder();
317	  // var latlng = new google.maps.LatLng(-34.397, 150.644);
318	  
319		var contentString = '<div>'+titleEl+messageEl+'<p class="nobottommargin"><icon class="fa fa-home"></icon>&nbsp;&nbsp;'+address+'</p>'+phoneEl+emailEl+'</div>';
320	
321		var infowindow = new google.maps.InfoWindow({
322	  		content: contentString,
323			maxWidth: 300,					  
324	    });
325
326	  geocoder.geocode( { 'address': address}, function(results, status) {
327		if (status == google.maps.GeocoderStatus.OK) {
328		  map.setCenter(results[0].geometry.location);
329		  
330		  var marker = new google.maps.Marker({
331			  map: map,
332			  //title: 'New York',
333			  position: results[0].geometry.location
334		  });
335		  
336		  google.maps.event.addListener(marker, 'click', function() {
337			infowindow.open(map,marker);
338		  });
339		  if( popupEl ) {
340		  	google.maps.event.addListenerOnce(map, 'idle', function() {
341			  setTimeout(function() {
342				// wait some more (...)
343				google.maps.event.trigger(marker, 'click'); //still doesn't work?
344			  },400);
345			});	
346		  }
347		  
348		} else {
349		  alert('Geocode was not successful for the following reason: ' + status);
350		}
351	  });
352	 
353	  map = new google.maps.Map(document.getElementById(id), mapOptions);
354
355	//}
356	
357	//google.maps.event.addDomListener(window, 'load', initialize);
358		
359}
360
361// php strstr alternative for jquery
362function strstr(haystack, needle, bool) {
363  //  discuss at: http://phpjs.org/functions/strstr/
364  // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
365  // bugfixed by: Onno Marsman
366  // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
367  //   example 1: strstr('Kevin van Zonneveld', 'van');
368  //   returns 1: 'van Zonneveld'
369  //   example 2: strstr('Kevin van Zonneveld', 'van', true);
370  //   returns 2: 'Kevin '
371  //   example 3: strstr('[email protected]', '@');
372  //   returns 3: '@example.com'
373  //   example 4: strstr('[email protected]', '@', true);
374  //   returns 4: 'name'
375
376  var pos = 0;
377  haystack += '';
378  pos = haystack.indexOf(needle);
379  if (pos == -1) {
380    return false;
381  } else {
382    if (bool) {
383      return haystack.substr(0, pos);
384    } else {
385      return haystack.slice(pos);
386    }
387  }
388}
389
390
391
392jQuery(document).ready(function($) {	
393
394			//smooth scrolling for One Page template
395			
396			$(function() {			  	
397			  jQuery('#nav.one-page-template a').click(function() {
398				if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
399				  var target = $(this.hash);
400				  var id = $(this).attr('href');
401				  console.log(id);
402				  var header = $('header').attr('header-version');
403				  var header_height = jQuery('header').outerHeight();
404				  
405				  if (header == 'v2' || header == 'v3') header_height = 142;				  
406				  
407				  //alert(header_height);
408				  target = target.length ? target : $('[name="' + this.hash.slice(1) +']"');
409				  if (target.length && (id != '#home')) {
410				  	console.log('du-te la sectiune');
411					$('html,body').animate({ scrollTop: target.offset().top - 71 }, 1000);
412					return false;
413				  }
414				  else {
415				  	if( id=='#home') {
416					  	console.log('du-te sus');
417					  	$('html,body').animate({ scrollTop: 0}, 1000);
418						return false;
419					}
420				  }
421				}
422			  });
423			  jQuery('#mobile-menu.one-page-template a').click(function() {
424				if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
425				  var target = $(this.hash);
426				  var id = $(this).attr('href');
427				  
428				  target = target.length ? target : $('[name="' + this.hash.slice(1) +']"');
429				  if (target.length && (id != '#home')) {
430					$('html,body').animate({ scrollTop: target.offset().top}, 1000);
431					return false;
432				  }
433				  else if(target.length && (id == '#home')) {
434				  	$('html,body').animate({ scrollTop: 0}, 1000);
435					return false;
436				  }
437				}
438			  });
439			});		
440			
441			// Scroll to Top
442			//if($(window).width() > 979) {        
443				$(window).scroll(function() {
444					if($(this).scrollTop() > 450) {
445						$('#gotoTop').fadeIn();
446					} else {
447						$('#gotoTop').fadeOut();
448					}
449				});				
450				
451				$('#gotoTop').click(function() {
452					$('body,html').animate({scrollTop:0},400);
453					return false;
454				});
455			//}
456			
457			//test if vc-editor is enabled or not
458			if(!strstr(window.location.href, 'vceditor=true')) {
459				jQuery(".player").mb_YTPlayer();
460			}
461
462			if(jQuery('.sticky-header').length >= 1 && $(window).width() > 979) {
463				jQuery(window).scroll(function() {
464					 var header = jQuery(document).scrollTop();
465					 var logo = jQuery('#logo img').height();
466					 var menuitem = jQuery('html:not(.js) #header nav > ul > li > a').height();
467					 var headerHeight = jQuery('#top-bar').height();
468					 var marginWrapper = parseInt(jQuery("#wrapper").css("margin-top"));
469					 
470					 if(marginWrapper > 0 && headerHeight > 0) {
471						 headerHeight = headerHeight + marginWrapper;
472					 }
473					 
474					 if(marginWrapper > 0 && !headerHeight) {
475						 headerHeight = marginWrapper;
476					 }
477		
478					 if(!headerHeight) {
479						headerHeight = 1;
480					 }
481		
482					 if(header > headerHeight) {
483						//jQuery('.header-v1,.header-v2,.header-v3,.header-v4,.header-v5').hide();
484						jQuery('.sticky-header').addClass('sticky');
485						jQuery('.sticky').fadeIn();
486						if ($(this).scrollTop()>140 ){
487							/*
488							$('.sticky #logo img').stop().animate({ height: 70 },80);
489							$('html:not(.js) #header.sticky nav > ul > li > a').stop().animate({ 'line-height': 70 },50);
490							*/
491							$('#header.sticky-header').addClass("reduced");
492						}
493						else{							
494							$('#header.sticky-header.reduced').removeClass("reduced");
495						}
496						
497					 } else {
498						//jQuery('.header-v1,.header-v2,.header-v3,.header-v4,.header-v5').show();
499						jQuery('.sticky-header').removeClass('sticky');
500						jQuery('.sticky-header').hide();
501					 }
502				});
503			}	
504		/*	
505		$('.expand').each(function() {	
506			$('.expand').height(function(index, height) {
507				return window.innerHeight - $(this).offset().top;
508			});
509			$(window).resize(function() {
510				$('.expand').height(function(index, height) {
511					return window.innerHeight - $(this).offset().top;
512				});
513			});
514		});
515		*/
516		// Tabs
517		//When page loads...
518		$('.tab_widget').each(function() {
519			$(this).find(".tab_content").hide(); //Hide all content
520			$(this).find("ul.tabs li:first").addClass("active").show(); //Activate first tab
521			$(this).find(".tab_content:first").show(); //Show first tab content
522		});
523		
524		//On Click Event
525		$("ul.tabs li").click(function(e) {
526			$(this).parents('.tab_widget').find("ul.tabs li").removeClass("active"); //Remove any "active" class
527			$(this).addClass("active"); //Add "active" class to selected tab
528			$(this).parents('.tab_widget').find(".tab_content").hide(); //Hide all tab content
529	
530			var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
531			$(this).parents('.tab_widget').find(activeTab).fadeIn(); //Fade in the active ID content
532			
533			e.preventDefault();
534		});
535		
536		$("ul.tabs li a").click(function(e) {
537			e.preventDefault();
538		})
539		
540		//Call to action auto padding
541		
542			$('.promo').each(function() {				
543				var align = $(this).attr('data-style');			
544				if(align != 'center') {
545					var button_width = $(this).find('.promo-action').width();
546
547					if($(window).width() > 767) {
548						$(this).find('.promo-desc').css('padding-right', button_width);				
549					}
550				}
551				
552			});
553				
554			if($(window).width() > 767) {	
555				var button_cta = $('#call_action .promo-action').width()+35;		
556				$('#call_action .promo-text').css('padding-right', button_cta);				
557			}
558			
559			$('.woocommerce_message').each(function() {
560				$(this).find('.button.wc-forward').addClass('simple-button default_color small inverse').removeClass('button wc-forward');
561			});
562			
563			$('.checkout_log').each(function() {
564				$(this).find('.button').addClass('simple-button default_color small inverse').removeClass('button');
565			});
566			
567				
568       /***************** PARALLAX SECTIONS ******************/
569
570
571		var $window = $(window);
572		var windowHeight = $window.height();
573		
574		$window.resize(function () {
575			windowHeight = $window.height();
576		});
577		
578		$.fn.parallax = function(xpos, speedFactor, outerHeight) {
579			var $this = $(this);
580			var getHeight;
581			var firstTop;
582			var paddingTop = 0;
583			
584			//get the starting position of each element to have parallax applied to it		
585			$this.each(function(){
586				firstTop = $this.offset().top;
587			});
588			
589			$window.resize(function () {
590				$this.each(function(){
591					firstTop = $this.offset().top;
592				});
593			});
594			
595			$window.load(function(){
596				$this.each(function(){
597					firstTop = $this.offset().top;
598				}); 
599			});
600		 
601		
602			getHeight = function(jqo) {
603				return jqo.outerHeight(true);
604			};
605			 
606				
607			// setup defaults if arguments aren't specified
608			if (arguments.length < 1 || xpos === null) xpos = "50%";
609			if (arguments.length < 2 || speedFactor === null) speedFactor = 0.1;
610			if (arguments.length < 3 || outerHeight === null) outerHeight = true;
611			
612			// function to be called whenever the window is scrolled or resized
613			function update(){
614				var pos = $window.scrollTop();				
615		
616				$this.each(function(){
617					var $element = $(this);
618					var top = $element.offset().top;
619					var height = getHeight($element);
620					// Check if totally above or totally below viewport
621					if (top + height < pos || top > pos + windowHeight) {
622						return;
623					}
624		
625					$this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px");
626				});
627			}		
628		
629			$window.bind('scroll', update).resize(update);
630			update();
631		};
632		if(window.innerWidth > 1024 ){	
633			$('.parallax_section').each(function(){
634
635			   $(".parallax_section").parallax("50%", 0.2);
636			});
637		}
638	   
639	   
640		function initSF(){
641
642			$(".sf-menu").superfish({
643				 delay: 900,
644				 speed: 'fast',
645				 speedOut:      'fast',             
646				 animation:   {opacity:'show'}
647			}); 
648	
649		}
650		
651		$('#header nav > ul > li').mouseleave(function(){
652			if(!$(this).hasClass('megamenu')){
653				$(this).find('> ul').stop(true,true).fadeOut();
654			}
655		});
656		
657		function addOrRemoveSF(){
658			var $smoothActive = $('body').attr('data-responsive');
659			if( window.innerWidth < 980 && $smoothActive == "true" ){
660				$('body').addClass('mobile');
661				$('#header nav').hide();
662			}
663			
664			else {
665				$('body').removeClass('mobile');
666				$('#header nav').show();
667				$('#mobile-menu').hide();
668				
669				//recalc height of dropdown arrow
670				//$('.sf-sub-indicator').css('height',$('a.sf-with-ul').height());
671			}
672		}
673		
674		addOrRemoveSF();
675		initSF();
676		
677		$(window).resize(addOrRemoveSF);
678	
679		function SFArrows(){
680	
681			//set height of dropdown arrow
682			$('.sf-sub-indicator').css('height',$('a.sf-with-ul').height());
683		}
684		
685		//SFArrows();
686		
687		//responsive nav
688		$('#toggle-nav').click(function(){
689			
690			$('#mobile-menu').stop(true,true).slideToggle(500);
691			return false;
692		});
693		
694		////append dropdown indicators / give classes
695		$('#mobile-menu .container ul li').each(function(){
696			if($(this).find('> ul').length > 0) {
697				 $(this).addClass('has-ul');
698				 $(this).find('> a').append('<span class="sf-sub-indicator"><i class="fa fa-plus-square"></i></span>');
699			}
700		});
701		
702		////events
703		$('#mobile-menu .container ul li:has(">ul") > a .sf-sub-indicator').click(function(){
704			$(this).parent().parent().toggleClass('open');
705			$(this).parent().parent().find('> ul').stop(true,true).slideToggle();
706			return false;
707		});
708		
709		jQuery('a.add_to_cart_button').click(function(e) {
710			var link = this;
711			jQuery(link).parents('.product').find('.cart-loading').find('i').removeClass('fa-check').addClass('fa-refresh');
712			jQuery(this).parents('.product').find('.cart-loading').fadeIn();
713			setTimeout(function(){
714				jQuery(link).parents('.product').find('.cart-loading').find('i').hide().removeClass('fa-refresh').addClass('fa-check').fadeIn();
715	
716				setTimeout(function(){
717					jQuery(link).parents('.product').find('.cart-loading').fadeOut().parents('.product').find('.product-images img').animate({opacity: 1});;
718				}, 1500);
719			}, 1500);
720		});
721	
722		jQuery('li.product').mouseenter(function() {
723			if(jQuery(this).find('.cart-loading').find('i').hasClass('fa fa-check')) {
724				jQuery(this).find('.cart-loading').fadeIn();
725			}
726		}).mouseleave(function() {
727			if(jQuery(this).find('.cart-loading').find('i').hasClass('fa fa-check')) {
728				jQuery(this).find('.cart-loading').fadeOut();
729			}		
730		});
731		
732		jQuery('li.cart').mouseenter(function() {
733			
734				jQuery(this).find('.cart-contents').fadeIn();
735			
736		}).mouseleave(function() {
737			
738				jQuery(this).find('.cart-contents').fadeOut();
739			/*
740			if(jQuery(this).find('.cart-loading').find('i').hasClass('fa fa-check')) {
741				jQuery(this).find('.cart-loading').fadeOut();
742			}*/		
743		});
744        
745        // ToolTips
746        
747        if ( $().tipsy ) { nTip=function(){ $('.ntip').tipsy({gravity: 's', fade:true}); }; nTip(); }
748		if ( $().tipsy ) { sTip=function(){ $('.stip').tipsy({gravity: 'n', fade:true}); }; sTip(); }
749		if ( $().tipsy ) { eTip=function(){ $('.etip').tipsy({gravity: 'w', fade:true}); }; eTip(); }
750		if ( $().tipsy ) { wTip=function(){ $('.wtip').tipsy({gravity: 'e', fade:true}); }; wTip(); }
751        
752        
753        $("#primary-menu ul li:has(ul)").addClass('sub-menu');
754
755		// Portfolio Items Filter 			
756			
757		portfolioItemsFilter();
758			
759			 // Accordions
760    		$('.accordion').each(function() {
761				var id = $(this).attr('data-unique-id');
762				$('.accordion-wrap-'+id+' .acc_content').hide(); //Hide/close all containers
763				$('.accordion-wrap-'+id+' .acctitle:first').addClass('acctitlec').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
764		
765				//On Click
766				$('.accordion-wrap-'+id+' .acctitle').click(function(){
767					if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
768						$('.accordion-wrap-'+id+' .acctitle').removeClass('acctitlec').next().slideUp("normal"); //Remove all "active" state and slide up the immediate next container
769						$(this).toggleClass('acctitlec').next().slideDown("normal"); //Add "active" state to clicked trigger and slide down the immediate next container
770					}
771					return false; //Prevent the browser jump to the link anchor
772				});
773			});
774			
775			
776			
777			faqItemsFilter();
778
779        // Top Socials
780        
781        topSocialExpander=function(){
782            
783            var windowWidth = $(window).width();
784        
785                
786                $("#top-social li").show();
787                
788                $("#top-social li a").css({width: 40});
789                
790                $("#top-social li a").each(function() {
791                    $(this).addClass('stip');
792                    var topIconTitle = $(this).children('.ts-text').text();
793                    $(this).attr('title', topIconTitle);
794                });
795                
796                sTip();
797                
798                $("#top-social li a").hover(function() {
799                    $(this).stop().animate({width: 40}, 1, 'jswing');
800        		}, function() {
801        			$(this).stop().animate({width: 40}, 1, 'jswing');
802        		});
803                /*
804                if( windowWidth < 479 ) {
805                    
806                    $("#top-social li").hide();
807                    $("#top-social li").slice(0, 8).show();
808                    
809                }*/
810                
811            
812        
813        };
814		topSocialExpander();
815        
816        $(window).resize(function() {
817            topSocialExpander();
818        });
819        
820        
821        // Siblings Fader
822        
823        siblingsFader=function(){
824		$(".siblings_fade,.flickr_badge_image").hover(function() {
825			$(this).siblings().stop().fadeTo(400,0.5);
826		}, function() {
827			$(this).siblings().stop().fadeTo(400,1);
828		});
829		};
830		siblingsFader();
831        
832        
833        // Images Preload
834        
835        image_preload('.portfolio-image img, .portfolio-image-round img, .product-loop-thumb  img.product-loop-image, #kwicks-slider img,.rs-slider img, .ipost-image img');
836        
837        $('.port-gallery').each(function(){ $(this).addClass('preloader'); });
838		//$('.portfolio-image').each(function(){ $(this).addClass('preloader'); });
839        
840        $('.fslider').each(function(){ $(this).addClass('preloader2'); });       
841        
842        // Image Fade	
843		imgFade();        
844        
845        // Toggles
846        /*
847        $(".togglec").hide();
848		
849		$(".togglec.open").show();
850    	
851    	$(".togglet").click(function(){
852    	
853    	   $(this).toggleClass("toggleta").next(".togglec, .togglec.open").slideToggle("normal");
854    	   return true;
855        
856    	});
857		*/
858    	//$('.faqs_wrap').each( function() {
859    		toggles_function();
860    	//});
861        
862        
863        // Pricing Tables
864        
865        $('.pricing-defines').each( function(){
866            
867            var pricingDefinesTop = $(this).next().find('.pricing-features').position();
868            
869            var pricingDefinesParentHeight = $(this).next().outerHeight();
870            
871            $(this).find('.pricing-features').css( 'margin-top', (pricingDefinesTop.top - 1) + 'px' );
872            
873            $(this).find('.pricing-inner').css( 'height', (pricingDefinesParentHeight - 1) + 'px' );
874            
875        });
876
877        // Portfolio Hoverlay
878        
879		
880        
881		imgHoverlay();
882   
883        
884        // FitVids
885        
886        if ( $().fitVids ) { $("#content,#footer,#slider:not(.layerslider-wrap),.landing-offer-media").fitVids( { customSelector: "iframe[src^='http://www.dailymotion.com/embed']"} ); }
887        
888        
889        // prettyPhoto
890        
891        if ( $().prettyPhoto ) {
892            
893            initprettyPhoto=function(){
894                
895                $("a[rel^='prettyPhoto']").prettyPhoto({ theme: 'light_square' });
896            
897            };
898            initprettyPhoto();
899        
900        }
901        
902        
903        // Mobile Menu
904        
905        if( $().mobileMenu ) { $('#primary-menu > ul').mobileMenu(); }
906              
907        
908        // Anchor Link Scroll
909        
910        $("a[data-scrollto]").click(function(){
911    	
912            var divScrollToAnchor = $(this).attr('data-scrollto');
913            
914            if( $().scrollTo ) { jQuery.scrollTo( $( divScrollToAnchor ) , 400, {offset:-20} ); }
915            
916            return false;
917        
918    	});    	
919
920        jQuery('.googlemaps').each( function() {
921			jQuery(this).google_maps();
922		});
923
924        // Testimonials
925        
926        if( $().carouFredSel ) {
927            
928            $('.testimonial-scroller').each(function() {
929                jQuery(this).testimonials_carousel();
930            
931            });
932			
933			recent_works();
934			
935			$('.clients_wrapper').each(function() {
936				
937				jQuery(this).clients_carousel();
938            
939            });
940			
941			$('.portfolio-widget').each(function() {
942                
943                $(this).find('.portfolio-widget-scroll').carouFredSel({
944                	width : "100%",
945					height : "auto",
946					circular : false,
947					responsive : true,
948					infinite : false,
949					auto : false,
950					items : {
951						width : 280,
952						visible: {
953							max: 1
954						}
955					},
956					scroll : {						
957						wipe : true,
958						fx: "fade"
959					},
960					
961					prev: jQuery(this).find('.widget-scroll-prev'),
962					next: jQuery(this).find('.widget-scroll-next'),
963					
964					onCreate : function () {
965						$(window).on('resize', function(){
966							$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
967						}).trigger('resize');
968					}
969                });
970            
971            });
972			
973			
974			$('#related-posts-scroller').each(function() {
975                
976                $(this).carouFredSel({
977                	width : "100%",
978					height : "auto",
979					circular : false,
980					responsive : true,
981					infinite : false,
982					auto : false,
983					items : {
984						width : 160,
985						visible: {
986							min: 2,
987							max: 4
988						}
989					},
990					scroll : {
991						wipe : true
992					},
993					prev : {	
994						button : "#relatedposts_prev",
995						key : "left"
996					},
997					next : { 
998						button : "#relatedposts_next",
999						key : "right"
1000					},
1001					onCreate : function () {
1002						$(window).on('resize', function(){
1003							$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
1004						}).trigger('resize');
1005					}
1006                });
1007				
1008			});	
1009			
1010			$('#related-posts-scroller-wide').each(function() {
1011                
1012                $(this).carouFredSel({
1013                	width : "100%",
1014					height : "auto",
1015					circular : false,
1016					responsive : true,
1017					infinite : false,
1018					auto : false,
1019					items : {
1020						width : 160,
1021						visible: {
1022							min: 2,
1023							max: 5
1024						}
1025					},
1026					scroll : {
1027						wipe : true
1028					},
1029					prev : {	
1030						button : "#relatedposts_prev",
1031						key : "left"
1032					},
1033					next : { 
1034						button : "#relatedposts_next",
1035						key : "right"
1036					},
1037					onCreate : function () {
1038						$(window).on('resize', function(){
1039							$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
1040						}).trigger('resize');
1041					}
1042                });
1043				
1044			});	
1045			
1046			$('#portfolio-related-items').each(function() {
1047                
1048                $(this).carouFredSel({
1049                	width : "100%",
1050					height : "auto",
1051					circular : false,
1052					responsive : true,
1053					infinite : false,
1054					auto : false,
1055					items : {
1056						width : 200,
1057						visible: {
1058							min: 2,
1059							max: 5
1060						}
1061					},
1062					scroll : {
1063						wipe : true
1064					},
1065					prev : {	
1066						button : "#related-portfolio-prev",
1067						key : "left"
1068					},
1069					next : { 
1070						button : "#related-portfolio-next",
1071						key : "right"
1072					},
1073					onCreate : function () {
1074						$(window).on('resize', function(){
1075							$(this).parent().add($(this)).css('height', $(this).children().first().outerHeight() + 'px');
1076						}).trigger('resize');
1077					}
1078                });
1079				
1080			});	
1081			
1082        
1083        }
1084        
1085        // Flickr Feed
1086        
1087        if( $().jflickrfeed ) {
1088            
1089            $('.flickrfeed').each(function() {
1090                
1091                var flickrFeedID = $(this).attr('data-id');
1092                var flickrFeedCount = $(this).attr('data-count');
1093                var flickrFeedType = $(this).attr('data-type');
1094                var flickrFeedTypeGet = 'photos_public.gne';
1095                
1096                if( flickrFeedType == 'group' ) { flickrFeedTypeGet = 'groups_pool.gne'; }
1097                
1098                if( !flickrFeedCount ) { flickrFeedCount = 9; }
1099            
1100                $(this).jflickrfeed({
1101                    feedapi: flickrFeedTypeGet,
1102            		limit: Number(flickrFeedCount),
1103            		qstrings: {
1104            			id: flickrFeedID
1105            		},
1106            		itemTemplate: '<div class="flickr_badge_image">'+
1107            						'<a rel="prettyPhoto[galflickr]" href="{{image}}" title="{{title}}">' +
1108            							'<img src="{{image_s}}" alt="{{title}}" />' +
1109            						'</a>' +
1110            					  '</div>'
1111            	}, function(data) {
1112            		if ( $().prettyPhoto ) { initprettyPhoto(); }
1113            	});
1114            
1115            });
1116            
1117        }
1118        
1119        
1120        
1121
1122});
1123
1124
1125$(window).load(function() {
1126    
1127    jQuery('#pageLoader').fadeOut(800, function(){
1128        $(this).remove();
1129    });
1130    
1131    
1132    //siblingsFader();
1133    
1134    
1135    // Flex Slider
1136    
1137    if ( jQuery().flexslider ) {
1138        
1139        jQuery('.fslider .flexslider').each(function() {
1140            
1141            var flexsAnimation = $(this).parent('.fslider').attr('data-animate');
1142            var flexsEasing = $(this).parent('.fslider').attr('data-easing');
1143            var flexsDirection = $(this).parent('.fslider').attr('data-direction');
1144			var flexsDirectionNav = $(this).parent('.fslider').attr('data-direction-nav');
1145            var flexsSlideshow = $(this).parent('.fslider').attr('data-sli
1145deshow');
1146            var flexsPause = $(this).parent('.fslider').attr('data-pause');
1147			var flexsPauseHover = $(this).parent('.fslider').attr('data-pause-hover');
1148            var flexsSpeed = $(this).parent('.fslider').attr('data-speed');
1149            var flexsVideo = $(this).parent('.fslider').attr('data-video');
1150            var flexsSheight = true;
1151            var flexsUseCSS = false;
1152            
1153            if( !flexsAnimation ) { flexsAnimation = 'slide'; }
1154            if( !flexsEasing || flexsEasing == 'swing' ) {
1155                flexsEasing = 'swing';
1156                flexsUseCSS = true;
1157            }
1158            if( !flexsDirection ) { flexsDirection = 'horizontal'; }
1159            if( !flexsSlideshow ) { flexsSlideshow = false; }
1160			if( !flexsDirectionNav ) { flexsDirectionNav = false; }
1161            if( !flexsPause ) { flexsPause = 5000; }
1162			if( !flexsPauseHover ) { flexsPauseHover = false; }
1163            if( !flexsSpeed ) { flexsSpeed = 600; }
1164            if( !flexsVideo ) { flexsVideo = false; }
1165            if( flexsDirection == 'vertical' ) { flexsSheight = false; }
1166            
1167            $(this).flexslider({
1168                
1169                selector: ".slider-wrap > .slide",
1170                animation: flexsAnimation,
1171                easing: flexsEasing,
1172                direction: flexsDirection,
1173                slideshow: flexsSlideshow,
1174                slideshowSpeed: Number(flexsPause),
1175                animationSpeed: Number(flexsSpeed),
1176                pauseOnHover: flexsPauseHover,
1177				prevText: "<i class=\"fa fa-angle-left\"></i>",
1178				nextText: "<i class=\"fa fa-angle-right\"></i>",
1179                video: flexsVideo,
1180                controlNav: false,
1181                directionNav: flexsDirectionNav,
1182                smoothHeight: flexsSheight,
1183                useCSS: flexsUseCSS,
1184                start: function(slider){
1185                    slider.parent('.fslider').removeClass('preloader2');
1186                    slider.parent('.fslider').parent('.port-gallery').removeClass('preloader');
1187                }
1188                
1189            });
1190        
1191        });
1192    
1193    }
1194
1195});

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.