PageSourceSearch

https://theparlour.net/wp-content/themes/uncode/library/js/init.js?ver=625034918

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