PageSourceSearch

https://www.klab.it/wp-content/themes/uncode/library/js/init.js?ver=1006480116

js klab.it collected 2026-09-25 20:06:55 UTC 171,359 bytes, 4,128 lines download raw bytes

1/**
2 * Load utils - BEGIN
3 */
4/*
5 CSS Browser Selector 1.0
6 Originally written by Rafael Lima (http://rafael.adm.br)
7 http://rafael.adm.br/css_browser_selector
8 License: http://creativecommons.org/licenses/by/2.5/
9
10 Co-maintained by:
11 https://github.com/ridjohansen/css_browser_selector
12 https://github.com/wbruno/css_browser_selector
13 */
14
15"use strict";
16
17window.requestAnimFrame = (function() {
18	return  window.requestAnimationFrame	   ||
19			window.webkitRequestAnimationFrame ||
20			window.mozRequestAnimationFrame	||
21			window.oRequestAnimationFrame	  ||
22			window.msRequestAnimationFrame	 ||
23			function(/* function */ callback, /* DOMElement */ element){
24				window.setTimeout(callback, 1000 / 60);
25			};
26})();
27
28window.requestTimeout = function(fn, delay) {
29	if( !window.requestAnimationFrame	  	&&
30		!window.webkitRequestAnimationFrame &&
31		!(window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame) && // Firefox 5 ships without cancel support
32		!window.oRequestAnimationFrame	  &&
33		!window.msRequestAnimationFrame)
34			return window.setTimeout(fn, delay);
35
36	var start = new Date().getTime(),
37		handle = new Object();
38
39	function loop(){
40		var current = new Date().getTime(),
41			delta = current - start;
42
43		delta >= delay ? fn.call() : handle.value = requestAnimFrame(loop);
44	};
45
46	handle.value = requestAnimFrame(loop);
47	return handle;
48};
49
50window.clearRequestTimeout = function(handle) {
51	if ( typeof handle !== 'undefined' ) {
52		window.cancelAnimationFrame ? window.cancelAnimationFrame(handle.value) :
53		window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(handle.value) :
54		window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(handle.value) : /* Support for legacy API */
55		window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(handle.value) :
56		window.oCancelRequestAnimationFrame	? window.oCancelRequestAnimationFrame(handle.value) :
57		window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(handle.value) :
58		clearTimeout(handle);
59	}
60};
61
62var uaInfo = {
63	ua: '',
64	is: function(t) {
65		return RegExp(t, "i").test(uaInfo.ua);
66	},
67	version: function(p, n) {
68		n = n.replace(".", "_");
69		var i = n.indexOf('_'),
70			ver = "";
71		while (i > 0) {
72			ver += " " + p + n.substring(0, i);
73			i = n.indexOf('_', i + 1);
74		}
75		ver += " " + p + n;
76		return ver;
77	},
78	getBrowser: function() {
79		var g = 'gecko',
80			w = 'webkit',
81			c = 'chrome',
82			f = 'firefox',
83			s = 'safari',
84			o = 'opera',
85			a = 'android',
86			bb = 'blackberry',
87			dv = 'device_',
88			ua = uaInfo.ua,
89			is = uaInfo.is;
90		return [
91			(!(/opera|webtv/i.test(ua)) && /msie\s(\d+)/.test(ua)) ? ('ie ie' + (/trident\/4\.0/.test(ua) ? '8' : RegExp.$1))
92			: is('edge\/') ? 'edge ie' + (/edge\/(\d+)\.(\d+)/.test(ua) ? RegExp.$1 + ' ie' + RegExp.$1 + '_' + RegExp.$2 : '') // IE Edge
93			: is('trident\/') ? 'ie ie'+ (/trident\/.+rv:(\d+)/i.test(ua) ? RegExp.$1 : '') //ie11+
94			: is('firefox/') ? g + " " + f + (/firefox\/((\d+)(\.(\d+))(\.\d+)*)/.test(ua) ? ' ' + f + RegExp.$2 + ' ' + f + RegExp.$2 + "_" + RegExp.$4 : '')
95			: is('gecko/') ? g
96			: is('opera') ? o + (/version\/((\d+)(\.(\d+))(\.\d+)*)/.test(ua) ? ' ' + o + RegExp.$2 + ' ' + o + RegExp.$2 + "_" + RegExp.$4 : (/opera(\s|\/)(\d+)\.(\d+)/.test(ua) ? ' ' + o + RegExp.$2 + " " + o + RegExp.$2 + "_" + RegExp.$3 : ''))
97			: is('konqueror') ? 'konqueror'
98			: is('blackberry') ? (bb + (/Version\/(\d+)(\.(\d+)+)/i.test(ua) ? " " + bb + RegExp.$1 + " " + bb + RegExp.$1 + RegExp.$2.replace('.', '_') : (/Blackberry ?(([0-9]+)([a-z]?))[\/|;]/gi.test(ua) ? ' ' + bb + RegExp.$2 + (RegExp.$3 ? ' ' + bb + RegExp.$2 + RegExp.$3 : '') : ''))) // blackberry
99			: is('android') ? (a + (/Version\/(\d+)(\.(\d+))+/i.test(ua) ? " " + a + RegExp.$1 + " " + a + RegExp.$1 + RegExp.$2.replace('.', '_') : '') + (/Android (.+); (.+) Build/i.test(ua) ? ' ' + dv + ((RegExp.$2).replace(/ /g, "_")).replace(/-/g, "_") : '')) //android
100			: is('chrome') ? w + ' ' + c + (/chrome\/((\d+)(\.(\d+))(\.\d+)*)/.test(ua) ? ' ' + c + RegExp.$2 + ((RegExp.$4 > 0) ? ' ' + c + RegExp.$2 + "_" + RegExp.$4 : '') : '')
101			: is('iron') ? w + ' iron'
102			: is('applewebkit/') ? (w + ' ' + s + (/version\/((\d+)(\.(\d+))(\.\d+)*)/.test(ua) ? ' ' + s + RegExp.$2 + " " + s + RegExp.$2 + RegExp.$3.replace('.', '_') : (/ Safari\/(\d+)/i.test(ua) ? ((RegExp.$1 == "419" || RegExp.$1 == "417" || RegExp.$1 == "416" || RegExp.$1 == "412") ? ' ' + s + '2_0' : RegExp.$1 == "312" ? ' ' + s + '1_3' : RegExp.$1 == "125" ? ' ' + s + '1_2' : RegExp.$1 == "85" ? ' ' + s + '1_0' : '') : ''))) //applewebkit
103			: is('mozilla/') ? g : ''
104		];
105	},
106	getPlatform : function() {
107		var wp = 'winphone',
108			a  = 'android',
109			bb = 'blackberry',
110			dv = 'device_',
111
112			ua = uaInfo.ua,
113			version = uaInfo.version,
114			is = uaInfo.is;
115
116		return [
117			is('j2me') ? 'j2me'
118			:is('windows phone') ? (wp + (/Windows Phone (\d+)(\.(\d+))+/i.test(ua) ? " " + wp + RegExp.$1 + " " + wp + RegExp.$1 + RegExp.$2.replace('.', '_') : (/Windows Phone OS (\d+)(\.(\d+))+/i.test(ua) ? " " + wp + RegExp.$1 + " " + wp + RegExp.$1 + RegExp.$2.replace('.', '_') : ''))) // Windows Phone
119			:is('blackberry') ? (bb + (/Version\/(\d+)(\.(\d+)+)/i.test(ua) ? " " + bb + RegExp.$1 + " " + bb + RegExp.$1 + RegExp.$2.replace('.', '_') : (/Blackberry ?(([0-9]+)([a-z]?))[\/|;]/gi.test(ua) ? ' ' + bb + RegExp.$2 + (RegExp.$3 ? ' ' + bb + RegExp.$2 + RegExp.$3 : '') : ''))) // blackberry
120			:is('android') ? (a + (/Version\/(\d+)(\.(\d+))+/i.test(ua) ? " " + a + RegExp.$1 + " " + a + RegExp.$1 + RegExp.$2.replace('.', '_') : '') + (/Android (.+); (.+) Build/i.test(ua) ? ' ' + dv + ((RegExp.$2).replace(/ /g, "_")).replace(/-/g, "_") : '')) //android
121			:is('ipad|ipod|iphone') ? (
122			(/CPU( iPhone)? OS (\d+[_|\.]\d+([_|\.]\d+)*)/i.test(ua) ? 'ios' + version('ios', RegExp.$2) : '') + ' ' + (/(ip(ad|od|hone))/gi.test(ua) ? RegExp.$1 : "")) //'iphone'
123			//:is('ipod')?'ipod'
124			//:is('ipad')?'ipad'
125			:is('playbook') ? 'playbook'
126			:is('kindle|silk') ? 'kindle'
127			:is('playbook') ? 'playbook'
128			:is('mac') ? 'mac' + (/mac os x ((\d+)[.|_](\d+))/.test(ua) ? (' mac' 
128+ (RegExp.$2) + ' mac' + (RegExp.$1).replace('.', "_")) : '')
129			:is('win') ? 'win' + (is('windows nt 10.0') ? ' win10'
130			:is('windows nt 6.3') ? ' win8_1'
131			:is('windows nt 6.2') ? ' win8'
132			:is('windows nt 6.1') ? ' win7'
133			:is('windows nt 6.0') ? ' vista'
134			:is('windows nt 5.2') || is('windows nt 5.1') ? ' win_xp'
135			:is('windows nt 5.0') ? ' win_2k'
136			:is('windows nt 4.0') || is('WinNT4.0') ? ' win_nt' : '')
137			:is('freebsd') ? 'freebsd'
138			:is('x11|linux') ? 'linux' : ''
139		];
140	},
141	getMobile: function() {
142		var is = uaInfo.is;
143		return [
144			is("android|mobi|mobile|j2me|iphone|ipod|ipad|blackberry|playbook|kindle|silk") ? 'mobile' : ''
145		];
146	},
147	getIpadApp: function() {
148		var is = uaInfo.is;
149		return [
150			(is('ipad|iphone|ipod') && !is('safari')) ? 'ipad_app' : ''
151		];
152	},
153	getLang: function() {
154		var ua = uaInfo.ua;
155		return [/[; |\[](([a-z]{2})(\-[a-z]{2})?)[)|;|\]]/i.test(ua) ? ('lang_' + RegExp.$2).replace("-", "_") + (RegExp.$3 != '' ? (' ' + 'lang_' + RegExp.$1).replace("-", "_") : '') : ''];
156	}
157}
158var screenInfo = {
159	width: document.documentElement.clientWidth ? document.documentElement.clientWidth + 15 : window.outerWidth,
160	height: document.documentElement.clientHeight || window.outerHeight,
161	screens: [
162		[340, 'screen-xxs'],
163		[570, 'screen-xs'],
164		[960, 'screen-sm'],
165		[1500, 'screen-md'],
166		[1700, 'screen-lg'],
167	],
168	screenSize: function() {
169		screenInfo.width = document.documentElement.clientWidth ? document.documentElement.clientWidth + 15 : window.outerWidth;
170		screenInfo.height = document.documentElement.clientHeight || window.outerHeight;
171		var screens = screenInfo.screens,
172			i = screens.length,
173			arr = [];
174
175		while (i--) {
176			if (screenInfo.width >= screens[i][0]) {
177				arr.push(screens[i][1]);
178			}
179		}
180
181		return arr;
182	},
183	getOrientation: function() {
184		return screenInfo.width < screenInfo.height ? ["orientation_portrait"] : ["orientation_landscape"];
185	},
186	getInfo: function() {
187		var arr = [];
188		arr = arr.concat(screenInfo.screenSize());
189		arr = arr.concat(screenInfo.getOrientation());
190		return arr;
191	},
192	getPixelRatio: function() {
193		var arr = [],
194			pixelRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
195		if (pixelRatio > 1) {
196			arr.push('retina_' + parseInt(pixelRatio) + 'x');
197			arr.push('hidpi');
198		} else {
199			arr.push('no-hidpi');
200		}
201		return arr;
202	}
203}
204var dataUriInfo = {
205	data: new Image(),
206	div: document.createElement("div"),
207	isIeLessThan9: false,
208	getImg: function() {
209		dataUriInfo.data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
210		dataUriInfo.div.innerHTML = "<!--[if lt IE 9]><i></i><![endif]-->";
211		dataUriInfo.isIeLessThan9 = dataUriInfo.div.getElementsByTagName("i").length == 1;
212		return dataUriInfo.data;
213	},
214	checkSupport: function() {
215		if (dataUriInfo.data.width != 1 || dataUriInfo.data.height != 1 || dataUriInfo.isIeLessThan9) {
216			return ["no-datauri"];
217		} else {
218			return ["datauri"];
219		}
220	}
221}
222
223function css_browser_selector(u, ns) {
224		var html = document.documentElement,
225			b = []
226		ns = ns ? ns : "";
227		/* ua */
228		uaInfo.ua = u.toLowerCase();
229		var browser = uaInfo.getBrowser();
230		if (browser == 'gecko') browser = (!(window.ActiveXObject) && "ActiveXObject" in window) ? 'ie ie11' : browser;
231		var pattTouch = /no-touch/g;
232		if (pattTouch.test(html.className)) b = b.concat('no-touch');
233		else b = b.concat('touch');
234		var pattAdmin = /admin-mode/g;
235		if (pattAdmin.test(html.className)) b = b.concat('admin-mode');
236		b = b.concat(browser);
237		b = b.concat(uaInfo.getPlatform());
238		b = b.concat(uaInfo.getMobile());
239		b = b.concat(uaInfo.getIpadApp());
240		b = b.concat(uaInfo.getLang());
241		/* js */
242		b = b.concat(['js']);
243		/* no animations  */
244		var noAnimations = /no-cssanimations/g;
245		if (noAnimations.test(html.className)) {
246			b = b.concat('no-cssanimations');
247		}
248		/* pixel ratio */
249		b = b.concat(screenInfo.getPixelRatio());
250		/* screen */
251		b = b.concat(screenInfo.getInfo());
252		var updateScreen = function() {
253			html.className = html.className.replace(/ ?orientation_\w+/g, "").replace(/ [min|max|cl]+[w|h]_\d+/g, "");
254			html.className = html.className.replace(/ ?screen-\w+/g, "");
255			html.className = html.className + ' ' + screenInfo.getInfo().join(' ');
256		}
257		if (SiteParameters.listen_for_screen_update) {
258			window.addEventListener('resize', updateScreen);
259			window.addEventListener('orientationchange', updateScreen);
260		}
261		/* dataURI */
262		var data = dataUriInfo.getImg();
263		data.onload = data.onerror = function() {
264				html.className += ' ' + dataUriInfo.checkSupport().join(' ');
265			}
266			/* removendo itens invalidos do array */
267		b = b.filter(function(e) {
268			return e;
269		});
270		/* prefixo do namespace */
271		b[0] = ns ? ns + b[0] : b[0];
272		html.className = b.join(' ' + ns);
273		return html.className;
274	}
275	// define css_browser_selector_ns before loading this script to assign a namespace
276var css_browser_selector_ns = css_browser_selector_ns || "";
277// init
278css_browser_selector(navigator.userAgent, css_browser_selector_ns);
279/**
280 * skip-link-focus-fix.js
281 *
282 * Helps with accessibility for keyboard only users.
283 *
284 * Learn more: https://github.com/Automattic/_s/pull/136
285 */
286(function() {
287	var is_webkit = navigator.userAgent.toLowerCase().indexOf('webkit') > -1,
288		is_opera = navigator.userAgent.toLowerCase().indexOf('opera') > -1,
289		is_ie = navigator.userAgent.toLowerCase().indexOf('msie') > -1;
290	if ((is_webkit || is_opera || is_ie) && document.getElementById && window.addEventListener) {
291		window.addEventListener('hashchange', function() {
292			var id = location.hash.substring(1),
293				element;
294			if (!(/^[A-z0-9_-]+$/.test(id))) {
295				return;
296			}
297			element = document.getElementById(id);
298			if (element) {
299				if (!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName))) {
300					element.tabIndex = -1;
301				}
302				element.focus();
303			}
304		}, false);
305	}
306})();
307// Polyfill for creating CustomEvents on IE9/10/11
308// code pulled from:
309// https://github.com/d4tocchini/customevent-polyfill
310// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill
311try {
312	new CustomEvent("test");
313} catch (e) {
314	var CustomEvent = function(event, params) {
315		var evt;
316		params = params || {
317			bubbles: false,
318			cancelable: false,
319			detail: undefined
320		};
321		evt = document.createEvent("CustomEvent");
322		evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
323		return evt;
324	};
325	CustomEvent.prototype = window.Event.prototype;
326	window.CustomEvent = CustomEvent; // expose definition to window
327}
328// Evento - v1.0.0
329// by Erik Royall <[email protected]> (http://erikroyall.github.io)
330// Dual licensed under MIT and GPL
331// Array.prototype.indexOf shim
332// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
333Array.prototype.indexOf || (Array.prototype.indexOf = function(n) {
334	"use strict";
335	if (null == this) throw new TypeError;
336	var t, e, o = Object(this),
337		r = o.length >>> 0;
338	if (0 === r) return -1;
339	if (t = 0, arguments.length > 1 && (t = Number(arguments[1]), t != t ? t = 0 : 0 != t && 1 / 0 != t && t != -1 / 0 && (t = (t > 0 || -1) * Math.floor(Math.abs(t)))), t >= r) return -1;
340	for (e = t >= 0 ? t : Math.max(r - Math.abs(t), 0); r > e; e++)
341		if (e in o && o[e] === n) return e;
342	return -1
343});
344var evento = function(n) {
345	var t, e, o, r = n,
346		i = r.document,
347		f = {};
348	return t = function() {
349		return "function" == typeof i.addEventListener ? function(n, t, e) {
350			n.addEventListener(t, e, !1), f[n] = f[n] || {}, f[n][t] = f[n][t] || [], f[n][t].push(e)
351		} : "function" == typeof i.attachEvent ? function(n, t, e) {
352			n.attachEvent(t, e), f[n] = f[n] || {}, f[n][t] = f[n][t] || [], f[n][t].push(e)
353		} : function(n, t, e) {
354			n["on" + t] = e, f[n] = f[n] || {}, f[n][t] = f[n][t] || [], f[n][t].push(e)
355		}
356	}(), e = function() {
357		return "function" == typeof i.removeEventListener ? function(n, t, e) {
358			n.removeEventListener(t, e, !1), Helio.each(f[n][t], function(o) {
359				o === e && (f[n] = f[n] || {}, f[n][t] = f[n][t] || [], f[n][t][f[n][t].indexOf(o)] = void 0)
360			})
361		} : "function" == typeof i.detachEvent ? function(n, t, e) {
362			n.detachEvent(t, e), Helio.each(f[n][t], function(o) {
363				o === e && (f[n] = f[n] || {}, f[n][t] = f[n][t] || [], f[n][t][f[n][t].indexOf(o)] = void 0)
364			})
365		} : function(n, t, e) {
366			n["on" + t] = void 0, Helio.each(f[n][t], function(o) {
367				o === e && (f[n] = f[n] || {}, f[n][t] = f[n][t] || [], f[n][t][f[n][t].indexOf(o)] = void 0)
368			})
369		}
370	}(), o = function(n, t) {
371		f[n] = f[n] || {}, f[n][t] = f[n][t] || [];
372		for (var e = 0, o = f[n][t].length; o > e; e += 1) f[n][t][e]()
373	}, {
374		add: t,
375		remove: e,
376		trigger: o,
377		_handlers: f
378	}
379}(this);
380// DOM class helper
381(function(window) {
382	'use strict';
383	// class helper functions from bonzo https://github.com/ded/bonzo
384	function classReg(className) {
385			return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
386		}
387		// classList support for class management
388		// altho to be fair, the api sucks because it won't accept multiple classes at once
389	var hasClass, addClass, removeClass;
390	if ('classList' in document.documentElement) {
391		hasClass = function(elem, c) {
392			if ( elem !== null && typeof elem !== 'undefined' && typeof elem.classList !== 'undefined' ) return elem.classList.contains(c);
393		};
394		addClass = function(elem, c) {
395			if ( elem !== null && typeof elem !== 'undefined' && typeof elem.classList !== 'undefined' ) elem.classList.add(c);
396		};
397		removeClass = function(elem, c) {
398			if ( elem !== null && typeof elem !== 'undefined' && typeof elem.classList !== 'undefined' ) elem.classList.remove(c);
399		};
400	} else {
401		hasClass = function(elem, c) {
402			if (elem !== null) return classReg(c).test(elem.className);
403		};
404		addClass = function(elem, c) {
405			if (!hasClass(elem, c)) {
406				if (elem !== null) elem.className = elem.className + ' ' + c;
407			}
408		};
409		removeClass = function(elem, c) {
410			if (elem !== null) elem.className = elem.className.replace(classReg(c), ' ');
411		};
412	}
413
414	function toggleClass(elem, c) {
415		var fn = hasClass(elem, c) ? removeClass : addClass;
416		fn(elem, c);
417	}
418	var classie = {
419		// full names
420		hasClass: hasClass,
421		addClass: addClass,
422		removeClass: removeClass,
423		toggleClass: toggleClass,
424		// short names
425		has: hasClass,
426		add: addClass,
427		remove: removeClass,
428		toggle: toggleClass
429	};
430	// transport
431	if (typeof define === 'function' && define.amd) {
432		// AMD
433		define(classie);
434	} else {
435		// browser global
436		window.classie = classie;
437	}
438
439	window.wrap = function(wrapper, elms) {
440		if (!elms.length) {
441			elms = [elms];
442		}
443
444		for (var i = elms.length - 1; i >= 0; i--) {
445			var child = (i > 0) ? wrapper.cloneNode(true) : wrapper;
446			var el    = elms[i];
447
448			var parent  = el.parentNode;
449			var sibling = el.nextSibling;
450
451			child.appendChild(el);
452
453			if (sibling) {
454				parent.insertBefore(child, sibling);
455			} else {
456				parent.appendChild(child);
457			}
458		}
459	};
460
461	window.wrapAll = function(wrapper, nodes) {
462		var parent = nodes[0].parentNode;
463		var previousSibling = nodes[0].previousSibling;
464
465		for (var i = 0; nodes.length - i;
465 wrapper.firstChild === nodes[0] && i++) {
466			wrapper.appendChild(nodes[i]);
467		}
468
469		var nextSibling = previousSibling ? previousSibling.nextSibling : parent.firstChild;
470		parent.insertBefore(wrapper, nextSibling);
471
472		return wrapper;
473	};
474})(window);
475/* From Modernizr */
476function whichTransitionEvent() {
477		var t;
478		var el = document.createElement('fakeelement');
479		var transitions = {
480			'transition': 'transitionend',
481			'OTransition': 'oTransitionEnd',
482			'MozTransition': 'transitionend',
483			'WebkitTransition': 'webkitTransitionEnd'
484		}
485		for (t in transitions) {
486			if (el.style[t] !== undefined) {
487				return transitions[t];
488			}
489		}
490	}
491function whichAnimationEvent() {
492		var t;
493		var el = document.createElement('fakeelement');
494		var animations = {
495			'animation': 'animationend',
496			'OAnimation': 'oAnimationEnd',
497			'MozAnimation': 'animationend',
498			'WebkitAnimation': 'webkitAnimationEnd'
499		}
500		for (t in animations) {
501			if (el.style[t] !== undefined) {
502				return animations[t];
503			}
504		}
505	}
506/**
507 * Load utils - END
508 */
509
510/**
511 * Start main js
512 */
513(function(window, undefined) {
514	'use strict';
515
516	// Init variables
517	var bodyTop,
518		scrollbarWidth = false,
519		noScroll = false,
520		boxEvent = new CustomEvent('boxResized'),
521		menuClose = new CustomEvent('menuClose'),
522		menuOpen = new CustomEvent('menuOpen'),
523		bodyBorder = 0,
524		adminBarHeight = 0,
525		boxWidth = 0,
526		boxLeft = 0,
527		parallaxRows,
528		parallaxCols,
529		parallaxHeaders,
530		kenburnsHeaders,
531		kenburnsRows,
532		kenburnsCols,
533		backwashHeaders,
534		backwashRows,
535		backwashCols,
536		visibleRows,
537		headerWithOpacity,
538		speedDivider = SiteParameters.parallax_factor,
539		adminBar,
540		pageHeader,
541		headerVideo,
542		masthead,
543		mastheadMobile,
544		menuMobileTransparent,
545		mastheadMobilePaddingTop = 0,
546		offcanvas_overlay_close,
547		maincontainer,
548		menuwrapper,
549		menuhide,
550		$mainHeader,
551		mainHeader,
552		$mainWrapper,
553		$initBox,
554		menusticky,
555		menuStickyMobile,
556		menuHeight = 0,
557		menuMobileHeight = 0,
558		mainmenu = new Array(),
559		secmenu = new Array(),
560		secmenuHeight = 0,
561		transmenuHeight = 0,
562		header,
563		transmenuel,
564		logo,
565		logoel,
566		logolink,
567		logoMinScale,
568		lastScrollValue = 0,
569		wwidth = uaInfo.getIpadApp() == 'ipad_app' ? document.documentElement.clientWidth : window.innerWidth || document.documentElement.clientWidth,
570		wheight = uaInfo.getIpadApp() == 'ipad_app' ? document.documentElement.clientHeight : window.innerHeight || document.documentElement.clientHeight,
571		mediaQuery = 959,
572		mediaQueryMobile = 569,
573		printDialogOpen = false,
574		isScrolling = false,
575		boxWrapper,
576		docheight = 0,
577		isMobile = wwidth <= mediaQuery,
578		isIE = classie.hasClass(document.documentElement, 'ie') || classie.hasClass(document.documentElement, 'opera12') ? true : false,
579		isFF = classie.hasClass(document.documentElement, 'firefox') ? true : false,
580		isFullPage,
581		isFullPageSnap,
582		isFrontEndEditor,
583		transitionEvent = whichTransitionEvent(),
584		animationEvent = whichAnimationEvent(),
585		footerScroller = false,
586		menuOpened = false,
587		overlayOpened = false,
588		menuMobileTriggerEvent = new CustomEvent('menuMobileTrigged'),
589		resizeTimer_,
590		resizeTimer,
591		hidingTimer,
592		isSplitMenu = false,
593		mainNavMenu,
594		mainNavWrapper,
595		isMobileTransparent = false,
596		isMobileParallaxAllowed = SiteParameters.mobile_parallax_allowed,
597		loadedFonts = new Array(),
598		already_font = false,
599		scrollRowHeight_fix = window.pageYOffset,
600		isQuickView = false,
601		menuStickyMobileOverlay = false,
602
603	checkVisible = function( elm ) {
604		var rect = elm.getBoundingClientRect();
605		var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
606		return !(rect.bottom < 0 || rect.top - viewHeight >= 0);
607	},
608	initBox = function() {
609			var bodyBorderDiv = document.querySelectorAll('.body-borders .top-border');
610			if (bodyBorderDiv.length) {
611				bodyBorder = outerHeight(bodyBorderDiv[0]);
612			} else bodyBorder = 0;
613			UNCODE.isRTL = classie.hasClass(document.body, 'rtl') ? true : false,
614			UNCODE.bodyBorder = bodyBorder;
615			UNCODE.isFrontEndEditor = classie.hasClass(document.body, 'compose-mode') && classie.hasClass(document.body, 'vc_editor');
616			UNCODE.isFullPage = !UNCODE.isFrontEndEditor && classie.hasClass(document.body, 'uncode-fullpage-slide') && !( UNCODE.isMobile && classie.hasClass(document.body, 'uncode-fp-mobile-disable') && window.innerWidth < 570 );
617			UNCODE.isFullPageSnap = !UNCODE.isFrontEndEditor && classie.hasClass(document.body, 'uncode-scroll-snap');
618			if (bodyBorder != 0) {
619				if ( !UNCODE.isFullPage ) {
620					document.documentElement.style.paddingTop = bodyBorder + 'px';
621				}
622				wheight = (uaInfo.getIpadApp() == 'ipad_app' ? document.documentElement.clientWidth : window.innerHeight || document.documentElement.clientHeight) - (bodyBorder * 2);
623			}
624			if (!isMobile && !scrollbarWidth) {
625				// Create the measurement node
626				var scrollDiv = document.createElement("div");
627				scrollDiv.className = "scrollbar-measure";
628				var dombody = document.body;
629				if (dombody != null) {
630					dombody.appendChild(scrollDiv);
631					// Get the scrollbar width
632					scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
633					// Delete the DIV
634					dombody.removeChild(scrollDiv);
635				}
636			}
637			if (!isMobile) {
638				forEachElement('.box-container', function(el, i) {
639					if (!classie.hasClass(el, 'limit-width')) {
640						var elWidth = outerWidth(el),
641							newWidth = 12 * Math.ceil((wwidth - scrollbarWidth) / 12);
642						boxWidth = newWidth - (bodyBorder * 2);
643						boxLeft = (wwidth - boxWidth - scrollbarWidth) / 2;
644						el.style.width = boxWidth + 'px';
645						if ( UNCODE.isRTL )
646							el.style.marginRight = boxLeft + 'px';
647						else
648							el.style.marginLeft = boxLeft + 'px';
649						if (mainmenu != undefined && mainmenu[0] != undefined) {
650							mainmenu[0].style.width = boxWidth + 'px';
651						}
652					}
653				});
654			}
655
656			if (classie.hasClass(document.body, 'menu-mobile-transparent') && !classie.hasClass(document.body, 'hmenu-center')) isMobileTransparent = true;
657
658			if (!isMobileTransparent) {
659				if (wwidth > mediaQuery && classie.hasClass(document.body, 'menu-force-opacity')) classie.removeClass(document.body, 'menu-force-opacity');
660				if (wwidth <= mediaQuery && !classie.hasClass(document.body, 'menu-force-opacity')) classie.addClass(document.body, 'menu-force-opacity');
661			}
662
663			UNCODE.isQuickView = isQuickView;
664
665		},
666		fixMenuHeight = function() {
667			if (!classie.hasClass(document.body, 'vmenu')) noScroll = true;
668
669			menuwrapper = document.querySelectorAll(".menu-wrapper");
670			masthead = document.getElementById("masthead");
671			offcanvas_overlay_close = document.querySelector('.uncode-close-offcanvas-overlay');
672			if (classie.hasClass(document.body, 'hmenu-center-split') && document.getElementById("logo-container-mobile") != null && document.getElementById("main-logo") != null ) {
673				mastheadMobile = new Array(document.getElementById("logo-container-mobile"), document.getElementById("main-logo").parentNode);
674			} else mastheadMobile = document.getElementById("logo-container-mobile");
675			menuhide = document.querySelector('#masthead .menu-hide, .main-header .menu-hide, #masthead .menu-hide-vertical');
676			menusticky = document.querySelectorAll('.menu-sticky, .menu-sticky-vertical');
677			transmenuel = document.querySelectorAll('.menu-transparent:not(.vmenu-container)');
678			var menuItemsButton = document.querySelectorAll('.menu-item-button .menu-btn-table');
679			logo = document.querySelector('#main-logo');
680			if (logo != undefined) logolink = (logo.firstElementChild || logo.firstChild);
681			if (logolink != undefined) logoMinScale = logolink.getAttribute("data-minheight");
682			logoel = document.querySelectorAll('.menu-shrink .logo-container');
683			mainmenu = document.querySelectorAll('.vmenu .vmenu-container, .menu-primary .menu-container');
684			if (classie.hasClass(document.body, 'hmenu-center')) {
685				var mainmenucenter = document.querySelectorAll('.hmenu-center .menu-container-mobile');
686				var first_array = Array.prototype.slice.call(mainmenu);
687				var second_array = Array.prototype.slice.call(mainmenucenter);
688				mainmenu = first_array.concat(second_array);
689			}
690			secmenu = document.querySelectorAll('.menu-secondary');
691			calculateMenuHeight(true);
692			for (var k = 0;
692 k < menuItemsButton.length; k++) {
693				var a_item = menuItemsButton[k].parentNode,
694					buttonHeight = outerHeight(menuItemsButton[k]);
695				a_item.style.height = buttonHeight + 'px';
696			}
697			if (classie.hasClass(document.body, 'hmenu-center-split')) {
698				mainNavMenu = document.querySelector('#masthead .navbar-main .menu-primary-inner');
699				mainNavWrapper = document.querySelector('#masthead > .menu-container');
700				isSplitMenu = true;
701			}
702
703			var $secondary_menu_html = document.getElementById("secondary-menu-html");
704			if ( (classie.hasClass(document.body, 'vmenu') || classie.hasClass(document.body, 'menu-offcanvas')) && $secondary_menu_html == null ) {
705				classie.addClass(document.body, 'menu-offcanvas-additional-text')
706			}
707
708			fixMenu();
709			menuOpacity();
710		},
711		menuOpacity = function(){
712			transmenuel = document.querySelectorAll('.menu-transparent:not(.vmenu-container)');
713			if (typeof transmenuel === 'undefined' || !transmenuel.length) {
714				return false;
715			}
716			if (wwidth > mediaQuery && classie.hasClass(transmenuel[0], 'menu-desktop-transparent')) {
717				classie.removeClass(transmenuel[0], 'menu-desktop-transparent');
718				classie.addClass(transmenuel[0], 'menu-desktop-transparent');
719			} else if (wwidth <= mediaQuery && classie.hasClass(transmenuel[0], 'menu-desktop-transparent')) {
720				classie.removeClass(transmenuel[0], 'menu-desktop-transparent');
721				classie.addClass(transmenuel[0], 'menu-desktop-transparent');
722			}
723		},
724		verticalRightMenu = function() {
725			var setVrightMenu, vRightMenuw;
726			var vRightMenu = function(){
727				$initBox = document.getElementById("initBox");
728				$mainHeader = document.querySelector('.main-header');
729				if ( $mainHeader != null ) {
730					mainHeader = $mainHeader.innerHTML;
731					$mainWrapper = document.querySelector('.main-wrapper');
732					if ( classie.hasClass(document.body, 'vmenu') && ( ( classie.hasClass(document.body, 'vmenu-position-right') && ! classie.hasClass(document.body, 'rtl') ) || ( classie.hasClass(document.body, 'vmenu-position-left') && classie.hasClass(document.body, 'rtl') ) ) ) {
733						if ( wwidth <= mediaQuery ) {
734							$initBox.parentNode.insertBefore($mainHeader, $initBox.nextSibling);
735						} else {
736							$mainWrapper.parentNode.insertBefore($mainHeader, $mainWrapper.nextSibling);
737						}
738						$mainHeader.removeChild;
739					}
740					window.dispatchEvent(new Event('lateral_resize'));
741				}
742			};
743			vRightMenu();
744			window.addEventListener("resize", function() {
745				if ( wwidth != vRightMenuw ) {
746					clearRequestTimeout(setVrightMenu);
747					setVrightMenu = requestTimeout( function(){
748						vRightMenuw = wwidth;
749						vRightMenu();
750					}, 100 );
751				}
752			});
753		},
754		calculateMenuHeight = function(first) {
755			menuHeight = transmenuHeight = secmenuHeight = 0;
756
757			if (mastheadMobile != null) {
758				if (mastheadMobile.length === 2) {
759					if (wwidth > mediaQuery) {
760						UNCODE.menuMobileHeight = outerHeight(mastheadMobile[1]);
761						mastheadMobilePaddingTop = parseFloat(getComputedStyle(mastheadMobile[1]).paddingTop);
762					} else {
763						UNCODE.menuMobileHeight = outerHeight(mastheadMobile[0]);
764						mastheadMobilePaddingTop = parseFloat(getComputedStyle(mastheadMobile[0]).paddingTop);
765					}
766				} else {
767					UNCODE.menuMobileHeight = outerHeight(mastheadMobile);
768					mastheadMobilePaddingTop = parseFloat(getComputedStyle(mastheadMobile).paddingTop);
769				}
770			}
771
772			secmenu = document.querySelectorAll('.menu-secondary:not(.menu-primary)');
773			if (wwidth > mediaQuery) {
774				for (var i = 0; i < mainmenu.length; i++) {
775					if (classie.hasClass(document.body, 'hmenu-center') && i === 1) continue;
776					if (!classie.hasClass(masthead, 'masthead-vertical')) {
777						menuHeight = menuHeight + outerHeight(mainmenu[i]);
778						if ( classie.hasClass(document.body, 'hmenu-center') && document.getElementById("logo-container-mobile") != null ) {
779							menuHeight = menuHeight + outerHeight(document.getElementById("logo-container-mobile"));
780						}
781					} else menuHeight = 0;
782
783					if (isIE && first) {
784						getDivChildren(mainmenu[i], '.menu-horizontal-inner', function(innerMenu, i) {
785							innerMenu.style.height = menuHeight + 'px';
786						});
787					}
788
789					if (classie.hasClass(mainmenu[i].parentNode, 'menu-transparent')) {
790						transmenuHeight += menuHeight;
791					}
792				}
793
794				for (var j = 0; j < secmenu.length; j++) {
795					secmenuHeight += outerHeight(secmenu[j]);
796				}
797				menuHeight += secmenuHeight;
798			} else {
799				menuHeight = UNCODE.menuMobileHeight;
800				if (isMobileTransparent) {
801					for (var i = 0; i < mainmenu.length; i++) {
802						if (classie.hasClass(mainmenu[i].parentNode, 'menu-transparent')) {
803							transmenuHeight += menuHeight;
804						}
805					}
806				}
807				var search_box = document.querySelectorAll('.search-icon .drop-menu');
808				for (var i = 0; i < search_box.length; i++) {
809					search_box[i].removeAttribute('style');
810				}
811
812				for (var j = 0; j < secmenu.length; j++) {
813					secmenuHeight += outerHeight(secmenu[j]);
814				}
815				menuHeight += secmenuHeight;
816			}
817
818
819			if (classie.hasClass(document.documentElement, 'admin-mode')) {
820				adminBar = document.getElementById("wpadminbar");
821				if (wwidth > 600) {
822					if (adminBar != null) adminBarHeight = outerHeight(adminBar);
823					else {
824						if (wwidth > 782) adminBarHeight = 32;
825						else adminBarHeight = 46;
826					}
827				} else adminBarHeight = 0;
828			}
829			UNCODE.adminBarHeight = adminBarHeight;
830			UNCODE.menuHeight = menuHeight;
831
832			if ( UNCODE.isFullPage && ! UNCODE.isFrontEndEditor ) {
833				if ( UNCODE.adminBarHeight > 0 )
834					document.body.style.marginTop = ( ( UNCODE.adminBarHeight + UNCODE.bodyBorder ) * -1 ) + 'px';
835
836				document.body.style.paddingTop = ( UNCODE.adminBarHeight + UNCODE.bodyBorder ) + 'px';
837			} else {
838				document.body.style.marginTop = 0;
839				document.body.style.paddingTop = 0;
840			}
841
842			if (masthead != undefined) {
843				//masthead.parentNode.style.height = menuHeight + 'px';
844				if (classie.hasClass(masthead, 'menu-transparent')) {
845					if (wwidth > mediaQuery) masthead.parentNode.style.height = '0px';
846				}
847			}
848
849			if (typeof menuhide == 'object' && menuhide != null && mainmenu[0] != undefined) {
850				var sticky_element = (typeof mainmenu.item === 'undefined' ? ((wwidth > mediaQuery) ? mainmenu[0] : mainmenu[1]) : mainmenu[0]);
851				if (sticky_element.style.top != '') {
852					sticky_element.style.top = UNCODE.bodyBorder + 'px'
853				}
854			}
855
856		},
857		centerSplitMenu = function() {
858			if ( typeof mainNavMenu !== 'undefined' && mainNavMenu !== null  ) {
859				if (wwidth > mediaQuery && mainNavMenu) {
860					if (mainNavMenu.style.left == '') {
861						mainNavMenu.style.left = '0px';
862						var logoPos = logo.parentNode.getBoundingClientRect();
863						mainNavMenu.style.left = (wwidth / 2) - (logoPos.left + (logoPos.width / 2) ) + 'px';
864						mainNavWrapper.style.opacity = '1';
865					}
866					mainNavWrapper.style.opacity = '1';
867				} else {
868					mainNavMenu.style.left = '';
869				}
870			}
871		},
872		initHeader = function() {
873			pageHeader = document.getElementById("page-header");
874			if (SiteParameters.dynamic_srcset_active === '1') {
875				UNCODE.adaptive_srcset_replace_bg(pageHeader);
876			}
877			UNCODE.adaptive();
878
879			parallaxHeaders = document.querySelectorAll('.header-parallax > .header-bg-wrapper');
880			header = document.querySelectorAll('.header-wrapper.header-uncode-block, .header-wrapper.header-revslider, .header-wrapper.header-layerslider, .header-basic .header-wrapper, .header-uncode-block > .row-container:first-child > .row > .row-inner > .col-lg-12 > .uncol, .header-uncode-block .uncode-slider .owl-carousel > .row-container:first-child .column_child .uncoltable');
881			headerWithOpacity = document.querySelectorAll('.header-scroll-opacity');
882			if ( typeof pageHeader === 'object' && pageHeader !== null  ) {
883				headerVideo = pageHeader.querySelectorAll('.uncode-video-container:not(.t-entry-drop)');
884				kenburnsHeaders = pageHeader.querySelectorAll('.with-kburns > .header-bg-wrapper');
885				backwashHeaders = pageHeader.querySelectorAll('.with-zoomout > .header-bg-wrapper');
886				if ( headerVideo.length ) {
887					classie.addClass(pageHeader, 'has-video');
888				}
889			}
890			if (pageHeader != undefined) {
891				var backs = pageHeader.querySelectorAll('.header-bg'),
892					backsCarousel = pageHeader.querySelectorAll('.header-uncode-block .background-inner'),
893					uri_pattern = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig;
894				if (backs.length == 0 && backsCarousel.length == 0) {
895					pageHeader.setAttribute('data-imgready', 'true');
896				} else {
897					if (backsCarousel.length) {
898						for (var j = 0; j < backsCarousel.length; j++) {
899							if (j == 0) {
900								if ( classie.hasClass(backsCarousel[j], 'lazyload') ) {
901									pageHeader.setAttribute('data-imgready', 'true');
902								}
903
904							    if (!!backsCarousel[j].style.backgroundImage && backsCarousel[j].style.backgroundImage !== void 0) {
905									var url = (backsCarousel[j].style.backgroundImage).match(uri_pattern),
906										image = new Image();
907									if ( url === null ) {
908                                        url = (backsCarousel[j].style.backgroundImage).slice(4, -1).replace(/"/g, "");
909									}
910									image.onload = function() {
911										pageHeader.setAttribute('data-imgready', 'true');
912									};
913									image.src = url[0];
914								} else {
915									pageHeader.setAttribute('data-imgready', 'true');
916								}
917							}
918						}
919					} else {
920						for (var i = 0; i < backs.length; i++) {
921							if (i == 0) {
922								if ( classie.hasClass(backs[i], 'lazyload') ) {
923									pageHeader.setAttribute('data-imgready', 'true');
924								}
925								
926 							    if (!!backs[i].style.backgroundImage && backs[i].style.backgroundImage !== void 0) {
927									var url = (backs[i].style.backgroundImage).match(uri_pattern),
928										image = new Image();
929                                    if ( url === null ) {
930                                        url = (backs[i].style.backgroundImage).slice(4, -1).replace(/"/g, "");
931                                    }
932									image.onload = function() {
933										pageHeader.setAttribute('data-imgready', 'true');
934									};
935									image.src = url[0];
936								} else {
937									pageHeader.setAttribute('data-imgready', 'true');
938								}
939							}
940						}
941					}
942				}
943			}
944
945			if (masthead != undefined && !classie.hasClass(masthead, 'masthead-vert
945ical')) {
946				if (header.length) {
947					masthead.parentNode.style.height = (menuHeight-1) + 'px';
948					if ( offcanvas_overlay_close != undefined ) {
949						offcanvas_overlay_close.style.height = (menuHeight-1) + 'px';
950						offcanvas_overlay_close.style.lineHeight = (menuHeight-5) + 'px';
951					}
952					if (menuwrapper[0] != undefined) classie.addClass(menuwrapper[0], 'with-header');
953					for (var j = 0; j < header.length; j++) {
954						var headerel = header[j],
955							closestStyle = getClosest(headerel, 'style-light'),
956							wcClosestStyle = getClosest(headerel, 'wc-parent-style-light');
957						if (closestStyle != null && classie.hasClass(closestStyle, 'style-light')) {
958							switchColorsMenu(0, 'light');
959						} else if (wcClosestStyle != null && classie.hasClass(wcClosestStyle, 'wc-parent-style-light')) {
960							switchColorsMenu(0, 'light');
961						} else if (getClosest(headerel, 'style-dark') != null) {
962							switchColorsMenu(0, 'dark');
963						} else if (getClosest(headerel, 'wc-parent-style-dark') != null) {
964							switchColorsMenu(0, 'dark');
965						} else {
966							if (masthead.style.opacity !== 1) masthead.style.opacity = 1;
967						}
968						if (classie.hasClass(masthead, 'menu-transparent')) {
969							if (isMobileTransparent || wwidth > mediaQuery) {
970								masthead.parentNode.style.height = '0px';
971								if (classie.hasClass(masthead, 'menu-add-padding')) {
972									var headerBlock = getClosest(headerel, 'header-uncode-block');
973									if (headerBlock != null) {
974										var parentRow = headerBlock.querySelector('.vc_row');
975										if (parentRow != null) {
976											var innerRows = parentRow.querySelectorAll('.column_parent > .uncol > .uncoltable > .uncell > .uncont, .uncode-slider .column_child > .uncol > .uncoltable > .uncell > .uncont');
977											for (var k = 0; k < innerRows.length; k++) {
978												if (innerRows[k] != undefined) {
979													if (wwidth > mediaQuery) innerRows[k].style.paddingTop = transmenuHeight + 'px';
980													else innerRows[k].style.paddingTop = (transmenuHeight - mastheadMobilePaddingTop) + 'px';
981												}
982											}
983										}
984									} else {
985										getDivChildren(headerel, '.header-content', function(headerContent, i) {
986											if (wwidth > mediaQuery) headerContent.style.paddingTop = transmenuHeight + 'px';
987											else headerContent.style.paddingTop = (transmenuHeight - mastheadMobilePaddingTop) + 'px';
988										});
989									}
990								}
991							}
992						}
993						if (classie.hasClass(headerel, 'uncoltable')) {
994							break;
995						}
996					}
997				} else {
998					if (menuwrapper[0] != undefined) classie.addClass(menuwrapper[0], 'no-header');
999					classie.removeClass(masthead, 'menu-transparent');
1000					transmenuHeight = 0;
1001					isMobileTransparent = false;
1002				}
1003			} else {
1004				isMobileTransparent = false;
1005			}
1006			if (typeof transmenuel === 'undefined' || !transmenuel.length) isMobileTransparent = false;
1007			bodyTop = document.documentElement['scrollTop'] || document.body['scrollTop'];
1008			UNCODE.bodyTop = bodyTop;
1009			headerHeight('.header-wrapper');
1010			if (!classie.hasClass(document.body, 'vmenu'))
1011				initBox();
1012			scrollFunction();
1013			showHideScrollup(bodyTop);
1014
1015			if ( UNCODE.isMobile ) {
1016
1017				var eventName = 'loadedmetadata';
1018				eventName = eventName.replace(/^on/, '');
1019				var elt = document.createElement('video'[eventName]);
1020				var eventIsSupported = ('on'+eventName in elt);
1021				elt = null;
1022				if ( ! eventIsSupported || ( classie.hasClass(document.documentElement, 'firefox') && classie.hasClass(document.documentElement, 'android') ) ) {
1023					classie.addClass(document.body, 'video-not-supported');
1024				}
1025			}
1026
1027		},
1028		initRow = function(currentRow) {
1029			if (SiteParameters.dynamic_srcset_active === '1') {
1030				UNCODE.adaptive_srcset_replace_bg(currentRow);
1031			}
1032			UNCODE.adaptive();
1033			var el = typeof currentRow.parentNode !== 'undefined' && currentRow.parentNode.parentNode.getAttribute("data-parent") == 'true' ? currentRow.parentNode : ( currentRow.getAttribute("data-parent") == 'true' ? currentRow.querySelector('.row-parent') : currentRow.parentNode.parentNode ),
1034				rowParent = el.parentNode,
1035				rowInner = currentRow.parentNode,
1036				percentHeight = el.getAttribute("data-height-ratio"),
1037				minHeight = el.getAttribute("data-minheight"),
1038				calculateHeight,
1039				calculatePadding = 0,
1040				isHeader = false,
1041				isFirst = false,
1042				uri_pattern = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig;
1043
1044			/** Add class to the row when contains responsive column size */
1045			getDivChildren(el.parentNode, '.column_parent, .column_child', function(obj, i, total) {
1046				if ((obj.className).indexOf("col-md-") > - 1) {
1047					classie.addClass(obj.parentNode, 'cols-md-responsive');
1048				}
1049				obj.className = obj.className.replace(/vc_col-sm-(\d{1,2})/g, "");
1050				if ((obj.className).indexOf("col-sm-") > - 1 && (obj.className).indexOf("col-sm-clear") == - 1) {
1051					classie.addClass(obj.parentNode, 'cols-sm-responsive');
1052				}
1053			});
1054
1055			setRowHeight(el);
1056
1057			var elements = 0;
1058			getDivChildren(el, '.row-internal .background-inner', function(obj, i, total) {
1059				elements++;
1060				if (i == 0) {
1061					if (!!obj.style.backgroundImage && obj.style.backgroundImage !== void 0) {
1062						var url = (obj.style.backgroundImage).match(uri_pattern),
1063							image = new Image();
1064                        if ( url === null ) {
1065                            url = (obj.style.backgroundImage).slice(4, -1).replace(/"/g, "");
1066                        }
1067						image.onload = function() {
1068							el.setAttribute('data-imgready', 'true');
1069							el.dispatchEvent(new CustomEvent('imgLoaded'));
1070						};
1071						image.src = url[0];
1072					} else {
1073						el.setAttribute('data-imgready', 'true');
1074						el.dispatchEvent(new CustomEvent('imgLoaded'));
1075					}
1076				}
1077			});
1078			if (elements == 0) {
1079				el.setAttribute('data-imgready', 'true');
1080			}
1081
1082			// var $bgs = rowParent.querySelectorAll('.background-inner');
1083
1084			// for (var i = 0; i < $bgs.length; i++) {
1085			// 	var $bg = $bgs[i];
1086			// 	if ($bg.style.backgroundImage && $bg.style.backgroundImage !== '') {
1087			// 		var url = ($bg.style.backgroundImage).match(uri_pattern),
1088			// 			image = new Image();
1089			// 		url = url[0];
1090			// 		image.source = url;
1091			// 		image.el = $bg;
1092			// 		image.onload = function() {
1093			// 			var _this = this;
1094			// 			_this.el.setAttribute('data-imgloaded', 'true');
1095			// 		};
1096			// 		image.src = url;
1097			// 	} else {
1098			// 		$bg.setAttribute('data-imgloaded', 'true');
1099			// 	}
1100			// }
1101
1102			/** init parallax is not mobile */
1103			if ( ! UNCODE.isFullPage ) {
1104				bodyTop = document.documentElement['scrollTop'] || document.body['scrollTop'];
1105				kenburnsRows = el.parentNode.parentNode.querySelectorAll('.with-kburns > .row-background > .background-wrapper, .with-kburns > .uncode-multi-bgs > .row-background > .background-wrapper, .with-kburns > .fp-tableCell > .row-background > .background-wrapper, .with-kburns > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
1106				kenburnsCols = el.querySelectorAll('.with-kburns > .column-background > .background-wrapper, .with-kburns > .uncode-multi-bgs > .column-background > .background-wrapper');
1107				backwashRows = el.parentNode.parentNode.querySelectorAll('.with-zoomout > .row-background > .background-wrapper, .with-zoomout > .uncode-multi-bgs > .row-background > .background-wrapper, .with-zoomout > .fp-tableCell > .row-background > .background-wrapper, .with-zoomout > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
1108				backwashCols = el.querySelectorAll('.with-zoomout > .column-background > .background-wrapper');
1109				if (isMobileParallaxAllowed || !UNCODE.isMobile) {
1110					parallaxRows = el.parentNode.parentNode.querySelectorAll('.with-parallax > .row-background > .background-wrapper, .with-parallax > .uncode-multi-bgs > .row-background > .background-wrapper, .with-parallax > .fp-tableCell > .row-background > .background-wrapper, .with-parallax > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
1111					parallaxCols = el.querySelectorAll('.with-parallax > .column-background > .background-wrapper, .with-parallax > .uncode-multi-bgs > .column-background > .background-wrapper');
1112					visibleRows = el.parentNode.parentNode;
1113					parallaxRowCol(bodyTop);
1114					visibleRowCol(bodyTop);
1115				} else {
1116					if (UNCODE.isMobile) {
1117						kenburnsHeader(bodyTop);
1118						kenburnsRowCol(bodyTop);
1119						backwashHeader(bodyTop);
1120						backwashRowCol(bodyTop);
1121					}
1122				}
1123			}
1124
1125			shapeDivider();
1126
1127			var wrapLinesWw = wwidth;
1128
1129			//Text animation, automatic lines and highlights
1130			var setWrap;
1131
1132			//Font style of grouped products
1133			function product_relative_font_style(el){
1134				var $labels = el.querySelectorAll('.woocommerce-grouped-product-list-item__label, .woocommerce-grouped-product-list-item__price');
1135				if ( $labels.length ) {
1136					var $main_price = el.querySelectorAll('.heading-text .woocommerce-Price-amount');
1137					if ( $main_price.length ) {
1138						var $price_wrap = $main_price[0].closest('.heading-text'),
1139							$price_nest = $price_wrap.querySelector(':first-child'),
1140							font_class = $price_nest.getAttribute('class').split(' '),
1141							cli, labI;
1142
1143						for ( labI = 0; labI < $labels.length; labI++ ) {
1144							for ( cli = 0; cli < font_class.length; cli++ ) {
1145								if ( font_class[cli].indexOf('font') !== -1 && font_class[cli].indexOf('fontsize') === -1 ) {
1146									classie.addClass($labels[labI], font_class[cli]);
1147								}
1148							}
1149						}
1150
1151					}
1152				}
1153			}
1154			product_relative_font_style(el)
1155
1156			function vc_row_full_width_size(){
1157				if (boxWidth != 0 && classie.hasClass(rowParent, 'vc_row-full-width')) {
1158					var vmenu = document.querySelector('.vmenu .vmenu-container'),
1159						vmenuW = 0;
1160					if (typeof vmenu == 'object' && vmenu != null && wwidth > mediaQuery  ) {
1161						vmenuW = vmenu.offsetWidth;
1162					}
1163					rowParent.style.maxWidth = ( boxWidth - vmenuW ) + 'px';
1164				}
1165			}
1166			vc_row_full_width_size();
1167
1168			window.addEventListener("resize", function() {
1169				vc_row_full_width_size();
1170			});
1171
1172			function heading_inline_images(){
1173				var $headings = currentRow.querySelectorAll('.heading-text');
1174				for (var head_k = 0; head_k < $headings.length; head_k++) {
1175					var $heading = $headings[head_k],
1176						$imgs = $heading.querySelectorAll('.un-inline-image');
1177
1178					for ( var im = 0; im < $imgs.length; im++ ) {
1179						var $img = $imgs[im].querySelectorAll('img, video'),
1180							$span = $imgs[im].querySelectorAll('span'),
1181							ratio_att = $imgs[im].getAttribute('data-ratio'),
1182							// span_bound = $span[0].getBoundingClientRect(),
1183							// span_h = span_bound.height;
1184							span_h = $span[0].offsetHeight;
1185
1186						if ( ratio_att != undefined ) {
1187							var final_w = span_h * parseFloat(ratio_att);
1188						} else {
1189							if ( $img.length ) {
1190								// var img_bound = $img[0].getBoundingClientRect(),
1191								// 	img_w = img_bound.width,
1192								// 	img_h = img_bound.height,
1193								var img_w = $img[0].offsetWidth,
1194									img_h = $img[0].offsetHeight,
1195									img_r = img_w/img_h
1196								if ( isNaN(img_r) ) {
1197									img_r = 1;
1198								}
1199								var final_w = span_h*img_r;
1200								$imgs[im].setAttribute('data-ratio', img_r);
1201							}
1202						}
1203						classie.addClass($imgs[im], 'inline-img-loaded');
1204						$imgs[im].style.width = final_w + 'px';
1205					}
1206
1207					if ( span_h === 0 ) {
1208						heading_inline_images();
1209					}
1210
1211				}
1212			};
1213
1214			heading_inline_images();
1215
1216
1217			 function word_for_lines(event, $parent_el){
1218 
1219				 if ( typeof $parent_el === 'undefined' || $parent_el === null ) {
1220					 $parent_el = document.body;
1221				 }
1222 
1223				 var $headings = $parent_el.querySelectorAll('.heading-text');
1224 
1225				 for (var head_k = 0; head_k < $headings.length; head_k++) {
1226					 var $heading = $headings[head_k],
1227						 heading_cont = $heading.innerHTML,
1228						 $row = $heading.closest('.row-parent'),
1229						 $owl_carousel = $heading.closest('.owl-carousel-wrapper'),
1230						 $owl_item = $heading.closest('.owl-item'),
1231						$words = $heading.querySelectorAll('.split-word');
1232 
1233					 if ( ! $words.length ) {
1234						 if ( $owl_item !== null )
1235							 continue;
1236					 }
1237 
1238					 if ( $owl_carousel === null && typeof event !== 'undefined' && event !== 'resize' && event !== false ) {
1239						 continue;
1240					 }
1241 
1242					 if ( $owl_carousel !== null ) {
1243						 if (
1244							 ( $owl_item === null )
1245							 ||
1246							 ( $owl_item !== null && classie.hasClass($owl_item, 'active') && $owl_item.getAttribute('data-index') !== '1' )
1247							 ||
1248							 ( $owl_item !== null && classie.hasClass($owl_item, 'active') && $owl_item.getAttribute('data-index') === '1' && $owl_item.getAttribute('data-already-reached') === 'true' )
1249						 ) {
1250							 continue;
1251						 }
1252					 }
1253 
1254					 $heading.innerHTML = heading_cont;
1255					$words = $heading.querySelectorAll('.split-word, .heading-foreword');
1256					 var lineArray = [],
1257						 lineIndex = 0,
1258						 lineStart = true,
1259						 lineEnd = false,
1260						 $text_highlight = $heading.querySelectorAll('.heading-text-highlight'),
1261						 $line_wraps = $heading.querySelectorAll('.heading-line-wrap');
1262 
1263					 if ( $line_wraps.length && typeof event === 'undefined' ) {
1264						 continue;
1265					 }
1266 
1267					 var lettering = function(){
1268						 var $wraps = $parent_el.querySelectorAll('.animate_inner_when_almost_visible.curtain, .animate_inner_when_almost_visible.curtain-words, .animate_inner_when_almost_visible.typewriter, .animate_inner_when_almost_visible.single-curtain, .animate_inner_when_almost_visible.single-slide, .animate_inner_when_almost_visible.single-slide-opposite');
1269 
1270						 for (var i = 0; i < $wraps.length; i++) {
1271							 var $wrap = $wraps[i],
1272								 $lines = $wrap.querySelectorAll('.heading-line-wrap'),
1273								 $words =  $wrap.querySelectorAll('.split-word:not(.uncode-rotating-span)'),
1274								 containerDelay = $wrap.getAttribute('data-delay'),
1275								 containerSpeed = $wrap.getAttribute('data-speed'),
1276								 containerSpeed_val = typeof containerSpeed !== 'undefined' && containerSpeed !== null ? parseFloat(containerSpeed) : 400,
1277								 containerInterval = typeof $wrap.getAttribute('data-interval') !== 'undefined' && $wrap.getAttribute('data-interval') !== null ? $wrap.getAttribute('data-interval') : 0,
1278								 $cloned = $wrap.closest('.cloned'),
1279								 delayAttr = (containerDelay != undefined) ? containerDelay : 0;
1280 
1281							if ( classie.hasClass($wrap, 'already-animated') ) {
1282								 continue;
1283							}
1284 
1285							if ( $cloned !== null ) {
1286								continue;
1287							}
1288
1289							if ( classie.hasClass($wrap, 'curtain') ) {
1290 
1291								 for (var il = 0; il < $lines.length; il++) {
1292									 var $line = $lines[il],
1293										 $spans = $line.querySelectorAll('.split-word-inner');
1294 
1295									 for (var is = 0; is < $spans.length; is++) {
1296 
1297										 var $span = $spans[is];
1298 
1299										 $span.setAttribute('data-delay', ( parseFloat(delayAttr) + ( ( parseFloat(containerInterval) + 100 ) * il ) ) );
1300 
1301										 if (typeof containerSpeed_val !== 'undefined' ) {
1302											 $span.setAttribute('data-speed', containerSpeed_val);
1303										 }
1304 
1305										 classie.addClass($span, 'animate_when_parent_almost_visible');
1306										 classie.addClass($span, 'text-bottom-t-top');
1307 
1308										 if ( is+1 === $spans.length && il+1 === $lines.length ) {
1309											 classie.addClass($span, 'anim-tot-checker');
1310										 }
1311									 }
1312 
1313								 }
1314 
1315							 } else if ( classie.hasClass($wrap, 'single-curtain') ) {
1316 
1317								 var $spans = $wrap.querySelectorAll('.split-char');
1318 
1319								 for (var is = 0; is < $spans.length; is++) {
1320									 var $span = $spans[is];
1321 
1322									 $span.setAttribute('data-delay', ( parseFloat(delayAttr) + ( ( parseFloat(containerInterval) + 20 ) * is ) ) );
1323 
1324									 if (typeof containerSpeed_val !== 'undefined' ) {
1325										 $span.setAttribute('data-speed', containerSpeed_val);
1326									 }
1327 
1328									 classie.addClass($span, 'animate_when_parent_almost_visible');
1329									if ( ! classie.hasClass($span, 'un-inline-image') ) {
1330									 classie.addClass($span, 'text-bottom-t-top');
1331									}
1332 
1333									 if ( is+1 == $spans.length ) {
1334										 classie.addClass($span, 'anim-tot-checker');
1335									 }
1336								 };
1337 
1338							 } else if ( classie.hasClass($wrap, 'typewriter') ) {
1339 
1340								 var $spans = $wrap.querySelectorAll('.split-char');
1341 
1342								 for (var is = 0; is < $spans.length; is++) {
1343									 var $span = $spans[is];
1344 
1345									 $span.setAttribute('data-delay', ( parseFloat(delayAttr) + ( ( parseFloat(containerInterval) + 20 ) * is ) ) );
1346 
1347									 if (typeof containerSpeed_val !== 'undefined' ) {
1348										 $span.setAttribute('data-speed', containerSpeed_val);
1349									 }
1350 
1351									 classie.addClass($span, 'animate_when_parent_almost_visible');
1352									 classie.addClass($span, 'typewriter');
1353 
1354									 if ( is+1 == $spans.length ) {
1355										 classie.addClass($span, 'anim-tot-checker');
1356									 }
1357 
1358								 }
1359 
1360							 } else if ( classie.hasClass($wrap, 'single-slide') ) {
1361 
1362								 var $spans = $wrap.querySelectorAll('.split-word-inner');
1363 
1364								 for (var is = 0; is < $spans.length; is++) {
1365									 var $span = $spans[is];
1366 
1367									 $span.setAttribute('data-delay', ( parseFloat(delayAttr) + ( ( parseFloat(containerInterval) + 50 ) * is ) ) );
1368 
1369									 if (typeof containerSpeed_val !== 'undefined' ) {
1370										 $span.setAttribute('data-speed', containerSpeed_val);
1371									 }
1372 
1373									 classie.addClass($span, 'animate_when_parent_almost_visible');
1374									 if ( classie.hasClass(document.body, 'rtl') ) {
1375										 classie.addClass($span, 'text-left-t-right');
1376									 } else {
1377										 classie.addClass($span, 'text-right-t-left');
1378									 }
1379 
1380									 if ( is+1 == $spans.length ) {
1381										 classie.addClass($span, 'anim-tot-checker');
1382									 }
1383								 }
1384 
1385							 } else if ( classie.hasClass($wrap, 'single-slide-opposite') ) {
1386 
1387								 var $spans = $wrap.querySelectorAll('.split-word-inner');
1388 
1389								 for (var is = 0; is < $spans.length; is++) {
1390									 var $span = $spans[is];
1391 
1392									 $span.setAttribute('data-delay', ( parseFloat(delayAttr) + ( ( parseFloat(containerInterval) + 50 ) * is ) ) );
1393 
1394									 if (typeof containerSpeed_val !== 'undefined' ) {
1395										 $span.setAttribute('data-speed', containerSpeed_val);
1396									 }
1397 
1398									 classie.addClass($span, 'animate_when_parent_almost_visible');
1399									 if ( classie.hasClass(document.body, 'rtl') ) {
1400										 classie.addClass($span, 'text-right-t-left');
1401									 } else {
1402										 classie.addClass($span, 'text-left-t-right');
1403									 }
1404 
1405									 if ( is+1 == $spans.length ) {
1406										 classie.addClass($span, 'anim-tot-checker');
1407									 }
1408								 }
1409 
1410							 } else if ( classie.hasClass($wrap, 'curtain-words') ) {
1411 
1412								 var $spans = $wrap.querySelectorAll('.split-word-inner');
1413 
1414								 for (var is = 0; is < $spans.length; is++) {
1415									 var $span = $spans[is];
1416 
1417									 $span.setAttribute('data-delay', ( parseFloat(delayAttr) + ( ( parseFloat(containerInterval) + 50 ) * is ) ) );
1418 
1419									 if (typeof containerSpeed_val !== 'undefined' ) {
1420										 $span.setAttribute('data-speed', containerSpeed_val);
1421									 }
1422 
1423									 classie.addClass($span, 'animate_when_parent_almost_visible');
1424									 classie.addClass($span, 'text-bottom-t-top');
1425 
1426									 if ( is+1 == $spans.length ) {
1427										 classie.addClass($span, 'anim-tot-checker');
1428									 }
1429								 }
1430							 }
1431 
1432						 }
1433					 }
1434 
1435					 var removeOldLines = function(){
1436						 for (var wrap_k = 0; wrap_k < $line_wraps.length; wrap_k++) {
1437							 var $line_wrap = $line_wraps[wrap_k];
1438							 var $parent_wrap = $line_wrap.parentNode;
1439							 if ( $parent_wrap !== null ) {
1440								 while ( $line_wrap.firstChild ) {
1441									 $parent_wrap.insertBefore($line_wrap.firstChild, $line_wrap);
1442								 }
1443								 $parent_wrap.removeChild($line_wrap);
1444							 }
1445						 }
1446						 window.dispatchEvent(new CustomEvent('removeOldLines'));
1447					 }
1448 
1449					 var createHighlightSpans = function(){
1450						 for (var high_k = 0; high_k < $text_highlight.length; high_k++) {
1451							 var $highlight = $text_highlight[high_k],
1452								 atts = $highlight.getAttribute('data-atts'),
1453								 objAtts,
1454								 styleEl = '',
1455								 classEl = '',
1456								 animation = false,
1457								 hexRe = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,
1458								 $h_words = $highlight.querySelectorAll('.split-word:not(.uncode-rotating-span)');
1459 
1460							 if ( typeof atts !== 'undefined' && atts != '' ) {
1461								 objAtts = JSON.parse(atts);
1462								 if ( typeof objAtts.bg != 'undefined' ) {
1463									 if ( hexRe.test(objAtts.bg)) {
1464										 styleEl += 'background-color:' + objAtts.bg + ';';
1465									 } else {
1466										 classEl += ' ' + objAtts.bg;
1467									 }
1468								 }
1469								 if ( typeof objAtts.color != 'undefined' ) {
1470									 if ( hexRe.test(objAtts.color)) {
1471										 styleEl += 'color:' + objAtts.color + ';';
1472									 } else {
1473										 var classChild = objAtts.color;
1474									 }
1475								 }
1476								 if ( typeof objAtts.height != 'undefined' ) {
1477									 styleEl += 'height:' + objAtts.height + ';';
1478								 }
1479								 if ( typeof objAtts.offset != 'undefined' ) {
1480									 styleEl += 'bottom:' + objAtts.offset + ';';
1481								 }
1482								 if ( typeof objAtts.opacity != 'undefined' ) {
1483									 styleEl += 'opacity:' + objAtts.opacity + ';';
1484								 }
1485								 if ( objAtts.animated == 'yes' ) {
1486									 animation = true;
1487								 }
1488 
1489							 }
1490 
1491							 for (var h_words_k = 0; h_words_k < $h_words.length; h_words_k++) {
1492								 var $word = $h_words[h_words_k],
1493									 $new_el = document.createElement('span');
1494 
1495								 if ( typeof classChild !== 'undefined' ) {
1496									 classie.addClass($word, objAtts.color);
1497								 }
1498 
1499								 if ( h_words_k === 0 ) {
1500									 classie.addClass($word, 'first-highlight');
1501								 } else if ( (h_words_k+1) === $h_words.length ) {
1502									 classie.addClass($word, 'last-highlight');
1503								 }
1504 
1505								 $new_el.className = 'heading-text-highlight-inner' + classEl;
1506								 if ( styleEl !== '' ) {
1507									 $new_el.setAttribute('style', styleEl);
1508								 }
1509 
1510								 if ( animation ) {
1511									 $new_el.setAttribute('data-animated', 'yes');
1512								 }
1513 
1514								 $word.appendChild($new_el);
1515 
1516							 };
1517 
1518							 var $parent_highlight = $highlight.parentNode;
1519							 if ( $parent_highlight != null ) {
1520								 while ( $highlight.firstChild ) {
1521									 $parent_highlight.insertBefore($highlight.firstChild, $highlight);
1522								 }
1523								 $parent_highlight.removeChild($highlight);
1524							 }
1525						 }
1526 
1527					 }
1528 
1529					 var createNewLines = function(){
1530						 for (var word_k = 0; word_k < $words.length; word_k++) {
1531							 var $word = $words[word_k],
1532								 top = $word.offsetTop,
1533								 elH = $word.offsetHeight,
1534								 $next = typeof $words[(word_k+1)] !== 'undefined' ? $words[(word_k+1)] : null,
1535								 nextTop = $next !== null ? $next.offsetTop : null;
1536 
1537							 if (lineStart) {
1538								 lineArray[lineIndex] = [word_k];
1539 
1540								 if (nextTop !== null && elH > 0 && nextTop > (top + elH/2)) {//tollerance
1541									 lineArray[lineIndex].push(word_k);
1542									 lineIndex++;
1543									 lineStart = true;
1544								 } else {
1545									 lineStart = false;
1546								 }
1547							 } else {
1548								 if (nextTop !== null && elH > 0 && nextTop > (top + elH/2)) {//tollerance
1549									 lineArray[lineIndex].push(word_k);
1550									 lineIndex++;
1551									 lineStart = true;
1552								 } else if ( nextTop === null ) {
1553									 lineArray[lineIndex].push(word_k);
1554								 }
1555							 }
1556						 }
1557 
1558						 for (var i = 0; i < lineArray.length; i++) {
1559							 var start = lineArray[i][0],
1560								 end = lineArray[i][1] + 1;
1561 
1562							 var spanWrap = document.createElement('span');
1563							 spanWrap.className = 'heading-line-wrap';
1564 
1565							 if (!end) {
1566								 window.wrap(spanWrap, $words[start]);
1567							 } else {
1568								 for (var _i = start; _i < end; _i++) {
1569									 if ( typeof $words[_i] !== 'undefined' && $words[_i] !==  null ) {
1570										 classie.addClass($words[_i], 'heading-temp');
1571										 $words[_i].style.zIndex = end - _i;
1572									 }
1573								 }
1574								 var $towrap = $heading.querySelectorAll('.heading-temp');
1575								 if ( typeof $towrap[0] !== 'undefined' && $towrap[0] !==  null ) {
1576									 window.wrapAll(spanWrap, $towrap);
1577									 for (var _i = 0; _i < $towrap.length; _i++) {
1578										 classie.removeClass($towrap[_i], 'heading-temp');
1579									 }
1580								 }
1581							 }
1582 
1583							 if ( (i+1) == lineArray.length ) {
1584								 classie.addClass($row, 'loaded-split-word');
1585							 }
1586 
1587							 classie.addClass($heading, 'heading-lined');
1588						 }
1589						 lettering();
1590 
1591					 }
1592 
1593					 removeOldLines();
1594					 createHighlightSpans();
1595					 createNewLines();
1596 
1597					 $parent_el.addEventListener("owl-carousel-changed", function() {
1598						 removeOldLines();
1599						 createHighlightSpans();
1600						 createNewLines();
1601					 });
1602 
1603					 if ( event !== 'resize' ) {
1604						 document.body.dispatchEvent(new CustomEvent('uncode_waypoints'));
1605					 }
1606 
1607				 }
1608			 }
1609 
1610			 var $h_markup = document.body.querySelectorAll('.font-obs'),
1611				 fontArr = new Array();
1612 
1613			 for (var i = 0; i < $h_markup.length; i++) {
1614				 var font_to_check = $h_markup[i].getAttribute("data-font");
1615 
1616				 if ( font_to_check === null ) {
1617					 word_for_lines(false, el);
1618				 } else {
1619					 var font_weight = $h_markup[i].getAttribute("data-weight");
1620					 var font_style = $h_markup[i].getAttribute("data-style");
1621 
1622					 if ( font_weight === null ) {
1623						 font_weight = 'normal';
1624					 }
1625 
1626					 if ( font_style === null ) {
1627						 font_style = 'normal';
1628					 }
1629 
1630					 font_to_check = font_to_check.split(',');
1631 
1632					 var font_val = font_to_check[0].replace(/['"]+/g, ''),
1633						 font_key = '\''+font_val+'_'+font_weight+'_'+font_style+'\'';
1634 
1635					 if ( fontArr.indexOf( font_val+'_'+font_weight ) === -1  ) {
1636						 fontArr[font_key] = {'family':font_val,'weight':font_weight,'style':font_style };
1637					 }
1638				 }
1639			 }
1640 
1641			 var counter = 0;
1642 
1643			 for (var key in fontArr) {
1644				 if (fontArr.hasOwnProperty(key)) {
1645					 var font = new FontFaceObserver(fontArr[key].family, { weight: fontArr[key].weight, style: fontArr[key].style } );
1646 
1647					 font.load(null, 10000).then(function (font) {
1648						 counter++;
1649						 if ( counter == Object.keys(fontArr).length ) {
1650							 already_font = true;
1651							 requestTimeout(function(){
1652								 word_for_lines(false, el);
1653								heading_inline_images();
1654							 }, 10);
1655						 }
1656					 }, function (error) {
1657						 word_for_lines(false, el);
1658						heading_inline_images();
1659					 });
1660				 }
1661			 }
1662 
1663			 el.addEventListener("owl-carousel-initialized", function() {
1664				 word_for_lines("owl-carousel-initialized", el);
1665			 });
1666 
1667			 el.addEventListener("vc-shortcodeView-updated", function() {
1668				heading_inline_images();
1669				 word_for_lines(false, el);
1670			 });
1671 
1672			 window.addEventListener("resize", function() {
1673				 if ( wwidth != wrapLinesWw ) {
1674					 clearRequestTimeout(setWrap);
1675					 setWrap = requestTimeout( function(){
1676						 wrapLinesWw = wwidth;
1677						 word_for_lines('resize');
1678					 }, 100 );
1679				 }
1680				heading_inline_images();
1681			});
1682
1683			window.addEventListener("load", function() {
1684				if ( ! UNCODE.isFrontEndEditor && wwidth <= mediaQuery ) {
1685					heading_inline_images();
1686				}
1687			 });
1688 
1689			 scrollFunction();
1690 
1691			 var videos = document.querySelectorAll('.wp-video-shortcode');
1692			 for (var i = 0; i < videos.length; i++) {
1693				 var video = videos[i];
1694				 if ( typeof video.getAttribute('autoplay') !== 'undefined' && video.getAttribute('autoplay') !== null && ( typeof video.getAttribute('muted') === 'undefined' || video.getAttribute('muted') === null )  ) {
1695					 video.oncanplay = function(e) {
1696						 video.muted = true;
1697						 video.play();
1698					 };
1699					 break;
1700				 }
1701			 }
1702 
1703			 // Single Product reviews counter on Page Builder module
1704			 var singleProductReviewsCounter = function(){
1705				 var $reviews = document.getElementById("reviews"),
1706					 $comments = $reviews != undefined ? $reviews.querySelector(".commentlist") : undefined;
1707				 if ( $reviews != undefined && $comments != undefined ) {
1708					 var dataReviews = $reviews.getAttribute('data-reviewed'),
1709						 comments = $comments.getAttribute('data-comment-amout'),
1710						 count_review_class = comments > 0 ? '' : ' hidden';
1711					 if ( typeof dataReviews == 'undefined' || dataReviews == null || dataReviews == '' ) {
1712						 $reviews.setAttribute('data-reviewed', 'reviewed');
1713						 var $tabPane = getClosest($reviews, 'tab-pane'),
1714							 $panel = getClosest($reviews, 'wpb_accordion_section');
1715						 if ( $tabPane != undefined) {
1716							 var revID = $tabPane.getAttribute('id'),
1717								 $spanTxt = document.querySelector('[data-tab-id=' + revID + '] > a > span');
1718 
1719							 if ( typeof revID !== 'undefined' && revID !== '' && $spanTxt != null ) {
1720								 var $spanCount = $spanTxt.querySelector('span.review-count');
1721								 if ( $spanCount != null ) {
1722									 $spanCount.innerHTML = comments;
1723								 } else {
1724									 var textReviews = $spanTxt.innerHTML;
1725									 $spanTxt.innerHTML = textReviews + ' <span class="review-count' + count_review_class + '">' + comments + '</span>';
1726								 }
1727							 }
1728						 }
1729						 if ( $panel != undefined ) {
1730							 var $spanTxt = $panel.querySelector('.panel-title > a > span');
1731 
1732							 if ( $spanTxt != null ) {
1733								 var $spanTxt_0 = $spanTxt;
1734								 if ( $spanTxt[0] != undefined ) {
1735									 $spanTxt_0 = $spanTxt[0];
1736								 }
1737								 var $spanCount = $spanTxt.querySelector('span.review-count');
1738								 if ( $spanCount != null ) {
1739									 $spanCount.innerHTML = comments;
1740								 } else {
1741									 var textReviews = $spanTxt.innerHTML;
1742									 $spanTxt.innerHTML = textReviews + ' <span class="review-count' + count_review_class + '">' + comments + '</span>';
1743								 }
1744							 }
1745						 }
1746					 }
1747				 }
1748			 };
1749			 singleProductReviewsCounter();
1750			 window.addEventListener( "vc_panel_title_edited", singleProductReviewsCounter );
1751 
1752			 //Check for empty additional info tabs
1753			 var checkEmptyAdditionalInfo = function(){
1754				 var $emptyAdditional = document.getElementById("no_additional_info"),
1755					 $emptyPane,
1756					 empty_pane_ID,
1757					 $tabsParent,
1758					 $emptyTab;
1759				 if ( $emptyAdditional != undefined ) {
1760					 $emptyPane = getClosest($emptyAdditional, 'tab-pane');
1761					 $tabsParent = getClosest($emptyAdditional, 'uncode-tabs');
1762					 if ( $emptyPane == undefined )
1763						 return false;
1764					 empty_pane_ID = $emptyPane.getAttribute('id');
1765 
1766					 $emptyTab = $tabsParent.querySelector('li[data-tab-id="' + empty_pane_ID + '"]');
1767					 $emptyTab.parentNode.removeChild($emptyTab);
1768					 $emptyPane.parentNode.removeChild($emptyPane);
1769				 }
1770			 };
1771			 checkEmptyAdditionalInfo();
1772 
1773			 var waitForSrcSetMedia = function(){
1774				 var $thumbs = el.querySelectorAll('.srcset-lazy-animations');
1775 
1776				 if ( $thumbs.length ) {
1777					 $thumbs.forEach(function($thumb) {
1778						 var $media = $thumb.querySelectorAll('.srcset-auto');
1779 
1780						 if ( $media.length ) {
1781							 var $media_inside = $media[0].querySelectorAll('.srcset-sizes-done');
1782							 if ( classie.hasClass($media[0], 'srcset-sizes-done') || $media_inside.length ) {
1783								 classie.removeClass($thumb, 'srcset-lazy-animations');
1784							 }
1785						 } else {
1786							 classie.removeClass($thumb, 'srcset-lazy-animations');
1787						 }
1788					 });
1789				 }
1790 
1791				 var $posters = el.querySelectorAll('.no-control-lazy-poster');
1792 
1793				 if ( $posters.length ) {
1794 
1795					 $posters.forEach(function($thumb) {
1796						 var $media = $thumb.querySelectorAll('.srcset-auto');
1797 
1798						 var loadForPosters = function( $thumb, $media ){
1799							 var url = ($media[0].getAttribute('src')),
1800								 image = new Image();
1801							 if ( url !== null ) {
1802								 image.onload = function() {
1803									 setTimeout(function(){
1804										 classie.removeClass($thumb, 'no-control-lazy-poster');
1805									 }, 200);
1806								 };
1807								 image.src = url;
1808							 } else {
1809								 classie.removeClass($thumb, 'no-control-lazy-poster');
1810							 }
1811						 };
1812 
1813						 if ( $media.length ) {
1814							 var $media_inside = $media[0].querySelectorAll('.srcset-sizes-done');
1815							 var checkSrcSetDone = function(){
1816								 if ( classie.hasClass($media[0], 'srcset-sizes-done') || $media_inside.length ) {
1817									 loadForPosters($thumb, $media);
1818								 } else {
1819									 setTimeout(checkSrcSetDone, 100);
1820								 }
1821							 }
1822							 checkSrcSetDone();
1823						 } else {
1824							 $media = $thumb.querySelectorAll('img[src]');
1825							 if ( $media.length ) {
1826								 loadForPosters($thumb, $media);
1827							 } else {
1828								 classie.removeClass($thumb, 'no-control-lazy-poster');
1829							 }
1830						 }
1831					 });
1832				 } 
1833			 };
1834			 waitForSrcSetMedia();
1835			window.addEventListener( "uncode-ajax-filtered", waitForSrcSetMedia, {
1836				passive: true,
1837				once: true,
1838			});
1839 
1840		 },
1841 
1842		 setRowHeight = function(container, forced, resized) {
1843			 var currentTallest = 0,
1844				 percentHeight = 0,
1845				 minHeight = 0,
1846				 el,
1847				 child,
1848				 hasSubCols = false;
1849			 if (container.length == undefined) {
1850				 container = [container];
1851			 }
1852			 // Loop for each container element to match their heights
1853			 for (var i = 0; i < container.length; i++) {
1854				 var el = container[i],
1855					 $row = el,
1856					 totalHeight = 0,
1857					 colsArray = new Array(),
1858					 calculatePadding = 0,
1859					 $rowParent = $row.parentNode,
1860					 isHeader = false,
1861					 isFirst = false;
1862				 $row.oversized = false;
1863				 percentHeight = el.getAttribute("data-height-ratio");
1864				 minHeight = el.getAttribute("data-minheight");
1865				 // child = (el.firstElementChild || el.firstChild);
1866				 child = (el.lastElementChild || el.lastChild);
1867				 var childHeight = outerHeight(child);
1868				 /** window height without header **/
1869				 if (!!percentHeight || !!minHeight || forced || (isIE && classie.hasClass(el, 'unequal')) ) {
1870					 child.style.height = '';
1871					 if (!!percentHeight) {
1872						 if (percentHeight == 'full') {
1873							 currentTallest = parseInt(UNCODE.wheight);
1874						 } else {
1875							 currentTallest = parseInt((UNCODE.wheight * percentHeight) / 100);
1876						 }
1877					 } else {
1878						 currentTallest = el.clientHeight;
1879					 }
1880 
1881					 if (!!minHeight) {
1882						 if (currentTallest < minHeight || currentTallest == undefined) currentTallest = parseInt(minHeight);
1883					 }
1884 
1885					 if (getClosest(el, 'header-uncode-block') != null) {
1886						 el.setAttribute('data-row-header', 'true');
1887						 isHeader = true;
1888					 } else {
1889						 if (pageHeader == null) {
1890							 var prevRow = $rowParent.previousSibling;
1891							 if (prevRow != null && prevRow.innerText == 'UNCODE.initHeader();') {
1892								 isFirst = true;
1893							 }
1894						 }
1895					 }
1896 
1897					 menuMobileTransparent = document.querySelector('.menu-absolute.menu-transparent');
1898					 if (classie.hasClass(el, 'row-slider')) {
1899						 percentHeight = el.getAttribute("data-height-ratio");
1900						 minHeight = el.getAttribute("data-minheight");
1901						 if (percentHeight == 'full') {
1902							 currentTallest = parseInt(UNCODE.wheight);
1903						 } else {
1904							 currentTallest = parseInt((UNCODE.wheight * percentHeight) / 100);
1905						 }
1906 
1907						 var computedStyleRow = getComputedStyle(el),
1908							 computedStyleRowParent = getComputedStyle($rowParent);
1909						 calculatePadding -= (parseFloat(computedStyleRow.paddingTop) + parseFloat(computedStyleRowParent.paddingTop));
1910						 calculatePadding -= (parseFloat(computedStyleRow.paddingBottom) + parseFloat(computedStyleRowParent.paddingBottom));
1911 
1912						 if (isHeader || isFirst) {
1913							 if ( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) {
1914								 currentTallest -= menuHeight - transmenuHeight;
1915							 } else {
1916								 currentTallest -= menuHeight;
1917							 }
1918							 currentTallest += calculatePadding;
1919						 } else {
1920							 if ( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) {
1921								 currentTallest += calculatePadding;
1922							 } else {
1923								 currentTallest = 'auto';
1924							 }
1925						 }
1926 
1927						 getDivChildren(el, '.owl-carousel', function(owl, i) {
1928							 owl.style.height = (currentTallest == 'auto' ? 'auto' : currentTallest + 'px');
1929							 if (isIE) {
1930								 getDivChildren(owl, '.owl-stage', function(owlIn, i) {
1931									 owlIn.style.height = (currentTallest == 'auto' ? '100%' : currentTallest + 'px');
1932								 });
1933							 }
1934						 });
1935						 if ( UNCODE.isFullPageSnap || classie.hasClass(masthead, 'menu-transparent') )
1936							 continue;
1937						 else {
1938							 if ( classie.hasClass(document.body, 'uncode-fp-menu-hide') ) {
1939								 $rowParent.parentNode.style.paddingTop = menuHeight + 'px';
1940							 }
1941						 }
1942					 } else {
1943						 if (isHeader || isFirst || UNCODE.isFullPage ) {
1944							 if ( !( UNCODE.isFullPage && !classie.hasClass(masthead, 'menu-transparent') && classie.hasClass(document.body, 'uncode-fp-menu-hide') && !isHeader && !isFirst ) ) {
1945								 if (isMobileTransparent || wwidth > mediaQuery) {
1946									currentTallest -= menuHeight - transmenuHeight;
1947								} else {
1948									currentTallest -= menuHeight - secmenuHeight;
1949								 }
1950							 }
1951							 if ( UNCODE.isFullPage && classie.hasClass(document.body, 'uncode-scroll-safe-padding') && classie.hasClass(masthead, 'menu-transparent') && !classie.hasClass(document.body, 'uncode-fp-menu-hide') ) {
1952								 var safeMenuHeight = parseFloat(document.body.getAttribute("data-additional-padding")) + parseFloat(menuHeight);
1953								 if ( (" " + child.parentNode.className + " ").replace(/[\n\t]/g, " ").indexOf("-top-padding ") < 0 || classie.hasClass(child.parentNode, 'single-top-padding') ) {
1954									 classie.addClass(child.parentNode, 'fp-safe-padding-top');
1955									 child.parentNode.style.paddingTop = safeMenuHeight + 'px';
1956								 }
1957								 if ( (" " + child.parentNode.className + " ").replace(/[\n\t]/g, " ").indexOf("-bottom-padding ") < 0 || classie.hasClass(child.parentNode, 'single-bottom-padding') ) {
1958									 classie.addClass(child.parentNode, 'fp-safe-padding-bottom');
1959									 child.parentNode.style.paddingBottom = safeMenuHeight + 'px';
1960								 }
1961							 }
1962							 if ( !classie.hasClass(masthead, 'menu-transparent') && classie.hasClass(document.body, 'uncode-fp-menu-hide') && ( isFirst || isHeader ) ) {
1963								$rowParent.parentNode.style.paddingTop = menuHeight + 'px';
1964							 }
1965 
1966							 var computedStyleRow = getComputedStyle(el),
1967								 computedStyleRowParent = getComputedStyle($rowParent);
1968							 calculatePadding -= (parseFloat(computedStyleRow.paddingTop) + parseFloat(computedStyleRowParent.paddingTop));
1969							 calculatePadding -= (parseFloat(computedStyleRow.paddingBottom) + parseFloat(computedStyleRowParent.paddingBottom));
1970 
1971							 currentTallest += calculatePadding;
1972 
1973						 } else {
1974 
1975							var computedStyleRow = getComputedStyle(el),
1976								 computedStyleRowParent = getComputedStyle($rowParent);
1977							 calculatePadding -= (parseFloat(computedStyleRow.paddingTop) + parseFloat(computedStyleRowParent.paddingTop));
1978							 calculatePadding -= (parseFloat(computedStyleRow.paddingBottom) + parseFloat(computedStyleRowParent.paddingBottom));
1979 
1980							 if (wwidth > mediaQuery) currentTallest += calculatePadding;
1981							 else currentTallest = 'auto';
1982 
1983						 }
1984					 }
1985					 if ( UNCODE.isFullPage ) {
1986						 currentTallest -= UNCODE.adminBarHeight;
1987					 }
1988					 if (!!minHeight) {
1989						 if (currentTallest < minHeight || currentTallest == 'auto') currentTallest = parseInt(minHeight);
1990					 }
1991 
1992					 if ( UNCODE.isFrontEndEditor && child !== null ) {
1993						 var innerWrapper = child.querySelectorAll('.owl-carousel-wrapper.vc_uncode_slider');
1994						 if ( innerWrapper.length ) {
1995							 getDivChildren(child, '.owl-carousel-wrapper.vc_uncode_slider', function(wrapper, i) {
1996								 if ( wrapper !== null ) {
1997									 wrapper.style.height = (currentTallest == 'auto' ? 'auto' : currentTallest + 'px');
1998								 } else {
1999									 child.style.height = (currentTallest == 'auto' ? 'auto' : currentTallest + 'px');
2000								 }
2001							 });
2002						 } else {
2003							 child.style.height = (currentTallest == 'auto' ? 'auto' : currentTallest + 'px');
2004						 }
2005					 } else {
2006						 //here
2007						 child.style.height = (currentTallest == 'auto' ? 'auto' : currentTallest + 'px');
2008					 }
2009 
2010					 if ( wwidth < mediaQuery && classie.hasClass(child, 'auto-height-device') ) {
2011						 child.style.height = 'auto';
2012					 }
2013 
2014				 } else {
2015					 currentTallest = 0;
2016					 if ( UNCODE.isFrontEndEditor && child !== null ) {
2017 
2018						 child.style.height = '';
2019 
2020						 getDivChildren(el, '.owl-carousel', function(owl, i) {
2021							 owl.style.height = '';
2022							 if (isIE) {
2023								 getDivChildren(owl, '.owl-stage', function(owlIn, i) {
2024									 owlIn.style.height = '';
2025								 });
2026							 }
2027						 });
2028					 }
2029				 }
2030 
2031				 if (wwidth > mediaQuery) {
2032 
2033					 getDivChildren(el, '.column_parent', function(col, i, total) {
2034						 var $col = col,
2035							 $colHeight = 0,
2036							 $colDiff = 0,
2037							 $colPercDiff = 100;
2038						 $col.oversized = false;
2039						 $col.forceHeight = currentTallest;
2040						 currentTallest = child.clientHeight;
2041						 if ((isHeader || isFirst) && currentTallest != 'auto') currentTallest -= transmenuHeight;
2042						 var getFirstCol = null,
2043						 getMargin = 0,
2044						 getSubMargin = 0;
2045						 getDivChildren(col, '.row-child', function(obj, i, total) {
2046							 var $colChild = obj,
2047								 $colParent = $colChild.parentNode,
2048								 computedStyleCol = getComputedStyle($colParent);
2049							 parseFloat(computedStyleCol.marginTop);
2050							 getSubMargin += parseFloat(computedStyleCol.marginTop);
2051						 });
2052						 currentTallest += getSubMargin;
2053						 getDivChildren(col, '.row-child', function(obj, i, total) {
2054							 var $colChild = obj,
2055								 $colInner,
2056								 $colParent = $colChild.parentNode,
2057								 $uncont = $colParent.parentNode;
2058							 for (var it = 0; it < $colChild.childNodes.length; it++) {
2059								 if ( ! classie.hasClass($colChild.childNodes[it], 'uncode-divider-wrap') ) {
2060									 $colInner = $colChild.childNodes[it];
2061									 break;
2062								 }
2063							 }
2064							 if (i == 0 && total > 1) getFirstCol = $colInner;
2065							 $colChild.oversized = false;
2066							 percentHeight = $colChild.getAttribute("data-height");
2067							 minHeight = $colChild.getAttribute("data-minheight");
2068							 if (percentHeight != null || minHeight != null) {
2069								 if ( ! classie.hasClass($colInner, 'uncode-divider-wrap') )
2070									 $colInner.style.height = '';
2071								 $colParent.style.height = 'auto';
2072								 $uncont.style.height = '100%';
2073								 $colChild.removeAttribute("style");
2074								 var newHeight = (percentHeight != null) ? Math.ceil((currentTallest) * (percentHeight / 100)) : parseInt(minHeight);
2075								 var computedStyleCol = getComputedStyle($colParent);
2076								 getMargin = parseFloat(computedStyleCol.marginTop);
2077								 newHeight -= (getMargin);
2078								 $colPercDiff -= (percentHeight != null) ? percentHeight : 0;
2079								if (currentTallest >= newHeight) {
2080									 var getColHeight = outerHeight($colChild);
2081									 if (getColHeight > newHeight) {
2082										 $colHeight += getColHeight;
2083										 $colDiff += getColHeight;
2084										 $colChild.oversized = true;
2085										 $col.oversized = true;
2086										 $row.oversized = true;
2087									 } else {
2088										 $colHeight += newHeight;
2089										 if ( ! classie.hasClass($colInner, 'uncode-divider-wrap') ) {
2090											 $colInner.style.height = newHeight + 'px';
2091										 }
2092									 }
2093								 }
2094							 } else {
2095								 $colHeight += outerHeight($colChild);
2096							 }
2097						 });
2098						 if (getFirstCol != null) {
2099							 getFirstCol.style.height = (parseFloat(getFirstCol.style.height) - getMargin) + 'px';
2100						 }
2101						 colsArray.push({
2102							 colHeight: $colHeight,
2103							 colDiv: $col
2104						 });
2105						 $col.colDiff = $colDiff;
2106						 $col.colPercDiff = $colPercDiff;
2107 
2108					 });
2109 
2110					 if ($row.oversized) {
2111						 child.style.height = '';
2112						 colsArray.sort(function(a, b) {
2113							 if (a.colHeight < b.colHeight) return 1;
2114							 if (a.colHeight > b.colHeight) return -1;
2115							 return 0;
2116						 });
2117						 var $totalHeight = 0;
2118						 colsArray.forEach(function(col) {
2119							 var $col = col.colDiv,
2120								 $colHeight = col.colHeight;
2121							 getDivChildren($col, '.row-child', function(obj, i, total) {
2122								 var $colChild = obj,
2123									 $colInner = $colChild.children[0],
2124									 percentHeight = parseFloat($colChild.getAttribute("data-height")),
2125									 $colParent = $colChild.parentNode,
2126									 $uncont = $colParent.parentNode,
2127									 newHeight;
2128 
2129								 $colHeight = $col.forceHeight - $col.colDiff;
2130								 if (percentHeight != null) {
2131									 if ($colHeight > 0) {
2132										 if ($col.oversized) {
2133											 if (!$colChild.oversized) {
2134												 newHeight = Math.ceil(($colHeight) * (percentHeight / $col.colPercDiff));
2135												 if (i == total - 1 && total > 1) {
2136													 $uncont.style.height = 'auto';
2137													 $colChild.style.display = 'none';
2138													 newHeight = outerHeight($col.parentNode) - outerHeight($uncont);
2139													 $uncont.style.height = '100%';
2140													 $colChild.style.display = 'table';
2141												 }
2142												 if (newHeight == 0) newHeight = Math.ceil(($col.forceHeight) * (percentHeight / 100));
2143												 $colInner.style.height = newHeight + 'px';
2144											 }
2145										 } else {
2146											 if ($totalHeight == 0) newHeight = Math.ceil(($colHeight) * (percentHeight / $col.colPercDiff));
2147											 else {
2148												 newHeight = Math.ceil(($totalHeight) * (percentHeight / $col.colPercDiff));
2149											 }
2150											 if (i == total - 1 && total > 1) {
2151												 $uncont.style.height = 'auto';
2152												 $colChild.style.display = 'none';
2153												 newHeight = outerHeight($col.parentNode) - outerHeight($uncont);
2154												 $uncont.style.height = '100%';
2155												 $colChild.style.display = 'table';
2156											 }
2157											 $colInner.style.height = newHeight + 'px';
2158											}
2159									 } else {
2160										 if ($colChild.oversized) {
2161											 if ($totalHeight == 0) newHeight = Math.ceil(($colHeight) * (percentHeight / $col.colPercDiff));
2162											 else {
2163												 if ($col.colPercDiff == 0) $col.colPercDiff = 100;
2164												 newHeight = Math.ceil(($totalHeight) * (percentHeight / $col.colPercDiff));
2165											 }
2166											 if (i == total - 1 && total > 1) {
2167												 $uncont.style.height = 'auto';
2168												 $colChild.style.display = 'none';
2169												 newHeight = outerHeight($col.parentNode) - outerHeight($uncont);
2170												 $uncont.style.height = '100%';
2171												 $colChild.style.display = 'table';
2172											 }
2173											 //and here
2174											 $colInner.style.height = newHeight + 'px';
2175											}
2176									 }
2177								 }
2178							 });
2179							 var uncell = $col.getElementsByClassName('uncell');
2180							 if (uncell[0] != undefined && $totalHeight == 0) $totalHeight = outerHeight(uncell[0]);
2181						 });
2182					 }
2183					 if (isFF) {
2184						 getDivChildren(el, '.uncoltable', function(col, i, total) {
2185							 if (col.style.minHeight != '') {
2186								 col.style.height = '';
2187							 }
2188						 });
2189					 }
2190					 if (resized) {
2191						 getDivChildren(el, '.row-child > .row-inner', function(obj, k, total) {
2192							 if (obj.style.height == '') {
2193								 if (wwidth > mediaQueryMobile) {
2194									 var getStyle = (window.getComputedStyle((obj.parentNode), null)),
2195									 getInnerHeight = (parseInt(obj.parentNode.clientHeight) - parseInt(getStyle.paddingTop) - parseInt(getStyle.paddingBottom));
2196									 obj.style.height = getInnerHeight + 'px';
2197									 //obj.style.marginBottom = '-1px';
2198								 }
2199							 }
2200						 });
2201						 getDivChildren(el, '.row-parent > .row-inner', function(obj, k, total) {
2202							 if (obj.style.height != '') {
2203								 var getStyle = (window.getComputedStyle((obj.parentNode), null)),
2204								 getInnerHeight = (parseInt(obj.parentNode.clientHeight) - parseInt(getStyle.paddingTop) - parseInt(getStyle.paddingBottom)),
2205								 getTempHeight = parseInt(obj.style.height);
2206								 if (getInnerHeight > getTempHeight && ( obj.parentNode.parentNode == null || ! classie.hasClass(obj.parentNode.parentNode, 'pin-trigger') ) ) {
2207									 obj.style.height = getInnerHeight + 'px';
2208									 //obj.style.marginBottom = '-1px';
2209								 }
2210							 }
2211						 });
2212					 }
2213				 } else {
2214					 if (isFF) {
2215						 getDivChildren(el, '.uncoltable', function(col, i, total) {
2216							 if (col.style.minHeight != '') {
2217								 col.style.height = '';
2218								 col.style.height = outerHeight(col.parentNode) + 'px';
2219							 }
2220						 });
2221					 }
2222					 if (isIE && (wwidth > mediaQueryMobile)) {
2223						 if (child.style.height == 'auto') {
2224							 child.style.height = outerHeight(child) + 'px';
2225						 }
2226					 }
2227				 }
2228				 if (isFF) {
2229					 var sliderColumnFix = document.querySelector('.uncode-slider .row-inner > .column_child:only-child');
2230					 if (sliderColumnFix != null) {
2231						 if (wwidth > mediaQuery) {
2232							 sliderColumnFix.style.setProperty("height", "");
2233						 } else {
2234							 sliderColumnFix.style.setProperty("height", "");
2235							 sliderColumnFix.style.setProperty("height", outerHeight(sliderColumnFix.parentNode) + "px", "important");
2236						 }
2237					 }
2238				 }
2239				 container[i].dispatchEvent(new CustomEvent('setResized'));
2240			 };
2241			 if ( resized || UNCODE.isFrontEndEditor ) {
2242				 window.scroll(0, scrollRowHeight_fix);
2243			 }
2244		 },
2245		 headerHeight = function(container) {
2246			 menuMobileTransparent = document.querySelector('.menu-absolute.menu-transparent');
2247			 forEachElement(container, function(el, i) {
2248				 var getHeight = parseFloat(el.getAttribute("data-height")),
2249					 newHeight = ((wheight * getHeight) / 100);
2250				 if (getHeight != 'fixed' && newHeight != 0) {
2251					 if ( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) newHeight -= menuHeight - transmenuHeight;
2252					 else newHeight -= menuHeight - secmenuHeight;
2253					 el.style.height = newHeight + 'px';
2254				 }
2255			 });
2256			 if ( masthead == undefined ) {
2257				 masthead = document.getElementById("masthead");
2258			 }
2259			 if (masthead != undefined) {
2260				 menuStickyMobile = UNCODE.isMobile ? document.querySelectorAll('.menu-sticky-mobile') : null;
2261				 masthead.parentNode.style.height = (menuHeight-1) + 'px';
2262				 var $overlay = masthead.parentNode.parentNode.querySelector('div.overlay-menu'),
2263					 $navbarmain;
2264 
2265				 if ( typeof $overlay == 'object' && $overlay != null ) {
2266					 if ( menuStickyMobile !== null && menuStickyMobile.length ) {
2267						 UNCODE.menuStickyMobileOverlay = true;
2268						 $overlay.style.top = menuHeight + 'px';
2269					 } else {
2270						 UNCODE.menuStickyMobileOverlay = false;
2271						 $overlay.style.top = '0';
2272						 if ( isMobileTransparent && menuMobileTransparent !== null && !classie.hasClass(document.body, 'menu-mobile-off-canvas') ) {
2273							 $navbarmain = $overlay.querySelector('div.navbar-main');
2274							 if (wwidth > mediaQuery) {
2275								 $navbarmain.style.paddingTop = false;
2276							 } else {
2277								 $navbarmain.style.paddingTop = menuHeight + 'px';
2278							 }
2279						 }
2280					 }
2281				 }
2282				 if (header != undefined && header.length) {
2283					 if (classie.hasClass(masthead, 'menu-transparent')) {
2284						 if ( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) {
2285							 masthead.parentNode.style.height = '0px';
2286							 if (classie.hasClass(masthead, 'menu-add-padding')) {
2287								 for (var j = 0; j < header.length; j++) {
2288									 var headerel = header[j];
2289									 var headerBlock = getClosest(headerel, 'header-uncode-block');
2290									 if (headerBlock != null) {
2291										 var parentRow = headerBlock.querySelector('.vc_row'),
2292											 innerRows;
2293										 if ( parentRow !== null ) {
2294											 innerRows = parentRow.querySelectorAll('.column_parent > .uncol > .uncoltable > .uncell > .uncont, .uncode-slider .column_child > .uncol > .uncoltable > .uncell > .uncont');
2295										 }
2296										 if ( innerRows != undefined && innerRows !== null ) {
2297											 for (var k = 0; k < innerRows.length; k++) {
2298												 if (innerRows[k] != undefined) {
2299													 if (wwidth > mediaQuery) innerRows[k].style.paddingTop = transmenuHeight + 'px';
2300													 else innerRows[k].style.paddingTop = (transmenuHeight - mastheadMobilePaddingTop) + 'px';
2301												 }
2302											 }
2303										 }
2304									 } else {
2305										 getDivChildren(headerel, '.header-content', function(headerContent, i) {
2306											 if (wwidth > mediaQuery) headerContent.style.paddingTop = transmenuHeight + 'px';
2307											 else headerContent.style.paddingTop = (transmenuHeight - mastheadMobilePaddingTop) + 'px';
2308										 });
2309									 }
2310								 }
2311							 }
2312						 }
2313					 }
2314				 }
2315			 }
2316		 },
2317		 initVideoComponent = function(container, classTarget) {
2318			 if ( UNCODE.isFrontEndEditor )
2319				 return;
2320			 getDivChildren(container, classTarget, function(el, i) {
2321				 if ( classie.hasClass(el, 'fluid-object') ) {
2322					 return;
2323				 }
2324				 var width = outerWidth(el),
2325					 pWidth, // player width, to be defined
2326					 height = outerHeight(el),
2327					 pHeight, // player height, tbd
2328					 $tubularPlayer = (el.getElementsByTagName('iframe').length == 1) ? el.getElementsByTagName('iframe') : el.getElementsByTagName('video'),
2329					 ratio = (el.getAttribute("data-ratio") != null) ? Number(el.getAttribute("data-ratio")) : typeof $tubularPlayer[0] !== 'undefined' ? $tubularPlayer[0].getAttribute("data-ratio") : '1.8',
2330					 heightOffset = 80,
2331					 widthOffset = heightOffset * ratio;
2332				 // when screen aspect ratio differs from video, video must center and underlay one dimension
2333				 if ($tubularPlayer[0] != undefined) {
2334					 if (width / ratio < height) { // if new video height < window height (gap underneath)
2335						 pWidth = Math.ceil((height + heightOffset) * ratio); // get new player width
2336						 $tubularPlayer[0].style.width = pWidth + widthOffset + 'px';
2337						 $tubularPlayer[0].style.height = height + heightOffset + 'px';
2338						 $tubularPlayer[0].style.left = ((width - pWidth) / 2) - (widthOffset / 2) + 'px';
2339						 $tubularPlayer[0].style.top = '-' + (heightOffset / 2) + 'px';
2340						 $tubularPlayer[0].style.position = 'absolute';
2341					 } else { // new video width < window width (gap to right)
2342						 pHeight = Math.ceil(width / ratio); // get new player height
2343						 $tubularPlayer[0].style.width = width + widthOffset + 'px';
2344						 $tubularPlayer[0].style.height = pHeight + heightOffset + 'px';
2345						 $tubularPlayer[0].style.left = '-' + (widthOffset / 2) + 'px';
2346						 $tubularPlayer[0].style.top = ((height - pHeight) / 2) - (heightOffset / 2) + 'px';
2347						 $tubularPlayer[0].style.position = 'absolute';
2348					 }
2349				 }
2350			 });
2351		 },
2352		 init_overlay = function() {
2353			 if ( UNCODE.isFrontEndEditor )
2354				 return;
2355			 var triggerButton,
2356			 globalBtnn,
2357			 sequential = false,
2358			 ddCloseBtn = false,
2359			 closeButtons = new Array();
2360			 function toggleOverlay(btn) {
2361				 if ( classie.hasClass(triggerButton, 'menu-button-offcanvas') || classie.hasClass(triggerButton, 'opening') || classie.hasClass(triggerButton, 'closing') ) {
2362					 return true;
2363				 }
2364				 Array.prototype.forEach.call(document.querySelectorAll('div.overlay'), function(overlay) {
2365					 if (btn.getAttribute('data-area') == overlay.getAttribute('data-area')) {
2366						 var container = document.querySelector('div.' + btn.getAttribute('data-container')),
2367							 menuCont = overlay.querySelector('.menu-container'),
2368							 masthead = document.getElementById("masthead"),
2369							 inputField = overlay.querySelector('.search-field');
2370						 if (classie.has(overlay, 'open')) {
2371							 globalBtnn = false;
2372							 window.dispatchEvent(menuClose);
2373							 overlayOpened = false;
2374							 classie.remove(overlay, 'open');
2375							 classie.remove(document.body, 'navbar-hover');
2376							 classie.remove(document.body, 'open-megamenu');
2377							 classie.add(overlay, 'close');
2378							 classie.remove(overlay, 'open-items');
2379							 classie.remove(document.body, 'menu-overlay-open');
2380							 classie.add(document.body, 'menu-dd-search-closing');
2381							 requestTimeout(function(){
2382								 if ( classie.has( masthead, 'style-dark-stop' ) ) {
2383									 classie.remove( masthead, 'style-dark-stop' );
2384									 classie.remove( masthead, 'style-light-override' );
2385									 classie.add( masthead, 'style-dark-override' );
2386								 } else if ( classie.has( masthead, 'style-light-stop' ) ) {
2387									 classie.remove( masthead, 'style-light-stop' );
2388									 classie.remove( masthead, 'style-dark-override' );
2389									 classie.add( masthead, 'style-light-override' );
2390								 }
2391								 // if ( classie.has( masthead, 'is_stuck-stop' ) ) {
2392								 // 	classie.remove( masthead, 'is_stuck-stop' );
2393								 // 	classie.add( masthead, 'is_stuck' );
2394								 // }
2395								 classie.remove(document.documentElement, 'overlay-open');
2396								 classie.remove(document.body, 'menu-dd-search-open');
2397								 classie.remove(document.body, 'menu-dd-search-closing');
2398								 ddCloseBtn = false;
2399							 }, 500);
2400							 var onEndTransitionFn = function(ev) {
2401								 if (transitionEvent) {
2402									 if (ev.propertyName !== 'visibility') return;
2403									 this.removeEventListener(transitionEvent, onEndTransitionFn);
2404								 }
2405								 classie.remove(overlay, 'close');
2406								 if ( sequential !== false ) {
2407									 toggleOverlay(sequential);
2408									 sequential = false;
2409								 }
2410							 };
2411							 if (transitionEvent) {
2412								 overlay.addEventListener(transitionEvent, onEndTransitionFn);
2413							 } else {
2414								 onEndTransitionFn();
2415							 }
2416						 } else if (!classie.has(overlay, 'close') && !classie.hasClass(btn, 'overlay-close')) {
2417							 globalBtnn = btn;
2418							 window.dispatchEvent(menuOpen);
2419							 overlayOpened = true;
2420							 classie.add(overlay, 'open');
2421							 if ( ( classie.hasClass(document.body, 'menu-dd-search') && wwidth > mediaQuery ) || classie.hasClass(document.body, 'menu-dd-search-mobile') ) {
2422								 classie.add(document.body, 'navbar-hover');
2423								 ddCloseBtn = btn;
2424							 }
2425							 if ( ( classie.hasClass(document.body, 'menu-dd-search') && wwidth > mediaQuery ) ) {
2426								 classie.add(document.body, 'menu-dd-search-open');
2427								 ddCloseBtn = btn;
2428							 }
2429							 classie.add(container, 'overlay-open');
2430							 if ( wwidth > mediaQuery && overlay.getAttribute('data-area') != 'search' ) {
2431								 classie.add(document.documentElement, 'overlay-open');
2432								 classie.add(document.documentElement, 'menu-overlay-open');
2433							 }
2434							 if ( classie.has( menuCont, 'style-light' ) ) {
2435								 if ( classie.has( masthead, 'style-dark-override' ) && ! classie.has( masthead, 'style-light-override' ) ) {
2436									 classie.remove( masthead, 'style-dark-override' );
2437									 classie.add( masthead, 'style-dark-stop' );
2438									 classie.add( masthead, 'style-light-override' );
2439								 }
2440							 } else if ( classie.has( menuCont, 'style-dark' ) ) {
2441								 if ( classie.has( masthead, 'style-light-override' ) && ! classie.has( masthead, 'style-dark-override' ) ) {
2442									 classie.remove( masthead, 'style-light-override' );
2443									 classie.add( masthead, 'style-light-stop' );
2444									 classie.add( masthead, 'style-dark-override' );
2445								 }
2446							 }
2447							 // if ( classie.has( masthead, 'is_stuck' ) ) {
2448							 // 	classie.remove( masthead, 'is_stuck' );
2449							 // 	classie.add( masthead, 'is_stuck-stop' );
2450							 // }
2451							 if (jQuery('body.menu-overlay').length == 0 && inputField != null) {
2452								 setTimeout(function() {
2453									 inputField.focus();
2454								 }, 1000);
2455							 }
2456							 setTimeout(function() {
2457								 if (classie.has(overlay, 'overlay-sequential')) classie.add(overlay, 'open-items');
2458							 }, 800);
2459						 }
2460					 }
2461				 });
2462 
2463				 if (classie.hasClass(btn, 'search-icon') || classie.hasClass(btn, 'menu-close-search') || classie.hasClass(btn, 'mobile-search-icon')) return;
2464 
2465				 if (classie.hasClass(triggerButton, 'close')) {
2466					 UNCODE.menuOpened = false;
2467					 classie.removeClass(triggerButton, 'close');
2468					 classie.addClass(triggerButton, 'closing');
2469					 Array.prototype.forEach.call(closeButtons, function(closeButton) {
2470						 if (!classie.hasClass(closeButton, 'menu-close-search')) {
2471							 classie.removeClass(closeButton, 'close');
2472							 classie.addClass(closeButton, 'closing');
2473						 }
2474					 });
2475					 setTimeout(function() {
2476						 classie.removeClass(triggerButton, 'closing');
2477						 // triggerButton.style.opacity = 1;
2478						 Array.prototype.forEach.call(closeButtons, function(closeButton) {
2479							 if (!classie.hasClass(closeButton, 'menu-close-search')) {
2480								 classie.removeClass(closeButton, 'closing');
2481								 // closeButton.style.opacity = 0;
2482							 }
2483						 });
2484					 }, 1000);
2485				 } else {
2486					 UNCODE.menuOpened = true;
2487					 // triggerButton.style.opacity = 0;
2488					 var getBtnRect = !classie.hasClass(triggerButton, 'search-icon') ? triggerButton.getBoundingClientRect() : null;
2489					 classie.addClass(triggerButton, 'opening');
2490					 Array.prototype.forEach.call(closeButtons, function(closeButton) {
2491						 if (!classie.hasClass(closeButton, 'menu-close-search')) {
2492							 // classie.addClass(triggerButton, 'close');
2493							 // if (getBtnRect != null) closeButton.setAttribute('style', 'top:' + getBtnRect.top + 'px; left:'+ getBtnRect.left + 'px !important');
2494							 classie.addClass(closeButton, 'close');
2495							 classie.addClass(closeButton, 'opening');
2496							 // closeButton.style.opacity = 1;
2497						 }
2498					 });
2499					 setTimeout(function() {
2500						 classie.removeClass(triggerButton, 'opening');
2501						 Array.prototype.forEach.call(closeButtons, function(closeButton) {
2502							 if (!classie.hasClass(closeButton, 'menu-close-search')) {
2503								 classie.removeClass(closeButton, 'opening');
2504							 }
2505						 });
2506					 }, 1000);
2507					 window.addEventListener("resize", function() {
2508						 positionCloseBtn(triggerButton, closeButtons);
2509					 });
2510				 }
2511			 }
2512			 function positionCloseBtn(triggerButton, closeButtons){
2513				 var getBtnRect = !classie.hasClass(triggerButton, 'search-icon') ? triggerButton.getBoundingClientRect() : null;
2514				 // Array.prototype.forEach.call(closeButtons, function(closeButton) {
2515				 // 	if (!classie.hasClass(closeButton, 'menu-close-search')) {
2516				 // 		if (getBtnRect != null) closeButton.setAttribute('style', 'top:' + getBtnRect.top + 'px; left:'+ getBtnRect.left + 'px !important');
2517				 // 		closeButton.style.opacity = 1;
2518				 // 	}
2519				 // });
2520			 }
2521			 (function bindEscape() {
2522				 document.onkeydown = function(evt) {
2523				 evt = evt || window.event;
2524				 var isEscape = false;
2525				 if ("key" in evt) {
2526					isEscape = (evt.key == "Escape" || evt.key == "Esc");
2527				 } else {
2528				   isEscape = (evt.keyCode == 27);
2529				 }
2530				 if (isEscape && overlayOpened) {
2531				   Array.prototype.forEach.call(closeButtons, function(closeButton) {
2532					   if (classie.hasClass(closeButton, 'overlay-close') && classie.hasClass(closeButton, 'menu-button-overlay')) {
2533						   closeButton.click();
2534					   }
2535				   });
2536				 }
2537				 };
2538			 })();
2539			 Array.prototype.forEach.call(document.querySelectorAll('.trigger-overlay'), function(triggerBttn) {
2540				 if ( UNCODE.menuOpened || ( (classie.hasClass(document.body, 'vmenu') || classie.hasClass(triggerBttn, 'menu-button-offcanvas')) && UNCODE.wwidth >= 960 ) ) return;
2541				 triggerBttn.addEventListener('click', function(e) {
2542					 triggerButton = e.currentTarget;
2543					 // if (wwidth < mediaQuery && classie.hasClass(triggerButton, 'search-icon')) {
2544					 if ( wwidth < mediaQuery && triggerButton.getAttribute('data-area') != 'search' ) {
2545						 return true;
2546					 } else {
2547						 e.stopPropagation();
2548						 // if (wwidth > mediaQuery) toggleOverlay(triggerButton);
2549						 // else {
2550						 // 	if (classie.addClass(triggerButton, 'search-icon')) return true;
2551						 // }
2552						 if ( triggerButton.getAttribute('data-area') == 'search' ) {
2553							 if ( globalBtnn !== undefined && globalBtnn !== false && globalBtnn !== triggerButton ) {
2554								 sequential = triggerButton;
2555								 globalBtnn.dispatchEvent(new Event("click"));
2556							 } else {
2557								 window.dispatchEvent(new CustomEvent('menuMobileTrigged'));
2558								 toggleOverlay(triggerButton);
2559							 }
2560						 } else {
2561							 window.dispatchEvent(new CustomEvent('menuMobileTrigged'));
2562							 toggleOverlay(triggerButton);
2563						 }
2564						 e.preventDefault();
2565						 return false;
2566					 }
2567				 }, false);
2568			 });
2569			 Array.prototype.forEach.call(document.querySelectorAll('.overlay-close, .menu-button-overlay'), function(closeBttn) {
2570				 closeButtons.push(closeBttn);
2571				 if ( classie.hasClass(closeBttn, 'menu-close-search') ) {
2572					 closeBttn.addEventListener('click', function(e) {
2573						 // if (wwidth > mediaQuery) toggleOverlay(closeBttn);
2574						 toggleOverlay(closeBttn);
2575						 e.preventDefault();
2576						 return false;
2577					 }, false);
2578				 }
2579			 });
2580			 document.body.addEventListener('click', function(e) {
2581				 if ( ddCloseBtn !== false ) {
2582					 var close_overlay = getClosest( e.target, 'overlay-search');
2583					 if ( close_overlay === null ) {
2584						 toggleOverlay(ddCloseBtn);
2585					 }
2586				 }
2587			 });
2588			 document.addEventListener('keydown', function(e) {
2589				 e = e || window.event;
2590				 if ( ddCloseBtn !== false && ( e.key === "Escape" || e.key === "Esc" ) ) {
2591					 toggleOverlay(ddCloseBtn);
2592				 }
2593			 });
2594		 },
2595		 /** All scrolling functions - Begin */
2596		 /** Shrink menu **/
2597		 shrinkMenu = function(bodyTop) {
2598			 if ( UNCODE.isFrontEndEditor )
2599				 return;
2600			 var logoShrink,
2601				 offset = 100;
2602			 for (var i = 0; i < logoel.length; i++) {
2603				 if (((secmenuHeight == 0) ? bodyTop > menuHeight : bodyTop > secmenuHeight + offset) && !classie.hasClass(logoel[i], 'shrinked') && (wwidth > mediaQuery)) {
2604					 classie.addClass(logoel[i], 'shrinked');
2605					 if (logoMinScale != undefined) {
2606						 logoShrink = logolink.children;
2607						 Array.prototype.forEach.call(logoShrink, function(singleLogo) {
2608							 singleLogo.style.height = logoMinScale + 'px';
2609							 singleLogo.style.lineHeight = logoMinScale + 'px';
2610							 if (classie.hasClass(singleLogo, 'text-logo')) singleLogo.style.fontSize = logoMinScale + 'px';
2611						 });
2612					 }
2613					 setTimeout(function() {
2614						 calculateMenuHeight(false);
2615						 //window.dispatchEvent(new Event('resize'));
2616					 }, 300);
2617				 } else if ((((secmenuHeight == 0) ? bodyTop == 0 : bodyTop <= secmenuHeight + offset) || (wwidth < mediaQuery)) && classie.hasClass(logoel[i], 'shrinked')) {
2618					 classie.removeClass(logoel[i], 'shrinked');
2619					 if (logoMinScale != undefined) {
2620						 logoShrink = logolink.children;
2621						 Array.prototype.forEach.call(logoShrink, function(singleLogo) {
2622							 singleLogo.style.height = singleLogo.getAttribute('data-maxheight') + 'px';
2623							 singleLogo.style.lineHeight = singleLogo.getAttribute('data-maxheight') + 'px';
2624							 if (classie.hasClass(singleLogo, 'text-logo')) singleLogo.style.fontSize = singleLogo.getAttribute('data-maxheight') + 'px';
2625						 });
2626					 }
2627					 setTimeout(function() {
2628						 calculateMenuHeight(false);
2629						 //window.dispatchEvent(new Event('resize'));
2630					 }, 300);
2631				 }
2632			 }
2633		 },
2634		 /** Switch colors menu **/
2635		 switchColorsMenu = function(bodyTop, style) {
2636			 for (var i = 0; i < transmenuel.length; i++) {
2637				 if (masthead.style.opacity !== 1) masthead.style.opacity = 1;
2638				 if ((secmenuHeight == 0) ? bodyTop > menuHeight / 2 : bodyTop > secmenuHeight) {
2639					 if (classie.hasClass(masthead, 'style-dark-original')) {
2640						 logo.className = logo.className.replace("style-light", "style-dark");
2641					 }
2642					 if (classie.hasClass(masthead, 'style-light-original')) {
2643						 logo.className = logo.className.replace("style-dark", "style-light");
2644					 }
2645					 if (style != undefined) {
2646						 if (style == 'dark') {
2647							 classie.removeClass(transmenuel[i], 'style-light-override');
2648						 }
2649						 if (style == 'light') {
2650							 classie.removeClass(transmenuel[i], 'style-dark-override');
2651						 }
2652						 classie.addClass(transmenuel[i], 'style-' + style + '-override');
2653					 }
2654				 } else {
2655					 if (style != undefined) {
2656						 if (style == 'dark') {
2657							 classie.removeClass(transmenuel[i], 'style-light-override');
2658						 }
2659						 if (style == 'light') {
2660							 classie.removeClass(transmenuel[i], 'style-dark-override');
2661						 }
2662						 classie.addClass(transmenuel[i], 'style-' + style + '-override');
2663					 }
2664				 }
2665			 }
2666			 if (pageHeader != undefined) {
2667				 if (style != undefined) {
2668					 if (classie.hasClass(pageHeader, 'header-style-dark')) {
2669						 classie.removeClass(pageHeader, 'header-style-dark');
2670					 }
2671					 if (classie.hasClass(pageHeader, 'header-style-light')) {
2672						 classie.removeClass(pageHeader, 'header-style-light');
2673					 }
2674					 classie.addClass(pageHeader, 'header-style-' + style);
2675				 }
2676			 }
2677		 },
2678		 /** VisibleRows **/
2679		 visibleRowCol = function(bodyTop) {
2680			 if ( typeof visibleRows == 'object') {
2681				 for (var i = 0; i < visibleRows.length; i++) {
2682					 var section = visibleRows[i],
2683						 sectionHeight = outerHeight(section),
2684						 offSetTop = bodyTop + ( section != null ? section.getBoundingClientRect().top : 0 ),
2685						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop;
2686					 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2687						 classie.addClass($kenburnsInner[0], 'uncode-scroll-visible');
2688						 visibleRows[i].dispatchEvent(new CustomEvent('enter-row'));
2689					 } else {
2690						 classie.removeClass($kenburnsInner[0], 'uncode-scroll-visible');
2691						 visibleRows[i].dispatchEvent(new CustomEvent('exit-row'));
2692					 }
2693				 }
2694			 }
2695		 },
2696		 /** KenBurns **/
2697		 kenburnsHeader = function(bodyTop) {
2698			 var value;
2699			 if ( typeof kenburnsHeaders == 'object' && kenburnsHeaders.length ) {
2700				 for (var i = 0; i < kenburnsHeaders.length; i++) {
2701					 var section = kenburnsHeaders[i].parentNode,
2702						 sectionHeight = outerHeight(section),
2703						 offSetTop = bodyTop + (section != null ? (classie.hasClass(section.parentNode.parentNode, 'owl-carousel') ? section.parentNode.parentNode.getBoundingClientRect().top : section.getBoundingClientRect().top) : 0),
2704						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop,
2705						 $kenburnsInner = kenburnsHeaders[i].querySelectorAll('.header-bg');
2706					 if (classie.hasClass(kenburnsHeaders[i], 'header-carousel-wrapper')) {
2707						 $kenburnsInner = kenburnsHeaders[i].querySelectorAll('.t-background-cover');
2708					 }
2709					 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2710						 for (var i = 0; i < $kenburnsInner.length; i++) {
2711							 classie.addClass($kenburnsInner[i], 'uncode-kburns');
2712							 $kenburnsInner[i].dispatchEvent(new CustomEvent('enter-kburns'));
2713						 }
2714					 } else {
2715						 for (var i = 0; i < $kenburnsInner.length; i++) {
2716							 classie.removeClass($kenburnsInner[i], 'uncode-kburns');
2717							 $kenburnsInner[i].dispatchEvent(new CustomEvent('exit-kburns'));
2718						 }
2719					 }
2720				 }
2721			 }
2722		 },
2723		 kenburnsRowCol = function(bodyTop) {
2724			 var value;
2725			 if ( UNCODE.isFrontEndEditor || UNCODE.isQuickView ) {
2726				 kenburnsRows = document.querySelectorAll('.with-kburns > .row-background > .background-wrapper, .with-kburns > .uncode-multi-bgs > .row-background > .background-wrapper, .with-kburns > .fp-tableCell > .row-background > .background-wrapper, .with-kburns > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
2727			 }
2728			 if ( typeof kenburnsRows == 'object' && kenburnsRows.length ) {
2729				 for (var i = 0; i < kenburnsRows.length; i++) {
2730					 var section = kenburnsRows[i].parentNode,
2731						 sectionHeight = outerHeight(section),
2732						 offSetTop = bodyTop + (section != null ? (classie.hasClass(section.parentNode.parentNode, 'owl-carousel') ? section.parentNode.parentNode.getBoundingClientRect().top : section.getBoundingClientRect().top) : 0),
2733						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop,
2734						 $kenburnsInner = kenburnsRows[i].querySelectorAll('.background-inner, .header-bg');
2735					 if (offSetPosition >
2735 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2736						 classie.addClass($kenburnsInner[0], 'uncode-kburns');
2737						 $kenburnsInner[0].dispatchEvent(new CustomEvent('enter-kburns'));
2738					 } else {
2739						 classie.removeClass($kenburnsInner[0], 'uncode-kburns');
2740						 $kenburnsInner[0].dispatchEvent(new CustomEvent('exit-kburns'));
2741					 }
2742				 }
2743			 }
2744			 if ( UNCODE.isFrontEndEditor || UNCODE.isQuickView ) {
2745				 kenburnsCols = document.querySelectorAll('.with-kburns > .column-background > .background-wrapper, .with-kburns > .uncode-multi-bgs > .column-background > .background-wrapper');
2746			 }
2747			 if ( typeof kenburnsCols == 'object' && kenburnsCols.length ) {
2748				 for (var j = 0; j < kenburnsCols.length; j++) {
2749					 var elm = kenburnsCols[j],
2750						 $kenburnsInner = elm.querySelectorAll('.background-inner');
2751					 if (checkVisible(elm)) {
2752						 classie.addClass($kenburnsInner[0], 'uncode-kburns');
2753						 $kenburnsInner[0].dispatchEvent(new CustomEvent('enter-kburns'));
2754					 } else {
2755						 classie.removeClass($kenburnsInner[0], 'uncode-kburns');
2756						 $kenburnsInner[0].dispatchEvent(new CustomEvent('exit-kburns'));
2757					 }
2758				 }
2759			 }
2760		 },
2761		 /** Zoom Out BackWash **/
2762		 backwashHeader = function(bodyTop) {
2763			 var value;
2764			 var onEndAnimationFn = function(ev){
2765				 if (animationEvent) {
2766					 if (ev.animationName !== 'backwash') {
2767						 return;
2768					 }
2769					 this.removeEventListener(animationEvent, onEndAnimationFn);
2770				 }
2771				 classie.addClass(ev.target, 'uncode-zoomout-already');
2772			 }
2773			 if ( typeof backwashHeaders == 'object' && backwashHeaders.length ) {
2774				 for (var i = 0; i < backwashHeaders.length; i++) {
2775					 var section = backwashHeaders[i].parentNode,
2776						 sectionHeight = outerHeight(section),
2777						 offSetTop = bodyTop + (section != null ? (classie.hasClass(section.parentNode.parentNode, 'owl-carousel') ? section.parentNode.parentNode.getBoundingClientRect().top : section.getBoundingClientRect().top) : 0),
2778						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop,
2779						 $backwashInner = backwashHeaders[i].querySelectorAll('.header-bg');
2780 
2781					 if ( classie.hasClass($backwashInner[0], 'uncode-video-container') ) {
2782						 continue;
2783					 }
2784 
2785					 if (classie.hasClass(backwashHeaders[i], 'header-carousel-wrapper')) {
2786						 $backwashInner = backwashHeaders[i].querySelectorAll('.t-background-cover');
2787					 }
2788 
2789					 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2790						 for (var i = 0; i < $backwashInner.length; i++) {
2791							 classie.addClass($backwashInner[i], 'uncode-zoomout');
2792							 $backwashInner[i].dispatchEvent(new CustomEvent('enter-zoomout'));
2793						 }
2794					 } else {
2795						 for (var i = 0; i < $backwashInner.length; i++) {
2796							 classie.removeClass($backwashInner[i], 'uncode-zoomout');
2797							 $backwashInner[i].dispatchEvent(new CustomEvent('exit-zoomout'));
2798						 }
2799					 }
2800					 for (var i = 0; i < $backwashInner.length; i++) {
2801						 $backwashInner[i].addEventListener(animationEvent, onEndAnimationFn);
2802					 }
2803				 }
2804			 }
2805		 },
2806		 backwashRowCol = function(bodyTop) {
2807			 var value;
2808			 var onEndAnimationFn = function(ev){
2809				 if (animationEvent) {
2810					 if (ev.animationName !== 'backwash') {
2811						 return;
2812					 }
2813					 this.removeEventListener(animationEvent, onEndAnimationFn);
2814				 }
2815				 classie.addClass(ev.target, 'uncode-zoomout-already');
2816			 }
2817			 if ( UNCODE.isFrontEndEditor || UNCODE.isQuickView ) {
2818				 backwashRows = document.querySelectorAll('.with-zoomout > .row-background > .background-wrapper, .with-zoomout > .fp-tableCell > .row-background > .background-wrapper, .with-zoomout > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
2819			 }
2820			 if ( typeof backwashRows == 'object' && backwashRows.length ) {
2821				 for (var i = 0; i < backwashRows.length; i++) {
2822					 var section = backwashRows[i].parentNode,
2823						 sectionHeight = outerHeight(section),
2824						 offSetTop = bodyTop + (section != null ? (classie.hasClass(section.parentNode.parentNode, 'owl-carousel') ? section.parentNode.parentNode.getBoundingClientRect().top : section.getBoundingClientRect().top) : 0),
2825						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop,
2826						 $backwashInner = backwashRows[i].querySelectorAll('.background-inner');
2827 
2828					 if ( classie.hasClass($backwashInner[0], 'uncode-video-container') ) {
2829						 continue;
2830					 }
2831 
2832					 if (offSetPosition >
2832 0 && offSetPosition < (sectionHeight + UNCODE.wheight) ) {
2833						 classie.addClass($backwashInner[0], 'uncode-zoomout');
2834						 $backwashInner[0].dispatchEvent(new CustomEvent('enter-zoomout'));
2835					 } else {
2836						 classie.removeClass($backwashInner[0], 'uncode-zoomout');
2837						 $backwashInner[0].dispatchEvent(new CustomEvent('exit-zoomout'));
2838					 }
2839					 $backwashInner[0].addEventListener(animationEvent, onEndAnimationFn);
2840				 }
2841 
2842			 }
2843			 if ( UNCODE.isFrontEndEditor || UNCODE.isQuickView ) {
2844				 backwashCols = document.querySelectorAll('.with-zoomout > .column-background > .background-wrapper, .with-zoomout > .uncode-multi-bgs > .column-background > .background-wrapper');
2845			 }
2846			 if ( typeof backwashCols == 'object' && backwashCols.length ) {
2847				 for (var j = 0; j < backwashCols.length; j++) {
2848					 var elm = backwashCols[j],
2849						 $backwashInner = elm.querySelectorAll('.background-inner');
2850					 if (checkVisible(elm)) {
2851						 classie.addClass($backwashInner[0], 'uncode-zoomout');
2852						 $backwashInner[0].dispatchEvent(new CustomEvent('enter-zoomout'));
2853					 } else {
2854						 classie.removeClass($backwashInner[0], 'uncode-zoomout');
2855						 $backwashInner[0].dispatchEvent(new CustomEvent('exit-zoomout'));
2856					 }
2857					 $backwashInner[0].addEventListener(animationEvent, onEndAnimationFn);
2858				 }
2859			 }
2860		 },
2861		 /** Parallax Rows **/
2862		 parallaxRowCol = function(bodyTop) {
2863			 var value;
2864			 if ( UNCODE.isFrontEndEditor || UNCODE.isQuickView ) {
2865				 parallaxRows = document.querySelectorAll('.with-parallax > .row-background > .background-wrapper, .with-parallax > .uncode-multi-bgs > .row-background > .background-wrapper, .with-parallax > .fp-tableCell > .row-background > .background-wrapper, .with-parallax > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
2866			 }
2867			 if (typeof parallaxRows == 'object') {
2868				 for (var i = 0; i < parallaxRows.length; i++) {
2869					 var section = parallaxRows[i].parentNode,
2870						 thisHeight = outerHeight(parallaxRows[i]),
2871						 sectionHeight = outerHeight(section),
2872						 offSetTop = bodyTop + (section != null ? (classie.hasClass(section.parentNode.parentNode, 'owl-carousel') ? section.parentNode.parentNode.getBoundingClientRect().top : section.getBoundingClientRect().top) : 0),
2873						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop;
2874					 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2875						 value = ((offSetPosition - UNCODE.wheight) * speedDivider);
2876						 if (Math.abs(value) < (thisHeight - sectionHeight)) {
2877							translateElement(parallaxRows[i], Math.floor(value));
2878						 } else {
2879							translateElement(parallaxRows[i], Math.floor(thisHeight - sectionHeight));
2880						 }
2881					 }
2882				 }
2883			 }
2884			 if ( UNCODE.isFrontEndEditor || UNCODE.isQuickView ) {
2885				 parallaxCols = document.querySelectorAll('.with-parallax > .column-background > .background-wrapper, .with-parallax > .uncode-multi-bgs > .column-background > .background-wrapper');
2886			 }
2887			 if (typeof parallaxCols == 'object') {
2888				 for (var j = 0; j < parallaxCols.length; j++) {
2889					 var section = parallaxCols[j].parentNode,
2890						 thisHeight = outerHeight(parallaxCols[j]),
2891						 sectionHeight = outerHeight(section),
2892						 offSetTop = bodyTop + (section != null ? section.getBoundingClientRect().top : 0),
2893						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop;
2894					 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2895						 value = ((offSetPosition - UNCODE.wheight) * speedDivider);
2896						 value *= .8;
2897						 if (Math.abs(value) < (thisHeight - sectionHeight)) {
2898							 translateElement(parallaxCols[j], Math.floor(value));
2899						 } else {
2900							 translateElement(parallaxCols[j], Math.floor(thisHeight - sectionHeight));
2901						 }
2902					 }
2903				 }
2904			 }
2905		 },
2906		 /** Parallax Headers **/
2907		 parallaxHeader = function(bodyTop) {
2908			 var value;
2909			 if (typeof parallaxHeaders == 'object') {
2910				 for (var i = 0; i < parallaxHeaders.length; i++) {
2911					 var section = parallaxHeaders[i].parentNode,
2912						 thisSibling = section.nextSibling,
2913						 thisHeight,
2914						 sectionHeight,
2915						 offSetTop,
2916						 offSetPosition;
2917					 if (classie.hasClass(parallaxHeaders[i], 'header-carousel-wrapper')) {
2918						 getDivChildren(parallaxHeaders[i], '.t-entry-visual-cont', function(item, l, total) {
2919							 thisHeight = outerHeight(item);
2920							 sectionHeight = outerHeight(section);
2921							 offSetTop = bodyTop + section.getBoundingClientRect().top;
2922							 offSetPosition = UNCODE.wheight + bodyTop - offSetTop;
2923							 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2924								 value = ((offSetPosition - UNCODE.wheight) * speedDivider);
2925								 if (Math.abs(value) < (thisHeight - sectionHeight)) {
2926									 translateElement(item, Math.floor(value));
2927								 }
2928							 }
2929						 });
2930					 } else {
2931						 thisHeight = outerHeight(parallaxHeaders[i]);
2932						 sectionHeight = outerHeight(section);
2933						 offSetTop = bodyTop + section.getBoundingClientRect().top;
2934						 offSetPosition = UNCODE.wheight + bodyTop - offSetTop;
2935						 if (offSetPosition > 0 && offSetPosition < (sectionHeight + UNCODE.wheight)) {
2936							 value = ((offSetPosition - UNCODE.wheight) * speedDivider);
2937							 if (Math.abs(value) < (thisHeight - sectionHeight)) {
2938								 translateElement(parallaxHeaders[i], Math.floor(value));
2939							 }
2940						 }
2941					 }
2942				 }
2943			 }
2944		 },
2945		 /** Header opacity **/
2946		 headerOpacity = function(bodyTop) {
2947			 if ( UNCODE.isFrontEndEditor ) {
2948				 return;
2949			 }
2950			 if (headerWithOpacity && headerWithOpacity.length) {
2951				 var thisHeight = outerHeight(headerWithOpacity[0]);
2952				 if (bodyTop > thisHeight / 8) {
2953					 if (pageHeader != undefined) classie.addClass(pageHeader, 'header-scrolled');
2954				 } else {
2955					 if (pageHeader != undefined) classie.removeClass(pageHeader, 'header-scrolled');
2956				 }
2957			 }
2958		 },
2959		 /** Show hide scroll top arrow **/
2960		 showHideScrollup = function(bodyTop) {
2961			 if ( bodyTop != 0 ) {
2962				 if (bodyTop > UNCODE.wheight || ((bodyTop + UNCODE.wheight) >= docheight) && docheight > 0) {
2963					 classie.addClass(document.body, 'window-scrolled');
2964					 classie.removeClass(document.body, 'hide-scrollup');
2965					 if (footerScroller && footerScroller[0] != undefined) {
2966						 footerScroller[0].style.display = '';
2967					 }
2968				 } else {
2969					 if (classie.hasClass(document.body, 'window-scrolled')) classie.addClass(document.body, 'hide-scrollup');
2970					 classie.removeClass(document.body, 'window-scrolled');
2971				 }
2972			 }
2973		 },
2974		 /** Fix menu **/
2975		 fixMenu = function(){
2976			 if ( UNCODE.isFrontEndEditor )
2977				 return;
2978			 menuwrapper = document.querySelectorAll(".menu-wrapper");
2979			 if ( ! classie.hasClass(document.body, 'vmenu') && UNCODE.isFullPage && !UNCODE.isFullPageSnap && classie.hasClass(document.body, 'uncode-fp-menu-hide') ) {
2980				 menuwrapper = document.querySelector(".menu-wrapper");
2981				 pageHeader = document.getElementById("page-header");
2982				 menuwrapper.style.position = 'fixed';
2983				 menuwrapper.style.zIndex = '5';
2984			 }
2985		 },
2986		 /** Hide Menu **/
2987		 hideMenu = function(bodyTop) {
2988			 if ( UNCODE.isFrontEndEditor )
2989				 return;
2990			 if (UNCODE.menuOpened || bodyTop < 0) return;
2991			 if (classie.hasClass(document.body, 'vmenu')) {
2992				 if (wwidth < mediaQuery) menuhide = document.querySelector('#masthead .menu-hide-vertical');
2993				 else menuhide = null;
2994			 } else if (classie.hasClass(document.body, 'hmenu-center')) {
2995				 if (wwidth > mediaQuery) menuhide = document.querySelector('#masthead .menu-hide');
2996				 else menuhide = document.querySelector('.menu-sticky-mobile .menu-hide');
2997			 } else {
2998				 if (wwidth <= mediaQuery) menuhide = document.querySelector('.menu-sticky-mobile .menu-hide');
2999			 }
3000			 menuMobileTransparent = document.querySelector('.menu-absolute.menu-transparent');
3001			 if (typeof menuhide == 'object' && menuhide != null && mainmenu[0] != undefined) {
3002				 var translate,
3003				 scrollingDown = true;
3004				 /** fix for hmenu-center **/
3005				 var sticky_element = (typeof mainmenu.item === 'undefined' ? ((wwidth > mediaQuery) ? mainmenu[0] : mainmenu[1]) : mainmenu[0]);
3006				 if (lastScrollValue == bodyTop) return;
3007 
3008				 if (lastScrollValue > bodyTop) scrollingDown = false;
3009				 else scrollingDown = true;
3010				 lastScrollValue = bodyTop;
3011 
3012				 if (!scrollingDown) {
3013					 if (!UNCODE.scrolling) {
3014						 if ((secmenuHeight == 0) ? bodyTop == 0 : bodyTop < secmenuHeight) {
3015							 classie.removeClass(sticky_element.parentNode, 'is_stuck');
3016							 if (classie.hasClass(masthead, 'menu-transparent')) {
3017								 if (( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) && !classie.hasClass(masthead.parentNode, 'no-header')) masthead.parentNode.style.height = '0px';
3018							 }
3019							 if (wwidth < mediaQuery && secmenuHeight === 0) sticky_element.style.position = 'fixed';
3020							 else sticky_element.style.position = '';
3021							 hideMenuReset(sticky_element);
3022							 clearTimeout(hidingTimer);
3023						 }
3024 
3025						 if (classie.hasClass(menuhide, 'menu-hided')) {
3026							 classie.removeClass(menuhide, 'menu-hided');
3027							 hidingTimer = setTimeout(function() {
3028								 classie.addClass(sticky_element.parentNode, 'is_stuck');
3029								 hideMenuReset(sticky_element);
3030							 }, 400);
3031						 }
3032					 }
3033				 } else {
3034					 if (menusticky.length == 0 && bodyTop < UNCODE.wheight / 3) {
3035						 if (sticky_element.style.position == 'fixed') sticky_element.style.position = '';
3036					 }
3037					 if (bodyTop > UNCODE.wheight / 2) {
3038						 clearTimeout(hidingTimer);
3039						 if (!classie.hasClass(menuhide, 'menu-hided')) {
3040							 classie.addClass(menuhide, 'menu-hided');
3041							 classie.addClass(sticky_element.parentNode, 'is_stuck');
3042							 if (sticky_element.style.position != 'fixed') {
3043								 sticky_element.style.visibility = 'hidden';
3044								 sticky_element.style.position = 'fixed';
3045								 sticky_element.style.top = '0px';
3046							 }
3047							 translateElement(menuhide, -UNCODE.menuMobileHeight - 1);
3048						 }
3049					 }
3050				 }
3051			 }
3052		 },
3053		 hideMenuReset = function(sticky_element) {
3054			 var topOffset = 0;
3055			 if (sticky_element.style.visibility == 'hidden') sticky_element.style.visibility = '';
3056			 if (bodyBorder > 0) topOffset += bodyBorder;
3057			 if (adminBar != null && window.getComputedStyle(adminBar,null).getPropertyValue("position") != 'fixed') adminBarHeight = 0;
3058			 if (adminBarHeight > 0) topOffset += adminBarHeight;
3059			 //sticky_element.style.top = topOffset + 'px';
3060			 if (!classie.hasClass(document.body, 'boxed-width') && boxWidth > 0) sticky_element.style.width = boxWidth + 'px';
3061			 translateElement(menuhide, 0);
3062		 },
3063		 /** Stick Menu **/
3064		 stickMenu = function(bodyTop) {
3065			 if ( mainmenu[0] == undefined ) {
3066				 mainmenu = document.querySelectorAll('.vmenu .vmenu-container, .menu-primary .menu-container');
3067			 }
3068			 if (header && mainmenu[0] != undefined) {
3069				var stickyHeight = secmenuHeight;
3070				 menuMobileTransparent = document.querySelector('.menu-absolute.menu-transparent');
3071				 if (classie.hasClass(mainmenu[0], 'vmenu-container') && wwidth > mediaQuery) return;
3072				 /** fix for hmenu-center **/
3073				 var sticky_element = (typeof mainmenu.item === 'undefined' ? (( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) ? mainmenu[0] : mainmenu[1]) : mainmenu[0]);
3074				if ( classie.hasClass(document.body, 'hmenu-center') && document.getElementById("logo-container-mobile") != null ) {
3075					stickyHeight = secmenuHeight + outerHeight(document.getElementById("logo-container-mobile"));
3076				}
3077
3078				 if ((stickyHeight == 0 && ( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery)) ? bodyTop > (0 + adminBarHeight)  : bodyTop > (stickyHeight + adminBarHeight)) {
3079					 if (!classie.hasClass(sticky_element.parentNode, 'is_stuck')) {
3080						 classie.addClass(sticky_element.parentNode, 'is_stuck');
3081						 sticky_element.style.position = 'fixed';
3082						 var getAnchorTop = bodyBorder;
3083						 if (adminBar != null && window.getComputedStyle(adminBar,null).getPropertyValue("position") != 'fixed') adminBarHeight = 0;
3084						 if (adminBarHeight > 0) getAnchorTop += adminBarHeight;
3085						 sticky_element.style.top = getAnchorTop + 'px';
3086						 if (!classie.hasClass(document.body, 'boxed-width') && boxWidth > 0) sticky_element.style.width = boxWidth + 'px';
3087					 }
3088				 } else {
3089					 clearTimeout(hidingTimer);
3090					 classie.removeClass(sticky_element.parentNode, 'is_stuck');
3091					 sticky_element.style.position = '';
3092					 if ( ( isMobileTransparent && menuMobileTransparent !== null ) || wwidth > mediaQuery) sticky_element.style.position = '';
3093					 if (classie.hasClass(document.body, 'hmenu-center')) sticky_element.style.position = 'absolute';
3094					 sticky_element.style.top = '';
3095				 }
3096			 }
3097		 },
3098		 translateElement = function(element, valueY) {
3099			 var translate = 'translate3d(0, ' + valueY + 'px' + ', 0)';
3100			 element.style['-webkit-transform'] = translate;
3101			 element.style['-moz-transform'] = translate;
3102			 element.style['-ms-transform'] = translate;
3103			 element.style['-o-transform'] = translate;
3104			 element.style['transform'] = translate;
3105			},
3106		 setScrollPosition,
3107		 scrollFunction = function() {
3108			 if ( ! UNCODE.isFullPage ) {
3109				 menusticky = UNCODE.isMobile ? document.querySelectorAll('.menu-sticky-mobile') : document.querySelectorAll('.menu-sticky, .menu-sticky-vertical');
3110				 if (menusticky != undefined && menusticky.length) stickMenu(bodyTop);
3111				 kenburnsHeader(bodyTop);
3112				 kenburnsRowCol(bodyTop);
3113				 backwashHeader(bodyTop);
3114				 backwashRowCol(bodyTop);
3115				 if (logoel != undefined && logoel.length && !isMobile) shrinkMenu(bodyTop);
3116				 hideMenu(bodyTop);
3117				 if (isMobileParallaxAllowed || !isMobile) {
3118					 if (header && menusticky != undefined && menusticky.length)
3119						 switchColorsMenu(bodyTop);
3120					 parallaxRowCol(bodyTop);
3121					 parallaxHeader(bodyTop);
3122					 headerOpacity(bodyTop);
3123					 visibleRowCol(bodyTop);
3124				 }
3125				 clearRequestTimeout(setScrollPosition);
3126				 setScrollPosition = requestTimeout( function(){
3127					 scrollRowHeight_fix = window.pageYOffset;
3128				 }, 100 );
3129			 }
3130		 },
3131		 /** Custom Cursor **/
3132		 initCursor = function(){
3133			 var clientX, clientY;
3134 
3135			 var $customCursor = document.getElementById('uncode-custom-cursor'),
3136				 $customPilot = document.getElementById('uncode-custom-cursor-pilot'),
3137				 cursorType = 'auto',
3138				 loadedCursor = false;
3139 
3140			 document.addEventListener("mousemove", function(e) {
3141				 clientX = e.clientX;
3142				 clientY = e.clientY;
3143 
3144				 if ( loadedCursor !== true ) {
3145					loadedCursor = true;
3146					classie.addClass($customCursor, 'loaded-cursor');
3147					if ( $customPilot !== null ) {
3148						classie.addClass($customPilot, 'loaded-cursor');
3149					}
3150			   }
3151			 });
3152 
3153			 function render() {
3154				 if ( $customCursor != null ) {
3155					$customCursor.style.transform = 'translate3d(' + clientX + 'px, ' + clientY + 'px, 0)';
3156					if ( $customPilot !== null ) {
3157						$customPilot.style.transform = 'translate3d(' + clientX + 'px, ' + clientY + 'px, 0)';
3158					}
3159					requestAnimationFrame(render);
3160				}
3161			 };
3162			 requestAnimationFrame(render);
3163		 },
3164 
3165		 /** Shape Dividers **/
3166		 shapeDivider = function() {
3167			 var $shape = '.uncode-divider-wrap';
3168 
3169			 forEachElement($shape, function($el, i) {
3170				 var elH = parseInt( $el.getAttribute('data-height') ),
3171					 elHunit = $el.getAttribute('data-unit'),
3172					 newEl,
3173					 $parent = $el.parentNode,
3174					 parentH,
3175					 $svg = $el.getElementsByTagName('svg')[0];
3176 
3177				 if ( elHunit == 'px' ) {
3178 
3179					 switch (true) {
3180						 case (wwidth < 1500 && wwidth >= 1180):
3181							 newEl = elH*0.8;
3182							 break;
3183 
3184						 case (wwidth < 1180 && wwidth >= 960):
3185							 newEl = elH*0.65;
3186							 break;
3187 
3188						 case (wwidth < 960 && wwidth >= 570):
3189							 newEl = elH*0.5;
3190							 break;
3191 
3192						 case (wwidth < 570):
3193							 newEl = elH*0.25;
3194							 break;
3195 
3196						 default:
3197							 newEl = elH;
3198					 }
3199 
3200					 $el.style.height = newEl + elHunit;
3201				 }
3202 
3203 
3204				 if ( classie.hasClass($el, 'uncode-divider-preserve-ratio') && ( window.navigator.userAgent.indexOf('MSIE ') !== -1 || window.navigator.userAgent.indexOf('Trident/') !== -1 ) ) {
3205 
3206					 $svg.setAttribute('preserveAspectRatio','none');
3207 
3208					 var sizes = $svg.getAttribute('viewBox').split(' '),
3209						 svgW = sizes[2],
3210						 svgH = sizes[3],
3211						 newSvgW;
3212 
3213					 newSvgW = newEl * ( svgW / svgH );
3214 
3215					 $svg.style.width = newSvgW + 'px';
3216 
3217				 }
3218			 });
3219		 };
3220	 if (!noScroll && document.body == null) {
3221		 window.addEventListener('scroll', function(e) {
3222			 if ( ! UNCODE.isFullPage ) {
3223				 bodyTop = document.documentElement.scrollTop || document.body.scrollTop;
3224				 scrollFunction();
3225				 showHideScrollup(bodyTop);
3226			 }
3227		 }, false);
3228	 }
3229	 window.addEventListener('uncode-quick-view-loaded', function() {
3230		 document.getElementById('unmodal-content').addEventListener('scroll', function(e) {
3231			 bodyTop = document.getElementById('unmodal-content').scrollTop;
3232			 scrollFunction();
3233			 showHideScrollup(bodyTop);
3234		 }, false);
3235	 }, false);
3236	 /** All scrolling functions - End */
3237	 /** help functions */
3238	 function getClosest(el, tag) {
3239		 do {
3240			 if (el.className != undefined && el.className.indexOf(tag) > -1) return el;
3241		 } while (el = el.parentNode);
3242		 // not found :(
3243		 return null;
3244	 }
3245 
3246	 function outerHeight(el, includeMargin) {
3247		 if (el != null) {
3248			 var height = el.offsetHeight;
3249			 if (includeMargin) {
3250				 var style = el.currentStyle || getComputedStyle(el);
3251				 height += parseInt(style.marginTop) + parseInt(style.marginBottom);
3252			 }
3253			 return height;
3254		 }
3255	 }
3256 
3257	 function outerWidth(el, includeMargin) {
3258			 var width = el.offsetWidth;
3259			 if (includeMargin) {
3260				 var style = el.currentStyle || getComputedStyle(el);
3261				 width += parseInt(style.marginLeft) + parseInt(style.marginRight);
3262			 }
3263			 return width;
3264		 }
3265		 // Replicate jQuery .each method
3266	 function forEachElement(selector, fn) {
3267		 var elements = document.querySelectorAll(selector);
3268		 for (var i = 0; i < elements.length; i++) fn(elements[i], i);
3269	 }
3270 
3271	 function getDivChildren(containerId, selector, fn) {
3272		 if (containerId !== null) {
3273			 var elements = containerId.querySelectorAll(selector);
3274			 for (var i = 0; i < elements.length; i++) fn(elements[i], i, elements.length);
3275		 }
3276	 }
3277 
3278	 function hideFooterScroll() {
3279		 if (classie.hasClass(document.body, 'hide-scrollup')) footerScroller[0].style.display = "none";
3280	 }
3281	 window.addEventListener("load", function(event) {
3282		 if (SiteParameters.dynamic_srcset_active === '1') {
3283			 UNCODE.adaptive_srcset_bg();
3284			 UNCODE.adaptive_srcset(false);
3285		 }
3286		 classie.addClass(document.body, 'uncode-loaded');
3287	 });
3288	 window.addEventListener("dynamic_srcset_load", function(event) {
3289		 if (SiteParameters.dynamic_srcset_active === '1') {
3290			 UNCODE.refresh_dynamic_srcset_size(false);
3291		 }
3292	 });
3293	 document.addEventListener("DOMContentLoaded", function(event) {
3294		 UNCODE.adaptive();
3295		 boxWrapper = document.querySelectorAll('.box-wrapper');
3296		 docheight = boxWrapper[0] != undefined ? boxWrapper[0].offsetHeight : 0;
3297		 // if (!classie.hasClass(document.body, 'vmenu') && !classie.hasClass(document.body, 'menu-offcanvas')) init_overlay();
3298		 init_overlay();
3299		 kenburnsRows = document.querySelectorAll('.with-kburns > .row-background > .background-wrapper, .with-kburns > .uncode-multi-bgs > .row-background > .background-wrapper, .with-kburns > .fp-tableCell > .row-background > .background-wrapper, .with-kburns > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
3300		 kenburnsCols = document.querySelectorAll('.with-kburns > .column-background > .background-wrapper, .with-kburns > .uncode-multi-bgs > .column-background > .background-wrapper');
3301		 backwashRows = document.querySelectorAll('.with-zoomout > .row-background > .background-wrapper, .with-zoomout > .uncode-multi-bgs > .row-background > .background-wrapper, .with-zoomout > .fp-tableCell > .row-background > .background-wrapper, .with-zoomout > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
3302		 backwashCols = document.querySelectorAll('.with-zoomout > .column-background > .background-wrapper, .with-zoomout > .uncode-multi-bgs > .column-background > .background-wrapper');
3303		 if (!UNCODE.isMobile || isMobileParallaxAllowed) {
3304			 parallaxRows = document.querySelectorAll('.with-parallax > .row-background > .background-wrapper, .with-parallax > .uncode-multi-bgs > .row-background > .background-wrapper, .with-parallax > .fp-tableCell > .row-background > .background-wrapper, .with-parallax > .fp-tableCell > .fp-scrollable > .fp-scroller > .row-background > .background-wrapper');
3305			 parallaxCols = document.querySelectorAll('.with-parallax > .column-background > .background-wrapper, .with-parallax > .uncode-multi-bgs > .column-background > .background-wrapper');
3306		 }
3307		 footerScroller = document.querySelectorAll('.footer-scroll-top');
3308		 if (footerScroller && footerScroller[0] != undefined) {
3309			 if (transitionEvent) {
3310				 footerScroller[0].addEventListener(transitionEvent, hideFooterScroll);
3311			 }
3312		 }
3313		 Array.prototype.forEach.call(document.querySelectorAll('.row-inner'), function(el) {
3314			 el.style.height = '';
3315			 el.style.marginBottom = '';
3316		 });
3317		 setRowHeight(document.querySelectorAll('.page-wrapper .row-parent, footer .row-parent'));
3318		 initVideoComponent(document.body, '.uncode-video-container.video:not(.drop-move):not(.fluid-object), .uncode-video-container.self-video:not(.drop-move)');
3319	 });
3320	 /** On resize events **/
3321	 window.addEventListener("vc-resize", function() {
3322		 scrollRowHeight_fix = window.pageYOffset;
3323		 Array.prototype.forEach.call(document.querySelectorAll('.row-inner'), function(el) {
3324			 el.style.height = '';
3325			 el.style.marginBottom = '';
3326		 });
3327		 setRowHeight(document.querySelectorAll('.page-wrapper .row-parent, footer .row-parent'), false, true);
3328	 });
3329	 var setIsScrolling;
3330	 window.addEventListener("scroll", function() {
3331		 UNCODE.setIsScrolling = true;
3332		 clearRequestTimeout(setIsScrolling);
3333 
3334		 setIsScrolling = requestTimeout(function() {
3335			 UNCODE.setIsScrolling = false;
3336		 }, 66);
3337	 });
3338	 window.addEventListener("resize", function(e) {
3339		 scrollRowHeight_fix = window.pageYOffset;
3340		 docheight = (boxWrapper != undefined && boxWrapper[0] != undefined) ? boxWrapper[0].offsetHeight : 0;
3341		 var oldWidth = wwidth;
3342		 UNCODE.wwidth = wwidth = window.innerWidth || document.documentElement.clientWidth;
3343		 UNCODE.wheight = wheight = (window.innerHeight || document.documentElement.clientHeight) - (bodyBorder * 2);
3344		 if ( isSplitMenu && typeof resizeTimer_ === 'undefined' ) centerSplitMenu();
3345		 if (isMobile && (oldWidth == wwidth)) return false;
3346		 calculateMenuHeight(false);
3347		 initBox();
3348		 window.dispatchEvent(boxEvent);
3349		 scrollFunction();
3350		 shapeDivider();
3351		 showHideScrollup(bodyTop);
3352		 clearTimeout(resizeTimer_);
3353		 resizeTimer_ = setTimeout(function() {
3354			 if (isSplitMenu) centerSplitMenu();
3355		 }, 10);
3356		 resizeThrottle(
3357			 function() {
3358				 if (SiteParameters.dynamic_srcset_active === '1') {
3359					 UNCODE.refresh_dynamic_srcset_size(false);
3360				 }
3361				 UNCODE.isMobile = UNCODE.wwidth <= UNCODE.mediaQuery;
3362				 menuOpacity();
3363				 headerHeight('.header-wrapper');
3364			 }, 100
3365		 );
3366		 if ( UNCODE.setIsScrolling !== true ) {
3367			 clearTimeout(resizeTimer);
3368			 resizeTimer = setTimeout(function() {
3369				 if ( UNCODE.setIsScrolling !== true ) {
3370					 UNCODE.wheight = wheight = (window.innerHeight || document.documentElement.clientHeight) - (bodyBorder * 2);
3371					 Array.prototype.forEach.call(document.querySelectorAll('.row-inner'), function(el) {
3372						 el.style.height = '';
3373						 el.style.marginBottom = '';
3374					 });
3375					 setRowHeight(document.querySelectorAll('.page-wrapper .row-parent, footer .row-parent'), false, true);
3376				 }
3377				 initVideoComponent(document.body, '.uncode-video-container.video:not(.drop-move):not(.fluid-object), .uncode-video-container.self-video:not(.drop-move)');
3378			 }, 500);
3379		 }
3380	 });
3381 
3382	 window.addEventListener("lateral_resize", function(e) {
3383		 fixMenuHeight();
3384		 calculateMenuHeight(false);
3385		 scrollFunction();
3386		 headerHeight('.header-wrapper');
3387	 });
3388 
3389	 var resizeThrottle = (function () {
3390		 var timer = 0;
3391		 return function (callback, ms) {
3392			 clearTimeout(timer);
3393			 timer = setTimeout(callback, ms);
3394		 };
3395	 })();
3396 
3397	 /**
3398	  * On DOM ready
3399	  */
3400	 window.addEventListener("load", function(){
3401		 if (!UNCODE.isMobile) {
3402			 setTimeout(function() {
3403				 // window.dispatchEvent(UNCODE.boxEvent);
3404				 if (typeof Waypoint !== 'undefined') {
3405					 Waypoint.refreshAll();
3406				 }
3407			 }, 2000);
3408		 }
3409		 //repeat it for mobile since it changes layout on carousel after DOM loading
3410		 if (UNCODE.isMobile && !isMobileParallaxAllowed) {
3411			 kenburnsHeader(bodyTop);
3412			 kenburnsRowCol(bodyTop);
3413		 }
3414		 backwashHeader(bodyTop);
3415		 backwashRowCol(bodyTop);
3416		 scrollFunction();
3417		 showHideScrollup(bodyTop);
3418 
3419		 // if (document.createEvent) { // W3C
3420		 // 	var ev = document.createEvent('Event');
3421		 // 	ev.initEvent('resize', true, true);
3422		 // 	window.dispatchEvent(ev);
3423		 // } else { // IE
3424		 // 	document.fireEvent('onresize');
3425		 // }
3426 
3427		 scrollRowHeight_fix = window.pageYOffset;
3428		 docheight = (boxWrapper != undefined && boxWrapper[0] != undefined) ? boxWrapper[0].offsetHeight : 0;
3429		 var oldWidth = wwidth;
3430		 UNCODE.wwidth = wwidth = window.innerWidth || document.documentElement.clientWidth;
3431		 UNCODE.wheight = wheight = (window.innerHeight || document.documentElement.clientHeight) - (bodyBorder * 2);
3432		 if ( isSplitMenu && typeof resizeTimer_ === 'undefined' ) {
3433			 centerSplitMenu();
3434		 }
3435		 calculateMenuHeight(false);
3436		 headerHeight('.header-wrapper');
3437		 
3438	 }, false);
3439 
3440	 function localStorageAvailable() {
3441		 try {
3442			 var storage = window['localStorage'],
3443			 x = '__storage_test__';
3444			 storage.setItem(x, x);
3445			 storage.removeItem(x);
3446			 return true;
3447		 } catch(e) {
3448			 return false;
3449		 }
3450	 }
3451 
3452	 /**
3453	  * Print Dialog check
3454	  */
3455	 window.addEventListener("beforeprint", function(event) {
3456		 UNCODE.printDialogOpen = true;
3457	 });
3458	 window.addEventListener("afterprint", function(event) {
3459		 UNCODE.printDialogOpen = false;
3460		 window.dispatchEvent(new Event('resize'));
3461	 });
3462 
3463	 var UNCODE = {
3464		 bodyTop: bodyTop,
3465		 boxEvent: boxEvent,
3466		 bodyBorder: bodyBorder,
3467		 initBox: initBox,
3468		 adminBarHeight: 0,
3469		 menuHeight: 0,
3470		 menuMobileHeight: 0,
3471		 menuOpacity: menuOpacity,
3472		 fixMenuHeight: fixMenuHeight,
3473		 verticalRightMenu: verticalRightMenu,
3474		 initHeader: initHeader,
3475		 initRow: initRow,
3476		 initCursor: initCursor,
3477		 setRowHeight: setRowHeight,
3478		 switchColorsMenu: switchColorsMenu,
3479		 isMobile: isMobile,
3480		 scrolling: false,
3481		 menuHiding: false,
3482		 menuOpened: false,
3483		 menuMobileTriggerEvent: menuMobileTriggerEvent,
3484		 mediaQuery: mediaQuery,
3485		 mediaQueryMobile: mediaQueryMobile,
3486		 initVideoComponent: initVideoComponent,
3487		 hideMenu: hideMenu,
3488		 wwidth: wwidth,
3489		 wheight: wheight,
3490		 printDialogOpen: printDialogOpen,
3491		 webp_lossy_supported: SiteParameters.force_webp ? true : localStorageAvailable() && localStorage.getItem('webp_lossy_supported') === 'true' ? true : false,
3492		 webp_lossless_supported: SiteParameters.force_webp ? true : localStorageAvailable() && localStorage.getItem('webp_lossless_supported') === 'true' ? true : false,
3493	 };
3494	 // transport
3495	 if (typeof define === 'function' && define.amd) {
3496		 // AMD
3497		 define(UNCODE);
3498	 } else {
3499		 // browser global
3500		 window.UNCODE = UNCODE;
3501	 }
3502 
3503	 UNCODE.check_webp_support = function(feature, callback) {
3504		 // https://developers.google.com/speed/webp/faq#in_your_own_javascript
3505		 var kTestImages = {
3506			 lossy: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",
3507			 lossless: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",
3508			 alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",
3509			 // animation: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"
3510		 };
3511		 var img = new Image();
3512		 img.onload = function () {
3513			 var result = (img.width > 0) && (img.height > 0);
3514			 callback(feature, result);
3515		 };
3516		 img.onerror = function () {
3517			 callback(feature, false);
3518		 };
3519		 img.src = "data:image/webp;base64," + kTestImages[feature];
3520	 }
3521 
3522	 UNCODE.check_webp_support('lossy', function (feature, isSupported) {
3523		 if (isSupported) {
3524			 UNCODE.webp_lossy_supported = true;
3525			 if (localStorageAvailable()) {
3526				 localStorage.setItem('webp_lossy_supported', true);
3527			 }
3528		 }
3529	 });
3530 
3531	 UNCODE.check_webp_support('lossless', function (feature, isSupported) {
3532		 if (isSupported) {
3533			 UNCODE.webp_lossless_supported = true;
3534			 if (localStorageAvailable()) {
3535				 localStorage.setItem('webp_lossless_supported', true);
3536			 }
3537		 }
3538	 });
3539 
3540	 UNCODE.adaptive = function() {
3541		 if (SiteParameters.dynamic_srcset_active === '1') {
3542			 return;
3543		 }
3544 
3545		 var images = new Array(),
3546			 getImages = document.querySelectorAll('.adaptive-async:not(.adaptive-fetching)');
3547		 for (var i = 0; i < getImages.length; i++) {
3548			 var imageObj = {},
3549				 el = getImages[i];
3550			 if (classie.hasClass(el, 'woocommerce-product-gallery__image-first__img')) {
3551				 continue;
3552			 }
3553			 classie.addClass(el, 'adaptive-fetching');
3554			 imageObj.unique = el.getAttribute('data-uniqueid');
3555			 imageObj.url = el.getAttribute('data-guid');
3556			 imageObj.path = el.getAttribute('data-path');
3557			 imageObj.singlew = el.getAttribute('data-singlew');
3558			 imageObj.singleh = el.getAttribute('data-singleh');
3559			 imageObj.origwidth = el.getAttribute('data-width');
3560			 imageObj.origheight = el.getAttribute('data-height');
3561			 imageObj.crop = el.getAttribute('data-crop');
3562			 imageObj.fixed = el.getAttribute('data-fixed') == undefined ? null : el.getAttribute('data-fixed');
3563			 imageObj.screen = window.uncodeScreen;
3564			 imageObj.images = window.uncodeImages;
3565			 images.push(imageObj);
3566		 }
3567 
3568		 var post_data = {
3569			 images: JSON.stringify(images),
3570			 action: 'get_adaptive_async',
3571			 ai_breakpoints: SiteParameters.ai_breakpoints,
3572			 resize_quality: SiteParameters.resize_quality,
3573			 register_metadata: SiteParameters.register_metadata,
3574			 nonce_adaptive_images: SiteParameters.nonce_adaptive_images
3575		 };
3576 
3577		 if (images.length > 0) {
3578			 var xhr = new XMLHttpRequest();
3579			 xhr.open('POST', SiteParameters.ajax_url, true);
3580			 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
3581			 xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
3582 
3583			 xhr.onreadystatechange = function() {
3584				 if (xhr.readyState == XMLHttpRequest.DONE) {
3585					 if (xhr.status == 200 && xhr.responseText) {
3586						 var jsonResponse = JSON.parse(xhr.responseText);
3587 
3588						 if (jsonResponse.success && jsonResponse.data.images) {
3589							 var images = jsonResponse.data.images;
3590 
3591							 for (var i = 0; i < images.length; i++) {
3592								 var val = images[i];
3593								 var processedImageID = val.id;
3594								 var processedImageUniqueID = val.unique;
3595								 var processedImageisNew = val.new_crop === true ? true : false;
3596								 var getImage = document.querySelectorAll('[data-uniqueid="'+processedImageUniqueID+'"]');
3597 
3598								 for (var j = 0; j < getImage.length; j++) {
3599									 var attrScr = getImage[j].getAttribute('src'),
3600									 replaceImg = new Image();
3601									 replaceImg.source = attrScr;
3602									 replaceImg.el = getImage[j];
3603 
3604									 classie.removeClass(getImage[j], 'adaptive-async');
3605									 classie.removeClass(getImage[j], 'adaptive-fetching');
3606 
3607									 replaceImg.onload = function () {
3608 
3609										 var _this = this,
3610											 parentNode = (_this.el).parentNode,
3611											 placeH;
3612 
3613										 //Workaround for lazy-load flickering on Firefox
3614										 if ( typeof parentNode.prepend == 'undefined') {
3615											 if (_this.source !== null) {
3616												 (_this.el).src = _this.src;
3617											 } else {
3618												 (_this.el).style.backgroundImage = 'url("'+_this.src+'")';
3619											 }
3620 
3621											 classie.addClass(_this.el, 'async-done');
3622											 _this.el.dispatchEvent(new CustomEvent("async-done"));
3623										 } else {
3624											 if (_this.source !== null) {
3625												 placeH = document.createElement("IMG");
3626												 placeH.setAttribute('class', 'placeH');
3627												 placeH.src = _this.src;
3628												 placeH.style.position = 'absolute';
3629												 placeH.style.opacity = '0';
3630											 } else {
3631												 placeH = document.createElement("DIV");
3632												 placeH.setAttribute('style', _this.el.getAttribute('style'));
3633												 placeH.setAttribute('class', 'placeH ' + _this.el.getAttribute('class'));
3634												 placeH.style.backgroundImage = 'url("'+_this.src+'")';
3635												 placeH.style.backgroundSize = 'cover';
3636												 placeH.style.backgroundPosition = 'center';
3637												 placeH.style.position = 'absolute';
3638												 placeH.style.top = '0';
3639												 placeH.style.width = '100%';
3640												 placeH.style.height = '100%';
3641											 }
3642 
3643											 if ( !classie.hasClass( _this.el, 'box-wrapper') ) {
3644												 parentNode.prepend(placeH);
3645											 }
3646 
3647											 requestTimeout(function(){
3648												 if (_this.source !== null) {
3649													 (_this.el).src = _this.src;
3650												 } else {
3651													 (_this.el).style.backgroundImage = 'url("'+_this.src+'")';
3652												 }
3653												 if ( !classie.hasClass( _this.el, 'box-wrapper') ) {
3654													 parentNode.removeChild(placeH);
3655												 }
3656												 classie.addClass(_this.el, 'async-done');
3657												 _this.el.dispatchEvent(new CustomEvent("async-done"));
3658											 }, 250);
3659										 }
3660									 }
3661									 replaceImg.src = val.url;
3662								 }
3663 
3664								 if (processedImageisNew && SiteParameters.optimize_shortpixel_image == true) {
3665									 UNCODE.process_shortpixel_image(processedImageID);
3666								 }
3667							 }
3668 
3669						 } else {
3670							 if (SiteParameters.enable_debug == true) {
3671								 // This console log is disabled by default
3672								 // So nothing is printed in a typical installation
3673								 //
3674								 // It can be enabled for debugging purposes setting
3675								 // the 'uncode_enable_debug_on_js_scripts' filter to true
3676								 console.log('There was an error: bad response');
3677							 }
3678						 }
3679 
3680					 } else if (xhr.status == 400) {
3681						 if (SiteParameters.enable_debug == true) {
3682							 // This console log is disabled by default
3683							 // So nothing is printed in a typical installation
3684							 //
3685							 // It can be enabled for debugging purposes setting
3686							 // the 'uncode_enable_debug_on_js_scripts' filter to true
3687							 console.log('There was an error 400');
3688						 }
3689					 } else {
3690						 if (SiteParameters.enable_debug == true) {
3691							 // This console log is disabled by default
3692							 // So nothing is printed in a typical installation
3693							 //
3694							 // It can be enabled for debugging purposes setting
3695							 // the 'uncode_enable_debug_on_js_scripts' filter to true
3696							 console.log('Something else other than 200 was returned');
3697						 }
3698					 }
3699				 }
3700			 }
3701 
3702			 // Serialize our data
3703			 var queryString = "",
3704				 arrayLength = Object.keys(post_data).length,
3705				 arrayCounter = 0;
3706 
3707			 for (var key in post_data) {
3708				 queryString += key + "=" + post_data[key];
3709 
3710				 if (arrayCounter < arrayLength - 1) {
3711					 queryString += "&";
3712				 }
3713 
3714				 arrayCounter++;
3715			 }
3716 
3717			 xhr.send(queryString);
3718		 }
3719	 };
3720 
3721	 UNCODE.adaptive_srcset_replace_bg = function(currentRow) {
3722		 if (currentRow === null) {
3723			 return;
3724		 }
3725 
3726		 var mobileBreakpoint = SiteParameters.dynamic_srcset_bg_mobile_breakpoint ? parseInt(SiteParameters.dynamic_srcset_bg_mobile_breakpoint, 10) : 570;
3727		 var images = currentRow.querySelectorAll('.srcset-bg-async');
3728 
3729		 for (var i = 0; i < images.length; i++) {
3730			 var el = images[i];
3731			 var bg_url = el.dataset.backgroundImage;
3732			 var mobile_bg_url = el.dataset.mobileBackgroundImage;
3733 
3734			 if (SiteParameters.activate_webp && el.dataset.backgroundImageWebp) {
3735				 if ((el.dataset.mime === 'png' && UNCODE.webp_lossless_supported) || (el.dataset.mime === 'jpeg' && UNCODE.webp_lossy_supported)) {
3736					 bg_url = el.dataset.backgroundImageWebp;
3737					 el.dataset.backgroundImage = bg_url;
3738					 el.removeAttribute('data-background-image-webp');
3739				 }
3740			 }
3741 
3742			 if (SiteParameters.activate_webp && el.dataset.mobileBackgroundImageWebp && mobile_bg_url) {
3743				 if ((el.dataset.mime === 'png' && UNCODE.webp_lossless_supported) || (el.dataset.mime === 'jpeg' && UNCODE.webp_lossy_supported)) {
3744					 mobile_bg_url = el.dataset.mobileBackgroundImageWebp;
3745					 el.dataset.mobileBackgroundImage = mobile_bg_url;
3746					 el.removeAttribute('data-mobile-background-image-webp');
3747				 }
3748			 }
3749 
3750			 if (screenInfo.width <= mobileBreakpoint && mobile_bg_url) {
3751				 el.style.backgroundImage = 'url("' + mobile_bg_url + '")';
3752			 } else {
3753				 el.style.backgroundImage = 'url("' + bg_url + '")';
3754			 }
3755 
3756			 classie.addClass(el, 'srcset-bg-async');
3757		 }
3758	 }
3759 
3760	 UNCODE.adaptive_srcset_bg = function() {
3761		 var mobileSize = SiteParameters.dynamic_srcset_bg_mobile_size ? parseInt(SiteParameters.dynamic_srcset_bg_mobile_size, 10) : false;
3762 
3763		 if (!(mobileSize > 0)) {
3764			 return;
3765		 }
3766 
3767		 var images = new Array();
3768		 var getImages = document.querySelectorAll('.srcset-bg-generate-img:not(.adaptive-fetching)');
3769 
3770		 for (var i = 0; i < getImages.length; i++) {
3771			 var imageObj = {};
3772			 var el = getImages[i];
3773 
3774			 classie.addClass(el, 'srcset-bg-fetching');
3775			 imageObj.unique = el.getAttribute('data-uniqueid');
3776			 imageObj.url = el.getAttribute('data-guid');
3777			 imageObj.path = el.getAttribute('data-path');
3778			 imageObj.origwidth = el.getAttribute('data-width');
3779			 imageObj.origheight = el.getAttribute('data-height');
3780 
3781			 images.push(imageObj);
3782		 }
3783 
3784		 if (images.length > 0) {
3785			 var post_data = {
3786				 images: JSON.stringify(images),
3787				 action: 'regenerate_srcset_bg_async',
3788				 resize_quality: SiteParameters.resize_quality,
3789				 mobile_size: mobileSize,
3790				 nonce_srcset_async: SiteParameters.nonce_srcset_async
3791			 };
3792 
3793			 var xhr = new XMLHttpRequest();
3794			 xhr.open('POST', SiteParameters.ajax_url, true);
3795			 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
3796			 xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
3797 
3798			 xhr.onreadystatechange = function() {
3799				 if (xhr.readyState == XMLHttpRequest.DONE) {
3800					 if (xhr.status == 200 && xhr.responseText) {
3801						 var jsonResponse = JSON.parse(xhr.responseText);
3802 
3803						 if (jsonResponse.success && jsonResponse.data.images) {
3804							 var processedImages = jsonResponse.data.images;
3805 
3806							 for (var i = 0; i < processedImages.length; i++) {
3807								 var processedImageID = processedImages[i].id;
3808								 var processedImageUniqueID = processedImages[i].unique;
3809								 var processedImageisNew = processedImages[i].new_crop === true ? true : false;
3810								 var getImage = document.querySelectorAll('[data-uniqueid="'+processedImageUniqueID+'"]');
3811 
3812								 for (var j = 0; j < getImage.length; j++) {
3813									 classie.removeClass(getImage[j], 'srcset-bg-fetching');
3814									 classie.addClass(getImage[j], 'srcset-bg-async-done');
3815									 getImage[j].dispatchEvent(new CustomEvent("async-done"));
3816								 }
3817 
3818								 if (processedImageisNew && SiteParameters.optimize_shortpixel_image == true) {
3819									 UNCODE.process_shortpixel_image(processedImageID);
3820								 }
3821							 }
3822						 } else {
3823							 if (SiteParameters.enable_debug == true) {
3824								 // This console log is disabled by default
3825								 // So nothing is printed in a typical installation
3826								 //
3827								 // It can be enabled for debugging purposes setting
3828								 // the 'uncode_enable_debug_on_js_scripts' filter to true
3829								 if (jsonResponse.success == false && jsonResponse.data.message) {
3830									 console.log('There was an error: ' + jsonResponse.data.message);
3831								 } else {
3832									 console.log('There was an error: bad response');
3833								 }
3834							 }
3835						 }
3836 
3837					 } else if (xhr.status == 400) {
3838						 if (SiteParameters.enable_debug == true) {
3839							 // This console log is disabled by default
3840							 // So nothing is printed in a typical installation
3841							 //
3842							 // It can be enabled for debugging purposes setting
3843							 // the 'uncode_enable_debug_on_js_scripts' filter to true
3844							 console.log('There was an error 400');
3845						 }
3846					 } else {
3847						 if (SiteParameters.enable_debug == true) {
3848							 // This console log is disabled by default
3849							 // So nothing is printed in a typical installation
3850							 //
3851							 // It can be enabled for debugging purposes setting
3852							 // the 'uncode_enable_debug_on_js_scripts' filter to true
3853							 console.log('Something else other than 200 was returned');
3854						 }
3855					 }
3856				 }
3857			 }
3858 
3859			 // Serialize our data
3860			 var queryString = "",
3861				 arrayLength = Object.keys(post_data).length,
3862				 arrayCounter = 0;
3863 
3864			 for (var key in post_data) {
3865				 queryString += key + "=" + post_data[key];
3866 
3867				 if (arrayCounter < arrayLength - 1) {
3868					 queryString += "&";
3869				 }
3870 
3871				 arrayCounter++;
3872			 }
3873 
3874			 xhr.send(queryString);
3875		 }
3876	 }
3877 
3878	 UNCODE.refresh_dynamic_srcset_size = function(container) {
3879		 var parentSelector = container && container.length > 0 ? container[0] : document;
3880		 // If 'container' is false, we assume that we are resizing generic images
3881		 var images = container ? parentSelector.querySelectorAll('.srcset-auto') : parentSelector.querySelectorAll('.srcset-auto:not(.srcset-on-layout)');
3882 
3883		 for (var i = 0; i < images.length; i++) {
3884			 // Update srcset/sizes attributes
3885			 UNCODE.set_dynamic_srcset_size(images[i]);
3886		 }
3887	 }
3888 
3889	 UNCODE.set_dynamic_srcset_size = function(el) {
3890		 if (el.nodeName === 'PICTURE') {
3891			 var picture_imgs = el.getElementsByTagName('img');
3892			 var picture_sources = el.getElementsByTagName('source');
3893			 if (picture_imgs.length > 0) {
3894				 var picture_img = picture_imgs[0];
3895			 }
3896			 if (picture_sources.length > 0 && picture_imgs.length > 0) {
3897				 var picture_source = picture_sources[0];
3898				 var parent_width = el.clientWidth;
3899				 var parent_height = el.clientHeight;
3900				 var picture_img_width = parseInt(picture_img.getAttribute('width'), 10);
3901				 var picture_img_height = parseInt(picture_img.getAttribute('height'), 10);
3902				 var final_width = (picture_img_width * parent_height) / picture_img_height;
3903				 picture_source.sizes = final_width + 'px';
3904				 classie.addClass(picture_source, 'srcset-sizes-done');
3905				 if (picture_source.dataset.srcset) {
3906					 if (SiteParameters.activate_webp && picture_source.dataset.srcsetWebp && ((el.dataset.mime === 'png' && UNCODE.webp_lossless_supported) || (el.dataset.mime === 'jpeg' && UNCODE.webp_lossy_supported))) {
3907						 picture_source.srcset = picture_source.dataset.srcsetWebp;
3908						 picture_source.removeAttribute('data-srcset-webp');
3909					 } else {
3910						 picture_source.srcset = picture_source.dataset.srcset;
3911					 }
3912					 picture_source.removeAttribute('data-srcset');
3913					 var $waitingThumb = getClosest( picture_source, 'srcset-lazy-animations');
3914					 if ( $waitingThumb != null ) {
3915						 picture_img.onload = function(){
3916							 classie.removeClass( $waitingThumb, 'srcset-lazy-animations');
3917						 };
3918					 }
3919				 }
3920			 }
3921			 if (picture_sources.length > 0 || picture_imgs.length > 0) {
3922				 el.dispatchEvent(new CustomEvent("srcset-done"));
3923			 }
3924		 } else {
3925			if (typeof el.parentNode !== 'undefined') {
3926				 if ( classie.hasClass(el.parentNode, 't-entry-drop') ) {
3927					 var parent_width = el.parentNode.getAttribute('data-w');
3928					 if ( typeof parent_width !== 'undefined' && parent_width !== null ) {
3929						 parent_width = UNCODE.wwidth / 12 * parseFloat( parent_width );
3930					 }
3931				 } else {
3932					 var parent_width = el.parentNode.parentElement.clientWidth;
3933				 }
3934				 if ( parseFloat(el.sizes) === parseFloat(parent_width) ) {
3935					return;
3936				 }
3937				if ( parent_width === 0 ) {
3938					el.sizes = UNCODE.wwidth;
3939				} else {
3940				   el.sizes = parent_width + 'px';
3941				}
3942				classie.addClass(el, 'srcset-sizes-done');
3943				 if (el.dataset.srcset) {
3944					 if (SiteParameters.activate_webp && el.dataset.srcsetWebp && ((el.dataset.mime === 'png' && UNCODE.webp_lossless_supported) || (el.dataset.mime === 'jpeg' && UNCODE.webp_lossy_supported))) {
3945						 el.srcset = el.dataset.srcsetWebp;
3946						 el.removeAttribute('data-srcset-webp');
3947					 } else {
3948						 el.srcset = el.dataset.srcset;
3949					 }
3950					 el.removeAttribute('data-srcset');
3951					 var $waitingThumb = getClosest( el, 'srcset-lazy-animations');
3952					 if ( $waitingThumb != null ) {
3953						 el.onload = function(){
3954							 classie.removeClass( $waitingThumb, 'srcset-lazy-animations');
3955						 };
3956					 }
3957				 }
3958				 el.dispatchEvent(new CustomEvent("srcset-done"));
3959			 }
3960		 }
3961	 };
3962 
3963	 UNCODE.adaptive_srcset = function(container) {
3964		 var images = new Array();
3965		 var parentSelector = container ? container[0] : document;
3966		 // If 'container' is false, we assume that this is a call on window load
3967		 var isLoadingResize = container ? false : true;
3968		 var getImages = parentSelector.querySelectorAll('.srcset-async:not(.srcset-fetching)');
3969		 var limit = SiteParameters.dynamic_srcset_bunch_limit ? parseInt(SiteParameters.dynamic_srcset_bunch_limit, 10) : 1;
3970 
3971		 for (var i = 0; i < getImages.length; i++) {
3972			 var imageObj = {};
3973			 var el = getImages[i];
3974			 var missing_breakpoints = el.getAttribute('data-no-bp');
3975 
3976			 if (isLoadingResize) {
3977				 // Update srcset/sizes attributes
3978				 // But skip images that are processed on other events
3979				 // (isotope.onLayout for example) to avoid double calls
3980				 if (!classie.hasClass(el, 'srcset-on-layout')) {
3981					 UNCODE.set_dynamic_srcset_size(el);
3982				 }
3983			 }
3984 
3985			 if (missing_breakpoints) {
3986				 classie.addClass(el, 'srcset-fetching');
3987				 imageObj.unique = el.getAttribute('data-uniqueid');
3988				 imageObj.url = el.getAttribute('data-guid');
3989				 imageObj.path = el.getAttribute('data-path');
3990				 imageObj.singlew = el.getAttribute('data-singlew');
3991				 imageObj.singleh = el.getAttribute('data-singleh');
3992				 imageObj.origwidth = el.getAttribute('data-width');
3993				 imageObj.origheight = el.getAttribute('data-height');
3994				 imageObj.crop = el.getAttribute('data-crop');
3995				 imageObj.fixed = el.getAttribute('data-fixed') == undefined ? null : el.getAttribute('data-fixed');
3996				 imageObj.missingbp = missing_breakpoints;
3997 
3998				 images.push(imageObj);
3999			 } else {
4000				 classie.removeClass(el, 'srcset-async');
4001			 }
4002		 }
4003 
4004		 while (images.length > 0) {
4005			 if (images.length >= limit) {
4006				 var bunch_images = new Array();
4007				 for (var i = limit - 1; i >= 0; i--) {
4008					 bunch_images.push(images[i]);
4009					 images.splice(i, 1);
4010				 }
4011				 UNCODE.adaptive_srcset_async(parentSelector, bunch_images);
4012			 } else {
4013				 UNCODE.adaptive_srcset_async(parentSelector, images);
4014				 break;
4015			 }
4016		 }
4017	 };
4018 
4019	 UNCODE.adaptive_srcset_async = function(parentSelector, images) {
4020		 var post_data = {
4021			 images: JSON.stringify(images),
4022			 action: 'regenerate_srcset_async',
4023			 resize_quality: SiteParameters.resize_quality,
4024			 nonce_srcset_async: SiteParameters.nonce_srcset_async
4025		 };
4026 
4027		 var xhr = new XMLHttpRequest();
4028		 xhr.open('POST', SiteParameters.ajax_url, true);
4029		 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
4030		 xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
4031 
4032		 xhr.onreadystatechange = function() {
4033			 if (xhr.readyState == XMLHttpRequest.DONE) {
4034				 if (xhr.status == 200 && xhr.responseText) {
4035					 var jsonResponse = JSON.parse(xhr.responseText);
4036 
4037					 if (jsonResponse.success && jsonResponse.data.images) {
4038						 var processedImages = jsonResponse.data.images;
4039 
4040						 for (var i = 0; i < processedImages.length; i++) {
4041							 var processedImageID = processedImages[i].id;
4042							 var processedImageUniqueID = processedImages[i].unique;
4043							 var processedImageisNew = processedImages[i].new_crop === true ? true : false;
4044							 var getImage = parentSelector.querySelectorAll('[data-uniqueid="'+processedImageUniqueID+'"]');
4045 
4046							 for (var j = 0; j < getImage.length; j++) {
4047								 classie.removeClass(getImage[j], 'srcset-async');
4048								 classie.removeClass(getImage[j], 'srcset-fetching');
4049								 classie.addClass(getImage[j], 'srcset-async-done');
4050								 getImage[j].dispatchEvent(new CustomEvent("async-done"));
4051							 }
4052 
4053							 if (processedImageisNew && SiteParameters.optimize_shortpixel_image == true) {
4054								 UNCODE.process_shortpixel_image(processedImageID);
4055							 }
4056						 }
4057					 } else {
4058						 if (SiteParameters.enable_debug == true) {
4059							 // This console log is disabled by default
4060							 // So nothing is printed in a typical installation
4061							 //
4062							 // It can be enabled for debugging purposes setting
4063							 // the 'uncode_enable_debug_on_js_scripts' filter to true
4064							 if (jsonResponse.success == false && jsonResponse.data.message) {
4065								 console.log('There was an error: ' + jsonResponse.data.message);
4066							 } else {
4067								 console.log('There was an error: bad response');
4068							 }
4069						 }
4070					 }
4071 
4072				 } else if (xhr.status == 400) {
4073					 if (SiteParameters.enable_debug == true) {
4074						 // This console log is disabled by default
4075						 // So nothing is printed in a typical installation
4076						 //
4077						 // It can be enabled for debugging purposes setting
4078						 // the 'uncode_enable_debug_on_js_scripts' filter to true
4079						 console.log('There was an error 400');
4080					 }
4081				 } else {
4082					 if (SiteParameters.enable_debug == true) {
4083						 // This console log is disabled by default
4084						 // So nothing is printed in a typical installation
4085						 //
4086						 // It can be enabled for debugging purposes setting
4087						 // the 'uncode_enable_debug_on_js_scripts' filter to true
4088						 console.log('Something else other than 200 was returned');
4089					 }
4090				 }
4091			 }
4092		 }
4093 
4094		 // Serialize our data
4095		 var queryString = "",
4096			 arrayLength = Object.keys(post_data).length,
4097			 arrayCounter = 0;
4098 
4099		 for (var key in post_data) {
4100			 queryString += key + "=" + post_data[key];
4101 
4102			 if (arrayCounter < arrayLength - 1) {
4103				 queryString += "&";
4104			 }
4105 
4106			 arrayCounter++;
4107		 }
4108 
4109		 xhr.send(queryString);
4110	 };
4111 
4112 })(window);
4113 
4114 (function(global){var startY=0;var enabled=false;var supportsPassiveOption=false;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassiveOption=true}});window.addEventListener("test",null,opts)}catch(e){}var handleTouchmove=function(evt){var el=evt.target;while(el!==document.body&&el!==document){var style=window.getComputedStyle(el);if(!style){break}if(el.nodeName==="INPUT"&&el.getAttribute("type")==="range"){return}var scrolling=style.getPropertyValue("-webkit-overflow-scrolling");var overflowY=style.getPropertyValue("overflow-y");var height=parseInt(style.getPropertyValue("height"),10);var isScrollable=scrolling==="touch"&&(overflowY==="auto"||overflowY==="scroll");var canScroll=el.scrollHeight>el.offsetHeight;if(isScrollable&&canScroll){var curY=evt.touches?evt.touches[0].screenY:evt.screenY;var isAtTop=startY<=curY&&el.scrollTop===0;var isAtBottom=startY>=curY&&el.scrollHeight-el.scrollTop===height;if(isAtTop||isAtBottom){evt.preventDefault()}return}el=el.parentNode}evt.preventDefault()};var handleTouchstart=function(evt){startY=evt.touches?evt.touches[0].screenY:evt.screenY};var enable=function(){window.addEventListener("touchstart",handleTouchstart,supportsPassiveOption?{passive:false}:false);window.addEventListener("touchmove",handleTouchmove,supportsPassiveOption?{passive:false}:false);enabled=true};var disable=function(){window.removeEventListener("touchstart",handleTouchstart,false);window.removeEventListener("touchmove",handleTouchmove,false);enabled=false};var isEnabled=function(){return enabled};var testDiv=document.createElement("div");document.documentElement.appendChild(testDiv);testDiv.style.WebkitOverflowScrolling="touch";var scrollSupport="getComputedStyle"in window&&window.getComputedStyle(testDiv)["-webkit-overflow-scrolling"]==="touch";document.documentElement.removeChild(testDiv);if(scrollSupport){enable()}var iNoBounce={enable:enable,disable:disable,isEnabled:isEnabled};if(typeof module!=="undefined"&&module.exports){module.exports=iNoBounce}if(typeof global.define==="function"){(function(define){define("iNoBounce",[],function(){return iNoBounce})})(global.define)}else{global.iNoBounce=iNoBounce}})(this);
4115 iNoBounce.disable();
4116 
4117 /* Font Face Observer v2.1.0 - © Bram Stein. License: BSD-3-Clause */(function(){'use strict';var f,g=[];function l(a){g.push(a);1==g.length&&f()}function m(){for(;g.length;)g[0](),g.shift()}f=function(){setTimeout(m)};function n(a){this.a=p;this.b=void 0;this.f=[];var b=this;try{a(function(a){q(b,a)},function(a){r(b,a)})}catch(c){r(b,c)}}var p=2;function t(a){return new n(function(b,c){c(a)})}function u(a){return new n(function(b){b(a)})}function q(a,b){if(a.a==p){if(b==a)throw new TypeError;var c=!1;try{var d=b&&b.then;if(null!=b&&"object"==typeof b&&"function"==typeof d){d.call(b,function(b){c||q(a,b);c=!0},function(b){c||r(a,b);c=!0});return}}catch(e){c||r(a,e);return}a.a=0;a.b=b;v(a)}}
4118 function r(a,b){if(a.a==p){if(b==a)throw new TypeError;a.a=1;a.b=b;v(a)}}function v(a){l(function(){if(a.a!=p)for(;a.f.length;){var b=a.f.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0==a.a?"function"==typeof c?e(c.call(void 0,a.b)):e(a.b):1==a.a&&("function"==typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}})}n.prototype.g=function(a){return this.c(void 0,a)};n.prototype.c=function(a,b){var c=this;return new n(function(d,e){c.f.push([a,b,d,e]);v(c)})};
4119 function w(a){return new n(function(b,c){function d(c){return function(d){h[c]=d;e+=1;e==a.length&&b(h)}}var e=0,h=[];0==a.length&&b(h);for(var k=0;k<a.length;k+=1)u(a[k]).c(d(k),c)})}function x(a){return new n(function(b,c){for(var d=0;d<a.length;d+=1)u(a[d]).c(b,c)})};window.Promise||(window.Promise=n,window.Promise.resolve=u,window.Promise.reject=t,
4119window.Promise.race=x,window.Promise.all=w,window.Promise.prototype.then=n.prototype.c,window.Promise.prototype["catch"]=n.prototype.g);}());
4120 
4121 (function(){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c);a()}):document.attachEvent("onreadystatechange",function k(){if("interactive"==document.readyState||"complete"==document.readyState)document.detachEvent("onreadystatechange",k),a()})};function t(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
4122 this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
4123 function u(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function z(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function A(a,b){function c(){var a=k;z(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);z(a)};function B(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var C=null,D=null,E=null,F=null;function G(){if(null===D)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);D=!!a&&603>parseInt(a[1],10)}else D=!1;return D}function J(){null===F&&(F=!!document.fonts);return F}
4124 function K(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:"","100px",b].join(" ")}
4125 B.prototype.load=function(a,b){var c=this,k=a||"BESbswy",r=0,n=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=n?b(Error(""+n+"ms timeout exceeded")):document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},b)}e()}),N=new Promise(function(a,c){r=setTimeout(function(){c(Error(""+n+"ms timeout exceeded"))},n)});Promise.race([N,M]).then(function(){clearTimeout(r);a(c)},
4126 b)}else m(function(){function v(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=C&&(f==w&&g==w&&h==w||f==x&&g==x&&h==x||f==y&&g==y&&h==y)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(r),a(c))}function I(){if((new Date).getTime()-H>=n)d.parentNode&&d.parentNode.removeChild(d),b(Error(""+
4127 n+"ms timeout exceeded"));else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,g=p.a.offsetWidth,h=q.a.offsetWidth,v();r=setTimeout(I,50)}}var e=new t(k),p=new t(k),q=new t(k),f=-1,g=-1,h=-1,w=-1,x=-1,y=-1,d=document.createElement("div");d.dir="ltr";u(e,L(c,"sans-serif"));u(p,L(c,"serif"));u(q,L(c,"monospace"));d.appendChild(e.a);d.appendChild(p.a);d.appendChild(q.a);document.body.appendChild(d);w=e.a.offsetWidth;x=p.a.offsetWidth;y=q.a.offsetWidth;I();
4127A(e,function(a){f=a;v()});u(e,
4128 L(c,'"'+c.family+'",sans-serif'));A(p,function(a){g=a;v()});u(p,L(c,'"'+c.family+'",serif'));A(q,function(a){h=a;v()});u(q,L(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=B:(window.FontFaceObserver=B,window.FontFaceObserver.prototype.load=B.prototype.load);}());

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.