PageSourceSearch

https://www.sin3rgy-creative.com/wp-content/themes/kinetika/js/common.js

js sin3rgy-creative.com collected 2026-10-04 13:57:29 UTC 32,440 bytes, 943 lines download raw bytes

1jQuery(document).ready(function($){
2	"use strict";
3
4	if ( $('body').hasClass('rightclick-block') ) {
5		$(window).on("contextmenu", function(b) {
6		    if (3 === b.which) {
7		    	showCopyright();
8		    	return false;
9		    }
10		});
11	}
12	function showCopyright() {
13	    $("#dimmer").fadeIn();
14	    $("#dimmer").click(function(b) {
15	        $(this).fadeOut();
16	    });
17	}
18
19	$(".modal-trigger-button").on('click',function () {
20		var modal_display = $(this).data('modalid');
21		displayModal(modal_display);
22	});
23
24	function displayModal(modal_id) {
25		var modal_id_display = "#" + modal_id;
26	    $( modal_id_display ).fadeIn( "fast", function() {
27			// Animation complete
28			$(modal_id_display).find('.md-modal').addClass('md-show');
29		});
30	    $('body').addClass('modal-active');
31	    $( '.modal-close-button' ).click(function(b) {
32	        $(modal_id_display).fadeOut();
33	    	$('body').removeClass('modal-active');
34	    	$(modal_id_display).find('.md-modal').removeClass('md-show');
35	    });
36	}
37
38	Pace.on('done', function() {
39		$('.pace').fadeOut( "slow", function() {
40		    $('.pace').remove();
41		});
42		$('.woocommerce span.onsale,.woocommerce-page span.onsale').delay(500).fadeIn( "slow" );
43		$('.preloader-cover-screen').remove();
44	});
45
46	var deviceAgent = navigator.userAgent.toLowerCase();
47	var isIOS = deviceAgent.match(/(iphone|ipod|ipad)/);
48	var ua = navigator.userAgent.toLowerCase();
49	var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
50	var curr_menu_item;
51	var percent;
52
53	function mobilecheck() {
54		var check = false;
55		(function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
56		return check;
57	}
58
59	function centerLogo() {
60		var countMenuParents = $(".homemenu ul.sf-menu > li").length;
61		if (countMenuParents != 0) {
62			if (countMenuParents>1) {
63				var centerChild = Math.floor(countMenuParents / 2);
64			} else {
65				centerChild = 1;
66			}
67			var center_logo = $('body.middle-logo');
68			if ( center_logo.length ) {
69				$( ".header-logo-section" ).detach().insertAfter('.homemenu ul.sf-menu > li:nth-child('+centerChild+')');
70				$( ".header-logo-section" ).wrap( '<li id="header-logo"></li>' );
71			}
72		}
73		//console.log(centerChild);
74	}
75	centerLogo();
76
77	$(".vertical-menu").niceScroll({
78		cursorwidth:4,
79		cursorborder:0,
80		cursorcolor:"#777777",
81		touchbehavior: false,
82		autohidemode: true
83	});
84
85	function contain_video_fullscreen() {
86		var fullscreen_window_width = $(window).width();
87
88		var fullscreen_width = fullscreen_window_width;
89		var fullscreen_header_height = $('.outer-wrap').outerHeight() + 5;
90		if ($('.fullscreen-footer-wrap').length) {
91			var fullscreen_footer_height = $('.fullscreen-footer-wrap').outerHeight();
92		} else {
93			var fullscreen_footer_height = 0;
94		}
95		var fullscreen_outer = fullscreen_header_height + fullscreen_footer_height + 5;
96		var fullscreen_height = $( window ).height() - fullscreen_outer;
97
98		if ($('body').hasClass('boxed-site-layout')) {
99			fullscreen_width = fullscreen_window_width - 110;
100			$('#fullscreenvimeo').css('left','55px');
101		}
102
103		if (fullscreen_window_width < 1025 ) {
104			fullscreen_header_height = $('.mobile-menu-toggle').outerHeight();
105			fullscreen_outer = fullscreen_header_height + fullscreen_footer_height;
106
107			fullscreen_height = $( window ).height() - fullscreen_outer;
108			if ($('body').hasClass('boxed-site-layout')) {
109				$('#fullscreenvimeo').css('left','0');
110			}
111			fullscreen_width = '100%';
112		}
113		if ( $('body').hasClass('menu-is-vertical') ) {
114			var vertical_menu_width = $('.vertical-menu').width();
115			if (fullscreen_window_width < 1025 ) {
116				fullscreen_width = '100%';
117			} else {
118				fullscreen_width = fullscreen_window_width - vertical_menu_width;
119			}
120		}
121		if ($('body').hasClass('fullscreen-mode-on')) {
122			fullscreen_height = '100%';
123			fullscreen_header_height = 0;
124			fullscreen_width = '100%';
125			$('#fullscreenvimeo').css('left','0');
126		}
127
128		if ( $('body').hasClass('fullscreen-video-type-vimeo') ) {
129			$('#fullscreenvimeo').css('top',fullscreen_header_height);
130			$('#fullscreenvimeo').css('height',fullscreen_height);
131			$('#fullscreenvimeo').css('width',fullscreen_width);
132		}
133	}
134	contain_video_fullscreen();
135
136	function fotoramaResizer() {
137		if ($.fn.fotorama) {
138			
139			var fotorama_window_width = $(window).width();
140			
141			if ( $('body').hasClass('menu-is-vertical') ) {
142				if (fotorama_window_width < 1025 ) {
143					$('#fotorama-container-wrap').addClass('fotorama-fullwidth');
144				} else {
145					$('#fotorama-container-wrap').removeClass('fotorama-fullwidth');
146				}
147			}
148
149			$('.fotorama').data('fotorama').destroy();
150
151			var fotorama_width = fotorama_window_width;
152			var fotorama_header_height = $('.outer-wrap').outerHeight() + 5;
153			var fotorama_footer_height = $('.fullscreen-footer-wrap').outerHeight();
154			var fotorama_outer = fotorama_header_height + fotorama_footer_height + 5;
155			var fotorama_height = $( window ).height() - fotorama_outer;
156			
157			if ($('body').hasClass('fotorama-style-contain')) {
158				if ($('body').hasClass('boxed-site-layout')) {
159					fotorama_width = fotorama_window_width - 110;
160					$('#fotorama-container-wrap').css('left','55px');
161				}
162				if (fotorama_window_width < 1025 ) {
163					fotorama_header_height = $('.mobile-menu-toggle').outerHeight();
164					fotorama_outer = fotorama_header_height + fotorama_footer_height;
165
166					fotorama_height = $( window ).height() - fotorama_outer;
167					$('#fotorama-container-wrap').css('left','0');
168					fotorama_width = '100%';
169				}
170			} else {
171				fotorama_height = '100%';
172				fotorama_header_height = 0;
173				fotorama_width = '100%';				
174			}
175
176			if ($('body').hasClass('fullscreen-mode-on')) {
177				fotorama_height = '100%';
178				fotorama_header_height = 0;
179				fotorama_width = '100%';
180				$('#fotorama-container-wrap').css('left','0');
181			}
182			if ( $( 'body' ).hasClass( 'fotorama-style-cover' ) ) {
183				fotorama_height = $(window).height();
184			}
185			if ( $('body').hasClass('menu-is-vertical') ) {
186				fotorama_height = $(window).height();
187				fotorama_header_height = 0;
188			}
189			if ($(".responsive-menu-wrap:visible").length) {
190				fotorama_height = $(window).height() - 50;
191				fotorama_header_height = 53;
192			}
193
194			$('#fotorama-container-wrap').css('top',fotorama_header_height);
195			$('.fotorama').fotorama({
196				height: fotorama_height,
197				width: fotorama_width
198			});
199		}
200	}
201
202	$(window).resize(function() {
203		fotoramaResizer();
204		contain_video_fullscreen();
205	});
206	if ($.fn.fotorama) {
207		
208		var fotorama_window_width = $(window).width();
209		
210		if ( $('body').hasClass('menu-is-vertical') ) {
211			if (fotorama_window_width < 1025 ) {
212				$('#fotorama-container-wrap').addClass('fotorama-fullwidth');
213			} else {
214				$('#fotorama-container-wrap').removeClass('fotorama-fullwidth');
215			}
216		}
217		
218		var fotorama_width = fotorama_window_width;
219		var fotorama_header_height = $('.outer-wrap').outerHeight() + 5;
220		var fotorama_footer_height = $('.fullscreen-footer-wrap').outerHeight();
221		var fotorama_outer = fotorama_header_height + fotorama_footer_height + 5;
222		var fotorama_height = $( window ).height() - fotorama_outer;
223
224		if ($('body').hasClass('fullscreen-mode-on')) {
225			fotorama_height = '100%';
226			fotorama_header_height = 0;
227			fotorama_width = '100%';
228		}
229		
230		if ($('body').hasClass('fotorama-style-contain')) {
231			if ($('body').hasClass('boxed-site-layout')) {
232				fotorama_width = fotorama_window_width - 110;
233				$('#fotorama-container-wrap').css('left','55px');
234			}
235			if (fotorama_window_width < 1025 ) {
236				fotorama_header_height = $('.mobile-menu-toggle').outerHeight();
237				fotorama_outer = fotorama_header_height + fotorama_footer_height;
238
239				fotorama_height = $( window ).height() - fotorama_outer;
240				$('#fotorama-container-wrap').css('left','0');
241				fotorama_width = '100%';
242			}
243		} else {
244			fotorama_height = '100%';
245			fotorama_header_height = 0;
246			fotorama_width = '100%';				
247		}
248		if ( $( 'body' ).hasClass( 'fotorama-style-cover' ) ) {
249			fotorama_height = $(window).height();
250		}
251		
252		if ( $('body').hasClass('menu-is-vertical') ) {
253			fotorama_height = $(window).height();
254			fotorama_header_height = 0;
255		}
256		if ($(".responsive-menu-wrap:visible").length) {
257			fotorama_height = $(window).height() - 50;
258			fotorama_header_height = 53;
259		}
260		$('#fotorama-container-wrap').css('top',fotorama_header_height);
261		$('.fotorama').fotorama({
262			height: fotorama_height,
263			width: fotorama_width
264		});
265	}
266
267	// Fullscreen Toggle
268	var events_toggle_element = $('.mtheme-events-carousel');
269	var fullscreen_toggle_elements = $(".container-outer,.single-mtheme_photostory .portfolio-nav-wrap,.vertical-left-bar,.vertical-right-bar,#slidecaption,#static_slidecaption,.tp-bullets,#copyright,.edit-entry,.stickymenu-zone,.social-toggle-wrap,.fullscreen-footer-wrap,.toggle-menu,.page-is-not-fullscreen .container-wrapper");
270	var reverse_switch_elements = $('.background-slideshow-controls');
271	var slideshow_caption = $('#static_slidecaption,#slidecaption');
272	//Sidebar toggle function
273	$("body").on('click', '.fullscreen-toggle-off', function () {
274		
275		$('.mtheme-fullscreen-toggle').removeClass('fullscreen-toggle-off').addClass('fullscreen-toggle-on');
276		$('body').removeClass('fullscreen-mode-off').addClass('fullscreen-mode-on');
277		if ( $('body').hasClass('has-fullscreen-eventbox') ) {
278			$('body').removeClass('has-fullscreen-eventbox').addClass('fullscreen-eventbox-inactive').addClass('fullscreen-eventbox-switched');
279		}
280		$('.mtheme-fullscreen-toggle').find('i').removeClass('fa-expand').addClass('fa-compress');
281
282		events_toggle_element.addClass('mtheme-events-offscreen');
283		fullscreen_toggle_elements.fadeOut();
284		reverse_switch_elements.fadeIn();
285
286		fotoramaResizer();
287		contain_video_fullscreen();
288
289	});
290	
291	//Sidebar toggle function
292	$("body").on('click', '.fullscreen-toggle-on', function () {
293
294		$('.mtheme-fullscreen-toggle').removeClass('fullscreen-toggle-on').addClass('fullscreen-toggle-off');
295		$('body').removeClass('fullscreen-mode-on').addClass('fullscreen-mode-off');
296		if ( $('body').hasClass('fullscreen-eventbox-switched') ) {
297			$('body').addClass('has-fullscreen-eventbox').removeClass('fullscreen-eventbox-inactive').removeClass('fullscreen-eventbox-switched');
298		}
299
300		events_toggle_element.removeClass('mtheme-events-offscreen');
301		fullscreen_toggle_elements.fadeIn();
302		reverse_switch_elements.fadeOut();
303
304		$('.mtheme-fullscreen-toggle').find('i').addClass('fa-expand').removeClass('fa-compress');
305
306		var $filterContainer = $('#gridblock-container');
307        if ($.fn.isotope) {
308        	$filterContainer.isotope( 'layout' );
309    	}
310    	fotoramaResizer();
311    	contain_video_fullscreen();
312	});
313
314	// One page menu scrolls
315	var thebody = $('html, body');
316	var one_page_adjust = 75;
317	if ( $('body').hasClass('menu-is-vertical') ) {
318		var one_page_adjust = -1;
319	}
320	if ($(".responsive-menu-wrap:visible").length) {
321		var one_page_adjust = 53;
322	}
323	$('.menu-item a[href*=\\#],.rev_slider_wrapper a[href*=\\#]').click(function(){
324		var onepage_url = $(this).attr('href');
325		var onepage_hash = '#' + onepage_url.substring(onepage_url.indexOf("#")+1);
326
327		thebody.animate({
328		    scrollTop: $( onepage_hash ).offset().top - one_page_adjust
329		},{
330	        duration: 1700,
331	        easing: "easeInOutExpo"
332	    });
333		$('body').removeClass('body-dashboard-push-left');
334		$(".responsive-mobile-menu").removeClass('menu-push-onscreen');
335		$("body").removeClass('menu-is-onscreen');
336		$(".responsive-mobile-menu").hide();
337		$('.mobile-menu-icon-toggle').addClass('feather-icon-menu').removeClass('feather-icon-cross');
338		return false;
339	});
340	if(window.location.hash) {
341		var onepage_hash = '#' + window.location.hash.substring(1);
342		thebody.animate({
343		    scrollTop: $( onepage_hash ).offset().top - one_page_adjust
344		},{
345	        duration: 1700,
346	        easing: "easeInOutExpo"
347	    });
348	}
349
350	$(".service-column.alignicon-top-horizontal").hover(
351	function () {
352		var iconcolor = $(this).find('.service-icon').attr('data-iconcolor');
353		var bgcolor = $(this).find('.service-icon').attr('data-bgcolor');
354		console.log(iconcolor);
355		$(this).find('.service-icon').find('.fontawesome').css('color', bgcolor);
356		$(this).find('.service-icon').find('.fontawesome').css('background-color', iconcolor);
357	},
358	function () {
359		var iconcolor = $(this).find('.service-icon').attr('data-iconcolor');
360		var bgcolor = $(this).find('.service-icon').attr('data-bgcolor');
361		console.log(iconcolor);
362		$(this).find('.service-icon').find('.fontawesome').css('background-color', bgcolor);
363		$(this).find('.service-icon').find('.fontawesome').css('color', iconcolor);
364	});
365
366    function html5_resizer() {
367		$('.photocard-video').each(function(){
368	        var width = $(this).width();
369			var ratio = 16/9;
370			var pWidth; // player width, to be defined
371			var	height = $(this).height();
372			var	pHeight; // player height, tbd
373			var	videojs_container = $(this).find('#photocardvideo');
374	            //console.log(width);
375	        // when screen aspect ratio differs from video, video must center and underlay one dimension
376
377	        if (width / ratio < height) { // if new video height < window height (gap underneath)
378	            pWidth = Math.ceil(height * ratio); // get new player width
379	            videojs_container.width(pWidth).height(height).css({left: (width - pWidth) / 2, top: 0}); // player width is greater, offset left; reset top
380	        } else { // new video width < window width (gap to right)
381	            pHeight = Math.ceil(width / ratio); // get new player height
382	            videojs_container.width(width).height(pHeight).css({left: 0, top: (height - pHeight) / 2}); // player height is greater, offset top; reset left
383	        }
384		});
385    }
386    // events
387    $(window).resize(function() {
388        html5_resizer();
389    });
390    html5_resizer();
391
392	// Hero image
393	var document_height = $( window ).height();
394	var document_width = $( window ).width();
395	$(".heroimage-wrap").height(document_height);
396
397	var header_height = $(".outer-wrap").outerHeight() * -1;
398	if ( $('body').hasClass('menu-is-vertical') ) {
399		header_height = 0;
400	}
401	console.log(header_height);
402	if (header_height!==0) {
403		// $("#heroimage1").css("marginTop",header_height);
404	}
405	$(window).resize(function() {
406		
407		document_height = $( window ).height();
408
409		if ( $(".outer-wrap").is(":visible") ) {
410			// header_height = $(".'.esc_js($offsetclass).'").outerHeight() * -1;
411			// $("#heroimage1").css({"marginTop":header_height,"background-size":"cover"});
412		} else {
413			$("#heroimage").css({"marginTop":"0","background-size":"cover"});
414		}
415		$(".heroimage-wrap").height(document_height);
416	});
417
418
419	// Slideshow Hero titles
420    var slidetext = $(".hero-text-wrap ul li");
421    var slideIndex = -1;
422    
423    function showNextHeroText() {
424        slideIndex++;
425        slidetext.eq(slideIndex % slidetext.length)
426            .fadeIn(2000)
427            .delay(2000)
428            .fadeOut(2000, showNextHeroText);
429    }
430    if ( $(".hero-text-wrap ul").hasClass("slideshow") ) {
431    	showNextHeroText();
432	}
433
434	$('.hero-link-to-base').on("click", function(){
435		//dashboard toggle
436		var scrollelement = $(this).closest('.heroimage-wrap');
437		var fromtop = scrollelement.offset().top;
438		var scrolltobase = scrollelement[0].scrollHeight + fromtop;
439		$('body,html').animate({
440			scrollTop: scrolltobase
441		}, 800);
442	});
443	$('.hero-demo-to-base').on("click", function(){
444		//dashboard toggle
445		var demoelement = $('.hero-linked-demo');
446		var fromtop = demoelement.offset().top;
447		var demoscrolltobase = demoelement[0].scrollHeight + fromtop;
448		$('body,html').animate({
449			scrollTop: demoscrolltobase
450		}, 800);
451	});
452	$('.hero-demo-to-base2').on("click", function(){
453		//dashboard toggle
454		var demoelement = $('.hero-linked-demo2');
455		var fromtop = demoelement.offset().top;
456		var demoscrolltobase = demoelement[0].scrollHeight + fromtop;
457		$('body,html').animate({
458			scrollTop: demoscrolltobase
459		}, 800);
460	});
461	// Hero image End
462	$('.single-mtheme_portfolio #sidebar,.single-mtheme_portfolio .portfolio-details-section')
463		.theiaStickySidebar({
464			additionalMarginTop: 100,
465			minWidth: 768
466	});
467
468	if (isIOS || isAndroid) {
469		$('.fullpage-block,.title-container-wrap').css('background-attachment','scroll');
470	}
471	$('.side-dashboard-toggle').on("click", function(){
472		//dashboard toggle
473		$('body').toggleClass('body-dashboard-push-right');
474		$('.side-dashboard-wrap').toggleClass('dashboard-push-onscreen');
475	});
476	$(".mobile-menu-icon").click(function(){
477		//mobile menu
478		$('body').toggleClass('body-dashboard-push-left');
479		$('.mobile-menu-icon-toggle').toggleClass('feather-icon-menu').toggleClass('feather-icon-cross');
480		$('.responsive-mobile-menu').toggle( 10, function() {
481			$(".responsive-mobile-menu").toggleClass('menu-push-onscreen');
482			$("body").toggleClass('menu-is-onscreen');
483		});
484	});
485	$('.container-wrapper').click(function(){
486		//Reset dashboard
487		$('body').removeClass('body-dashboard-push-right');
488		$('.side-dashboard-wrap').removeClass('dashboard-push-onscreen');
489		//reset mobile menu
490		$('body').removeClass('body-dashboard-push-left');
491		$(".responsive-mobile-menu").removeClass('menu-push-onscreen');
492		$("body").removeClass('menu-is-onscreen');
493		$(".responsive-mobile-menu").hide();
494		$('.mobile-menu-icon-toggle').addClass('feather-icon-menu').removeClass('feather-icon-cross');
495	});
496
497    $(window).resize(function() {
498		$(".woocommerce-product-gallery__image").css('min-height','0');
499    });
500
501	if (isIOS || isAndroid) {
502		$('.fullpage-block').css('background-attachment','scroll');
503	}
504
505	$(".ntips").tooltip({
506		position: { 
507			my: "center bottom+40",
508			at: "center bottom"
509		},
510		show: {
511		effect: "fade",
512		delay: 5
513		}
514	});	
515	$(".stips").tooltip({
516		position: { 
517			my: "center top",
518			at: "center top"
519		},
520		show: {
521		effect: "fade",
522		delay: 5
523		}
524	});
525
526	// Detect Search Toggle and ESC
527
528	// Open
529	$('.header-search').on("click", function(){
530		$('body').toggleClass('msearch-is-on');
531		$('#header-search-bar-wrap').fadeIn();
532		$( "#hs" ).focus();
533	});
534
535	if ( $('body').hasClass('error404') ) {
536		$( "#s" ).focus();
537	}
538
539	// Close
540	$('.header-search-close,#header-search-bar-wrap').on("click", function(){
541		if ( $('body').hasClass('msearch-is-on') ) {
542			$('body').toggleClass('msearch-is-on');
543			$('#header-search-bar-wrap').fadeOut();
544		}
545	});
546	$('.header-search-bar').click(function(event){
547    	event.stopPropagation();
548	});
549
550	// Watch for ESC Key
551	$('body').keyup(function(e){
552	    //alert(e.keyCode);
553	    if(e.keyCode == 27){
554	        // Close my modal window
555	        if ( $('body').hasClass('msearch-is-on') ) {
556		        $('body').toggleClass('msearch-is-on');
557		        $('#header-search-bar-wrap').fadeOut();
558	    	}
559	    }
560	});
561
562	// end block of search toggle
563
564	$(".fitVids").fitVids();
565
566	if ($.fn.superfish) {
567		$('.homemenu ul.sf-menu').superfish({
568			animation:     {opacity:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method. Used to animate the submenu open
569	  		animationOut:  {opacity:'hide'}, // fade-in and slide-down animation
570			speed:         'normal',
571			speedOut:      'fast',
572			disableHI:     true,
573			delay: 		100,
574			autoArrows:  true,
575			dropShadows: true,
576			onInit: function(){
577				$(".homemenu .sf-menu .mega-item .children-depth-0").css('display','none');
578				},
579			onHide: function(){
580				},
581			onShow: function(){
582				},
583			onBeforeShow: function(){
584				},
585			onBeforeHide: function(){
586				}
587		});
588	}
589
590	$('.support-user-options-trigger').on("click", function(){
591		$('.support-user-options-wrap').removeClass('support-monitor-active');
592	});
593	
594	//Portfolio Hover effects
595	$(".gototop,.hrule.top a").click(function(){
596		$('html, body').animate({scrollTop:0}, 'slow');
597		return false;
598	});
599	
600	// Responsive dropdown list triggered on Mobile platforms
601    $('#top-select-menu').bind('change', function () { // bind change event to select
602        var url = $(this).val(); // get selected value
603        if (url != '') { // require a URL
604            window.location = url; // redirect
605        }
606        return false;
607    });
608	
609	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
610	$(".toggle-shortcode").click(function(){
611		$(this).toggleClass("active").next().slideToggle("fast");
612		return false;
613	});
614
615	// Faq toggle shortcode
616	$(".faq-toggle-shortcode-wrap").click(function(){
617		$(this).toggleClass("active").find('a.faq-toggle-link').next().slideToggle("fast");
618		return false;
619	});
620
621	$(".fotorama").hover(
622	function () {
623		$('.fotorama__nav-wrap').fadeIn();
624	},
625	function () {
626		$('.fotorama__nav-wrap').fadeOut();
627	});
628
629	$(".service-item").hover(
630	function () {
631		$(this).children('.icon-large').animate({
632			top:-10
633		},300);
634	},
635	function () {
636		$(this).children('.icon-large').animate({
637			top:0
638		},300);
639	});
640	
641	$("#main-gridblock-carousel .preload").hover(
642	function () {
643	  $(this).stop().fadeTo("fast", 0.6);
644	},
645	function () {
646	  $(this).stop().fadeTo("fast", 1);
647	});
648	
649	$(".gridblock-image-holder").hover(
650	function () {
651	  $(this).stop().fadeTo("fast", 0.6);
652	},
653	function () {
654	  $(this).stop().fadeTo("fast", 1);
655	});
656	
657	$(".thumbnail-image").hover(
658	function () {
659	  $(this).stop().fadeTo("fast", 0.6);
660	},
661	function () {
662	  $(this).stop().fadeTo("fast", 1);
663	});
664	
665	$(".pictureframe").hover(
666	function () {
667	  $(this).stop().fadeTo("fast", 0.6);
668	},
669	function () {
670	  $(this).stop().fadeTo("fast", 1);
671	});
672	
673	$(".filter-image-holder").hover(
674	function () {
675	  $(this).stop().fadeTo("fast", 0.6);
676	},
677	function () {
678	  $(this).stop().fadeTo("fast", 1);
679	});
680
681	$("#popularposts_list li:even,#recentposts_list li:even").addClass('even');
682	$("#popularposts_list li:odd,#recentposts_list li:odd").addClass('odd');
683	
684	$(".close_notice").click(function(){
685	  	$(this).parent('.noticebox').slideUp('fast');
686	});
687
688	if ($.fn.waypoint) {
689
690		//Skill Bar
691		$('.skillbar').waypoint(function() {
692			$('.skillbar').each(function(){
693				percent = $(this).attr('data-percent');
694				$(this).find('.skillbar-bar').animate({ 'width' : percent + '%' }, 3000, 'easeInOutExpo').addClass('progressed');
695			});
696		}, { offset: '90%' });
697
698		
699		$('.animation-standby').each(function(){
700			var waypointElement = $(this);
701			new Waypoint({
702				element: waypointElement,
703				handler: function() {
704					waypointElement.removeClass('animation-standby').addClass('animation-action');
705				},
706				offset: '90%'
707			});
708		});
709		
710		$('.is-animated').each(function(){
711			var waypointElement = $(this);
712			new Waypoint({
713				element: waypointElement,
714				handler: function() {
715					waypointElement.removeClass('is-animated').addClass('element-animate');
716				},
717				offset: '90%'
718			});
719		});
720	}
721	
722	// fade in #back-top
723	$(function () {
724		$(window).scroll(function () {
725			if ($(this).scrollTop() > 100) {
726				$('#goto-top').fadeIn();
727			} else {
728				$('#goto-top').fadeOut();
729			}
730		});
731
732		// scroll body to 0px on click
733		$('#goto-top').click(function () {
734			$('body,html').animate({
735				scrollTop: 0
736			}, 800);
737			return false;
738		});
739	});
740	$('.pricing-column ul').each(function(e){
741		$(this).find('li:even').addClass('even');
742		$(this).find('li:odd').addClass('odd');
743	});
744
745	// WooCommerce Codes
746	// Thumnail hover for secondary image
747
748	var header_cart_toggle = $('.header-cart-toggle');
749	var header_cart_off = $('.header-cart-close');
750
751	header_cart_toggle.on("click", function(){
752		$('.mtheme-header-cart').fadeToggle();
753	});
754	$('.header-cart-close').on("click", function(){
755		$('.mtheme-header-cart').fadeOut();
756	});
757	$('.container-wrapper').on("click", function(event){
758    	$('.mtheme-header-cart').fadeOut();
759	});
760	$('.mtheme-header-cart').mouseleave(function() {
761		$(this).fadeOut();
762	});
763
764	var woocommerce_active = $('body.woocommerce');
765	if ( woocommerce_active.length ) {
766		// $( 'ul.products li' ).hover( function() {
767		// 	$( this ).find( '.mtheme-woocommerce-description' ).slideDown('fast');
768		// }, function() {
769		// 	$( this ).find( '.mtheme-woocommerce-description' ).slideUp('fast');
770		// });
771		$( 'ul.products li.mtheme-hover-thumbnail' ).hover( function() {
772			var woo_secondary_thumnail = $(this).find( '.mtheme-secondary-thumbnail-image' ).attr('src');
773			if( woo_secondary_thumnail !== undefined ) {
774				console.log(woo_secondary_thumnail);
775				$( this ).find( '.wp-post-image' ).removeClass( 'woo-thumbnail-fadeInDown' ).addClass( 'woo-thumbnail-fadeOutUp' );
776				$( this ).find( '.mtheme-secondary-thumbnail-image' ).removeClass( 'woo-thumbnail-fadeOutUp' ).addClass( 'woo-thumbnail-fadeInDown' );
777			}
778		}, function() {
779			var woo_secondary_thumnail = $(this).find( '.mtheme-secondary-thumbnail-image' ).attr('src');
780			if( woo_secondary_thumnail !== undefined ) {
781				$( this ).find( '.wp-post-image' ).removeClass( 'woo-thumbnail-fadeOutUp' ).addClass( 'woo-thumbnail-fadeInDown' );
782				$( this ).find( '.mtheme-secondary-thumbnail-image' ).removeClass( 'woo-thumbnail-fadeInDown' ).addClass( 'woo-thumbnail-fadeOutUp' );
783			}
784		});
785
786
787		var woocommerce_ordering = $(".woocommerce-page .woocommerce-ordering select");
788		if ( (woocommerce_ordering).length ) {
789			var woocommerce_ordering_curr = $(".woocommerce-ordering select option:selected").text();
790			var woocommerce_ordering_to_ul = woocommerce_ordering
791				.clone()
792				.wrap("<div></div>")
793				.parent().html()
794				.replace(/select/g,"ul")
795				.replace(/option/g,"li")
796				.replace(/value/g,"data-value");
797
798			$( '.woocommerce-ordering' )
799			.prepend( '<div class="mtheme-woo-order-selection-wrap"><div class="mtheme-woo-order-selected-wrap"><span class="mtheme-woo-order-selected">'+woocommerce_ordering_curr+'</span><i class="woo-sorter-dropdown feather-icon-layers"></i></div><div class="mtheme-woo-order-list">' + woocommerce_ordering_to_ul + '</div></div>' );
800		}
801
802		$(function(){
803			//$('.woocommerce-page .woocommerce-ordering select').hide();
804		    $('.mtheme-woo-order-selected-wrap').click(function(){
805		        $('.mtheme-woo-order-list ul').slideToggle('fast');
806		        $('.woo-sorter-dropdown').toggleClass('feather-icon-layers').toggleClass('feather-icon-cross');
807		    });
808		    $('.mtheme-woo-order-list ul li').click(function(e){
809		    	//Set value
810		    	 var selected_option = $(this).data('value');
811		         $(".woocommerce-page .woocommerce-ordering select").val(selected_option).trigger('change');
812		        
813		         $('.mtheme-woo-order-selected').text($(this).text());
814		         $('.mtheme-woo-order-list').slideUp('fast'); 
815		        $(this).addClass('current');
816		        e.preventDefault();
817		    })
818		});
819	}
820	
821});
822
823//
824(function($){
825$(window).on('load', function(){
826
827	var deviceAgent = navigator.userAgent.toLowerCase();
828	var isIOS = deviceAgent.match(/(iphone|ipod|ipad)/);
829	var ua = navigator.userAgent.toLowerCase();
830	var isAndroid = ua.indexOf("android") > -1;
831
832	if ( $('body').hasClass('pace-done') ) {
833		$('.pace').remove();
834	} else {
835		$('body').addClass('pace-done').removeClass('pace-running');
836		$('.preloader-cover-screen').remove();
837		$('.pace').fadeOut( "slow", function() {
838		    $('.pace').remove();
839		});
840	}
841
842    if ( isIOS || isAndroid ) {
843    	// for mobile
844    } else {
845	    $.stellar({
846	        horizontalScrolling: false,
847	        parallaxBackgrounds: true,
848	        verticalOffset: 0,
849	        responsive: true
850	    });
851	}
852
853	var sync1 = $("#owl-woocommerce-slideshow");
854	var sync2 = $("#owl-woocommerce-slideshow-thumbnails");
855
856		 function center(number) {
857		     var sync2visible = sync2.data("owlCarousel").owl.visibleItems;
858		     var num = number;
859		     var found = false;
860		     for (var i in sync2visible) {
861		         if (num === sync2visible[i]) {
862		             var found = true;
863		         }
864		     }
865
866		     if (found === false) {
867		         if (num > sync2visible[sync2visible.length - 1]) {
868		             sync2.trigger("owl.goTo", num - sync2visible.length + 2)
869		         } else {
870		             if (num - 1 === -1) {
871		                 num = 0;
872		             }
873		             sync2.trigger("owl.goTo", num);
874		         }
875		     } else if (num === sync2visible[sync2visible.length - 1]) {
876		         sync2.trigger("owl.goTo", sync2visible[1])
877		     } else if (num === sync2visible[0]) {
878		         sync2.trigger("owl.goTo", num - 1)
879		     }
880		 }
881
882		 function syncPosition(el) {
883		     var current = this.currentItem;
884		     $("#owl-woocommerce-slideshow-thumbnails")
885		         .find(".owl-item")
886		         .removeClass("synced")
887		         .eq(current)
888		         .addClass("synced")
889		     if ($("#owl-woocommerce-slideshow-thumbnails").data("owlCarousel") !== undefined) {
890		         center(current)
891		     }
892		 }
893
894	if (sync1.length) {
895		 sync1.owlCarousel({
896		     singleItem: true,
897		     slideSpeed: 1000,
898		     navigation: true,
899		     autoHeight: true,
900		     pagination: false,
901		     transitionStyle : "fade",
902		     afterAction: syncPosition,
903		     navigationText : ["",""],
904		     responsiveRefreshRate: 200,
905		 });
906		 sync2.owlCarousel({
907		     items: 8,
908		     itemsDesktop: [1199, 10],
909		     itemsDesktopSmall: [979, 10],
910		     itemsTablet: [768, 8],
911		     itemsMobile: [479, 4],
912		     pagination: false,
913		     responsiveRefreshRate: 100,
914		     afterInit: function(el) {
915		         el.find(".owl-item").eq(0).addClass("synced");
916		     }
917		 });
918
919
920
921		 $("#owl-woocommerce-slideshow-thumbnails").on("click", ".owl-item", function(e) {
922		     e.preventDefault();
923		     var number = $(this).data("owlItem");
924		     sync1.trigger("owl.goTo", number);
925		 });
926
927
928		$("#owl-woocommerce-slideshow-thumbnails").owlCarousel({
929			itemsCustom : [
930				[0, 2],
931				[500, 2],
932				[700, 3],
933				[1024, 4]
934			],
935			items: 4,
936			navigation : false,
937			navigationText : ["",""],
938			scrollPerPage : false
939		});
940	}
941
942})
943})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.