PageSourceSearch

https://www.maddermortem.com/RITAC_WP/wp-content/themes/uncode/library/js/init.js?ver=253823142

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