PageSourceSearch

https://bornaabzarcnc.ir/static/js/theme.js

js bornaabzarcnc.ir collected 2026-09-25 06:32:38 UTC 384,256 bytes, 11,511 lines download raw bytes

1/*
2Name: 			Theme Base
3Written by: 	Okler Themes - (http://www.okler.net)
4Theme Version:	9.7.0
5*/
6
7// Theme
8window.theme = {};
9
10// Theme Common Functions
11window.theme.fn = {
12
13	getOptions: function(opts) {
14
15		if (typeof(opts) == 'object') {
16
17			return opts;
18
19		} else if (typeof(opts) == 'string') {
20
21			try {
22				return JSON.parse(opts.replace(/'/g, '"').replace(';', ''));
23			} catch (e) {
24				return {};
25			}
26
27		} else {
28
29			return {};
30
31		}
32
33	},
34
35	execPluginFunction: function(functionName, context) {
36		var args = Array.prototype.slice.call(arguments, 2);
37		var namespaces = functionName.split(".");
38		var func = namespaces.pop();
39
40		for (var i = 0; i < namespaces.length; i++) {
41			context = context[namespaces[i]];
42		}
43
44		return context[func].apply(context, args);
45	},
46
47	intObs: function(selector, functionName, intObsOptions, alwaysObserve) {
48		var $el = document.querySelectorAll(selector);
49		var intersectionObserverOptions = {
50			rootMargin: '0px 0px 200px 0px'
51		}
52
53		if (Object.keys(intObsOptions).length) {
54			intersectionObserverOptions = $.extend(intersectionObserverOptions, intObsOptions);
55		}
56
57		var observer = new IntersectionObserver(function(entries) {
58			for (var i = 0; i < entries.length; i++) {
59				var entry = entries[i];
60
61				if (entry.intersectionRatio > 0) {
62					if (typeof functionName === 'string') {
63						var func = Function('return ' + functionName)();
64					} else {
65						var callback = functionName;
66
67						callback.call($(entry.target));
68					}
69
70					// Unobserve
71					if (!alwaysObserve) {
72						observer.unobserve(entry.target);
73					}
74
75				}
76			}
77		}, intersectionObserverOptions);
78
79		$($el).each(function() {
80			observer.observe($(this)[0]);
81		});
82	},
83
84	intObsInit: function(selector, functionName) {
85		var $el = document.querySelectorAll(selector);
86		var intersectionObserverOptions = {
87			rootMargin: '200px'
88		}
89
90		var observer = new IntersectionObserver(function(entries) {
91			for (var i = 0; i < entries.length; i++) {
92				var entry = entries[i];
93				if (entry.intersectionRatio > 0) {
94
95					var $this = $(entry.target),
96						opts;
97
98					var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
99					if (pluginOptions)
100						opts = pluginOptions;
101
102					theme.fn.execPluginFunction(functionName, $this, opts);
103
104					// Unobserve
105					observer.unobserve(entry.target);
106				}
107			}
108		}, intersectionObserverOptions);
109
110		$($el).each(function() {
111			observer.observe($(this)[0]);
112		});
113	},
114
115	dynIntObsInit: function(selector, functionName, pluginDefaults) {
116		var $el = document.querySelectorAll(selector);
117
118		$($el).each(function() {
119			var $this = $(this),
120				opts;
121
122			var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
123			if (pluginOptions)
124				opts = pluginOptions;
125
126			var mergedPluginDefaults = theme.fn.mergeOptions(pluginDefaults, opts)
127
128			var intersectionObserverOptions = {
129				rootMargin: theme.fn.getRootMargin(functionName, mergedPluginDefaults),
130				threshold: 0
131			}
132
133			if (!mergedPluginDefaults.forceInit) {
134
135				var observer = new IntersectionObserver(function(entries) {
136					for (var i = 0; i < entries.length; i++) {
137						var entry = entries[i];
138
139						if (entry.intersectionRatio > 0) {
140							theme.fn.execPluginFunction(functionName, $this, mergedPluginDefaults);
141
142							// Unobserve
143							observer.unobserve(entry.target);
144						}
145					}
146				}, intersectionObserverOptions);
147
148				observer.observe($this[0]);
149
150			} else {
151				theme.fn.execPluginFunction(functionName, $this, mergedPluginDefaults);
152			}
153		});
154	},
155
156	getRootMargin: function(plugin, pluginDefaults) {
157		switch (plugin) {
158			case 'themePluginCounter':
159				return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px';
160				break;
161
162			case 'themePluginAnimate':
163				return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px';
164				break;
165
166			case 'themePluginIcon':
167				return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px';
168				break;
169
170			case 'themePluginRandomImages':
171				return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px';
172				break;
173
174			default:
175				return '0px 0px 200px 0px';
176				break;
177		}
178	},
179
180	mergeOptions: function(obj1, obj2) {
181		var obj3 = {};
182
183		for (var attrname in obj1) {
184			obj3[attrname] = obj1[attrname];
185		}
186		for (var attrname in obj2) {
187			obj3[attrname] = obj2[attrname];
188		}
189
190		return obj3;
191	},
192
193	execOnceTroughEvent: function($el, event, callback) {
194		var self = this,
195			dataName = self.formatDataName(event);
196
197		$($el).on(event, function() {
198			if (!$(this).data(dataName)) {
199
200				// Exec Callback Function
201				callback.call($(this));
202
203				// Add data name 
204				$(this).data(dataName, true);
205
206				// Unbind event
207				$(this).off(event);
208			}
209		});
210
211		return this;
212	},
213
214	execOnceTroughWindowEvent: function($el, event, callback) {
215		var self = this,
216			dataName = self.formatDataName(event);
217
218		$($el).on(event, function() {
219			if (!$(this).data(dataName)) {
220
221				// Exec Callback Function
222				callback();
223
224				// Add data name 
225				$(this).data(dataName, true);
226
227				// Unbind event
228				$(this).off(event);
229			}
230		});
231
232		return this;
233	},
234
235	formatDataName: function(name) {
236		name = name.replace('.', '');
237		return name;
238	},
239
240	isElementInView: function($el) {
241		var rect = $el[0].getBoundingClientRect();
242
243		return (
244			rect.top <= (window.innerHeight / 3)
245		);
246	},
247
248	getScripts: function(arr, path) {
249		var _arr = $.map(arr, function(scr) {
250			return $.getScript((path || "") + scr);
251		});
252
253		_arr.push($.Deferred(function(deferred) {
254			$(deferred.resolve);
255		}));
256
257		return $.when.apply($, _arr);
258	}
259
260};
261
262// Local Environment Warning
263try {
264	$( document ).ready(function() {
265		if ("file://" === location.origin) {
266			if ($('[data-icon]').length || $('iframe').length) {
267				$('.modalLocalEnvironment').remove();
268				$('body').append('<div class="modal fade" id="modalLocalEnvironment" aria-hidden="true" aria-labelledby="exampleModalToggleLabel" tabindex="-1"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="exampleModalToggleLabel">Local Environment Warning</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body">SVG Objects, Icons, YouTube and Vimeo Videos might not show correctly on local environment. For better result, please preview on a server.</div><div class="modal-footer"><button type="button" class="btn btn-primary" data-bs-dismiss="modal">Close</button></div></div></div></div>');
269
270				var modalLocalEnvironment = document.getElementById('modalLocalEnvironment');
271				var modalLocalEnvironment = bootstrap.Modal.getOrCreateInstance(modalLocalEnvironment);
272				modalLocalEnvironment.show();
273			}
274		}
275	});
276} catch (e) {}
277
278/**
279 * Copyright 2016 Google Inc. All Rights Reserved.
280 *
281 * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
282 *
283 *  https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
284 *
285 */
286!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,o=i(e);o;)o=i(e=o.ownerDocument);return e}(),e=[],o=null,n=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return o||(o=function(t,o){n=t&&o?l(t,o):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach(function(t){t._checkForIntersections()})}),o},s._resetCrossOriginUpdater=function(){o=null,n=null},s.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,o){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==o[e-1]})},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var o=e.defaultView;if(o&&-1==this._monitoringDocuments.indexOf(e)){var n=this._checkForIntersections,r=null,s=null;this.POLL_INTERVAL?r=o.setInterval(n,this.POLL_INTERVAL):(h(o,"resize",n,!0),h(e,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in o&&(s=new o.MutationObserver(n)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push(function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),c(t,"resize",n,!0)),c(e,"scroll",n,!0),s&&s.disconnect()});var u=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=u){var a=i(e);a&&this._monitorIntersections(a.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var o=this._monitoringDocuments.indexOf(e);if(-1!=o){var n=this.root&&(this.root.ownerDocument||this.root)||t;if(!this._observationTargets.some(function(t){var o=t.element.ownerDocument;if(o==e)return!0;for(;o&&o!=n;){var r=i(o);if((o=r&&r.ownerDocument)==e)return!0}return!1})){var r=this._monitoringUnsubscribes[o];if(this._monitoringDocuments.splice(o,1),this._monitoringUnsubscribes.splice(o,1),r(),e!=n){var s=i(e);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!o||n){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};
286this._observationTargets.forEach(function(n){var i=n.element,s=u(i),h=this._rootContainsTarget(i),c=n.entry,a=t&&h&&this._computeTargetAndRootIntersection(i,s,e),l=null;this._rootContainsTarget(i)?o&&!this.root||(l=e):l={top:0,bottom:0,left:0,right:0,width:0,height:0};var f=n.entry=new r({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:s,rootBounds:l,intersectionRect:a});c?t&&h?this._hasCrossedThreshold(c,f)&&this._queuedEntries.push(f):c&&c.isIntersecting&&this._queuedEntries.push(f):this._queuedEntries.push(f)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,i,r){if("none"!=window.getComputedStyle(e).display){for(var s,h,c,a,f,d,g,m,v=i,_=p(e),b=!1;!b&&_;){var w=null,y=1==_.nodeType?window.getComputedStyle(_):{};if("none"==y.display)return null;if(_==this.root||9==_.nodeType)if(b=!0,_==this.root||_==t)o&&!this.root?!n||0==n.width&&0==n.height?(_=null,w=null,v=null):w=n:w=r;else{var I=p(_),E=I&&u(I),T=I&&this._computeTargetAndRootIntersection(I,E,r);E&&T?(_=I,w=l(E,T)):(_=null,v=null)}else{var R=_.ownerDocument;_!=R.body&&_!=R.documentElement&&"visible"!=y.overflow&&(w=u(_))}if(w&&(s=w,h=v,c=void 0,a=void 0,f=void 0,d=void 0,g=void 0,m=void 0,c=Math.max(s.top,h.top),a=Math.min(s.bottom,h.bottom),f=Math.max(s.left,h.left),d=Math.min(s.right,h.right),m=a-c,v=(g=d-f)>=0&&m>=0&&{top:c,bottom:a,left:f,right:d,width:g,height:m}||null),!v)break;_=_&&p(_)}return v}},s.prototype._getRootRect=function(){var e;if(this.root&&!d(this.root))e=u(this.root);else{var o=d(this.root)?this.root:t,n=o.documentElement,i=o.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,o){return"px"==e.unit?e.value:e.value*(o%2?t.width:t.height)/100}),o={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return o.width=o.right-o.left,o.height=o.bottom-o.top,o},s.prototype._hasCrossedThreshold=function(t,e){var o=t&&t.isIntersecting?t.intersectionRatio||0:-1,n=e.isIntersecting?e.intersectionRatio||0:-1;if(o!==n)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==o||r==n||r<o!=r<n)return!0}},s.prototype._rootIsInDom=function(){return!this.root||f(t,this.root)},s.prototype._rootContainsTarget=function(e){var o=this.root&&(this.root.ownerDocument||this.root)||t;return f(o,e)&&(!this.root||o==e.ownerDocument)},s.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=r}function i(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function r(t){this.time=t.time,this.target=t.target,this.rootBounds=a(t.rootBounds),this.boundingClientRect=a(t.boundingClientRect),this.intersectionRect=a(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,o=e.width*e.height,n=this.intersectionRect,i=n.width*n.height;this.intersectionRatio=o?Number((i/o).toFixed(4)):this.isIntersecting?1:0}function s(t,e){var o,n,i,r=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType&&9!=r.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(o=this._checkForIntersections.bind(this),n=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout(function(){o(),i=null},n))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function h(t,e,o,n){"function"==typeof t.addEventListener?t.addEventListener(e,o,n||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,o)}function c(t,e,o,n){"function"==typeof t.removeEventListener?t.removeEventListener(e,o,n||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,o)}function u(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function l(t,e){var o=e.top-t.top,n=e.left-t.left;return{top:o,left:n,height:e.height,width:e.width,bottom:o+e.height,right:n+e.width}}function f(t,e){for(var o=e;o;){if(o==t)return!0;o=p(o)}return!1}function p(e){var o=e.parentNode;return 9==e.nodeType&&e!=t?i(e):(o&&o.assignedSlot&&(o=o.assignedSlot.parentNode),o&&11==o.nodeType&&o.host?o.host:o)}function d(t){return t&&9===t.nodeType}}();
287
288(function($) {
289	$.extend({
290
291		browserSelector: function() {
292
293			// jQuery.browser.mobile (http://detectmobilebrowser.com/)
294			(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
294sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);
295
296			// Touch
297			var hasTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
298
299			var u = navigator.userAgent,
300				ua = u.toLowerCase(),
301				is = function (t) {
302					return ua.indexOf(t) > -1;
303				},
304				g = 'gecko',
305				w = 'webkit',
306				s = 'safari',
307				o = 'opera',
308				h = document.documentElement,
309				b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2 : '')) : is('konqueror') ? 'konqueror' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1 : '') : is('mozilla/') ? g : '', is('j2me') ? 'mobile' : is('iphone') ? 'iphone' : is('ipod') ? 'ipod' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js'];
310
311			c = b.join(' ');
312
313			if ($.browser.mobile) {
314				c += ' mobile';
315			}
316
317			if (hasTouch) {
318				c += ' touch';
319			}
320
321			h.className += ' ' + c;
322
323			// Edge Detect
324			var isEdge = /Edge/.test(navigator.userAgent);
325
326			if(isEdge) {
327				$('html').removeClass('chrome').addClass('edge');
328			}
329
330			// IE11 Detect
331			var isIE11 = !(window.ActiveXObject) && "ActiveXObject" in window;
332
333			if (isIE11) {
334				$('html').removeClass('gecko').addClass('ie ie11');
335				return;
336			}
337
338			// Dark and Boxed Compatibility
339			if($('body').hasClass('dark')) {
340				$('html').addClass('dark');
341			}
342
343			if($('body').hasClass('boxed')) {
344				$('html').addClass('boxed');
345			}
346
347		}
348
349	});
350
351	$.browserSelector();
352
353	/*
354	Global Variable For Screen Size
355	*/
356	theme.globalWindowWidth = $(window).width();
357	var globalWindowWidth = $(window).width();
358	window.onresize = function() {
359		theme.globalWindowWidth = $(window).width();
360	}
361
362	/*
363	Browser Workarounds
364	*/
365	if (/iPad|iPhone|iPod/.test(navigator.platform)) {
366
367		// iPad/Iphone/iPod Hover Workaround
368		$(document).ready(function($) {
369			$('.thumb-info').attr('onclick', 'return true');
370		});
371	}
372
373	/*
374	Tabs
375	*/
376	if( $('a[data-bs-toggle="tab"]').length ) {
377		$('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
378			var $tabPane = $($(e.target).attr('href'));
379
380			// Carousel Refresh
381			if($tabPane.length) {
382				$tabPane.find('.owl-carousel').trigger('refresh.owl.carousel');
383			}
384
385			// Change Active Class
386			$(this).parents('.nav-tabs').find('.active').removeClass('active');
387			$(this).addClass('active').parent().addClass('active');
388		});	
389
390		if( window.location.hash ) {
391			$(window).on('load', function(){
392				if( window.location.hash !== '*' && $( window.location.hash ).get(0) ) {
393					new bootstrap.Tab( $('a.nav-link[href="'+ window.location.hash +'"]:not([data-hash])')[0] ).show();
394				}
395			});
396		}
397	}
398
399	/*
400	On Load Scroll
401	*/
402	if( !$('html').hasClass('disable-onload-scroll') && window.location.hash && !['#*'].includes( window.location.hash ) ) {
403
404		window.scrollTo(0, 0);
405
406		$(window).on('load', function() {
407			setTimeout(function() {
408
409				var target = window.location.hash,
410					offset = ( $(window).width() < 768 ) ? 180 : 90;
411
412				if (!$(target).length) {
413					return;
414				}
415
416				if ( $("a[href$='" + window.location.hash + "']").is('[data-hash-offset]') ) {
417					offset = parseInt( $("a[href$='" + window.location.hash + "']").first().attr('data-hash-offset') );
418				} else if ( $("html").is('[data-hash-offset]') ) {
419					offset = parseInt( $("html").attr('data-hash-offset') );
420				}
421
422				if (isNaN(offset)) {
423					offset = 0;
424				}
425
426				$('body').addClass('scrolling');
427
428				$('html, body').animate({
429					scrollTop: $(target).offset().top - offset
430				}, 600, 'easeOutQuad', function() {
431					$('body').removeClass('scrolling');
432				});
433
434			}, 1);
435		});
436	}
437
438	/*
439	* Text Rotator
440	*/
441	$.fn.extend({
442		textRotator: function(options) {
443
444			var defaults = {
445				fadeSpeed: 500,
446				pauseSpeed: 100,
447				child: null
448			};
449
450			var options = $.extend(defaults, options);
451
452			return this.each(function() {
453				var o = options;
454				var obj = $(this);
455				var items = $(obj.children(), obj);
456				items.each(function() {
457					$(this).hide();
458				})
459				if (!o.child) {
460					var next = $(obj).children(':first');
461				} else {
462					var next = o.child;
463				}
464				$(next).fadeIn(o.fadeSpeed, function() {
465					$(next).delay(o.pauseSpeed).fadeOut(o.fadeSpeed, function() {
466						var next = $(this).next();
467						if (next.length == 0) {
468							next = $(obj).children(':first');
469						}
470						$(obj).textRotator({
471							child: next,
472							fadeSpeed: o.fadeSpeed,
473							pauseSpeed: o.pauseSpeed
474						});
475					})
476				});
477			});
478		}
479	});
480
481	/*
482	* Notice Top bar
483	*/
484	var $noticeTopBar = {
485		$wrapper: $('.notice-top-bar'),
486		$closeBtn: $('.notice-top-bar-close'),
487		$header: $('#header'),
488		$body: $('.body'),
489		init: function() {
490			var self = this;
491
492			if( !$.cookie('portoNoticeTopBarClose') ) {
493				self
494					.build()
495					.events();
496			} else {
497				self.$wrapper.parent().prepend( '<!-- Notice Top Bar removed by cookie -->' );
498				self.$wrapper.remove();
499			}
500
501			return this;
502		},
503		build: function(){
504			var self = this;
505
506			$(window).on('load', function(){
507				setTimeout(function(){
508					self.$body.css({
509						'margin-top': self.$wrapper.outerHeight(),
510						'transition': 'ease margin 300ms'
511					});
512
513					$('#noticeTopBarContent').textRotator({
514						fadeSpeed: 500,
515						pauseSpeed: 5000
516					});
517
518					if( ['absolute', 'fixed'].includes( self.$header.css('position') ) ) {
519						self.$header.css({
520							'top': self.$wrapper.outerHeight(),
521							'transition': 'ease top 300ms'
522						});
523					}
524
525					$(window).trigger('notice.top.bar.opened');
526
527				}, 1000);
528			});
529
530			return this;
531		},
532		events: function() {
533			var self = this;
534
535			self.$closeBtn.on('click', function(e){
536				e.preventDefault();
537
538				self.$body.animate({
539					'margin-top': 0,
540				}, 300, function(){
541					self.$wrapper.remove();
542					self.saveCookie();
543				});
544
545				if( ['absolute', 'fixed'].includes( self.$header.css('position') ) ) {
546					self.$header.animate({
547						top: 0
548					}, 300);
549				}
550
551				// When header has shrink effect
552				if( self.$header.hasClass('header-effect-shrink') ) {
553					self.$header.find('.header-body').animate({
554						top: 0
555					}, 300);
556				}
557
558				$(window).trigger('notice.top.bar.closed');
559			});
560
561			return this;
562		},
563		checkCookie: function(){
564			var self = this;
565
566			if( $.cookie('portoNoticeTopBarClose') ) {
567				return true;
568			} else {
569				return false;
570			}
571
572			return this;
573		},
574		saveCookie: function() {
575			var self = this;
576
577			$.cookie('portoNoticeTopBarClose', true);
578
579			return this;
580		}
581	}
582
583	if( $('.notice-top-bar').length ) {
584		$noticeTopBar.init();
585	}
586
587	/*
588	* Image Hotspots
589	*/
590	if( $('.image-hotspot').length ) {
591		$('.image-hotspot')
592			.append('<span class="ring"></span>')
593			.append('<span class="circle"></span>');
594	}
595
596
597	/*
598	* Reading Progress
599	*/
600	if( $('.progress-reading').length ) {
601
602		function updateScrollProgress() {
603			var pixels = $(document).scrollTop()
604				pageHeight = $(document).height() - $(window).height()
605				progress = 100 * pixels / pageHeight;
606
607			$('.progress-reading .progress-bar').width(parseInt(progress) + "%");
608		}
609
610		$(document).on('scroll ready', function() {
611			updateScrollProgress();
612		});
613
614		$(document).ready(function(){
615			$(window).afterResize(function() {
616				updateScrollProgress();
617			});
618		});
619
620	}
621
622	/*
623	* Page Transition
624	*/
625	if( $('body[data-plugin-page-transition]').length ) {
626		
627		var link_click = false;
628
629		$(document).on('click', 'a', function(e){
630			link_click = $(this);
631		});
632
633		$(window).on("beforeunload", function(e) {
634			if( typeof link_click === 'object' ) {
635				var href = link_click.attr('href');
636
637				if( href.indexOf('mailto:') != 0 && href.indexOf('tel:') != 0 && !link_click.data('rm-from-transition') ) {
638					$('body').addClass('page-transition-active');
639				}
640			}
641		});
642
643		$(window).on("pageshow", function(e){
644			if( e.persisted || e.originalEvent.persisted) {
645				if( $('html').hasClass('safari') ) {
646					window.location.reload();
647				}
648				
649		        $('body').removeClass('page-transition-active');
650		    }
651		});
652	}
653
654	/*
655	* Thumb Info Floating Caption
656	*/
657	$('.thumb-info-floating-caption').each(function() {
658
659		$(this)
660			.addClass('thumb-info-floating-element-wrapper')
661			.append( '<span class="thumb-info-floating-element thumb-info-floating-caption-title d-none">'+ $(this).data('title') +'</span>' );
662
663		if( $(this).data('type') ) {
664			$('.thumb-info-floating-caption-title', $(this))
665				.append( '<div class="thumb-info-floating-caption-type">'+ $(this).data('type') +'</div>' )
666				.css({
667					'padding-bottom' : 22
668				});
669		}
670
671		if( $(this).hasClass('thumb-info-floating-caption-clean') ) {
672			$('.thumb-info-floating-element', $(this)).addClass('bg-transparent');
673		}
674
675	});
676
677	/*
678	* Thumb Info Floating Element
679	*/
680	if( $('.thumb-info-floating-element-wrapper').length ) {
681
682		$('.thumb-info-floating-element-wrapper').on('mouseenter', function(e){
683			
684			if(!$(this).data('offset')) {
685				$(this).data('offset', 0);
686			}
687
688			var offset = parseInt($(this).data('offset'));
689
690			$('.thumb-info-floating-element-clone').remove();
691
692			$('.thumb-info-floating-element', $(this)).clone().addClass('thumb-info-floating-element-clone p-fixed p-events-none').attr('style', 'transform: scale(0.1);').removeClass('d-none').appendTo('body');
693
694			$('.thumb-info-floating-element-clone').css({
695				left: e.clientX + (offset),
696				top: e.clientY + (offset)
697			}).fadeIn(300);
698
699			gsap.to('.thumb-info-floating-element-clone', 0.5, {
700				css: {
701					scaleX: 1,
702					scaleY: 1
703				}
704			});
705
706			$(document).off('mousemove').on('mousemove', function(e){
707
708				gsap.to('.thumb-info-floating-element-clone', 0.5, {
709					css: {
710						left: e.clientX + (offset),
711						top: e.clientY + (offset)
712					}
713				});
714
715			});
716
717		}).on('mouseout', function(){
718
719			gsap.to('.thumb-info-floating-element-clone', 0.5, {
720				css: {
721					scaleX: 0.5,
722					scaleY: 0.5,
723					opacity: 0
724				}
725			});
726
727		});
728
729	}
730
731	/*
732	* Thumb Info Direction Aware
733	*/
734	$(window).on('load', function() {
735		$('.thumb-info-wrapper-direction-aware').each( function() {
736			$(this).hoverdir({
737				speed : 300,
738				easing : 'ease',
739				hoverDelay : 0,
740				inverse : false,
741				hoverElem: '.thumb-info-wrapper-overlay'
742			});
743		});
744	});
745
746	/*
747	* Thumb Info Container Full
748	*/
749	$('.thumb-info-container-full-img').each(function() {
750
751		var $container = $(this);
752
753		$('[data-full-width-img-src]', $container).each(function() {
754			var uniqueId = 'img' + Math.floor(Math.random() * 10000);
755			$(this).attr('data-rel', uniqueId);
756
757			$container.append('<div style="background-image: url(' + $(this).attr('data-full-width-img-src') + ');" id="' + uniqueId + '" class="thumb-info-container-full-img-large opacity-0"></div>');
758		});
759
760		$('.thumb-info', $container).on('mouseenter', function(e){
761			$('.thumb-info-container-full-img-large').removeClass('active');
762			$('#' + $(this).attr('data-rel')).addClass('active');
763		});
764
765	});
766
767	/*
768	* Toggle Text Click
769	*/
770	$('[data-toggle-text-click]').on('click', function () {
771		$(this).text(function(i, text){
772			return text === $(this).attr('data-toggle-text-click') ? $(this).attr('data-toggle-text-click-alt') : $(this).attr('data-toggle-text-click');
773		});
774	});
775
776	/*
777	* Shape Divider Aspect Ratio
778	*/
779	if( $('.shape-divider').length ) {
780		aspectRatioSVG();
781		$(window).on('resize', function(){
782			aspectRatioSVG();
783		});
784	}
785
786	/*
787	* Shape Divider Animated
788	*/
789	if( $('.shape-divider-horizontal-animation').length ) {
790		theme.fn.intObs('.shape-divider-horizontal-animation', function(){
791			for( var i = 0; i <= 1; i++ ) {
792				var svgClone = $(this).find('svg:nth-child(1)').clone();
793
794				$(this).append( svgClone )
795			}
796
797			$(this).addClass('start');
798		}, {});
799	}
800
801	/*
802	* Toggle Class
803	*/
804	$('[data-porto-toggle-class]').on('click', function (e) {
805		e.preventDefault();
806
807		$(this).toggleClass( $(this).data('porto-toggle-class') );
808	});
809
810	/*
811	* Dynamic Height
812	*/
813	var $window = $(window);
814	$window.on('resize dynamic.height.resize', function(){
815		$('[data-dynamic-height]').each(function(){
816			var $this = $(this),
817				values = JSON.parse($this.data('dynamic-height').replace(/'/g,'"').replace(';',''))
818
819			// XS
820			if( $window.width() < 576 ) {
821				$this.height( values[4] );
822			}
823
824			// SM
825			if( $window.width() > 575 && $window.width() < 768 ) {
826				$this.height( values[3] );
827			}
828
829			// MD
830			if( $window.width() > 767 && $window.width() < 992 ) {
831				$this.height( values[2] );
832			}
833
834			// LG
835			if( $window.width() > 991 && $window.width() < 1200 ) {
836				$this.height( values[1] );
837			}
838
839			// XS
840			if( $window.width() > 1199 ) {
841				$this.height( values[0] );
842			}
843		});
844	});
845
846	// Mobile First Load
847	if( $window.width() < 992 ) {
848		$window.trigger('dynamic.height.resize');
849	}
850
851	/* Video - Trigger Play */
852	if( $('[data-trigger-play-video]').length ) {
853		theme.fn.execOnceTroughEvent( '[data-trigger-play-video]', 'mouseover.trigger.play.video', function(){
854			var $video = $( $(this).data('trigger-play-video') );
855
856			$(this).on('click', function(e){
857				e.preventDefault();
858
859				if( $(this).data('trigger-play-video-remove') == 'yes' ) {
860					$(this).animate({
861						opacity: 0
862					}, 300, function(){
863						$video[0].play();
864
865						$(this).remove();
866					});
867				} else {
868					setTimeout(function(){
869						$video[0].play();
870					},300);
871				}
872			});
873		});
874	}
875
876	/* Video - Custom Auto Play */
877	if( $('video[data-auto-play]').length ) {
878		$(window).on('load', function(){
879			$('video[data-auto-play]').each(function(){
880				var $video = $(this);
881
882				setTimeout(function(){
883					if( $( '#' + $video.attr('id') ).length ) {
884						if( $( '[data-trigger-play-video="#' + $video.attr('id') + '"]' ).data('trigger-play-video-remove') == 'yes' ) {
885							$( '[data-trigger-play-video="#' + $video.attr('id') + '"]' ).animate({
886								opacity: 0
887							}, 300, function(){
888								$video[0].play();
889
890								$( '[data-trigger-play-video="#' + $video.attr('id') + '"]' ).remove();
891							});
892						} else {
893							setTimeout(function(){
894								$video[0].play();
895							},300);
896						}
897					}
898				}, 100);
899
900			});
901		});
902	}
903
904	/*
905	* Remove min height after the load of page
906	*/
907	if( $('[data-remove-min-height]').length ) {
908		$(window).on('load', function(){
909			$('[data-remove-min-height]').each(function(){
910				$(this).css({
911					'min-height': 0
912				});
913			});
914		});
915	}
916
917	/*
918	* Style Switcher Open Loader Button
919	*/
920	if( $('.style-switcher-open-loader').length ) {
921
922		$('.style-switcher-open-loader').on('click', function(e){
923			e.preventDefault();
924
925			var $this = $(this);
926
927			// Add Spinner to icon
928			$this.addClass('style-switcher-open-loader-loading');
929
930			var	basePath = $(this).data('base-path'),
931				skinSrc = $(this).data('skin-src');
932
933			var script1 = document.createElement("script");
934		  	script1.src = basePath + "master/style-switcher/style.switcher.localstorage.js";
935
936		  	var script2 = document.createElement("script");
937		  	script2.src = basePath + "master/style-switcher/style.switcher.js";
938		  	script2.id = "styleSwitcherScript";
939		  	script2.setAttribute('data-base-path', basePath);
940		  	script2.setAttribute('data-skin-src', skinSrc);
941
942		  	script2.onload = function() {
943		  		setTimeout(function(){
944		  			// Trigger a click to open the style switcher sidebar
945			  		function checkIfReady() {
946					    if( !$('.style-switcher-open').length ) {
947					       window.setTimeout(checkIfReady, 100);
948					    } else {
949					      $('.style-switcher-open').trigger('click');
950					    }
951					}
952					checkIfReady();
953
954		  		}, 500);
955		  	}
956
957		  	document.body.appendChild(script1);
958		  	document.body.appendChild(script2);	
959
960		});
961
962	}
963
964	})(jQuery);
965
966/*
967* Scroll and Focus
968*/
969function scrollAndFocus($this, scrollTarget, focusTarget, scrollOffset, scrollAgain) {
970	(function($) {
971
972		$('body').addClass('scrolling');
973
974		// if it's inside a header menu
975		if( $($this).closest('#mainNav').length ) {
976			$($this).parents('.collapse.show').collapse('hide');
977		}
978
979		$('html, body').animate({
980			scrollTop: $(scrollTarget).offset().top - (scrollOffset ? scrollOffset : 0)
981		}, 300, function() {
982			$('body').removeClass('scrolling');
983
984			setTimeout(function(){
985				$(focusTarget).focus();
986			}, 500);
987
988			if( scrollAgain ) {
989				$('html, body').animate({
990					scrollTop: $(scrollTarget).offset().top - (scrollOffset ? scrollOffset : 0)
991				});
992			}
993		});
994	})(jQuery);
995}
996
997/*
998* Shape Divider - SVG Aspect Ratio
999*/
1000function aspectRatioSVG() {
1001	if( $(window).width() < 1950 ) {
1002		$('.shape-divider svg[preserveAspectRatio]').each(function(){
1003			if( !$(this).parent().hasClass('shape-divider-horizontal-animation') ) {
1004				$(this).attr('preserveAspectRatio', 'xMinYMin');
1005			} else {
1006				$(this).attr('preserveAspectRatio', 'none');
1007			}
1008		});
1009	} else {
1010		$('.shape-divider svg[preserveAspectRatio]').each(function(){
1011			$(this).attr('preserveAspectRatio', 'none');
1012		});
1013	}
1014}
1015
1016/*
1017* Lazy Load Background Images (with lazySizes plugin)
1018*/
1019document.addEventListener('lazybeforeunveil', function(e){
vendor: 8,588 bytes, lines 1020-1026
1020    var bg = e.target.getAttribute('data-bg-src');
1021    if(bg) {
1022        e.target.style.backgroundImage = 'url(' + bg + ')';
1023    }
1024});
1025
1026(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports!=="undefined"){module.exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.fn.marquee=function(options){return this.each(function(){var o=$.extend({},$.fn.marquee.defaults,options),$this=$(this),$marqueeWrapper,containerWidth,animationCss,verticalDir,elWidth,loopCount=3,playState="animation-play-state",css3AnimationIsSupported=false,_prefixedEvent=function(element,type,callback){var pfx=["webkit","moz","MS","o",""];for(var p=0;p<pfx.length;p++){if(!pfx[p])type=type.toLowerCase();element.addEventListener(pfx[p]+type,callback,false)}},_objToString=function(obj){var tabjson=[];for(var p in obj){if(obj.hasOwnProperty(p)){tabjson.push(p+":"+obj[p])}}tabjson.push();return"{"+tabjson.join(",")+"}"},_startAnimationWithDelay=function(){$this.timer=setTimeout(animate,o.delayBeforeStart)},methods={pause:function(){if(css3AnimationIsSupported&&o.allowCss3Support){$marqueeWrapper.css(playState,"paused")}else{if($.fn.pause){$marqueeWrapper.pause()}}$this.data("runningStatus","paused");$this.trigger("paused")},resume:function(){if(css3AnimationIsSupported&&o.allowCss3Support){$marqueeWrapper.css(playState,"running")}else{if($.fn.resume){$marqueeWrapper.resume()}}$this.data("runningStatus","resumed");$this.trigger("resumed")},toggle:function(){methods[$this.data("runningStatus")==="resumed"?"pause":"resume"]()},destroy:function(){clearTimeout($this.timer);$this.find("*").addBack().off();$this.html($this.find(".js-marquee:first").html())}};if(typeof options==="string"){if($.isFunction(methods[options])){if(!$marqueeWrapper){$marqueeWrapper=$this.find(".js-marquee-wrapper")}if($this.data("css3AnimationIsSupported")===true){css3AnimationIsSupported=true}methods[options]()}return}var dataAttributes={},attr;$.each(o,function(key){attr=$this.attr("data-"+key);if(typeof attr!=="undefined"){switch(attr){case"true":attr=true;break;case"false":attr=false;break}o[key]=attr}});if(o.speed){o.duration=parseInt($this.width(),10)/o.speed*1e3}verticalDir=o.direction==="up"||o.direction==="down";o.gap=o.duplicated?parseInt(o.gap):0;$this.wrapInner('<div class="js-marquee"></div>');var $el=$this.find(".js-marquee").css({"margin-right":o.gap,float:"left"});if(o.duplicated){$el.clone(true).appendTo($this)}$this.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');$marqueeWrapper=$this.find(".js-marquee-wrapper");if(verticalDir){var containerHeight=$this.height();$marqueeWrapper.removeAttr("style");$this.height(containerHeight);$this.find(".js-marquee").css({float:"none","margin-bottom":o.gap,"margin-right":0});if(o.duplicated){$this.find(".js-marquee:last").css({"margin-bottom":0})}var elHeight=$this.find(".js-marquee:first").height()+o.gap;if(o.startVisible&&!o.duplicated){o._completeDuration=(parseInt(elHeight,10)+parseInt(containerHeight,10))/parseInt(containerHeight,10)*o.duration;o.duration=parseInt(elHeight,10)/parseInt(containerHeight,10)*o.duration}else{o.duration=(parseInt(elHeight,10)+parseInt(containerHeight,10))/parseInt(containerHeight,10)*o.duration}}else{elWidth=$this.find(".js-marquee:first").width()+o.gap;containerWidth=$this.width();if(o.startVisible&&!o.duplicated){o._completeDuration=(parseInt(elWidth,10)+parseInt(containerWidth,10))/parseInt(containerWidth,10)*o.duration;o.duration=parseInt(elWidth,10)/parseInt(containerWidth,10)*o.duration}else{o.duration=(parseInt(elWidth,10)+parseInt(containerWidth,10))/parseInt(containerWidth,10)*o.duration}}if(o.duplicated){o.duration=o.duration/2}if(o.allowCss3Support){var elm=document.body||document.createElement("div"),animationName="marqueeAnimation-"+Math.floor(Math.random()*1e7),domPrefixes="Webkit Moz O ms Khtml".split(" "),animationString="animation",animationCss3Str="",keyframeString="";if(elm.style.animation!==undefined){keyframeString="@keyframes "+animationName+" ";css3AnimationIsSupported=true}if(css3AnimationIsSupported===false){for(var i=0;i<domPrefixes.length;i++){if(elm.style[domPrefixes[i]+"AnimationName"]!==undefined){var prefix="-"+domPrefixes[i].toLowerCase()+"-";animationString=prefix+animationString;playState=prefix+playState;keyframeString="@"+prefix+"keyframes "+animationName+" ";css3AnimationIsSupported=true;break}}}if(css3AnimationIsSupported){animationCss3Str=animationName+" "+o.duration/1e3+"s "+o.delayBeforeStart/1e3+"s infinite "+o.css3easing;$this.data("css3AnimationIsSupported",true)}}var _rePositionVertically=function(){$marqueeWrapper.css("transform","translateY("+(o.direction==="up"?containerHeight+"px":"-"+elHeight+"px")+")")},_rePositionHorizontally=function(){$marqueeWrapper.css("transform","translateX("+(o.direction==="left"?containerWidth+"px":"-"+elWidth+"px")+")")};if(o.duplicated){if(verticalDir){if(o.startVisible){$marqueeWrapper.css("transform","translateY(0)")}else{$marqueeWrapper.css("transform","translateY("+(o.direction==="up"?containerHeight+"px":"-"+(elHeight*2-o.gap)+"px")+")")}}else{if(o.startVisible){$marqueeWrapper.css("transform","translateX(0)")}else{$marqueeWrapper.css("transform","translateX("+(o.direction==="left"?containerWidth+"px":"-"+(elWidth*2-o.gap)+"px")+")")}}if(!o.startVisible){loopCount=1}}else if(o.startVisible){loopCount=2}else{if(verticalDir){_rePositionVertically()}else{_rePositionHorizontally()}}var animate=function(){if(o.duplicated){if(loopCount===1){o._originalDuration=o.duration;if(verticalDir){o.duration=o.direction==="up"?o.duration+containerHeight/(elHeight/o.duration):o.duration*2}else{o.duration=o.direction==="left"?o.duration+containerWidth/(elWidth/o.duration):o.duration*2}if(animationCss3Str){animationCss3Str=animationName+" "+o.duration/1e3+"s "+o.delayBeforeStart/1e3+"s "+o.css3easing}loopCount++}else if(loopCount===2){o.duration=o._originalDuration;if(animationCss3Str){animationName=animationName+"0";keyframeString=$.trim(keyframeString)+"0 ";animationCss3Str=animationName+" "+o.duration/1e3+"s 0s infinite "+o.css3easing}loopCount++}}if(verticalDir){if(o.duplicated){if(loopCount>2){$marqueeWrapper.css("transform","translateY("+(o.direction==="up"?0:"-"+elHeight+"px")+")")}animationCss={transform:"translateY("+(o.direction==="up"?"-"+elHeight+"px":0)+")"}}else if(o.startVisible){if(loopCount===2){if(animationCss3Str){animationCss3Str=animationName+" "+o.duration/1e3+"s "+o.delayBeforeStart/1e3+"s "+o.css3easing}animationCss={transform:"translateY("+(o.direction==="up"?"-"+elHeight+"px":containerHeight+"px")+")"};loopCount++}else if(loopCount===3){o.duration=o._completeDuration;if(animationCss3Str){animationName=animationName+"0";keyframeString=$.trim(keyframeString)+"0 ";animationCss3Str=animationName+" "+o.duration/1e3+"s 0s infinite "+o.css3easing}_rePositionVertically()}}else{_rePositionVertically();animationCss={transform:"translateY("+(o.direction==="up"?"-"+$marqueeWrapper.height()+"px":containerHeight+"px")+")"}}}else{if(o.duplicated){if(loopCount>2){$marqueeWrapper.css("transform","translateX("+(o.direction==="left"?0:"-"+elWidth+"px")+")")}animationCss={transform:"translateX("+(o.direction==="left"?"-"+elWidth+"px":0)+")"}}else if(o.startVisible){if(loopCount===2){if(animationCss3Str){animationCss3Str=animationName+" "+o.duration/1e3+"s "+o.delayBeforeStart/1e3+"s "+o.css3easing}animationCss={transform:"translateX("+(o.direction==="left"?"-"+elWidth+"px":containerWidth+"px")+")"};loopCount++}else if(loopCount===3){o.duration=o._completeDuration;if(animationCss3Str){animationName=animationName+"0";keyframeString=$.trim(keyframeString)+"0 ";animationCss3Str=animationName+" "+o.duration/1e3+"s 0s infinite "+o.css3easing}_rePositionHorizontally()}}else{_rePositionHorizontally();animationCss={transform:"translateX("+(o.direction==="left"?"-"+elWidth+"px":containerWidth+"px")+")"}}}$this.trigger("beforeStarting");if(css3AnimationIsSupported){$marqueeWrapper.css(animationString,animationCss3Str);var keyframeCss=keyframeString+" { 100%  "+_objToString(animationCss)+"}",$styles=$marqueeWrapper.find("style");if($styles.length!==0){$styles.filter(":last").html(keyframeCss)}else{$("head").append("<style>"+keyframeCss+"</style>")}_prefixedEvent($marqueeWrapper[0],"AnimationIteration",function(){$this.trigger("finished")});_prefixedEvent($marqueeWrapper[0],"AnimationEnd",function(){animate();$this.trigger("finished")})}else{$marqueeWrapper.animate(animationCss,o.duration,o.easing,function(){$this.trigger("finished");
1026if(o.pauseOnCycle){_startAnimationWithDelay()}else{animate()}})}$this.data("runningStatus","resumed")};$this.on("pause",methods.pause);$this.on("resume",methods.resume);if(o.pauseOnHover){$this.on("mouseenter",methods.pause);$this.on("mouseleave",methods.resume)}if(css3AnimationIsSupported&&o.allowCss3Support){animate()}else{_startAnimationWithDelay()}})};$.fn.marquee.defaults={allowCss3Support:true,css3easing:"linear",easing:"linear",delayBeforeStart:1e3,direction:"left",duplicated:false,duration:5e3,speed:0,gap:20,pauseOnCycle:false,pauseOnHover:false,startVisible:false}});
1027
1028(function (factory) {
1029    if (typeof define === 'function' && define.amd) {
1030        // AMD
1031        define(['jquery'], factory);
1032    } else if (typeof exports === 'object') {
1033        // CommonJS
1034        factory(require('jquery'));
1035    } else {
1036        // Browser globals
1037        factory(jQuery);
1038    }
1039}(function ($) {
1040  var CountTo = function (element, options) {
1041    this.$element = $(element);
1042    this.options  = $.extend({}, CountTo.DEFAULTS, this.dataOptions(), options);
1043    this.init();
1044  };
1045
1046  CountTo.DEFAULTS = {
1047    from: 0,               // the number the element should start at
1048    to: 0,                 // the number the element should end at
1049    speed: 1000,           // how long it should take to count between the target numbers
1050    refreshInterval: 100,  // how often the element should be updated
1051    decimals: 0,           // the number of decimal places to show
1052    formatter: formatter,  // handler for formatting the value before rendering
1053    onUpdate: null,        // callback method for every time the element is updated
1054    onComplete: null       // callback method for when the element finishes updating
1055  };
1056
1057  CountTo.prototype.init = function () {
1058    this.value     = this.options.from;
1059    this.loops     = Math.ceil(this.options.speed / this.options.refreshInterval);
1060    this.loopCount = 0;
1061    this.increment = (this.options.to - this.options.from) / this.loops;
1062  };
1063
1064  CountTo.prototype.dataOptions = function () {
1065    var options = {
1066      from:            this.$element.data('from'),
1067      to:              this.$element.data('to'),
1068      speed:           this.$element.data('speed'),
1069      refreshInterval: this.$element.data('refresh-interval'),
1070      decimals:        this.$element.data('decimals')
1071    };
1072
1073    var keys = Object.keys(options);
1074
1075    for (var i in keys) {
1076      var key = keys[i];
1077
1078      if (typeof(options[key]) === 'undefined') {
1079        delete options[key];
1080      }
1081    }
1082
1083    return options;
1084  };
1085
1086  CountTo.prototype.update = function () {
1087    this.value += this.increment;
1088    this.loopCount++;
1089
1090    this.render();
1091
1092    if (typeof(this.options.onUpdate) == 'function') {
1093      this.options.onUpdate.call(this.$element, this.value);
1094    }
1095
1096    if (this.loopCount >= this.loops) {
1097      clearInterval(this.interval);
1098      this.value = this.options.to;
1099
1100      if (typeof(this.options.onComplete) == 'function') {
1101        this.options.onComplete.call(this.$element, this.value);
1102      }
1103    }
1104  };
1105
1106  CountTo.prototype.render = function () {
1107    var formattedValue = this.options.formatter.call(this.$element, this.value, this.options);
1108    this.$element.text(formattedValue);
1109  };
1110
1111  CountTo.prototype.restart = function () {
1112    this.stop();
1113    this.init();
1114    this.start();
1115  };
1116
1117  CountTo.prototype.start = function () {
1118    this.stop();
1119    this.render();
1120    this.interval = setInterval(this.update.bind(this), this.options.refreshInterval);
1121  };
1122
1123  CountTo.prototype.stop = function () {
1124    if (this.interval) {
1125      clearInterval(this.interval);
1126    }
1127  };
1128
1129  CountTo.prototype.toggle = function () {
1130    if (this.interval) {
1131      this.stop();
1132    } else {
1133      this.start();
1134    }
1135  };
1136
1137  function formatter(value, options) {
1138    return value.toFixed(options.decimals);
1139  }
1140
1141  $.fn.countTo = function (option) {
1142    return this.each(function () {
1143      var $this   = $(this);
1144      var data    = $this.data('countTo');
1145      var init    = !data || typeof(option) === 'object';
1146      var options = typeof(option) === 'object' ? option : {};
1147      var method  = typeof(option) === 'string' ? option : 'start';
1148
1149      if (init) {
1150        if (data) data.stop();
1151        $this.data('countTo', data = new CountTo(this, options));
1152      }
1153
1154      data[method].call(data);
1155    });
1156  };
1157}));
1158
1159
1160(function($){
1161
1162    /**
1163     * Copyright 2012, Digital Fusion
1164     * Licensed under the MIT license.
1165     * http://teamdf.com/jquery-plugins/license/
1166     *
1167     * @author Sam Sehnert
1168     * @desc A small plugin that checks whether elements are within
1169     *       the user visible viewport of a web browser.
1170     *       only accounts for vertical position, not horizontal.
1171     */
1172    $.fn.visible = function(partial,hidden,direction,container){
1173
1174        if (this.length < 1)
1175            return;
1176
1177        var $t          = this.length > 1 ? this.eq(0) : this,
1178						isContained = typeof container !== 'undefined' && container !== null,
1179						$w				  = isContained ? $(container) : $(window),
1180						wPosition        = isContained ? $w.position() : 0,
1181            t           = $t.get(0),
1182            vpWidth     = $w.outerWidth(),
1183            vpHeight    = $w.outerHeight(),
1184            direction   = (direction) ? direction : 'both',
1185            clientSize  = hidden === true ? t.offsetWidth * t.offsetHeight : true;
1186
1187        if (typeof t.getBoundingClientRect === 'function'){
1188
1189            // Use this native browser method, if available.
1190            var rec = t.getBoundingClientRect(),
1191                tViz = isContained ?
1192												rec.top - wPosition.top >= 0 && rec.top < vpHeight + wPosition.top :
1193												rec.top >= 0 && rec.top < vpHeight,
1194                bViz = isContained ?
1195												rec.bottom - wPosition.top > 0 && rec.bottom <= vpHeight + wPosition.top :
1196												rec.bottom > 0 && rec.bottom <= vpHeight,
1197                lViz = isContained ?
1198												rec.left - wPosition.left >= 0 && rec.left < vpWidth + wPosition.left :
1199												rec.left >= 0 && rec.left <  vpWidth,
1200                rViz = isContained ?
1201												rec.right - wPosition.left > 0  && rec.right < vpWidth + wPosition.left  :
1202												rec.right > 0 && rec.right <= vpWidth,
1203                vVisible   = partial ? tViz || bViz : tViz && bViz,
1204                hVisible   = partial ? lViz || rViz : lViz && rViz;
1205
1206            if(direction === 'both')
1207                return clientSize && vVisible && hVisible;
1208            else if(direction === 'vertical')
1209                return clientSize && vVisible;
1210            else if(direction === 'horizontal')
1211                return clientSize && hVisible;
1212        } else {
1213
1214            var viewTop 				= isContained ? 0 : wPosition,
vendor: 14,643 bytes, lines 1215-1678
1215                viewBottom      = viewTop + vpHeight,
1216                viewLeft        = $w.scrollLeft(),
1217                viewRight       = viewLeft + vpWidth,
1218                position          = $t.position(),
1219                _top            = position.top,
1220                _bottom         = _top + $t.height(),
1221                _left           = position.left,
1222                _right          = _left + $t.width(),
1223                compareTop      = partial === true ? _bottom : _top,
1224                compareBottom   = partial === true ? _top : _bottom,
1225                compareLeft     = partial === true ? _right : _left,
1226                compareRight    = partial === true ? _left : _right;
1227
1228            if(direction === 'both')
1229                return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop)) && ((compareRight <= viewRight) && (compareLeft >= viewLeft));
1230            else if(direction === 'vertical')
1231                return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop));
1232            else if(direction === 'horizontal')
1233                return !!clientSize && ((compareRight <= viewRight) && (compareLeft >= viewLeft));
1234        }
1235    };
1236
1237})(jQuery);
1238
1239
1240/**
1241* jquery-match-height 0.7.2 by @liabru
1242* http://brm.io/jquery-match-height/
1243* License: MIT
1244*/
1245
1246;(function(factory) { // eslint-disable-line no-extra-semi
1247    'use strict';
1248    if (typeof define === 'function' && define.amd) {
1249        // AMD
1250        define(['jquery'], factory);
1251    } else if (typeof module !== 'undefined' && module.exports) {
1252        // CommonJS
1253        module.exports = factory(require('jquery'));
1254    } else {
1255        // Global
1256        factory(jQuery);
1257    }
1258})(function($) {
1259    /*
1260    *  internal
1261    */
1262
1263    var _previousResizeWidth = -1,
1264        _updateTimeout = -1;
1265
1266    /*
1267    *  _parse
1268    *  value parse utility function
1269    */
1270
1271    var _parse = function(value) {
1272        // parse value and convert NaN to 0
1273        return parseFloat(value) || 0;
1274    };
1275
1276    /*
1277    *  _rows
1278    *  utility function returns array of jQuery selections representing each row
1279    *  (as displayed after float wrapping applied by browser)
1280    */
1281
1282    var _rows = function(elements) {
1283        var tolerance = 1,
1284            $elements = $(elements),
1285            lastTop = null,
1286            rows = [];
1287
1288        // group elements by their top position
1289        $elements.each(function(){
1290            var $that = $(this),
1291                top = $that.offset().top - _parse($that.css('margin-top')),
1292                lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
1293
1294            if (lastRow === null) {
1295                // first item on the row, so just push it
1296                rows.push($that);
1297            } else {
1298                // if the row top is the same, add to the row group
1299                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
1300                    rows[rows.length - 1] = lastRow.add($that);
1301                } else {
1302                    // otherwise start a new row group
1303                    rows.push($that);
1304                }
1305            }
1306
1307            // keep track of the last row top
1308            lastTop = top;
1309        });
1310
1311        return rows;
1312    };
1313
1314    /*
1315    *  _parseOptions
1316    *  handle plugin options
1317    */
1318
1319    var _parseOptions = function(options) {
1320        var opts = {
1321            byRow: true,
1322            property: 'height',
1323            target: null,
1324            remove: false
1325        };
1326
1327        if (typeof options === 'object') {
1328            return $.extend(opts, options);
1329        }
1330
1331        if (typeof options === 'boolean') {
1332            opts.byRow = options;
1333        } else if (options === 'remove') {
1334            opts.remove = true;
1335        }
1336
1337        return opts;
1338    };
1339
1340    /*
1341    *  matchHeight
1342    *  plugin definition
1343    */
1344
1345    var matchHeight = $.fn.matchHeight = function(options) {
1346        var opts = _parseOptions(options);
1347
1348        // handle remove
1349        if (opts.remove) {
1350            var that = this;
1351
1352            // remove fixed height from all selected elements
1353            this.css(opts.property, '');
1354
1355            // remove selected elements from all groups
1356            $.each(matchHeight._groups, function(key, group) {
1357                group.elements = group.elements.not(that);
1358            });
1359
1360            // TODO: cleanup empty groups
1361
1362            return this;
1363        }
1364
1365        if (this.length <= 1 && !opts.target) {
1366            return this;
1367        }
1368
1369        // keep track of this group so we can re-apply later on load and resize events
1370        matchHeight._groups.push({
1371            elements: this,
1372            options: opts
1373        });
1374
1375        // match each element's height to the tallest element in the selection
1376        matchHeight._apply(this, opts);
1377
1378        return this;
1379    };
1380
1381    /*
1382    *  plugin global options
1383    */
1384
1385    matchHeight.version = '0.7.2';
1386    matchHeight._groups = [];
1387    matchHeight._throttle = 80;
1388    matchHeight._maintainScroll = false;
1389    matchHeight._beforeUpdate = null;
1390    matchHeight._afterUpdate = null;
1391    matchHeight._rows = _rows;
1392    matchHeight._parse = _parse;
1393    matchHeight._parseOptions = _parseOptions;
1394
1395    /*
1396    *  matchHeight._apply
1397    *  apply matchHeight to given elements
1398    */
1399
1400    matchHeight._apply = function(elements, options) {
1401        var opts = _parseOptions(options),
1402            $elements = $(elements),
1403            rows = [$elements];
1404
1405        // take note of scroll position
1406        var scrollTop = $(window).scrollTop(),
1407            htmlHeight = $('html').outerHeight(true);
1408
1409        // get hidden parents
1410        var $hiddenParents = $elements.parents().filter(':hidden');
1411
1412        // cache the original inline style
1413        $hiddenParents.each(function() {
1414            var $that = $(this);
1415            $that.data('style-cache', $that.attr('style'));
1416        });
1417
1418        // temporarily must force hidden parents visible
1419        $hiddenParents.css('display', 'block');
1420
1421        // get rows if using byRow, otherwise assume one row
1422        if (opts.byRow && !opts.target) {
1423
1424            // must first force an arbitrary equal height so floating elements break evenly
1425            $elements.each(function() {
1426                var $that = $(this),
1427                    display = $that.css('display');
1428
1429                // temporarily force a usable display value
1430                if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
1431                    display = 'block';
1432                }
1433
1434                // cache the original inline style
1435                $that.data('style-cache', $that.attr('style'));
1436
1437                $that.css({
1438                    'display': display,
1439                    'padding-top': '0',
1440                    'padding-bottom': '0',
1441                    'margin-top': '0',
1442                    'margin-bottom': '0',
1443                    'border-top-width': '0',
1444                    'border-bottom-width': '0',
1445                    'height': '100px',
1446                    'overflow': 'hidden'
1447                });
1448            });
1449
1450            // get the array of rows (based on element top position)
1451            rows = _rows($elements);
1452
1453            // revert original inline styles
1454            $elements.each(function() {
1455                var $that = $(this);
1456                $that.attr('style', $that.data('style-cache') || '');
1457            });
1458        }
1459
1460        $.each(rows, function(key, row) {
1461            var $row = $(row),
1462                targetHeight = 0;
1463
1464            if (!opts.target) {
1465                // skip apply to rows with only one item
1466                if (opts.byRow && $row.length <= 1) {
1467                    $row.css(opts.property, '');
1468                    return;
1469                }
1470
1471                // iterate the row and find the max height
1472                $row.each(function(){
1473                    var $that = $(this),
1474                        style = $that.attr('style'),
1475                        display = $that.css('display');
1476
1477                    // temporarily force a usable display value
1478                    if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
1479                        display = 'block';
1480                    }
1481
1482                    // ensure we get the correct actual height (and not a previously set height value)
1483                    var css = { 'display': display };
1484                    css[opts.property] = '';
1485                    $that.css(css);
1486
1487                    // find the max height (including padding, but not margin)
1488                    if ($that.outerHeight(false) > targetHeight) {
1489                        targetHeight = $that.outerHeight(false);
1490                    }
1491
1492                    // revert styles
1493                    if (style) {
1494                        $that.attr('style', style);
1495                    } else {
1496                        $that.css('display', '');
1497                    }
1498                });
1499            } else {
1500                // if target set, use the height of the target element
1501                targetHeight = opts.target.outerHeight(false);
1502            }
1503
1504            // iterate the row and apply the height to all elements
1505            $row.each(function(){
1506                var $that = $(this),
1507                    verticalPadding = 0;
1508
1509                // don't apply to a target
1510                if (opts.target && $that.is(opts.target)) {
1511                    return;
1512                }
1513
1514                // handle padding and border correctly (required when not using border-box)
1515                if ($that.css('box-sizing') !== 'border-box') {
1516                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
1517                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
1518                }
1519
1520                // set the height (accounting for padding and border)
1521                $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
1522            });
1523        });
1524
1525        // revert hidden parents
1526        $hiddenParents.each(function() {
1527            var $that = $(this);
1528            $that.attr('style', $that.data('style-cache') || null);
1529        });
1530
1531        // restore scroll position if enabled
1532        if (matchHeight._maintainScroll) {
1533            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
1534        }
1535
1536        return this;
1537    };
1538
1539    /*
1540    *  matchHeight._applyDataApi
1541    *  applies matchHeight to all elements with a data-match-height attribute
1542    */
1543
1544    matchHeight._applyDataApi = function() {
1545        var groups = {};
1546
1547        // generate groups by their groupId set by elements using data-match-height
1548        $('[data-match-height], [data-mh]').each(function() {
1549            var $this = $(this),
1550                groupId = $this.attr('data-mh') || $this.attr('data-match-height');
1551
1552            if (groupId in groups) {
1553                groups[groupId] = groups[groupId].add($this);
1554            } else {
1555                groups[groupId] = $this;
1556            }
1557        });
1558
1559        // apply matchHeight to each group
1560        $.each(groups, function() {
1561            this.matchHeight(true);
1562        });
1563    };
1564
1565    /*
1566    *  matchHeight._update
1567    *  updates matchHeight on all current groups with their correct options
1568    */
1569
1570    var _update = function(event) {
1571        if (matchHeight._beforeUpdate) {
1572            matchHeight._beforeUpdate(event, matchHeight._groups);
1573        }
1574
1575        $.each(matchHeight._groups, function() {
1576            matchHeight._apply(this.elements, this.options);
1577        });
1578
1579        if (matchHeight._afterUpdate) {
1580            matchHeight._afterUpdate(event, matchHeight._groups);
1581        }
1582    };
1583
1584    matchHeight._update = function(throttle, event) {
1585        // prevent update if fired from a resize event
1586        // where the viewport width hasn't actually changed
1587        // fixes an event looping bug in IE8
1588        if (event && event.type === 'resize') {
1589            var windowWidth = $(window).width();
1590            if (windowWidth === _previousResizeWidth) {
1591                return;
1592            }
1593            _previousResizeWidth = windowWidth;
1594        }
1595
1596        // throttle updates
1597        if (!throttle) {
1598            _update(event);
1599        } else if (_updateTimeout === -1) {
1600            _updateTimeout = setTimeout(function() {
1601                _update(event);
1602                _updateTimeout = -1;
1603            }, matchHeight._throttle);
1604        }
1605    };
1606
1607    /*
1608    *  bind events
1609    */
1610
1611    // apply on DOM ready event
1612    $(matchHeight._applyDataApi);
1613
1614    // use on or bind where supported
1615    var on = $.fn.on ? 'on' : 'bind';
1616
1617    // update heights on load and resize events
1618    $(window)[on]('load', function(event) {
1619        matchHeight._update(false, event);
1620    });
1621
1622    // throttled update heights on resize events
1623    $(window)[on]('resize orientationchange', function(event) {
1624        matchHeight._update(true, event);
1625    });
1626
1627});
1628
1629
1630/*! waitForImages jQuery Plugin - v2.4.0 - 2018-02-13
1631* https://github.com/alexanderdickson/waitForImages
1632* Copyright (c) 2018 Alex Dickson; Licensed MIT */
1633;(function (factory) {
1634    if (typeof define === 'function' && define.amd) {
1635        // AMD. Register as an anonymous module.
1636        define(['jquery'], factory);
1637    } else if (typeof exports === 'object') {
1638        // CommonJS / nodejs module
1639        module.exports = factory(require('jquery'));
1640    } else {
1641        // Browser globals
1642        factory(jQuery);
1643    }
1644}(function ($) {
1645    // Namespace all events.
1646    var eventNamespace = 'waitForImages';
1647
1648    // Is srcset supported by this browser?
1649    var hasSrcset = (function(img) {
1650        return img.srcset && img.sizes;
1651    })(new Image());
1652
1653    // CSS properties which contain references to images.
1654    $.waitForImages = {
1655        hasImageProperties: [
1656            'backgroundImage',
1657            'listStyleImage',
1658            'borderImage',
1659            'borderCornerImage',
1660            'cursor'
1661        ],
1662        hasImageAttributes: ['srcset']
1663    };
1664
1665    // Custom selector to find all `img` elements with a valid `src` attribute.
1666    $.expr.pseudos['has-src'] = function (obj) {
1667        // Ensure we are dealing with an `img` element with a valid
1668        // `src` attribute.
1669        return $(obj).is('img[src][src!=""]');
1670    };
1671
1672    // Custom selector to find images which are not already cached by the
1673    // browser.
1674    $.expr.pseudos.uncached = function (obj) {
1675        // Ensure we are dealing with an `img` element with a valid
1676        // `src` attribute.
1677        if (!$(obj).is(':has-src')) {
1678            return false;
1679        }
1680
1681        return !obj.complete;
1682    };
1683
1684    $.fn.waitForImages = function () {
1685
1686        var allImgsLength = 0;
1687        var allImgsLoaded = 0;
1688        var deferred = $.Deferred();
1689        var originalCollection = this;
1690        var allImgs = [];
1691
1692        // CSS properties which may contain an image.
1693        var hasImgProperties = $.waitForImages.hasImageProperties || [];
1694        // Element attributes which may contain an image.
1695        var hasImageAttributes = $.waitForImages.hasImageAttributes || [];
1696        // To match `url()` references.
1697        // Spec: http://www.w3.org/TR/CSS2/syndata.html#value-def-uri
1698        var matchUrl = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
1699
1700        var finishedCallback;
1701        var eachCallback;
1702        var waitForAll;
1703
1704        // Handle options object (if passed).
1705        if ($.isPlainObject(arguments[0])) {
1706
1707            waitForAll = arguments[0].waitForAll;
1708            eachCallback = arguments[0].each;
1709            finishedCallback = arguments[0].finished;
1710
1711        } else {
1712
1713            // Handle if using deferred object and only one param was passed in.
1714            if (arguments.length === 1 && $.type(arguments[0]) === 'boolean') {
1715                waitForAll = arguments[0];
1716            } else {
1717                finishedCallback = arguments[0];
1718                eachCallback = arguments[1];
1719                waitForAll = arguments[2];
1720            }
1721
1722        }
1723
1724        // Handle missing callbacks.
1725        finishedCallback = finishedCallback || $.noop;
1726        eachCallback = eachCallback || $.noop;
1727
1728        // Convert waitForAll to Boolean.
1729        waitForAll = !! waitForAll;
1730
1731        // Ensure callbacks are functions.
1732        if (!$.isFunction(finishedCallback) || !$.isFunction(eachCallback)) {
1733            throw new TypeError('An invalid callback was supplied.');
1734        }
1735
1736        this.each(function () {
1737            // Build a list of all imgs, dependent on what images will
1738            // be considered.
1739            var obj = $(this);
1740
1741            if (waitForAll) {
1742
1743                // Get all elements (including the original), as any one of
1744                // them could have a background image.
1745                obj.find('*').addBack().each(function () {
1746                    var element = $(this);
1747
1748                    // If an `img` element, add it. But keep iterating in
1749                    // case it has a background image too.
1750                    if (element.is('img:has-src') &&
1751                        !element.is('[srcset]')) {
1752                        allImgs.push({
1753                            src: element.attr('src'),
1754                            element: element[0]
1755                        });
1756                    }
1757
1758                    $.each(hasImgProperties, function (i, property) {
1759                        var propertyValue = element.css(property);
1760                        var match;
1761
1762                        // If it doesn't contain this property, skip.
1763                        if (!propertyValue) {
1764                            return true;
1765                        }
1766
1767                        // Get all url() of this element.
1768                        while (match = matchUrl.exec(propertyValue)) {
1769                            allImgs.push({
1770                                src: match[2],
1771                                element: element[0]
1772                            });
1773                        }
1774                    });
1775
1776                    $.each(hasImageAttributes, function (i, attribute) {
1777                        var attributeValue = element.attr(attribute);
1778                        var attributeValues;
1779
1780                        // If it doesn't contain this property, skip.
1781                        if (!attributeValue) {
1782                            return true;
1783                        }
1784
1785                        allImgs.push({
1786                            src: element.attr('src'),
1787                            srcset: element.attr('srcset'),
1788                            element: element[0]
1789                        });
1790                    });
1791                });
1792            } else {
1793                // For images only, the task is simpler.
1794                obj.find('img:has-src')
1795                    .each(function () {
1796                    allImgs.push({
1797                        src: this.src,
1798                        element: this
1799                    });
1800                });
1801            }
1802        });
1803
1804        allImgsLength = allImgs.length;
1805        allImgsLoaded = 0;
1806
1807        // If no images found, don't bother.
1808        if (allImgsLength === 0) {
1809            finishedCallback.call(originalCollection);
1810            deferred.resolveWith(originalCollection);
1811        }
1812
1813        // Now that we've found all imgs in all elements in this,
1814        // load them and attach callbacks.
1815        $.each(allImgs, function (i, img) {
1816
1817            var image = new Image();
1818            var events =
1819              'load.' + eventNamespace + ' error.' + eventNamespace;
1820
1821            // Handle the image loading and error with the same callback.
1822            $(image).one(events, function me (event) {
1823                // If an error occurred with loading the image, set the
1824                // third argument accordingly.
1825                var eachArguments = [
1826                    allImgsLoaded,
1827                    allImgsLength,
1828                    event.type == 'load'
1829                ];
1830                allImgsLoaded++;
1831
1832                eachCallback.apply(img.element, eachArguments);
1833                deferred.notifyWith(img.element, eachArguments);
1834
1835                // Unbind the event listeners. I use this in addition to
1836                // `one` as one of those events won't be called (either
1837                // 'load' or 'error' will be called).
1838                $(this).off(events, me);
1839
1840                if (allImgsLoaded == allImgsLength) {
1841                    finishedCallback.call(originalCollection[0]);
1842                    deferred.resolveWith(originalCollection[0]);
1843                    return false;
1844                }
1845
1846            });
1847
1848            if (hasSrcset && img.srcset) {
1849                image.srcset = img.srcset;
1850                image.sizes = img.sizes;
1851            }
1852            image.src = img.src;
1853        });
1854
1855        return deferred.promise();
1856
1857    };
1858}));
1859
1860
1861/* jQuery-FontSpy.js v3.0.0
1862 * https://github.com/patrickmarabeas/jQuery-FontSpy.js
1863 *
1864 * Copyright 2013, Patrick Marabeas http://pulse-dev.com
1865 * Released under the MIT license
1866 * http://opensource.org/licenses/mit-license.php
1867 *
1868 * Date: 02/11/2015
1869 */
1870
1871(function( w, $ ) {
1872
1873  fontSpy = function  ( fontName, conf ) {
1874    var $html = $('html'),
1875        $body = $('body'),
1876        fontFamilyName = fontName;
1877
1878        // Throw error if fontName is not a string or not is left as an empty string
1879        if (typeof fontFamilyName !== 'string' || fontFamilyName === '') {
1880          throw 'A valid fontName is required. fontName must be a string and must not be an empty string.';
1881        }
1882
1883    var defaults = {
1884        font: fontFamilyName,
1885        fontClass: fontFamilyName.toLowerCase().replace( /\s/g, '' ),
1886        success: function() {},
1887        failure: function() {},
1888        testFont: 'Courier New',
1889        testString: 'QW@HhsXJ',
1890        glyphs: '',
1891        delay: 50,
1892        timeOut: 1000,
1893        callback: $.noop
1894    };
1895
1896    var config = $.extend( defaults, conf );
1897
1898    var $tester = $('<span>' + config.testString+config.glyphs + '</span>')
1899        .css('position', 'absolute')
1900        .css('top', '-9999px')
1901        .css('left', '-9999px')
1902        .css('visibility', 'hidden')
1903        .css('fontFamily', config.testFont)
1904        .css('fontSize', '250px');
1905
1906    $body.append($tester);
1907
1908    var fallbackFontWidth = $tester.outerWidth();
1909
1910    $tester.css('fontFamily', config.font + ',' + config.testFont);
1911
1912    var failure = function () {
1913      $html.addClass("no-"+config.fontClass);
1914      if( config && config.failure ) {
1915        config.failure();
1916      }
1917      config.callback(new Error('FontSpy timeout'));
1918      $tester.remove();
1919    };
1920
1921    var success = function () {
1922      config.callback();
1923      $html.addClass(config.fontClass);
1924      if( config && config.success ) {
1925        config.success();
1926      }
1927      $tester.remove();
1928    };
1929
1930    var retry = function () {
1931      setTimeout(checkFont, config.delay);
1932      config.timeOut = config.timeOut - config.delay;
1933    };
1934
1935    var checkFont = function () {
1936      var loadedFontWidth = $tester.outerWidth();
1937
1938      if (fallbackFontWidth !== loadedFontWidth){
1939        success();
1940      } else if(config.timeOut < 0) {
1941        failure();
1942      } else {
1943        retry();
1944      }
1945    }
1946
1947    checkFont();
1948    }
1949  })( this, jQuery );
1950
1951
1952!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(o.observeElementInViewport={})}(this,function(o){function e(o,e,t,r){if(void 0===t&&(t=function(){}),void 0===r&&(r={}),!o)throw new Error("Target element to observe should be a valid DOM Node");var n=Object.assign({},{viewport:null,modTop:"0px",modRight:"0px",modBottom:"0px",modLeft:"0px",threshold:[0]},r),i=n.viewport,f=n.modTop,s=n.modLeft,u=n.modBottom,a=n.modRight,d=n.threshold;if(!Array.isArray(d)&&"number"!=typeof d)throw new Error("threshold should be a number or an array of numbers");var p=Array.isArray(d)?d.map(function(o){return Math.floor(o%101)/100}):[Math.floor(d?d%101:0)/100],c=Math.min.apply(Math,p),m={root:i instanceof Node?i:null,rootMargin:f+" "+a+" "+u+" "+s,threshold:p},h=new IntersectionObserver(function(r,n){var i=r.filter(function(e){return e.target===o})[0],f=function(){return n.unobserve(o)};i&&(i.isInViewport=i.isIntersecting&&i.intersectionRatio>=c,i.isInViewport?e(i,f,o):t(i,f,o))},m);return h.observe(o),function(){return h.unobserve(o)}}o.observeElementInViewport=e,o.isInViewport=function(o,t){return void 0===t&&(t={}),new Promise(function(r,n){try{e(o,function(o,e){e(),r(!0)},function(o,e){e(),r(!1)},t)}catch(o){n(o)}})}});
1953//# sourceMappingURL=index.umd.js.map
1954
1955
1956/*
1957Plugin Name: 	jQuery.pin
1958https://github.com/webpop/jquery.pin
1959Licensed under the terms of the MIT license.
1960*/
1961(function ($) {
1962	"use strict";
1963	$.fn.pin = function (options) {
1964		var scrollY = 0, elements = [], disabled = false, $window = $(window);
1965
1966		options = options || {};
1967
1968		var recalculateLimits = function () {
1969			for (var i=0, len=elements.length; i<len; i++) {
1970				var $this = elements[i];
1971
1972				if (options.minWidth && $window.outerWidth() <= options.minWidth) {
1973					if ($this.parent().is(".pin-wrapper")) { $this.unwrap(); }
1974					$this.css({width: "", left: "", top: "", position: ""});
1975					if (options.activeClass) { $this.removeClass(options.activeClass); }
1976					disabled = true;
1977					continue;
1978				} else {
1979					disabled = false;
1980				}
1981
1982				var $container = options.containerSelector ? $this.closest(options.containerSelector) : $(document.body);
1983				var offset = $this.offset();
1984				var containerOffset = $container.offset();
1985				var parentOffset = $this.parent().offset();
1986
1987				if (!$this.parent().is(".pin-wrapper")) {
1988					$this.wrap("<div class='pin-wrapper'>");
1989				}
1990
1991				var pad = $.extend({
1992				  top: 0,
1993				  bottom: 0
1994				}, options.padding || {});
1995
1996				$this.data("pin", {
1997					pad: pad,
1998					from: (options.containerSelector ? containerOffset.top : offset.top) - pad.top,
1999					to: containerOffset.top + $container.height() - $this.outerHeight() - pad.bottom,
2000					end: containerOffset.top + $container.height(),
2001					parentTop: parentOffset.top
2002				});
2003
2004				$this.css({width: $this.outerWidth()});
2005				$this.parent().css("height", $this.outerHeight());
2006			}
2007		};
2008
2009		var onScroll = function () {
2010			if (disabled) { return; }
2011
2012			scrollY = $window.scrollTop();
2013
2014			var elmts = [];
2015			for (var i=0, len=elements.length; i<len; i++) {          
2016				var $this = $(elements[i]),
2017					data  = $this.data("pin");
2018
2019				if (!data) { // Removed element
2020				  continue;
2021				}
2022
2023				elmts.push($this); 
2024				  
2025				var from = data.from - data.pad.bottom,
2026					to = data.to - data.pad.top;
2027			  
2028				if (from + $this.outerHeight() > data.end) {
2029					$this.css('position', '');
2030					continue;
2031				}
2032			  
2033				if (from < scrollY && to > scrollY) {
2034					!($this.css("position") == "fixed") && $this.css({
2035						left: $this.offset().left,
2036						top: data.pad.top
2037					}).css("position", "fixed");
2038					if (options.activeClass) { $this.addClass(options.activeClass); }
2039				} else if (scrollY >= to) {
2040					$this.css({
2041						left: "",
2042						top: to - data.parentTop + data.pad.top
2043					}).css("position", "absolute");
2044					if (options.activeClass) { $this.addClass(options.activeClass); }
2045				} else {
2046					$this.css({position: "", top: "", left: ""});
2047					if (options.activeClass) { $this.removeClass(options.activeClass); }
2048				}
2049		  }
2050		  elements = elmts;
2051		};
2052
2053		var update = function () { recalculateLimits(); onScroll(); };
2054
2055		this.each(function () {
2056			var $this = $(this), 
2057				data  = $(this).data('pin') || {};
2058
2059			if (data && data.update) { return; }
2060			elements.push($this);
2061			$("img", this).one("load", recalculateLimits);
2062			data.update = update;
2063			$(this).data('pin', data);
2064		});
2065
2066		$window.scroll(onScroll);
2067		$window.resize(function () { recalculateLimits(); });
2068		recalculateLimits();
2069
2070		$window.on('load', update);
2071
2072		return this;
2073	  };
2074})(jQuery);
2075
2076
2077( function( $ ) {
2078	"use strict";
2079	
2080	// Define default settings
2081	var defaults = {
2082		action: function() {},
2083		runOnLoad: false,
2084		duration: 500
2085	};
2086	
2087	// Define global variables
2088	var settings = defaults,
2089		running = false,
2090		start;
2091	
2092	var methods = {};
2093	
2094	// Initial plugin configuration
2095	methods.init = function() {
2096		
2097		// Allocate passed arguments to settings based on type
2098		for( var i = 0; i <= arguments.length; i++ ) {
2099			var arg = arguments[i];
2100			switch ( typeof arg ) {
2101				case "function":
2102					settings.action = arg;
2103					break;
2104				case "boolean":
2105					settings.runOnLoad = arg;
2106					break;
2107				case "number":
2108					settings.duration = arg;
2109					break;
2110			}
2111		}
2112	
2113		// Process each matching jQuery object
2114		return this.each(function() {
2115		
2116			if( settings.runOnLoad ) { settings.action(); }
2117			
2118			$(this).resize( function() {
2119				
2120				methods.timedAction.call( this );
2121				
2122			} );
2123		
2124		} );
2125	};
2126	
2127	methods.timedAction = function( code, millisec ) {
2128		
2129		var doAction = function() {
2130			var remaining = settings.duration;
2131			
2132			if( running ) {
2133				var elapse = new Date() - start;
2134				remaining = settings.duration - elapse;
2135				if( remaining <= 0 ) {
2136					// Clear timeout and reset running variable
2137					clearTimeout(running);
2138					running = false;
2139					// Perform user defined function
2140					settings.action();
2141				
2142					return;
2143				}
2144			}
2145			wait( remaining );
2146		};
2147		
2148		var wait = function( time ) {
2149			running = setTimeout( doAction, time );
2150		};
2151		
2152		// Define new action starting time
2153		start = new Date();
2154		
2155		// Define runtime settings if function is run directly
2156		if( typeof millisec === 'number' ) { settings.duration = millisec; }
2157		if( typeof code === 'function' ) { settings.action = code; }
2158		
2159		// Only run timed loop if not already running
2160		if( !running ) { doAction(); }
2161		
2162	};
2163
2164	
2165	$.fn.afterResize = function( method ) {
2166		
2167		if( methods[method] ) {
2168			return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ) );
2169		} else {
2170			return methods.init.apply( this, arguments );
2171		}
2172		
2173	};
2174	
2175})(jQuery);
2176
2177
2178/*
2179Plugin Name: 	Animated Headlines
2180Written by: 	Codyhouse - (https://codyhouse.co/demo/animated-headlines/index.html)
2181*/
2182jQuery(document).ready(function($) {
2183	//set animation timing
2184	var animationDelay = 2500,
2185		//loading bar effect
2186		barAnimationDelay = 3800,
2187		barWaiting = barAnimationDelay - 3000, //3000 is the duration of the transition on the loading bar - set in the scss/css file
2188		//letters effect
2189		lettersDelay = 50,
2190		//type effect
2191		typeLettersDelay = 150,
2192		selectionDuration = 500,
2193		typeAnimationDelay = selectionDuration + 800,
2194		//clip effect 
2195		revealDuration = 600,
2196		revealAnimationDelay = 1500;
2197
2198	initHeadline();
2199
2200	function initHeadline() {
2201		//initialise headline animation
2202		animateHeadline('.word-rotator', '.word-rotator.letters');
2203	}
2204
2205	function animateHeadline($selector) {
2206		var duration = animationDelay;
2207
2208		theme.fn.intObs($selector, function(){
2209			
2210			// Single Letters - Insert <i> element for each letter of a changing word
2211			if( $(this).hasClass('letters') ) {
2212				$(this).find('b').each(function() {
2213					var word = $(this),
2214						letters = word.text().split(''),
2215						selected = word.hasClass('is-visible');
2216					for (i in letters) {
2217						if (word.parents('.rotate-2').length > 0) letters[i] = '<em>' + letters[i] + '</em>';
2218						letters[i] = (selected) ? '<i class="in">' + letters[i] + '</i>' : '<i>' + letters[i] + '</i>';
2219					}
2220					var newLetters = letters.join('');
2221					word.html(newLetters).css('opacity', 1);
2222				});				
2223			}
2224
2225			// Animate the Headline
2226			var headline = $(this);
2227
2228			if (headline.hasClass('loading-bar')) {
2229				duration = barAnimationDelay;
2230				setTimeout(function() {
2231					headline.find('.word-rotator-words').addClass('is-loading')
2232				}, barWaiting);
2233			} else if (headline.hasClass('clip')) {
2234				var spanWrapper = headline.find('.word-rotator-words'),
2235					newWidth = spanWrapper.outerWidth() + 10
2236				spanWrapper.css('width', newWidth);
2237			} else if (!headline.hasClass('type')) {
2238				//assign to .word-rotator-words the width of its longest word
2239				var words = headline.find('.word-rotator-words b'),
2240					width = 0;
2241				words.each(function() {
2242					var wordWidth = $(this).outerWidth();
2243					if (wordWidth > width) width = wordWidth;
2244				});
2245				headline.find('.word-rotator-words').css('width', width);
2246			};
2247
2248			// Trigger animation
2249			setTimeout(function() {
2250				hideWord(headline.find('.is-visible').eq(0))
2251			}, duration);
2252		}, {});
2253	}
2254
2255	function hideWord($word) {
2256		var nextWord = takeNext($word);
2257
2258		if ($word.parents('.word-rotator').hasClass('type')) {
2259			var parentSpan = $word.parent('.word-rotator-words');
2260			parentSpan.addClass('selected').removeClass('waiting');
2261			setTimeout(function() {
2262				parentSpan.removeClass('selected');
2263				$word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out');
2264			}, selectionDuration);
2265			setTimeout(function() {
2266				showWord(nextWord, typeLettersDelay)
2267			}, typeAnimationDelay);
2268
2269		} else if ($word.parents('.word-rotator').hasClass('letters')) {
2270			var bool = ($word.children('i').length >= nextWord.children('i').length) ? true : false;
2271			hideLetter($word.find('i').eq(0), $word, bool, lettersDelay);
2272			showLetter(nextWord.find('i').eq(0), nextWord, bool, lettersDelay);
2273
2274		} else if ($word.parents('.word-rotator').hasClass('clip')) {
2275			$word.parents('.word-rotator-words').stop( true, true ).animate({
2276				width: '2px'
2277			}, revealDuration, function() {
2278				switchWord($word, nextWord);
2279				showWord(nextWord);
2280			});
2281
2282		} else if ($word.parents('.word-rotator').hasClass('loading-bar')) {
2283			$word.parents('.word-rotator-words').removeClass('is-loading');
2284			switchWord($word, nextWord);
2285			setTimeout(function() {
2286				hideWord(nextWord)
2287			}, barAnimationDelay);
2288			setTimeout(function() {
2289				$word.parents('.word-rotator-words').addClass('is-loading')
2290			}, barWaiting);
2291
2292		} else {
2293			switchWord($word, nextWord);
2294			setTimeout(function() {
2295				hideWord(nextWord)
2296			}, animationDelay);
2297		}
2298	}
2299
2300	function showWord($word, $duration) {
2301		if ($word.parents('.word-rotator').hasClass('type')) {
2302			showLetter($word.find('i').eq(0), $word, false, $duration);
2303			$word.addClass('is-visible').removeClass('is-hidden');
2304		} else if ($word.parents('.word-rotator').hasClass('clip')) {
2305			if (document.hasFocus()) {
2306				$word.parents('.word-rotator-words').stop( true, true ).animate({
2307					'width': $word.outerWidth() + 10
2308				}, revealDuration, function() {
2309					setTimeout(function() {
2310						hideWord($word)
2311					}, revealAnimationDelay);
2312				});
2313			} else {
2314				$word.parents('.word-rotator-words').stop( true, true ).animate({
2315					width: $word.outerWidth() + 10
2316				});
2317				setTimeout(function() {
2318					hideWord($word)
2319				}, revealAnimationDelay);
2320			}
2321		}
2322	}
2323
2324	function hideLetter($letter, $word, $bool, $duration) {
2325		$letter.removeClass('in').addClass('out');
2326
2327		if (!$letter.is(':last-child')) {
2328			setTimeout(function() {
2329				hideLetter($letter.next(), $word, $bool, $duration);
2330			}, $duration);
2331		} else if ($bool) {
2332			setTimeout(function() {
2333				hideWord(takeNext($word))
2334			}, animationDelay);
2335		}
2336
2337		if ($letter.is(':last-child') && $('html').hasClass('no-csstransitions')) {
2338			var nextWord = takeNext($word);
2339			switchWord($word, nextWord);
2340		}
2341	}
2342
2343	function showLetter($letter, $word, $bool, $duration) {
2344		$letter.addClass('in').removeClass('out');
2345
2346		if (!$letter.is(':last-child')) {
2347			setTimeout(function() {
2348				showLetter($letter.next(), $word, $bool, $duration);
2349			}, $duration);
2350		} else {
2351			if ($word.parents('.word-rotator').hasClass('type')) {
2352				setTimeout(function() {
2353					$word.parents('.word-rotator-words').addClass('waiting');
2354				}, 200);
2355			}
2356			if (!$bool) {
2357				setTimeout(function() {
2358					hideWord($word)
2359				}, animationDelay)
2360			}
2361
2362			if (!$word.closest('.word-rotator').hasClass('type')) {
2363				$word.closest('.word-rotator-words').stop( true, true ).animate({
2364					width: $word.outerWidth()
2365				});
2366			}
2367		}
2368	}
2369
2370	function takeNext($word) {
2371		return (!$word.is(':last-child')) ? $word.next() : $word.parent().children().eq(0);
2372	}
2373
2374	function takePrev($word) {
2375		return (!$word.is(':first-child')) ? $word.prev() : $word.parent().children().last(
2375);
2376	}
2377
2378	function switchWord($oldWord, $newWord) {
2379		$oldWord.removeClass('is-visible').addClass('is-hidden');
2380		$newWord.removeClass('is-hidden').addClass('is-visible');
2381
2382		if (!$newWord.closest('.word-rotator').hasClass('clip')) {
2383			var space = 0,
2384				delay = ($newWord.outerWidth() > $oldWord.outerWidth()) ? 0 : 600;
2385
2386			if ($newWord.closest('.word-rotator').hasClass('loading-bar') || $newWord.closest('.word-rotator').hasClass('slide')) {
2387				space = 3;
2388				delay = 0;
2389			}
2390
2391			setTimeout(function() {
2392				$newWord.closest('.word-rotator-words').stop( true, true ).animate({
2393					width: $newWord.outerWidth() + space
2394				});
2395			}, delay);
2396		}
2397	}
2398});
2399
2400/*
2401jQuery Hover3d
2402=================================================
2403Version: 1.1.0
2404Author: Rian Ariona
2405Website: http://ariona.net
2406Docs: http://ariona.github.io/hover3d
2407Repo: http://github.com/ariona/hover3d
2408Issues: http://github.com/ariona/hover3d/issues
2409*/
2410
2411(function($){
2412	
2413	$.fn.hover3d = function(options){
2414		
2415		var settings = $.extend({
2416			selector      : null,
2417			perspective   : 1000,
2418			sensitivity   : 20,
2419			invert        : false,
2420			shine         : false,
2421			hoverInClass  : "hover-in",
2422			hoverOutClass : "hover-out",
2423			hoverClass    : "hover-3d"
2424		}, options);
2425		
2426		return this.each(function(){
2427			
2428			var $this = $(this),
2429				$card = $this.find(settings.selector);
2430				currentX = 0;
2431				currentY = 0;
2432
2433
2434			if( settings.shine ){
2435				$card.append('<div class="shine"></div>');
2436			}
2437			var $shine = $(this).find(".shine");
2438
2439			// Set perspective and transformStyle value
2440			// for element and 3d object
2441			$this.css({
2442				perspective: settings.perspective+"px",
2443				transformStyle: "preserve-3d"
2444			});
2445			
2446			$card.css({
2447				perspective: settings.perspective+"px",
2448				transformStyle: "preserve-3d",
2449			});
2450
2451			$shine.css({
2452				position  : "absolute",
2453				top       : 0,
2454				left      : 0,
2455				bottom    : 0,
2456				right     : 0,
2457				transform : 'translateZ(1px)',
2458				"z-index" : 9
2459			});
2460			
2461			// Mouse Enter function, this will add hover-in
2462			// Class so when mouse over it will add transition
2463			// based on hover-in class
2464			function enter(event){
2465				$card.addClass(settings.hoverInClass+" "+settings.hoverClass);
2466				currentX = currentY = 0;
2467				setTimeout(function(){
2468					$card.removeClass(settings.hoverInClass);
2469				}, 1000);
2470			}
2471			
2472			// Mouse movement Parallax effect
2473			function move(event){
2474				
2475				var w      = $card.innerWidth(),
2476					h      = $card.innerHeight(),
2477					currentX = Math.round(event.pageX - $card.offset().left),
2478					currentY = Math.round(event.pageY - $card.offset().top),
2479					ax 	   = settings.invert ?  ( w / 2 - currentX)/settings.sensitivity : -( w / 2 - currentX)/settings.sensitivity,
2480					ay     = settings.invert ? -( h / 2 - currentY)/settings.sensitivity :  ( h / 2 - currentY)/settings.sensitivity,
2481					dx     = currentX - w / 2,
2482					dy     = currentY - h / 2,
2483					theta  = Math.atan2(dy, dx),
2484					angle  = theta * 180 / Math.PI - 90;
2485
2486					
2487				if (angle < 0) {
2488					angle  = angle + 360;
2489				}
2490				
2491
2492				$card.css({
2493					perspective    : settings.perspective+"px",
2494					transformStyle : "preserve-3d",
2495					transform      : "rotateY("+ax+"deg) rotateX("+ay+"deg)"
2496				});
2497
2498				$shine.css('background', 'linear-gradient(' + angle + 'deg, rgba(255,255,255,' + event.offsetY / h * .5 + ') 0%,rgba(255,255,255,0) 80%)');
2499			}
2500			
2501			// Mouse leave function, will set the transform
2502			// property to 0, and add transition class
2503			// for exit animation
2504			function leave(){
2505				$card.addClass(settings.hoverOutClass+" "+settings.hoverClass);
2506				$card.css({
2507					perspective    : settings.perspective+"px",
2508					transformStyle : "preserve-3d",
2509					transform      : "rotateX(0) rotateY(0)"
2510				});
2511				setTimeout( function(){
2512					$card.removeClass(settings.hoverOutClass+" "+settings.hoverClass);
2513					currentX = currentY = 0;
2514				}, 1000 );
2515			}
2516			
2517			// Mouseenter event binding
2518			$this.on( "mouseenter", function(){
2519				return enter();
2520			});
2521			
2522			// Mousemove event binding
2523			$this.on( "mousemove", function(event){
2524				return move(event);
2525			});
2526			
2527			// Mouseleave event binding
2528			$this.on( "mouseleave", function(){
2529				return leave();
2530			});
2531			
2532		});
2533		
2534	};
2535	
2536}(jQuery));
2537
2538
2539/**
2540 * jquery.hoverdir.js v1.1.0
2541 * http://www.codrops.com
2542 *
2543 * Licensed under the MIT license.
2544 * http://www.opensource.org/licenses/mit-license.php
2545 * 
2546 * Copyright 2012, Codrops
2547 * http://www.codrops.com
2548 */
2549;( function( $, window, undefined ) {
2550	
2551	'use strict';
2552
2553	$.HoverDir = function( options, element ) {
2554		
2555		this.$el = $( element );
2556		this._init( options );
2557
2558	};
2559
2560	// the options
2561	$.HoverDir.defaults = {
2562		speed : 300,
2563		easing : 'ease',
2564		hoverDelay : 0,
2565		inverse : false,
2566		hoverElem: '.thumb-info-wrapper-overlay'
2567	};
2568
2569	$.HoverDir.prototype = {
2570
2571		_init : function( options ) {
2572			
2573			// options
2574			this.options = $.extend( true, {}, $.HoverDir.defaults, options );
2575			// transition properties
2576			this.transitionProp = 'all ' + this.options.speed + 'ms ' + this.options.easing;
2577			// support for CSS transitions
2578			this.support = Modernizr.csstransitions;
2579			// load the events
2580			this._loadEvents();
2581
2582		},
2583		_loadEvents : function() {
2584
2585			var self = this;
2586			
2587			this.$el.on( 'mouseenter.hoverdir, mouseleave.hoverdir', function( event ) {
2588				
2589				var $el = $( this ),
2590					$hoverElem = $el.find( self.options.hoverElem ),
2591					direction = self._getDir( $el, { x : event.pageX, y : event.pageY } ),
2592					styleCSS = self._getStyle( direction );
2593				
2594				if( event.type === 'mouseenter' ) {
2595					
2596					$hoverElem.hide().css( styleCSS.from );
2597					clearTimeout( self.tmhover );
2598
2599					self.tmhover = setTimeout( function() {
2600						
2601						$hoverElem.show( 0, function() {
2602							
2603							var $el = $( this );
2604							if( self.support ) {
2605								$el.css( 'transition', self.transitionProp );
2606							}
2607							self._applyAnimation( $el, styleCSS.to, self.options.speed );
2608
2609						} );
2610						
2611					
2612					}, self.options.hoverDelay );
2613					
2614				}
2615				else {
2616				
2617					if( self.support ) {
2618						$hoverElem.css( 'transition', self.transitionProp );
2619					}
2620					clearTimeout( self.tmhover );
2621					self._applyAnimation( $hoverElem, styleCSS.from, self.options.speed );
2622					
2623				}
2624					
2625			} );
2626
2627		},
2628		// credits : http://stackoverflow.com/a/3647634
2629		_getDir : function( $el, coordinates ) {
2630			
2631			// the width and height of the current div
2632			var w = $el.width(),
2633				h = $el.height(),
2634
2635				// calculate the x and y to get an angle to the center of the div from that x and y.
2636				// gets the x value relative to the center of the DIV and "normalize" it
2637				x = ( coordinates.x - $el.offset().left - ( w/2 )) * ( w > h ? ( h/w ) : 1 ),
2638				y = ( coordinates.y - $el.offset().top  - ( h/2 )) * ( h > w ? ( w/h ) : 1 ),
2639			
2640				// the angle and the direction from where the mouse came in/went out clockwise (TRBL=0123);
2641				// first calculate the angle of the point,
2642				// add 180 deg to get rid of the negative values
2643				// divide by 90 to get the quadrant
2644				// add 3 and do a modulo by 4  to shift the quadrants to a proper clockwise TRBL (top/right/bottom/left) **/
2645				direction = Math.round( ( ( ( Math.atan2(y, x) * (180 / Math.PI) ) + 180 ) / 90 ) + 3 ) % 4;
2646			
2647			return direction;
2648			
2649		},
2650		_getStyle : function( direction ) {
2651			
2652			var fromStyle, toStyle,
2653				slideFromTop = { left : '0px', top : '-100%' },
2654				slideFromBottom = { left : '0px', top : '100%' },
2655				slideFromLeft = { left : '-100%', top : '0px' },
2656				slideFromRight = { left : '100%', top : '0px' },
2657				slideTop = { top : '0px' },
2658				slideLeft = { left : '0px' };
2659			
2660			switch( direction ) {
2661				case 0:
2662					// from top
2663					fromStyle = !this.options.inverse ? slideFromTop : slideFromBottom;
2664					toStyle = slideTop;
2665					break;
2666				case 1:
2667					// from right
2668					fromStyle = !this.options.inverse ? slideFromRight : slideFromLeft;
2669					toStyle = slideLeft;
2670					break;
2671				case 2:
2672					// from bottom
2673					fromStyle = !this.options.inverse ? slideFromBottom : slideFromTop;
2674					toStyle = slideTop;
2675					break;
2676				case 3:
2677					// from left
2678					fromStyle = !this.options.inverse ? slideFromLeft : slideFromRight;
2679					toStyle = slideLeft;
2680					break;
2681			};
2682			
2683			return { from : fromStyle, to : toStyle };
2684					
2685		},
2686		// apply a transition or fallback to jquery animate based on Modernizr.csstransitions support
2687		_applyAnimation : function( el, styleCSS, speed ) {
2688
2689			$.fn.applyStyle = this.support ? $.fn.css : $.fn.animate;
2690			el.stop().applyStyle( styleCSS, $.extend( true, [], { duration : speed + 'ms' } ) );
2691
2692		},
2693
2694	};
2695	
2696	var logError = function( message ) {
2697
2698		if ( window.console ) {
2699
2700			window.console.error( message );
2701		
2702		}
2703
2704	};
2705	
2706	$.fn.hoverdir = function( options ) {
2707
2708		var instance = $.data( this, 'hoverdir' );
2709		
2710		if ( typeof options === 'string' ) {
2711			
2712			var args = Array.prototype.slice.call( arguments, 1 );
2713			
2714			this.each(function() {
2715			
2716				if ( !instance ) {
2717
2718					logError( "cannot call methods on hoverdir prior to initialization; " +
2719					"attempted to call method '" + options + "'" );
2720					return;
2721				
2722				}
2723				
2724				if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
2725
2726					logError( "no such method '" + options + "' for hoverdir instance" );
2727					return;
2728				
2729				}
2730				
2731				instance[ options ].apply( instance, args );
2732			
2733			});
2734		
2735		} 
2736		else {
2737		
2738			this.each(function() {
2739				
2740				if ( instance ) {
2741
2742					instance._init();
2743				
2744				}
2745				else {
2746
2747					instance = $.data( this, 'hoverdir', new $.HoverDir( options, this ) );
2748				
2749				}
2750
2751			});
2752		
2753		}
2754		
2755		return instance;
2756		
2757	};
2758	
2759} )( jQuery, window );
2760
2761
2762/*!
2763 * GSAP 3.10.4
2764 * https://greensock.com
2765 * 
2766 * @license Copyright 2022, GreenSock. All rights reserved.
2767 * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership.
2768 * @author: Jack Doyle, [email protected]
2769 */
2770
2771!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){return"string"==typeof t}function p(t){return"function"==typeof t}function q(t){return"number"==typeof t}function r(t){return void 0===t}function s(t){return"object"==typeof t}function t(t){return!1!==t}function u(){return"undefined"!=typeof window}function v(t){return p(t)||o(t)}
vendor: 27,685 bytes, line 2771
2771function M(t){return(h=mt(t,ot))&&he}function N(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function O(t,e){return!e&&console.warn(t)}function P(t,e){return t&&(ot[t]=e)&&h&&(h[t]=e)||ot}function Q(){return 0}function $(t){var e,r,i=t[0];if(s(i)||p(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=pt.length;r--&&!pt[r].targetTest(i););e=pt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Lt(t[r],e)))||t.splice(r,1);return t}function _(t){return t._gsap||$(xt(t))[0]._gsap}function aa(t,e,i){return(i=t[e])&&p(i)?t[e]():r(i)&&t.getAttribute&&t.getAttribute(e)||i}function ba(t,e){return(t=t.split(",")).forEach(e)||t}function ca(t){return Math.round(1e5*t)/1e5||0}function da(t){return Math.round(1e7*t)/1e7||0}function ea(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function fa(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function ga(){var t,e,r=ht.length,i=ht.slice(0);for(lt={},t=ht.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function ha(t,e,r,i){ht.length&&ga(),t.render(e,r,i),ht.length&&ga()}function ia(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(at).length<2?e:o(t)?t.trim():t}function ja(t){return t}function ka(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function na(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=s(e[r])?na(t[r]||(t[r]={}),e[r]):e[r]);return t}function oa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function pa(e){var r=e.parent||I,i=e.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(J(e.keyframes)):ka;if(t(e.inherit))for(;r;)i(e,r.vars.defaults),r=r.parent||r._dp;return e}function ra(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function sa(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function ta(t,e){!t.parent||e&&!t.parent.autoRemoveChildren||t.parent.remove(t),t._act=0}function ua(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function xa(t){return t._repeat?gt(t._tTime,t=t.duration()+t._rDelay)*t:0}function za(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Aa(t){return t._end=da(t._start+(t._tDur/Math.abs(t._ts||t._rts||V)||0))}function Ba(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=da(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Aa(t),r._dirty||ua(r,t)),t}function Ca(t,e){var r;if((e._time||e._initted&&!e._dur)&&(r=za(t.rawTime(),e),(!e._dur||bt(0,e.totalDuration(),r)-e._tTime>V)&&e.render(r,!0)),ua(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-V}}function Da(t,e,r,i){return e.parent&&ta(e),e._start=da((q(r)?r:r||t!==I?Tt(t,r,e):t._time)+e._delay),e._end=da(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),ra(t,e,"_first","_last",t._sort?"_start":0),vt(e)||(t._recent=e),i||Ca(t,e),t}function Ea(t,e){return(ot.ScrollTrigger||N("scrollTrigger",e))&&ot.ScrollTrigger.create(e,t)}function Fa(t,e,r,i){return Xt(t,e),t._initted?!r&&t._pt&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==Dt.frame?(ht.push(t),t._lazy=[e,i],1):void 0:1}function Ka(t,e,r,i){var n=t._repeat,a=da(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:da(a*(n+1)+t._rDelay*n):a,0<s&&!i?Ba(t,t._tTime=t._tDur*s):t.parent&&Aa(t),r||ua(t.parent,t),t}function La(t){return t instanceof Ut?ua(t):Ka(t,t._dur)}function Oa(e,r,i){var n,a,s=q(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=t(a.vars.inherit)&&a.parent;u.immediateRender=t(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new $t(r[0],u,r[1+o])}function Pa(t,e){return t||0===t?e(t):e}function Ra(t,e){return o(t)&&(e=st.exec(t))?e[1]:""}function Ua(t,e){return t&&s(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&s(t[0]))&&!t.nodeType&&t!==i}function Ya(t){return t.sort(function(){return.5-Math.random()})}function Za(t){if(p(t))return t;var c=s(t)?t:{each:t},m=Bt(c.ease),g=c.from||0,v=parseFloat(c.base)||0,y={},e=0<g&&g<1,T=isNaN(g)||e,b=c.axis,w=g,x=g;return o(g)?w=x={center:.5,edges:.5,end:1}[g]||0:!e&&T&&(w=g[0],x=g[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,d=(r||c).length,_=y[d];if(!_){if(!(f="auto"===c.grid?0:(c.grid||[1,Y])[1])){for(h=-Y;h<(h=r[f++].getBoundingClientRect().left)&&f<d;);f--}for(_=y[d]=[],i=T?Math.min(f,d)*w-.5:g%f,n=f===Y?0:T?d*x/f-.5:g/f|0,l=Y,u=h=0;u<d;u++)a=u%f-i,s=n-(u/f|0),_[u]=o=b?Math.abs("y"===b?s:a):G(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===g&&Ya(_),_.max=h-l,_.min=l,_.v=d=(parseFloat(c.amount)||parseFloat(c.each)*(d<f?d-1:b?"y"===b?d/f:f:Math.max(f,d/f))||0)*("edges"===g?-1:1),_.b=d<0?v-d:v,_.u=Ra(c.amount||c.each)||0,m=m&&d<0?Ft(m):m}return d=(_[t]-_.min)/_.max||0,da(_.b+(m?m(d):d)*_.v)+_.u}}function $a(r){var i=Math.pow(10,((r+"").split(".")[1]||"").length);return function(t){var e=Math.round(parseFloat(t)/r)*r*i;return(e-e%1)/i+(q(t)?0:Ra(t))}}function _a(u,t){var h,l,e=J(u);return!e&&s(u)&&(h=e=u.radius||Y,u.values?(u=xt(u.values),(l=!q(u[0]))&&(h*=h)):u=$a(u.increment)),Pa(t,e?p(u)?function(t){return l=u(t),Math.abs(l-t)<=h?l:t}:function(t){for(var e,r,i=parseFloat(l?t.x:t),n=parseFloat(l?t.y:0),a=Y,s=0,o=u.length;o--;)(e=l?(e=u[o].x-i)*e+(r=u[o].y-n)*r:Math.abs(u[o]-i))<a&&(a=e,s=o);return s=!h||a<=h?u[s]:t,l||s===t||q(t)?s:s+Ra(t)}:$a(u))}function ab(t,e,r,i){return Pa(J(t)?!e:!0===r?!!(r=0):!i,function(){return J(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function eb(e,r,t){return Pa(t,function(t){return e[~~r(t)]})}function hb(t){for(var e,r,i,n,a=0,s="";~(e=t.indexOf("random(",a));)i=t.indexOf(")",e),n="["===t.charAt(e+7),r=t.substr(e+7,i-e-7).match(n?at:tt),s+=t.substr(a,e-a)+ab(n?r:+r[0],n?0:+r[1],+r[2]||1e-5),a=i+1;return s+t.substr(a,t.length-a)}function kb(t,e,r){var i,n,a,s=t.labels,o=Y;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function mb(t){return ta(t),t.scrollTrigger&&t.scrollTrigger.kill(!1),t.progress()<1&&Ot(t,"onInterrupt"),t}function rb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*Pt+.5|0}function sb(t,e,r){var i,n,a,s,o,u,h,l,f,d,_=t?q(t)?[t>>16,t>>8&Pt,t&Pt]:0:Mt.black;if(!_){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Mt[t])_=Mt[t];else if("#"===t.charAt(0)){if(t.length<6&&(t="#"+(i=t.charAt(1))+i+(n=t.charAt(2))+n+(a=t.charAt(3))+a+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(_=parseInt(t.substr(1,6),16))>>16,_>>8&Pt,_&Pt,parseInt(t.substr(7),16)/255];_=[(t=parseInt(t.substr(1),16))>>16,t>>8&Pt,t&Pt]}else if("hsl"===t.substr(0,3))if(_=d=t.match(tt),e){if(~t.indexOf("="))return _=t.match(et),r&&_.length<4&&(_[3]=1),_}else s=+_[0]%360/360,o=_[1]/100,i=2*(u=_[2]/100)-(n=u<=.5?u*(o+1):u+o-u*o),3<_.length&&(_[3]*=1),_[0]=rb(s+1/3,i,n),_[1]=rb(s,i,n),_[2]=rb(s-1/3,i,n);else _=t.match(tt)||Mt.transparent;_=_.map(Number)}return e&&!d&&(i=_[0]/Pt,n=_[1]/Pt,a=_[2]/Pt,u=((h=Math.max(i,n,a))+(l=Math.min(i,n,a)))/2,h===l?s=o=0:(f=h-l,o=.5<u?f/(2-h-l):f/(h+l),s=h===i?(n-a)/f+(n<a?6:0):h===n?(a-i)/f+2:(i-n)/f+4,s*=60),_[0]=~~(s+.5),_[1]=~~(100*o+.5),_[2]=~~(100*u+.5)),r&&_.length<4&&(_[3]=1),_}function tb(t){var r=[],i=[],n=-1;return t.split(Ct).forEach(function(t){var e=t.match(rt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function ub(t,e,r){var i,n,a,s,o="",u=(t+o).match(Ct),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=sb(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=tb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Ct,"1").split(rt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Ct)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function xb(t){var e,r=t.join(" ");if(Ct.lastIndex=0,Ct.test(r))return e=At.test(r),t[1]=ub(t[1],e),t[0]=ub(t[0],e,tb(t[1])),!0}function Gb(t){var e=(t+"").split("("),r=zt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Et,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ia)):zt._CE&&Rt.test(t)?zt._CE("",t):r}function Ib(t,e){for(var r,i=t._first;i;)i instanceof Ut?Ib(i,e):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===e||(i.timeline?Ib(i.timeline,e):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=e)),i=i._next}function Kb(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ba(t,function(t){for(var e in zt[t]=ot[t]=a,zt[n=t.toLowerCase()]=r,a)zt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=zt[t+"."+e]=a[e]}),a}function Lb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Mb(r,t,e){function em(t){return 1===t?1:i*Math.pow(2,-10*t)*Z((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/X*(Math.asin(1/i)||0),s="out"===r?em:"in"===r?function(t){return 1-em(1-t)}:Lb(em);return n=X/n,s.config=function(t,e){return Mb(r,t,e)},s}function Nb(e,r){function mm(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?mm:"in"===e?function(t){return 1-mm(1-t)}:Lb(mm);return t.config=function(t){return Nb(e,t)},t}var B,I,i,n,a,h,l,f,d,c,m,g,y,T,b,w,x,k,C,A,D,S,z,R,E,F,U={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},L={duration:.5,overwrite:!1,delay:0},Y=1e8,V=1/Y,X=2*Math.PI,j=X/4,K=0,G=Math.sqrt,W=Math.cos,Z=Math.sin,H="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},J=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,rt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,it=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,nt=/[+-]=-?[.\d]+/,at=/[^,'"\[\]\s]+/gi,st=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ot={},ut={},ht=[],lt={},ft={},dt={},_t=30,pt=[],ct="",mt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},gt=function _animationCycle(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},vt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},yt={_start:0,endTime:Q,totalDuration:Q},Tt=function _parsePosition(t,e,r){var i,n,a,s=t.labels,u=t._recent||yt,h=t.duration()>=Y?u.endTime(!1):t._dur;return o(e)&&(isNaN(e)||e in s)?(n=e.charAt(0),a="%"===e.substr(-1),i=e.indexOf("="),"<"===n||">"===n?(0<=i&&(e=e.replace(/=/,"")),("<"===n?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(a?(i<0?u:r).totalDuration()/100:1)):i<0?(e in s||(s[e]=h),s[e]):(n=parseFloat(e.charAt(i-1)+e.substr(i+1)),a&&r&&(n=n/100*(J(r)?r[0]:r).totalDuration()),1<i?_parsePosition(t,e.substr(0,i-1),r)+n:h+n)):null==e?h:+e},bt=function _clamp(t,e,r){return r<t?t:e<r?e:r},wt=[].slice,xt=function toArray(t,e,r){return!o(t)||r||!n&&St()?J(t)?function _flatten(t,e,r){return void 0===r&&(r=[]),t.forEach(function(t){return o(t)&&!e||Ua(t,1)?r.push.apply(r,xt(t)):r.push(t)})||r}(t,r):Ua(t)?wt.call(t,0):t?[t]:[]:wt.call((e||a).querySelectorAll(t),0)},kt=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Pa(n,function(t){return r+((t-e)/a*s||0)})},Ot=function _callback(t,e,r){var i,n,a=t.vars,s=a[e];if(s)return i=a[e+"Params"],n=a.callbackScope||t,r&&ht.length&&ga(),i?s.apply(n,i):s.call(n)},Pt=255,Mt={aqua:[0,Pt,Pt],lime:[0,Pt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Pt],navy:[0,0,128],white:[Pt,Pt,Pt],olive:[128,128,0],yellow:[Pt,Pt,0],orange:[Pt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Pt,0,0],pink:[Pt,192,203],cyan:[0,Pt,Pt],transparent:[Pt,Pt,Pt,0]},Ct=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Mt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),At=/hsl[a]?\(/,Dt=(x=Date.now,k=500,C=33,A=x(),D=A,z=S=1e3/240,T={time:0,frame:0,tick:function tick(){Vk(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){l&&(!n&&u()&&(i=n=window,a=i.document||{},ot.gsap=he,(i.gsapVersions||(i.gsapVersions=[])).push(he.version),M(h||i.GreenSockGlobals||!i.gsap&&i||{}),y=i.requestAnimationFrame),m&&T.sleep(),g=y||function(t){return setTimeout(t,z-1e3*T.time+1|0)},c=1,Vk(2))},sleep:function sleep(){(y?i.cancelAnimationFrame:clearTimeout)(m),c=0,g=Q},lagSmoothing:function lagSmoothing(t,e){k=t||1e8,C=Math.min(e,k,0)},fps:function fps(t){S=1e3/(t||240),z=1e3*T.time+S},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),T.remove(a)}:n;return T.remove(n),R[e?"unshift":"push"](a),St(),a},remove:function remove(t,e){~(e=R.indexOf(t))&&R.splice(e,1)&&e<=w&&w--},_listeners:R=[]}),St=function _wake(){return!c&&Dt.wake()},zt={},Rt=/^[\d.\-M][\d.\-,\s]/,Et=/["']/g,Ft=function _invertEase(e){return function(t){return 1-e(1-t)}},Bt=function _parseEase(t,e){return t&&(p(t)?t:zt[t]||Gb(t))||e};function Vk(t){var e,r,i,n,a=x()-D,s=!0===t;if(k<a&&(A+=a-C),(0<(e=(i=(D+=a)-A)-z)||s)&&(n=++T.frame,b=i-1e3*T.time,T.time=i/=1e3,z+=e+(S<=e?4:S-e),r=1),s||(m=g(Vk)),r)for(w=0;w<R.length;w++)R[w](i,b,n,t)}function Dm(t){return t<F?E*t*t:t<.7272727272727273?E*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?E*(t-=2.25/2.75)*t+.9375:E*Math.pow(t-2.625/2.75,2)+.984375}ba("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Kb(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),zt.Linear.easeNone=zt.none=zt.Linear.easeIn,Kb("Elastic",Mb("in"),Mb("out"),Mb()),E=7.5625,F=1/2.75,Kb("Bounce",function(t){return 1-Dm(1-t)},Dm),Kb("Expo",function(t){return t?Math.pow(2,10*(t-1)):0}),Kb("Circ",function(t){return-(G(1-t*t)-1)}),Kb("Sine",function(t){return 1===t?1:1-W(t*j)}),Kb("Back",Nb("in"),Nb("out"),Nb()),zt.SteppedEase=zt.steps=ot.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*bt(0,.99999999,t)|0)+n)*r}}},L.ease=zt["quad.out"],ba("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return ct+=t+","+t+"Params,"});var It,Lt=function GSCache(t,e){this.id=K++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:aa,this.set=e?e.getSetter:Ht},Nt=((It=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},It.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},It.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ka(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},It.totalTime=function totalTime(t,e){if(St(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Ba(this,t),!r._dp||r.parent||Ca(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Da(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===V||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),ha(this,t,e)),this},It.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+xa(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},It.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},It.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+xa(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},It.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?gt(this._tTime,r)+1:1},It.timeScale=function timeScale(t){if(!arguments.length)return this._rts===-V?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?za(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-V?0:this._rts,this.totalTime(bt(-this._delay,this._tDur,e),!0),Aa(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},It.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(St(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==V&&(this._tTime-=V)))),this):this._ps},It.startTime=function startTime(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Da(e,this,t-this._delay),this}return this._start},It.endTime=function endTime(e){return this._start+(t(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},It.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?za(e.rawTime(t),this):this._tTime:this._tTime},It.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(e._ts||1),e=e._dp;return r},It.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,La(this)):-2===this._repeat?1/0:this._repeat},It.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,La(this),e?this.time(e):this}return this._rDelay},It.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},It.seek=function seek(e,r){return this.totalTime(Tt(this,e),t(r))},It.restart=function restart(e,r){return this.play().totalTime(e?-this._delay:0,t(r))},It.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},It.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},It.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},It.resume=function resume(){return this.paused(!1)},It.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-V:0)),this):this._rts<0},It.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-V,this},It.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-V))},It.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},It.then=function then(t){var i=this;return new Promise(function(e){function Un(){var t=i.then;i.then=null,p(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=p(t)?t:ja;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Un():i._prom=Un})},It.kill=function kill(){mb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ka(this,+t.duration,1,1),this.data=t.data,c||Dt.wake()}ka(Nt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-V,_prom:0,_ps:!1,_rts:1});var Ut=function(n){function Timeline(e,r){var i;return void 0===e&&(e={}),(i=n.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=t(e.sortChildren),I&&Da(e.parent||I,_assertThisInitialized(i),r),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&Ea(_assertThisInitialized(i),e.scrollTrigger),i}_inheritsLoose(Timeline,n);var e=Timeline.prototype;return e.to=function to(t,e,r){return Oa(0,arguments,this),this},e.from=function from(t,e,r){return Oa(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Oa(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,pa(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new $t(t,e,Tt(this,r),1),this},e.call=function call(t,e,r){return Da(this,$t.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new $t(t,r,Tt(this,n)),this},e.staggerFrom=function staggerFrom(e,r,i,n,a,s,o){return i.runBackwards=1,pa(i).immediateRender=t(i.immediateRender),this.staggerTo(e,r,i,n,a,s,o)},e.staggerFromTo=function staggerFromTo(e,r,i,n,a,s,o,u){return n.startAt=i,pa(n).immediateRender=t(n.immediateRender),this.staggerTo(e,r,n,a,s,o,u)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,d,_,p,c=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:da(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==I&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(c!==this._time&&g&&(v+=this._time-c,t+=this._time-c),i=v,f=this._start,u=!(l=this._ts),y&&(g||(c=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(_=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=da(v%o),v===m?(s=this._repeat,i=g):((s=~~(v/o))&&s===v/o&&(i=g,s--),g<i&&(i=g)),d=gt(this._tTime,o),!c&&this._tTime&&d!==s&&(d=s),_&&1&s&&(i=g-i,p=1),s!==d&&!this._lock){var T=_&&1&d,b=T===(_&&1&s);if(s<d&&(T=!T),c=T?0:g,this._lock=1,this.render(c||(p?0:da(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&Ot(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),c&&c!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,c=T?g:-1e-4,this.render(c,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Ib(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,da(c),da(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,c=0),!c&&i&&!e&&(Ot(this,"onStart"),this._tTime!==v))return this;if(c<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-V);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-V:V);break}}n=a}}if(h&&!e&&(this.pause(),h.render(c<=i?0:-V)._zTime=c<=i?1:-1,this._ts))return this._start=f,Aa(this),this.render(t,e,r);this._onUpdate&&!e&&Ot(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&c)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||ta(this,1),e||t<0&&!c||!v&&!c&&m||(Ot(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(t,e){var r=this;if(q(e)||(e=Tt(this,e,t)),!(t instanceof Nt)){if(J(t))return t.forEach(function(t){return r.add(t,e)}),this;if(o(t))return this.addLabel(t,e);if(!p(t))return this;t=$t.delayedCall(0,t)}return this!==t?Da(this,t,e):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-Y);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof $t?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return o(t)?this.removeLabel(t):p(t)?this.killTweensOf(t):(sa(this,t),t===this._recent&&(this._recent=this._last),ua(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=da(Dt.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),n.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Tt(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=$t.delayedCall(0,e||Q,r);return i.data="isPause",this._hasPause=1,Da(this,i,Tt(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Tt(this,t);e;)e._start===t&&"isPause"===e.data&&ta(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Yt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(t,e){for(var r,i=[],n=xt(t),a=this._first,s=q(e);a;)a instanceof $t?fa(a._targets,n)&&(s?(!Yt||a._initted&&a._ts)&&a.globalTime(0)<=e&&a.globalTime(a.totalDuration())>e:!e||a.isActive())&&i.push(a):(r=a.getTweensOf(n,e)).length&&i.push.apply(i,r),a=a._next;return i},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Tt(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=$t.to(i,ka({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||V,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ka(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ka({startAt:{time:Tt(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),kb(this,Tt(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),kb(this,Tt(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+V)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,a=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return ua(this)}
2771,e.invalidate=function invalidate(){var t=this._first;for(this._lock=0;t;)t.invalidate(),t=t._next;return n.prototype.invalidate.call(this)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),ua(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=Y;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Da(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ka(a,a===I&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(I._ts&&(ha(I,za(t,I)),f=Dt.frame),Dt.frame>=_t){_t+=U.autoSleep||120;var e=I._first;if((!e||!e._ts)&&U.autoSleep&&Dt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Dt.sleep()}}},Timeline}(Nt);ka(Ut.prototype,{_lock:0,_hasPause:0,_forcing:0});function Ub(t,e,r,i,n,a){var u,h,l,f;if(ft[t]&&!1!==(u=new ft[t]).init(n,u.rawVars?e[t]:function _processVars(t,e,r,i,n){if(p(t)&&(t=Qt(t,n,e,r,i)),!s(t)||t.style&&t.nodeType||J(t)||H(t))return o(t)?Qt(t,n,e,r,i):t;var a,u={};for(a in t)u[a]=Qt(t[a],n,e,r,i);return u}(e[t],i,n,a,r),r,i,a)&&(r._pt=h=new oe(r._pt,n,t,0,1,u.render,u,0,u.priority),r!==d))for(l=r._ptLookup[r._targets.indexOf(n)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function $b(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(J(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Yt,qt,Vt=function _addPropTween(t,e,r,i,n,a,s,u,h){p(i)&&(i=i(n||0,t,a));var l,f=t[e],d="get"!==r?r:p(f)?h?t[e.indexOf("set")||!p(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():f,_=p(f)?h?Zt:Wt:Gt;if(o(i)&&(~i.indexOf("random(")&&(i=hb(i)),"="===i.charAt(1)&&(!(l=ea(d,i)+(Ra(d)||0))&&0!==l||(i=l))),d!==i||qt)return isNaN(d*i)||""===i?(f||e in t||N(e,i),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,d,_,p,c=new oe(this._pt,t,e,0,1,ee,null,n),m=0,g=0;for(c.b=r,c.e=i,r+="",(_=~(i+="").indexOf("random("))&&(i=hb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(it)||[];o=it.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(d=parseFloat(u[g-1])||0,c._pt={_next:c._pt,p:f||1===g?f:",",s:d,c:"="===l.charAt(1)?ea(d,l)-d:parseFloat(l)-d,m:h&&h<4?Math.round:0},m=it.lastIndex);return c.c=m<i.length?i.substring(m,i.length):"",c.fp=s,(nt.test(i)||_)&&(c.e=0),this._pt=c}.call(this,t,e,d,i,_,u||U.stringFilter,h)):(l=new oe(this._pt,t,e,+d||0,i-(d||0),"boolean"==typeof f?te:Jt,0,_),h&&(l.fp=h),s&&l.modifier(s,this,t),this._pt=l)},Xt=function _initTween(e,r){var i,n,a,s,o,u,h,l,f,d,p,c,m,g=e.vars,v=g.ease,y=g.startAt,T=g.immediateRender,b=g.lazy,w=g.onUpdate,x=g.onUpdateParams,k=g.callbackScope,O=g.runBackwards,P=g.yoyoEase,M=g.keyframes,C=g.autoRevert,A=e._dur,D=e._startAt,S=e._targets,z=e.parent,R=z&&"nested"===z.data?z.parent._targets:S,E="auto"===e._overwrite&&!B,F=e.timeline;if(!F||M&&v||(v="none"),e._ease=Bt(v,L.ease),e._yEase=P?Ft(Bt(!0===P?v:P,L.ease)):0,P&&e._yoyo&&!e._repeat&&(P=e._yEase,e._yEase=e._ease,e._ease=P),e._from=!F&&!!g.runBackwards,!F||M&&!g.stagger){if(c=(l=S[0]?_(S[0]).harness:0)&&g[l.prop],i=oa(g,ut),D&&(ta(D.render(-1,!0)),D._lazy=0),y)if(ta(e._startAt=$t.set(S,ka({data:"isStart",overwrite:!1,parent:z,immediateRender:!0,lazy:t(b),startAt:null,delay:0,onUpdate:w,onUpdateParams:x,callbackScope:k,stagger:0},y))),r<0&&!T&&!C&&e._startAt.render(-1,!0),T){if(0<r&&!C&&(e._startAt=0),A&&r<=0)return void(r&&(e._zTime=r))}else!1===C&&(e._startAt=0);else if(O&&A)if(D)C||(e._startAt=0);else if(r&&(T=!1),a=ka({overwrite:!1,data:"isFromStart",lazy:T&&t(b),immediateRender:T,stagger:0,parent:z},i),c&&(a[l.prop]=c),ta(e._startAt=$t.set(S,a)),r<0&&e._startAt.render(-1,!0),e._zTime=r,T){if(!r)return}else _initTween(e._startAt,V);for(e._pt=e._ptCache=0,b=A&&t(b)||b&&!A,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||$(S)[n]._gsap,e._ptLookup[n]=d={},lt[h.id]&&ht.length&&ga(),p=R===S?n:R.indexOf(o),l&&!1!==(f=new l).init(o,c||i,e,p,R)&&(e._pt=s=new oe(e._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){d[t]=s}
2771),f.priority&&(u=1)),!l||c)for(a in i)ft[a]&&(f=Ub(a,i,e,p,o,R))?f.priority&&(u=1):d[a]=s=Vt.call(e,o,a,"get",i[a],p,R,0,g.stringFilter);e._op&&e._op[n]&&e.kill(o,e._op[n]),E&&e._pt&&(Yt=e,I.killTweensOf(o,d,e.globalTime(r)),m=!e.parent,Yt=0),e._pt&&b&&(lt[h.id]=1)}u&&se(e),e._onInit&&e._onInit(e)}e._onUpdate=w,e._initted=(!e._op||e._pt)&&!m,M&&r<=0&&F.render(Y,!0,!0)},Qt=function _parseFuncOrString(t,e,r,i,n){return p(t)?t.call(e,r,i,n):o(t)&&~t.indexOf("random(")?hb(t):t},jt=ct+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Kt={};ba(jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var $t=function(R){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var o,u,h,l,f,d,_,p,c=(a=R.call(this,n?r:pa(r))||this).vars,m=c.duration,g=c.delay,y=c.immediateRender,T=c.stagger,b=c.overwrite,w=c.keyframes,x=c.defaults,k=c.scrollTrigger,P=c.yoyoEase,M=r.parent||I,C=(J(e)||H(e)?q(e[0]):"length"in r)?[e]:xt(e);if(a._targets=C.length?$(C):O("GSAP target "+e+" not found. https://greensock.com",!U.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=b,w||T||v(m)||v(g)){if(r=a.vars,(o=a.timeline=new Ut({data:"nested",defaults:x||{}})).kill(),o.parent=o._dp=_assertThisInitialized(a),o._start=0,T||v(m)||v(g)){if(l=C.length,_=T&&Za(T),s(T))for(f in T)~jt.indexOf(f)&&((p=p||{})[f]=T[f]);for(u=0;u<l;u++)(h=oa(r,Kt)).stagger=0,P&&(h.yoyoEase=P),p&&mt(h,p),d=C[u],h.duration=+Qt(m,_assertThisInitialized(a),u,d,C),h.delay=(+Qt(g,_assertThisInitialized(a),u,d,C)||0)-a._delay,!T&&1===l&&h.delay&&(a._delay=g=h.delay,a._start+=g,h.delay=0),o.to(d,h,_?_(u,d,C):0),o._ease=zt.none;o.duration()?m=g=0:a.timeline=0}else if(w){pa(ka(o.vars.defaults,{ease:"none"})),o._ease=Bt(w.ease||r.ease||"none");var A,D,S,z=0;if(J(w))w.forEach(function(t){return o.to(C,t,">")});else{for(f in h={},w)"ease"===f||"easeEach"===f||$b(f,w[f],h,w.easeEach);for(f in h)for(A=h[f].sort(function(t,e){return t.t-e.t}),u=z=0;u<A.length;u++)(S={ease:(D=A[u]).e,duration:(D.t-(u?A[u-1].t:0))/100*m})[f]=D.v,o.to(C,S,z),z+=S.duration;o.duration()<m&&o.to({},{duration:m-o.duration()})}}m||a.duration(m=o.duration())}else a.timeline=0;return!0!==b||B||(Yt=_assertThisInitialized(a),I.killTweensOf(C),Yt=0),Da(M,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(y||!m&&!w&&a._start===da(M._time)&&t(y)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==M.data)&&(a._tTime=-V,a.render(Math.max(0,-g))),k&&Ea(_assertThisInitialized(a),k),a}_inheritsLoose(Tween,R);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,d=this._time,_=this._tDur,p=this._dur,c=_-V<t&&0<=t?_:t<V?0:t;if(p){if(c!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=t<0){if(i=c,l=this.timeline,this._repeat){if(s=p+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*s+t,e,r);if(i=da(c%s),c===_?(a=this._repeat,i=p):((a=~~(c/s))&&a===c/s&&(i=p,a--),p<i&&(i=p)),(u=this._yoyo&&1&a)&&(f=this._yEase,i=p-i),o=gt(this._tTime,s),i===d&&!r&&this._initted)return this._tTime=c,this;a!==o&&(l&&this._yEase&&Ib(l,u),!this.vars.repeatRefresh||u||this._lock||(this._lock=r=1,this.render(da(s*a),!0).invalidate()._lock=0))}if(!this._initted){if(Fa(this,t<0?t:i,r,e))return this._tTime=0,this;if(d!==this._time)return this;if(p!==this._dur)return this.render(t,e,r)}if(this._tTime=c,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=h=(f||this._ease)(i/p),this._from&&(this.ratio=h=1-h),i&&!d&&!e&&(Ot(this,"onStart"),this._tTime!==c))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:!i&&u?-V:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(t<0&&this._startAt&&this._startAt.render(t,!0,r),Ot(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&Ot(this,"onRepeat"),c!==this._tDur&&c||this._tTime!==c||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,!0,!0),!t&&p||!(c===this._tDur&&0<this._ts||!c&&this._ts<0)||ta(this,1),e||t<0&&!d||!c&&!d||(Ot(this,c===_?"onComplete":"onReverseComplete",!0),!this._prom||c<_&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!vt(t))||(t._ts<0||t._dp._ts<0)&&!vt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=bt(0,t._tDur,e),a=gt(l,h),t._yoyo&&1&a&&(u=1-u),a!==gt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||i||t._zTime===V||!e&&t._zTime){if(!t._initted&&Fa(t,e,i,r))return;for(s=t._zTime,t._zTime=e||(r?V:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;t._startAt&&e<0&&t._startAt.render(e,!0,!0),t._onUpdate&&!r&&Ot(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&Ot(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&ta(t,1),r||(Ot(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets}
vendor: 10,483 bytes, line 2771
2771,e.invalidate=function invalidate(){return this._pt=this._op=this._startAt=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),R.prototype.invalidate.call(this)},e.resetTo=function resetTo(t,e,r,i){c||Dt.wake(),this._ts||this.play();var n,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Xt(this,a),n=this._ease(a/this._dur),function _updatePropTweens(t,e,r,i,n,a,s){var o,u,h,l=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!l)for(l=t._ptCache[e]=[],u=t._ptLookup,h=t._targets.length;h--;){if((o=u[h][e])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==e;)o=o._next;if(!o)return qt=1,t.vars[e]="+=0",Xt(t,s),qt=0,1;l.push(o)}for(h=l.length;h--;)(o=l[h]).s=!i&&0!==i||n?o.s+(i||0)+a*o.c:i,o.c=r-o.s,o.e&&(o.e=ca(r)+Ra(o.e)),o.b&&(o.b=o.s+Ra(o.b))}(this,t,e,r,i,n,a)?this.resetTo(t,e,r,i):(Ba(this,0),this.parent||ra(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?mb(this):this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Yt&&!0!==Yt.vars.overwrite)._first||mb(this),this.parent&&r!==this.timeline.totalDuration()&&Ka(this,this._dur*this.timeline._tDur/r,0,1),this}var i,n,a,s,u,h,l,f=this._targets,d=t?xt(t):f,p=this._ptLookup,c=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,d))return"all"===e&&(this._pt=0),mb(this);for(i=this._op=this._op||[],"all"!==e&&(o(e)&&(u={},ba(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?_(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=mt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~d.indexOf(f[l]))for(u in n=p[l],"all"===e?(i[l]=e,s=n,a={}):(a=i[l]=i[l]||{},s=e),s)(h=n&&n[u])&&("kill"in h.d&&!0!==h.d.kill(u)||sa(this,h,"_pt"),delete n[u]),"all"!==a&&(a[u]=1);return this._initted&&!this._pt&&c&&mb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Oa(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Oa(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return I.killTweensOf(t,e,r)},Tween}(Nt);ka($t.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ba("staggerTo,staggerFrom,staggerFromTo",function(r){$t[r]=function(){var t=new Ut,e=wt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function gc(t,e,r){return t.setAttribute(e,r)}function oc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var Gt=function _setterPlain(t,e,r){return t[e]=r},Wt=function _setterFunc(t,e,r){return t[e](r)},Zt=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},Ht=function _getSetter(t,e){return p(t[e])?Wt:r(t[e])&&t.setAttribute?gc:Gt},Jt=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},te=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ee=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},re=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ie=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},ne=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?sa(this,i,"_pt"):i.dep||(e=1),i=r;return!e},se=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},oe=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=oc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||Jt,this.d=s||this,this.set=o||Gt,this.pr=u||0,(this._next=t)&&(t._prev=this)}ba(ct+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return ut[t]=1}),ot.TweenMax=ot.TweenLite=$t,ot.TimelineLite=ot.TimelineMax=Ut,I=new Ut({sortChildren:!1,defaults:L,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),U.stringFilter=xb;var ue={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return function _createPlugin(t){var e=(t=!t.name&&t.default||t).name,r=p(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:Q,render:re,add:Vt,kill:ne,modifier:ie,rawVars:0},a={targetTest:0,get:0,getSetter:Ht,aliases:{},register:0};if(St(),t!==i){if(ft[e])return;ka(i,ka(oa(t,n),a)),mt(i.prototype,mt(n,oa(t,a))),ft[i.prop=e]=i,t.targetTest&&(pt.push(i),ut[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}P(e,i),t.register&&t.register(he,i,oe)}(t)})},timeline:function timeline(t){return new Ut(t)},getTweensOf:function getTweensOf(t,e){return I.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,r){o(i)&&(i=xt(i)[0]);var n=_(i||{}).get,a=e?ja:ia;return"native"===e&&(e=""),i?t?a((ft[t]&&ft[t].get||n)(i,t,e,r)):function(t,e,r){return a((ft[t]&&ft[t].get||n)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=xt(r)).length){var n=r.map(function(t){return he.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=ft[e],o=_(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;d._pt=0,e.init(r,i?t+i:t,d,0,[r]),e.render(1,e),d._pt&&re(1,d)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function iw(t,e,r){return n.resetTo(i,t,e,r)}var r,n=he.to(t,mt(((r={})[i]="+=0.1",r.paused=!0,r),e||{}));return iw.tween=n,iw},isTweening:function isTweening(t){return 0<I.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=Bt(t.ease,L.ease)),na(L,t||{})},config:function config(t){return na(U,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!ft[t]&&!ot[t]&&O(i+" effect requires "+t+" plugin.")}),dt[i]=function(t,e,r){return n(xt(t),ka(e||{},a),r)},r&&(Ut.prototype[i]=function(t,e,r){return this.add(dt[i](t,s(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){zt[t]=Bt(e)},parseEase:function parseEase(t,e){return arguments.length?Bt(t,e):zt},getById:function getById(t){return I.getById(t)},exportRoot:function exportRoot(e,r){void 0===e&&(e={});var i,n,a=new Ut(e);for(a.smoothChildTiming=t(e.smoothChildTiming),I.remove(a),a._dp=0,a._time=a._tTime=I._time,i=I._first;i;)n=i._next,!r&&!i._dur&&i instanceof $t&&i.vars.onComplete===i._targets[0]||Da(a,i,i._start-i._delay),i=n;return Da(I,a,0),a},utils:{wrap:function wrap(e,t,r){var i=t-e;return J(e)?eb(e,wrap(0,e.length),t):Pa(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return J(e)?eb(e,wrapYoyo(0,e.length-1),t):Pa(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:Za,random:ab,snap:_a,normalize:function normalize(t,e,r){return kt(t,e,0,1,r)},getUnit:Ra,clamp:function clamp(e,r,t){return Pa(t,function(t){return bt(e,r,t)})},splitColor:sb,toArray:xt,selector:function selector(r){return r=xt(r)[0]||O("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return xt(t,e.querySelectorAll?e:e===r?O("Invalid scope")||a.createElement("div"):r)}},mapRange:kt,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||Ra(t))}},interpolate:function interpolate(e,r,t,i){var n=isNaN(e+r)?0:function(t){return(1-t)*e+t*r};if(!n){var a,s,u,h,l,f=o(e),d={};if(!0===t&&(i=1)&&(t=null),f)e={p:e},r={p:r};else if(J(e)&&!J(r)){for(u=[],h=e.length,l=h-2,s=1;s<h;s++)u.push(interpolate(e[s-1],e[s]));h--,n=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=r}else i||(e=mt(J(e)?[]:{},e));if(!u){for(a in r)Vt.call(d,e,a,"get",r[a]);n=function func(t){return re(t,d)||(f?e.p:e)}}}return Pa(t,n)},shuffle:Ya},install:M,effects:dt,ticker:Dt,updateRoot:Ut.updateRoot,plugins:ft,globalTimeline:I,core:{PropTween:oe,globals:P,Tween:$t,Timeline:Ut,Animation:Nt,getCache:_,_removeLinkedListItem:sa,suppressOverwrites:function suppressOverwrites(t){return B=t}}};ba("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return ue[t]=$t[t]}),Dt.add(Ut.updateRoot),d=ue.to({},{duration:0});function sc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function uc(t,n){return{name:t,rawVars:1,init:function init(t,i,e){e._onInit=function(t){var e,r;if(o(i)&&(e={},ba(i,function(t){return e[t]=1}),i=e),n){for(r in e={},i)e[r]=n(i[r]);i=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=sc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,i)}}}}var he=ue.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s;for(a in e)(s=this.add(t,"setAttribute",(t.getAttribute(a)||0)+"",e[a],i,n,0,0,a))&&(s.op=a),this._props.push(a)}},{name:"endArray",init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r])}},uc("roundProps",$a),uc("modifiers"),uc("snap",_a))||ue;$t.version=Ut.version=he.version="3.10.4",l=1,u()&&St();function dd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function ed(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function fd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function gd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function hd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function id(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}
2771function jd(t,e,r){return t.style[e]=r}function kd(t,e,r){return t.style.setProperty(e,r)}function ld(t,e,r){return t._gsap[e]=r}function md(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function nd(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function od(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function sd(t,e){var r=fe.createElementNS?fe.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):fe.createElement(t);return r.style?r:fe.createElement(t)}function td(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Ne,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&td(t,je(e)||e,1)||""}function wd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(le=window,fe=le.document,de=fe.documentElement,pe=sd("div")||{style:{}},sd("div"),Ve=je(Ve),Xe=Ve+"Origin",pe.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",me=!!je("perspective"),_e=1)}function xd(t){var e,r=sd("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,a=this.style.cssText;if(de.appendChild(r),r.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=xd}catch(t){}else this._gsapBBox&&(e=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),de.removeChild(r),this.style.cssText=a,e}function yd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function zd(e){var r;try{r=e.getBBox()}catch(t){r=xd.call(e,!0)}return r&&(r.width||r.height)||e.getBBox===xd||(r=xd.call(e,!0)),!r||r.width||r.x||r.y?r:{x:+yd(e,["x","cx","x1"])||0,y:+yd(e,["y","cy","y1"])||0,width:0,height:0}}function Ad(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!zd(t))}function Bd(t,e){if(e){var r=t.style;e in Fe&&e!==Xe&&(e=Ve),r.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),r.removeProperty(e.replace(Ne,"-$1").toLowerCase())):r.removeAttribute(e)}}function Cd(t,e,r,i,n,a){var s=new oe(t._pt,e,r,0,1,a?id:hd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function Ed(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=pe.style,f=Ue.test(e),d="svg"===t.tagName.toLowerCase(),p=(d?"client":"offset")+(f?"Width":"Height"),c="px"===i,m="%"===i;return i===h||!u||Ke[i]||Ke[h]?u:("px"===h||c||(u=Ed(t,e,r,"px")),o=t.getCTM&&Ad(t),!m&&"%"!==h||!Fe[e]&&!~e.indexOf("adius")?(l[f?"width":"height"]=100+(c?h:i),a=~e.indexOf("adius")||"em"===i&&t.appendChild&&!d?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==fe&&a.appendChild||(a=fe.body),(s=a._gsap)&&m&&s.width&&f&&s.time===Dt.time?ca(u/s.width*100):(!m&&"%"!==h||(l.position=td(t,"position")),a===t&&(l.position="static"),a.appendChild(pe),n=pe[p],a.removeChild(pe),l.position="absolute",f&&m&&((s=_(a)).time=Dt.time,s.width=a[p]),ca(c?n*u/100:n&&u?100/n*u:0))):(n=o?t.getBBox()[f?"width":"height"]:t[p],ca(m?u/n*100:u/100*n)))}function Fd(t,e,r,i){var n;return _e||wd(),e in qe&&"transform"!==e&&~(e=qe[e]).indexOf(",")&&(e=e.split(",")[0]),Fe[e]&&"transform"!==e?(n=He(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Je(td(t,Xe))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=Ge[e]&&Ge[e](t,e,r)||td(t,e)||aa(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?Ed(t,e,n,r)+r:n}function Gd(t,e,r,i){if(!r||"none"===r){var n=je(e,t,1),a=n&&td(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=td(t,"borderTopColor"))}var s,o,u,h,l,f,d,_,p,c,m,g=new oe(this._pt,t.style,e,0,1,ee),v=0,y=0;if(g.b=r,g.e=i,r+="","auto"===(i+="")&&(t.style[e]=i,i=td(t,e)||i,t.style[e]=r),xb(s=[r,i]),i=s[1],u=(r=s[0]).match(rt)||[],(i.match(rt)||[]).length){for(;o=rt.exec(i);)d=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),d!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===d.charAt(1)&&(d=ea(h,d)+m),_=parseFloat(d),c=d.substr((_+"").length),v=rt.lastIndex-c.length,c||(c=c||U.units[e]||m,v===i.length&&(i+=c,g.e+=c)),m!==c&&(h=Ed(t,e,f,c)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:_-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}
vendor: 9,773 bytes, line 2771
2771else g.r="display"===e&&"none"===i?id:hd;return nt.test(i)&&(g.e=0),this._pt=g}function Id(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=$e[r]||r,e[1]=$e[i]||i,e.join(" ")}function Jd(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],Fe[r]&&(i=1,r="transformOrigin"===r?Xe:Ve),Bd(a,r);i&&(Bd(a,Ve),u&&(u.svg&&a.removeAttribute("transform"),He(a,1),u.uncache=1))}}function Nd(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function Od(t){var e=td(t,Ve);return Nd(e)?We:e.substr(7).match(et).map(ca)}function Pd(t,e){var r,i,n,a,s=t._gsap||_(t),o=t.style,u=Od(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?We:u:(u!==We||t.offsetParent||t===de||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&t.offsetParent||(a=1,i=t.nextSibling,de.appendChild(t)),u=Od(t),n?o.display=n:Bd(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):de.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function Qd(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||Pd(t,!0),f=h.xOrigin||0,d=h.yOrigin||0,_=h.xOffset||0,p=h.yOffset||0,c=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==We&&(o=c*v-m*g)&&(u=w*(-m/o)+x*(c/o)-(c*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=zd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-d,h.xOffset=_+(y*c+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[Xe]="0px 0px",a&&(Cd(a,h,"xOrigin",f,w),Cd(a,h,"yOrigin",d,x),Cd(a,h,"xOffset",_,h.xOffset),Cd(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function Td(t,e,r){var i=Ra(e);return ca(parseFloat(e)+parseFloat(Ed(t,"x",r+"px",i)))+i}function $d(t,e,r,i,n){var a,s,u=360,h=o(n),l=parseFloat(n)*(h&&~n.indexOf("rad")?Be:1)-i,f=i+l+"deg";return h&&("short"===(a=n.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===a&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===a&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=s=new oe(t._pt,e,r,i,l,ed),s.e=f,s.u="deg",t._props.push(r),s}function _d(t,e){for(var r in e)t[r]=e[r];return t}function ae(t,e,r){var i,n,a,s,o,u,h,l=_d({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[Ve]=e,i=He(r,1),Bd(r,Ve),r.setAttribute("transform",a)):(a=getComputedStyle(r)[Ve],f[Ve]=e,i=He(r,1),f[Ve]=a),Fe)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=Ra(a)!==(h=Ra(s))?Ed(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new oe(t._pt,i,n,o,u-o,dd),t._pt.u=h||0,t._props.push(n));_d(i,l)}var le,fe,de,_e,pe,ce,me,ge=zt.Power0,ve=zt.Power1,ye=zt.Power2,Te=zt.Power3,be=zt.Power4,we=zt.Linear,xe=zt.Quad,ke=zt.Cubic,Oe=zt.Quart,Pe=zt.Quint,Me=zt.Strong,Ce=zt.Elastic,Ae=zt.Back,De=zt.SteppedEase,Se=zt.Bounce,ze=zt.Sine,Re=zt.Expo,Ee=zt.Circ,Fe={},Be=180/Math.PI,Ie=Math.PI/180,Le=Math.atan2,Ne=/([A-Z])/g,Ue=/(left|right|width|margin|padding|x)/i,Ye=/[\s,\(]\S/,qe={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Ve="transform",Xe=Ve+"Origin",Qe="O,Moz,ms,Ms,Webkit".split(","),je=function _checkPropPrefix(t,e,r){var i=(e||pe).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(Qe[n]+t in i););return n<0?null:(3===n?"ms":0<=n?Qe[n]:"")+t},Ke={deg:1,rad:1,turn:1},$e={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Ge={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new oe(t._pt,e,r,0,0,Jd);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},We=[1,0,0,1,0,0],Ze={},He=function _parseTransform(t,e){var r=t._gsap||new Lt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,d,_,p,c,m,g,v,y,T,b,w,x,k,O,P,M,C,A,D,S,z,R,E,F=t.style,B=r.scaleX<0,I="deg",L=td(t,Xe)||"0";return i=n=a=u=h=l=f=d=_=0,s=o=1,r.svg=!(!t.getCTM||!Ad(t)),m=Pd(t,r.svg),r.svg&&(P=(!r.uncache||"0px 0px"===L)&&!e&&t.getAttribute("data-svg-origin"),Qd(t,P||L,!!P||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,c=r.yOrigin||0,m!==We&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?Le(b,T)*Be:0,(f=w||x?Le(w,x)*Be+u:0)&&(o*=Math.abs(Math.cos(f*Ie))),r.svg&&(i-=p-(p*T+c*w),n-=c-(p*b+c*x))):(E=m[6],z=m[7],A=m[8],D=m[9],S=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=Le(E,S))*Be,g&&(P=k*(v=Math.cos(-g))+A*(y=Math.sin(-g)),M=O*v+D*y,C=E*v+S*y,A=k*-y+A*v,D=O*-y+D*v,S=E*-y+S*v,R=z*-y+R*v,k=P,O=M,E=C),l=(g=Le(-w,S))*Be,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=P=T*v-A*y,b=M=b*v-D*y,w=C=w*v-S*y),u=(g=Le(b,T))*Be,g&&(P=T*(v=Math.cos(g))+b*(y=Math.sin(g)),M=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=P,k=M),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ca(Math.sqrt(T*T+b*b+w*w)),o=ca(Math.sqrt(O*O+E*E)),g=Le(k,O),f=2e-4<Math.abs(g)?g*Be:0,_=R?1/(R<0?-R:R):0),r.svg&&(P=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!Nd(td(t,Ve)),P&&t.setAttribute("transform",P))),90<Math.abs(f)&&Math.abs(f)<270&&(B?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ca(s),r.scaleY=ca(o),r.rotation=ca(u)+I,r.rotationX=ca(h)+I,r.rotationY=ca(l)+I,r.skewX=f+I,r.skewY=d+I,r.transformPerspective=_+"px",(r.zOrigin=parseFloat(L.split(" ")[2])||0)&&(F[Xe]=Je(L)),r.xOffset=r.yOffset=0,r.force3D=U.force3D,r.renderTransform=r.svg?ar:me?nr:tr,r.uncache=0,r},Je=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},tr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,nr(t,e)},er="0deg",rr="0px",ir=") ",nr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,d=r.skewY,_=r.scaleX,p=r.scaleY,c=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==er||h!==er)){var b,w=parseFloat(h)*Ie,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*Ie,b=Math.cos(w),a=Td(g,a,x*b*-v),s=Td(g,s,-Math.sin(w)*-v),o=Td(g,o,k*b*-v+v)}c!==rr&&(y+="perspective("+c+ir),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===rr&&s===rr&&o===rr||(y+=o!==rr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+ir),u!==er&&(y+="rotate("+u+ir),h!==er&&(y+="rotateY("+h+ir),l!==er&&(y+="rotateX("+l+ir),f===er&&d===er||(y+="skew("+f+", "+d+ir),1===_&&1===p||(y+="scale("+_+", "+p+ir),g.style[Ve]=y||"translate(0, 0)"},ar=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,d=o.rotation,_=o.skewX,p=o.skewY,c=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);d=parseFloat(d),_=parseFloat(_),(p=parseFloat(p))&&(_+=p=parseFloat(p),d+=p),d||_?(d*=Ie,_*=Ie,r=Math.cos(d)*c,i=Math.sin(d)*c,n=Math.sin(d-_)*-m,a=Math.cos(d-_)*m,_&&(p*=Ie,s=Math.tan(_-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ca(r),i=ca(i),n=ca(n),a=ca(a)):(r=c,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=Ed(g,"x",l,"px"),k=Ed(g,"y",f,"px")),(v||y||T||b)&&(x=ca(x+v-(v*r+y*n)+T),k=ca(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ca(x+u/100*s.width),k=ca(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[Ve]=s)};ba("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});Ge[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return Fd(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var sr,or,ur,hr={name:"css",register:wd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,r,i,n){var a,s,u,h,l,f,d,_,p,c,m,g,v,y,T,b=this._props,w=t.style,x=r.vars.startAt;for(d in _e||wd(),e)if("autoRound"!==d&&(s=e[d],!ft[d]||!Ub(d,e,r,i,t,n)))if(l=typeof s,f=Ge[d],"function"===l&&(l=typeof(s=s.call(r,i,t,n))),"string"===l&&~s.indexOf("random(")&&(s=hb(s)),f)f(this,t,d,s,r)&&(T=1);else if("--"===d.substr(0,2))a=(getComputedStyle(t).getPropertyValue(d)+"").trim(),s+="",Ct.lastIndex=0,Ct.test(a)||(_=Ra(a),p=Ra(s)),p?_!==p&&(a=Ed(t,d,a,p)+p):_&&(s+=_),this.add(w,"setProperty",a,s,i,n,0,0,d),b.push(d);else if("undefined"!==l){if(x&&d in x?(a="function"==typeof x[d]?x[d].call(r,i,t,n):x[d],o(a)&&~a.indexOf("random(")&&(a=hb(a)),Ra(a+"")||(a+=U.units[d]||Ra(Fd(t,d))||""),"="===(a+"").charAt(1)&&(a=Fd(t,d))):a=Fd(t,d),h=parseFloat(a),(c="string"===l&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),u=parseFloat(s),d in qe&&("autoAlpha"===d&&(1===h&&"hidden"===Fd(t,"visibility")&&u&&(h=0),Cd(this,w,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==d&&"transform"!==d&&~(d=qe[d]).indexOf(",")&&(d=d.split(",")[0])),m=d in Fe)if(g||((v=t._gsap).renderTransform&&!e.parseTransform||He(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new oe(this._pt,w,Ve,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===d)this._pt=new oe(this._pt,v,"scaleY",v.scaleY,(c?ea(v.scaleY,c+u):u)-v.scaleY||0),b.pu
2771sh("scaleY",d),d+="X";else{if("transformOrigin"===d){s=Id(s),v.svg?Qd(t,s,0,y,0,this):((p=parseFloat(s.split(" ")[2])||0)!==v.zOrigin&&Cd(this,v,"zOrigin",v.zOrigin,p),Cd(this,w,d,Je(a),Je(s)));continue}if("svgOrigin"===d){Qd(t,s,1,y,0,this);continue}if(d in Ze){$d(this,v,d,h,c?ea(h,c+s):s);continue}if("smoothOrigin"===d){Cd(this,v,"smooth",v.smooth,s);continue}if("force3D"===d){v[d]=s;continue}if("transform"===d){ae(this,s,t);continue}}else d in w||(d=je(d)||d);if(m||(u||0===u)&&(h||0===h)&&!Ye.test(s)&&d in w)u=u||0,(_=(a+"").substr((h+"").length))!==(p=Ra(s)||(d in U.units?U.units[d]:_))&&(h=Ed(t,d,a,p)),this._pt=new oe(this._pt,m?v:w,d,h,(c?ea(h,c+u):u)-h,m||"px"!==p&&"zIndex"!==d||!1===e.autoRound?dd:gd),this._pt.u=p||0,_!==p&&"%"!==p&&(this._pt.b=a,this._pt.r=fd);else if(d in w)Gd.call(this,t,d,a,c?c+s:s);else{if(!(d in t)){N(d,s);continue}this.add(t,d,a||t[d],c?c+s:s,i,n)}b.push(d)}T&&se(this)},get:Fd,aliases:qe,getSetter:function getSetter(t,e,i){var n=qe[e];return n&&n.indexOf(",")<0&&(e=n),e in Fe&&e!==Xe&&(t._gsap.x||Fd(t,"x"))?i&&ce===i?"scale"===e?md:ld:(ce=i||{})&&("scale"===e?nd:od):t.style&&!r(t.style[e])?jd:~e.indexOf("-")?kd:Ht(t,e)},core:{_removeProperty:Bd,_getMatrix:Pd}};he.utils.checkPrefix=je,ur=ba((sr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(or="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){Fe[t]=1}),ba(or,function(t){U.units[t]="deg",Ze[t]=1}),qe[ur[13]]=sr+","+or,ba("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");qe[e[1]]=ur[e[0]]}),ba("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){U.units[t]="px"}),he.registerPlugin(hr);var lr=he.registerPlugin(hr)||he,fr=lr.core.Tween;e.Back=Ae,e.Bounce=Se,e.CSSPlugin=hr,e.Circ=Ee,e.Cubic=ke,e.Elastic=Ce,e.Expo=Re,e.Linear=we,e.Power0=ge,e.Power1=ve,e.Power2=ye,e.Power3=Te,e.Power4=be,e.Quad=xe,e.Quart=Oe,e.Quint=Pe,e.Sine=ze,e.SteppedEase=De,e.Strong=Me,e.TimelineLite=Ut,e.TimelineMax=Ut,e.TweenLite=$t,e.TweenMax=fr,e.default=lr,e.gsap=lr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});
2772
2773
2774
2775/*
2776* Title Border
2777*/
2778if($('[data-title-border]').length) {
2779
2780	var $pageHeaderTitleBorder = $('<span class="page-header-title-border"></span>'),
2781		$pageHeaderTitle = $('[data-title-border]'),
2782		$window = $(window);
2783
2784	$pageHeaderTitle.before($pageHeaderTitleBorder);
2785
2786	var setPageHeaderTitleBorderWidth = function() {
2787		$pageHeaderTitleBorder.width($pageHeaderTitle.width());
2788	}
2789
2790	$window.afterResize(function(){
2791		setPageHeaderTitleBorderWidth();
2792	});
2793
2794	setPageHeaderTitleBorderWidth();
2795
2796	$pageHeaderTitleBorder.addClass('visible');
2797}
2798
2799/*
2800* Footer Reveal
2801*/
2802(function($) {
2803	var $footerReveal = {
2804		$wrapper: $('.footer-reveal'),
2805		init: function() {
2806			var self = this;
2807
2808			self.build();
2809			self.events();
2810		},
2811		build: function() {
2812			var self = this, 
2813				footer_height = self.$wrapper.outerHeight(true),
2814				window_height = ( $(window).height() - $('.header-body').height() );
2815
2816			if( footer_height > window_height ) {
2817				$('#footer').removeClass('footer-reveal');
2818				$('body').css('margin-bottom', 0);
2819			} else {
2820				$('#footer').addClass('footer-reveal');
2821				$('body').css('margin-bottom', footer_height);
2822			}
2823
2824		},
2825		events: function() {
2826			var self = this,
2827				$window = $(window);
2828
2829			$window.on('load', function(){
2830				$window.afterResize(function(){
2831					self.build();
2832				});
2833			});
2834		}
2835	}
2836
2837	if( $('.footer-reveal').length ) {
2838		$footerReveal.init();
2839	}
2840})(jQuery);
2841
2842/* Re-Init Plugin */
2843if( $('[data-reinit-plugin]').length ) {
2844	$('[data-reinit-plugin]').on('click', function(e) {
2845		e.preventDefault();
2846
2847		var pluginInstance = $(this).data('reinit-plugin'),
2848			pluginFunction = $(this).data('reinit-plugin-function'),
2849			pluginElement  = $(this).data('reinit-plugin-element'),
2850			pluginOptions  = theme.fn.getOptions($(this).data('reinit-plugin-options'));
2851
2852		$( pluginElement ).data( pluginInstance ).destroy();
2853
2854		setTimeout(function(){
2855			theme.fn.execPluginFunction(pluginFunction, $( pluginElement ), pluginOptions);	
2856		}, 1000);
2857
2858	});
2859}
2860
2861/* Simple Copy To Clipboard */
2862if( $('[data-copy-to-clipboard]').length ) {
2863	theme.fn.intObs( '[data-copy-to-clipboard]', function(){
2864		var $this = $(this);
2865
2866		$this.wrap( '<div class="copy-to-clipboard-wrapper position-relative"></div>' );
2867
2868		var $copyButton = $('<a href="#" class="btn btn-primary btn-px-2 py-1 text-0 position-absolute top-8 right-8">COPY</a>');
2869		$this.parent().prepend( $copyButton );
2870
2871		$copyButton.on('click', function(e){
2872			e.preventDefault();
2873
2874			var $btn       = $(this),
2875				$temp = $('<textarea class="d-block opacity-0" style="height: 0;">');
2876
2877			$btn.parent().append( $temp );
2878
2879			$temp.val( $this.text() );
2880				
2881			$temp[0].select();
2882			$temp[0].setSelectionRange(0, 99999);
2883
2884			document.execCommand("copy");
2885
2886			$btn.addClass('copied');
2887			setTimeout(function(){
2888				$btn.removeClass('copied');
2889			}, 1000);
2890
2891			$temp.remove();
2892		});
2893	}, {
2894		rootMargin: '0px 0px 0px 0px'
2895	} );
2896}
2897
2898// Animate
2899(function(theme, $) {
2900
2901	theme = theme || {};
2902
2903	var instanceName = '__animate';
2904
2905	var PluginAnimate = function($el, opts) {
2906		return this.initialize($el, opts);
2907	};
2908
2909	PluginAnimate.defaults = {
2910		accX: 0,
2911		accY: -80,
2912		delay: 100,
2913		duration: '750ms',
2914		minWindowWidth: 767,
2915		forceAnimation: false,
2916		flagClassOnly: false
2917	};
2918
2919	PluginAnimate.prototype = {
2920		initialize: function($el, opts) {
2921			if ($el.data(instanceName)) {
2922				return this;
2923			}
2924
2925			this.$el = $el;
2926
2927			this
2928				.setData()
2929				.setOptions(opts)
2930				.build();
2931
2932			return this;
2933		},
2934
2935		setData: function() {
2936			this.$el.data(instanceName, this);
2937
2938			return this;
2939		},
2940
2941		setOptions: function(opts) {
2942			this.options = $.extend(true, {}, PluginAnimate.defaults, opts, {
2943				wrapper: this.$el
2944			});
2945
2946			return this;
2947		},
2948
2949		build: function() {
2950			var self = this;
2951
2952			// Flag Class Only
2953			// - Useful for simple animations like hightlight
2954			// - Less process and memory
2955			if( self.options.flagClassOnly ) {
2956				var delay = self.options.wrapper.attr('data-appear-animation-delay') ? self.options.wrapper.attr('data-appear-animation-delay') : self.options.delay;
2957				
2958				self.options.wrapper.css({
2959					'animation-delay': delay + 'ms',
2960					'transition-delay': delay + 'ms'
2961				});
2962				self.options.wrapper.addClass( self.options.wrapper.attr('data-appear-animation') );
2963
2964				return this;
2965			}
2966
2967			if($('body').hasClass('loading-overlay-showing')) {
2968				$(window).on('loading.overlay.ready', function(){
2969					self.animate();
2970				});
2971			} else {
2972				self.animate();
2973			}
2974
2975			return this;
2976		},
2977
2978		animate: function() {
2979			var self = this,
2980				$el = this.options.wrapper,
2981				delay = 0,
2982				duration = this.options.duration,
2983				elTopDistance = $el.offset().top,
2984				windowTopDistance = $(window).scrollTop();
2985
2986			// If has appear animation elements inside a SVG. 
2987			// Intersection Observer API do not check elements inside SVG's, so we need initialize trough top parent SVG
2988			if( $el.data('appear-animation-svg') ) {
2989				$el.find('[data-appear-animation]').each(function(){
2990					var $this = $(this),
2991						opts;
2992
2993					var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
2994					if (pluginOptions)
2995						opts = pluginOptions;
2996
2997					$this.themePluginAnimate(opts);	
2998				});
2999
3000				return this;
3001			}
3002
3003			// No animation at the first load of page. This is good for performance
3004			if( self.options.firstLoadNoAnim ) {
3005				$el.removeClass('appear-animation');
3006
3007				// Inside Carousel
3008				if( $el.closest('.owl-carousel').get(0) ) {
3009					setTimeout(function(){
3010						$el.closest('.owl-carousel').on('change.owl.carousel', function(){
3011							self.options.firstLoadNoAnim = false;
3012							$el.removeData('__animate');
3013							$el.themePluginAnimate( self.options );
3014						});
3015					}, 500);
3016				}
3017
3018				return this;
3019			}
3020
3021			$el.addClass('appear-animation animated');
3022
3023			if (!$('html').hasClass('no-csstransitions') && $(window).width() > self.options.minWindowWidth && elTopDistance >= windowTopDistance || self.options.forceAnimation == true) {
3024				delay = ($el.attr('data-appear-animation-delay') ? $el.attr('data-appear-animation-delay') : self.options.delay);
3025				duration = ($el.attr('data-appear-animation-duration') ? $el.attr('data-appear-animation-duration') : self.options.duration);
3026
3027				if (duration != '750ms') {
3028					$el.css('animation-duration', duration);
3029				}
3030
3031				$el.css('animation-delay', delay + 'ms');
3032				$el.addClass($el.attr('data-appear-animation') + ' appear-animation-visible');
3033				
3034				$el.trigger('animation:show');
3035
3036			} else {
3037				$el.addClass('appear-animation-visible');
3038			}
3039
3040			return this;
3041		}
3042	};
3043
3044	// expose to scope
3045	$.extend(theme, {
3046		PluginAnimate: PluginAnimate
3047	});
3048
3049	// jquery plugin
3050	$.fn.themePluginAnimate = function(opts) {
3051		return this.map(function() {
3052			var $this = $(this);
3053
3054			if ($this.data(instanceName)) {
3055				return $this.data(instanceName);
3056			} else {
3057				return new PluginAnimate($this, opts);
3058			}
3059
3060		});
3061	};
3062
3063}).apply(this, [window.theme, jQuery]);
3064
3065// Animated Letters
3066(function(theme, $) {
3067
3068	theme = theme || {};
3069
3070	var instanceName = '__animatedLetters';
3071
3072	var PluginAnimatedLetters = function($el, opts) {
3073		return this.initialize($el, opts);
3074	};
3075
3076	PluginAnimatedLetters.defaults = {
3077		animationName: 'fadeIn',
3078		animationSpeed: 50,
3079		startDelay: 500,
3080		minWindowWidth: 768,
3081		letterClass: ''
3082	};
3083
3084	PluginAnimatedLetters.prototype = {
3085		initialize: function($el, opts) {
3086			if ($el.data(instanceName)) {
3087				return this;
3088			}
3089
3090			var self = this;
3091
3092			this.$el = $el;
3093			this.initialText = $el.text();
3094
3095			this
3096				.setData()
3097				.setOptions(opts)
3098				.build()
3099				.events();
3100
3101			return this;
3102		},
3103
3104		setData: function() {
3105			this.$el.data(instanceName, this);
3106
3107			return this;
3108		},
3109
3110		setOptions: function(opts) {
3111			this.options = $.extend(true, {}, PluginAnimatedLetters.defaults, opts, {
3112				wrapper: this.$el
3113			});
3114
3115			return this;
3116		},
3117
3118		build: function() {
3119			var self    = this,
3120				letters = self.$el.text().split('');
3121
3122			if( $(window).width() < self.options.minWindowWidth ) {
3123				return this;
3124			}
3125
3126			if( self.options.firstLoadNoAnim ) {
3127				self.$el.css({
3128					visibility: 'visible'
3129				});
3130
3131				// Inside Carousel
3132				if( self.$el.closest('.owl-carousel').get(0) ) {
3133					setTimeout(function(){
3134						self.$el.closest('.owl-carousel').on('change.owl.carousel', function(){
3135							self.options.firstLoadNoAnim = false;
3136							self.build();
3137						});
3138					}, 500);
3139				}
3140
3141				return this;
3142			}
3143
3144			// Add class to show
3145			self.$el.addClass('initialized');			
3146
3147			// Set Min Height to avoid flicking issues
3148			self.setMinHeight();
3149
3150			self.$el.text('');
3151
3152			if( self.options.animationName == 'typeWriter' ) {
3153				self.$el.append( '<span class="letters-wrapper"></span><span class="typeWriter"></pre>' );
3154
3155				var index = 0;
3156
3157				setTimeout(function(){
3158
3159					var timeout = function(){
3160						var st = setTimeout(function(){
3161							var letter = letters[index];
3162							
3163							self.$el.find('.letters-wrapper').append( '<span class="letter '+ ( self.options.letterClass ? self.options.letterClass + ' ' : '' ) +'">' + letter + '</span>' );
3164
3165							index++;
3166							timeout();
3167						}, self.options.animationSpeed);
3168
3169						if( index >= letters.length ) {
3170							clearTimeout(st);
3171						}
3172					};
3173					timeout();
3174
3175				}, self.options.startDelay);
3176			} else {
3177				setTimeout(function(){
3178					for( var i = 0; i < letters.length; i++ ) {
3179						var letter = letters[i];
3180						
3181						self.$el.append( '<span class="letter '+ ( self.options.letterClass ? self.options.letterClass + ' ' : '' ) + self.options.animationName +' animated" style="animation-delay: '+ ( i * self.options.animationSpeed ) +'ms;">' + letter + '</span>' );
3182	
3183					}
3184				}, self.options.startDelay);
3185			}
3186
3187			return this;
3188		},
3189
3190		setMinHeight: function() {
3191			var self = this;
3192
3193			// if it's inside carousel
3194			if( self.$el.closest('.owl-carousel').get(0) ) {
3195				self.$el.closest('.owl-carousel').addClass('d-block');
3196				self.$el.css( 'min-height', self.$el.height() );
3197				self.$el.closest('.owl-carousel').removeClass('d-block');
3198			} else {
3199				self.$el.css( 'min-height', self.$el.height() );
3200			}
3201
3202			return this;
3203		},
3204
3205		destroy: function() {
3206			var self = this;
3207
3208			self.$el
3209				.html( self.initialText )
3210				.css( 'min-height', '' );
3211
3212			return this;
3213		},
3214
3215		events: function() {
3216			var self = this;
3217
3218			// Destroy
3219			self.$el.on('animated.letters.destroy', function(){
3220				self.destroy();
3221			});
3222
3223			// Initialize
3224			self.$el.on('animated.letters.initialize', function(){
3225				self.build();
3226			});
3227
3228			return this;
3229		}
3230	};
3231
3232	// expose to scope
3233	$.extend(theme, {
3234		PluginAnimatedLetters: PluginAnimatedLetters
3235	});
3236
3237	// jquery plugin
3238	$.fn.themePluginAnimatedLetters = function(opts) {
3239		return this.map(function() {
3240			var $this = $(this);
3241
3242			if ($this.data(instanceName)) {
3243				return $this.data(instanceName);
3244			} else {
3245				return new PluginAnimatedLetters($this, opts);
3246			}
3247
3248		});
3249	}
3250
3251}).apply(this, [window.theme, jQuery]);
3252
3253// Before / After
3254(function(theme, $) {
3255
3256	theme = theme || {};
3257
3258	var instanceName = '__beforeafter';
3259
3260	var PluginBeforeAfter = function($el, opts) {
3261		return this.initialize($el, opts);
3262	};
3263
3264	PluginBeforeAfter.defaults = {
3265		default_offset_pct: 0.5,
3266		orientation: 'horizontal',
3267		before_label: 'Before',
3268		after_label: 'After',
3269		no_overlay: false,
3270		move_slider_on_hover: false,
3271		move_with_handle_only: true,
3272		click_to_move: false
3273	};
3274
3275	PluginBeforeAfter.prototype = {
3276		initialize: function($el, opts) {
3277			this.$el = $el;
3278
3279			this
3280				.setData()
3281				.setOptions(opts)
3282				.build();
3283
3284			return this;
3285		},
3286
3287		setData: function() {
3288			this.$el.data(instanceName, this);
3289
3290			return this;
3291		},
3292
3293		setOptions: function(opts) {
3294			this.options = $.extend(true, {}, PluginBeforeAfter.defaults, opts, {
3295				wrapper: this.$el
3296			});
3297
3298			return this;
3299		},
3300
3301		build: function() {
3302
3303			if (!($.isFunction($.fn.twentytwenty))) {
3304				return this;
3305			}
3306
3307			var self = this;
3308
3309			self.options.wrapper
3310				.twentytwenty(self.options);
3311
3312			return this;
3313
3314		}
3315	};
3316
3317	// expose to scope
3318	$.extend(theme, {
3319		PluginBeforeAfter: PluginBeforeAfter
3320	});
3321
3322	// jquery plugin
3323	$.fn.themePluginBeforeAfter = function(opts) {
3324		return this.map(function() {
3325			var $this = $(this);
3326
3327			if ($this.data(instanceName)) {
3328				return $this.data(instanceName);
3329			} else {
3330				return new PluginBeforeAfter($this, opts);
3331			}
3332
3333		});
3334	}
3335
3336}).apply(this, [window.theme, jQuery]);
3337
3338// Carousel Light
3339(function(theme, $) {
3340
3341	theme = theme || {};
3342
3343	var instanceName = '__carouselLight';
3344
3345	var PluginCarouselLight = function($el, opts) {
3346		return this.initialize($el, opts);
3347	};
3348
3349	PluginCarouselLight.defaults = {
3350		autoplay: true,
3351		autoplayTimeout: 7000,
3352		disableAutoPlayOnClick: true
3353	};
3354
3355	PluginCarouselLight.prototype = {
3356		initialize: function($el, opts) {
3357			if ($el.data(instanceName)) {
3358				return this;
3359			}
3360
3361			this.$el = $el;
3362			this.clickFlag = true;
3363
3364			this
3365				.setData()
3366				.setOptions(opts)
3367				.build()
3368				.owlNav()
3369				.owlDots()
3370				.autoPlay()
3371				.events();
3372
3373			return this;
3374		},
3375
3376		setData: function() {
3377			this.$el.data(instanceName, this);
3378
3379			return this;
3380		},
3381
3382		setOptions: function(opts) {
3383			this.options = $.extend(true, {}, PluginCarouselLight.defaults, opts, {
3384				wrapper: this.$el
3385			});
3386
3387			return this;
3388		},
3389
3390		build: function() {
3391			var self = this;
3392
3393			self.$el
3394				.css('opacity', 1)
3395				.find('.owl-item:first-child')
3396				.addClass('active');
3397
3398			self.$el.trigger('initialized.owl.carousel');
3399
3400			// Carousel Navigate By ID and item index
3401			self.carouselNavigate();
3402
3403			return this;
3404		},
3405
3406		changeSlide: function( $nextSlide ) {
3407			var self = this,
3408				$prevSlide = self.$el.find('.owl-item.active');
3409
3410			self.$el.find('.owl-item.active').addClass('removing');
3411
3412			$prevSlide
3413				.removeClass('fadeIn')
3414				.addClass( 'fadeOut animated' );
3415
3416			setTimeout(function(){
3417				setTimeout(function(){
3418					$prevSlide.removeClass('active');
3419				}, 400);
3420
3421				$nextSlide
3422					.addClass('active')
3423					.removeClass('fadeOut')
3424					.addClass( 'fadeIn animated' );
3425
3426			}, 200);
3427
3428			// Dots
3429			self.$el
3430				.find('.owl-dot')
3431				.removeClass('active')
3432				.eq( $nextSlide.index() )
3433				.addClass('active');
3434
3435			self.$el.trigger({
3436				type: 'change.owl.carousel',
3437				nextSlideIndex: $nextSlide.index(),
3438				prevSlideIndex: $prevSlide.index()
3439			});
3440
3441			setTimeout(function(){
3442				self.$el.trigger({
3443					type: 'changed.owl.carousel',
3444					nextSlideIndex: $nextSlide.index(),
3445					prevSlideIndex: $prevSlide.index()
3446				});
3447			}, 500);
3448		},
3449
3450		owlNav: function() {
3451			var self = this,
3452				$owlNext = self.$el.find('.owl-next'),
3453				$owlPrev = self.$el.find('.owl-prev');
3454
3455			$owlPrev.on('click', function(e){
3456				e.preventDefault();
3457
3458				if( self.options.disableAutoPlayOnClick ) {
3459					window.clearInterval(self.autoPlayInterval);
3460				}
3461
3462				if( self.avoidMultipleClicks() ) {
3463					return false;
3464				}
3465
3466				self.owlPrev();
3467			});
3468
3469			$owlNext.on('click', function(e){
3470				e.preventDefault();
3471
3472				if( self.options.disableAutoPlayOnClick ) {
3473					window.clearInterval(self.autoPlayInterval);
3474				}
3475
3476				if( self.avoidMultipleClicks() ) {
3477					return false;
3478				}
3479
3480				self.owlNext();
3481			});
3482
3483			return this;
3484		},
3485
3486		owlDots: function(){
3487			var self = this,
3488				$owlDot = self.$el.find('.owl-dot');
3489
3490			$owlDot.on('click', function(e){
3491				$this = $(this);
3492
3493				e.preventDefault();
3494
3495				if( self.options.disableAutoPlayOnClick ) {
3496					window.clearInterval(self.autoPlayInterval);
3497				}
3498
3499				if( self.avoidMultipleClicks() ) {
3500					return false;
3501				}
3502
3503				var dotIndex = $(this).index();
3504
3505				// Do nothing if respective dot slide is active/showing
3506				if( $this.hasClass('active') ) {
3507					return false;
3508				}
3509
3510				self.changeSlide( self.$el.find('.owl-item').eq( dotIndex ) );
3511			});
3512
3513			return this;
3514		},
3515
3516		owlPrev: function() {
3517			var self = this;
3518
3519			if( self.$el.find('.owl-item.active').prev().get(0) ) {
3520				self.changeSlide( self.$el.find('.owl-item.active').prev() );
3521			} else {
3522				self.changeSlide( self.$el.find('.owl-item:last-child') );
3523			}
3524		},
3525
3526		owlNext: function() {
3527			var self = this;
3528
3529			if( self.$el.find('.owl-item.active').next().get(0) ) {
3530				self.changeSlide( self.$el.find('.owl-item.active').next() );
3531			} else {
3532				self.changeSlide( self.$el.find('.owl-item').eq(0) );
3533			}
3534		},
3535
3536		avoidMultipleClicks: function() {
3537			var self = this;
3538
3539			if( !self.clickFlag ) {
3540				return true;
3541			}
3542
3543			if( self.clickFlag ) {
3544				self.clickFlag = false;
3545				setTimeout(function(){
3546					self.clickFlag = true; 
3547				}, 1000);
3548			}
3549
3550			return false;
3551		},
3552
3553		autoPlay: function(){
3554			var self = this,
3555				$el  = this.options.wrapper;
3556
3557			if( self.options.autoplay ) {
3558				self.autoPlayInterval = window.setInterval(function() {
3559					self.owlNext();
3560				}, self.options.autoplayTimeout);
3561			}
3562
3563			return this;
3564		},
3565
3566		carouselNavigate: function() {
3567			var self      = this,
3568				$el       = this.options.wrapper,
3569				$carousel = $el;
3570
3571			if( $('[data-carousel-navigate]').get(0) ) {
3572				$('[data-carousel-navigate-id="#'+ $el.attr('id') +'"]').each(function(){
3573					var $this = $(this),
3574						hasCarousel = $( $this.data('carousel-navigate-id') ).get(0),
3575						toIndex = $this.data('carousel-navigate-to');
3576
3577					if( hasCarousel ) {
3578
3579						$this.on('click', function(){
3580
3581							if( self.options.disableAutoPlayOnClick ) {
3582								window.clearInterval(self.autoPlayInterval);
3583							}
3584							
3585							self.changeSlide( self.$el.find('.owl-item').eq( parseInt(toIndex) - 1 ) );
3586						});
3587
3588					}
3589				});
3590
3591				$el.on('change.owl.carousel', function(e){
3592					$('[data-carousel-navigate-id="#'+ $el.attr('id') +'"]').removeClass('active');
3593				});
3594
3595				$el.on('changed.owl.carousel', function(e){
3596					$('[data-carousel-navigate-id="#'+ $el.attr('id') +'"][data-carousel-navigate-to="'+ ( e.nextSlideIndex + 1 ) +'"]').addClass('active');
3597				});
3598			}
3599
3600			return this;
3601		},
3602
3603		events: function() {
3604			var self = this;
3605
3606			self.$el.on('change.owl.carousel', function(event) {
3607
3608				// Hide elements inside carousel
3609			    self.$el.find('[data-appear-animation]:not(.background-image-wrapper), [data-plugin-animated-letters]').addClass('invisible');
3610
3611			    // Animated Letters
3612			    self.$el.find('[data-plugin-animated-letters]').trigger('animated.letters.destroy');
3613
3614			    // Remove "d-none" class before show the element. This is useful when using background images inside a carousel. Like ken burns effect
3615			    self.$el.find('.owl-item:not(.active) [data-carousel-onchange-show]').removeClass('d-none');
3616
3617			});
3618
3619			self.$el.on('changed.owl.carousel', function(event) {
3620				setTimeout(function(){
3621
3622				    // Appear Animation
3623				    if( self.$el.find('.owl-item.cloned [data-appear-animation]').get(0) ) {
3624				    	self.$el.find('.owl-item.cloned [data-appear-animation]').each(function() {
3625							var $this = $(this),
3626								opts;
3627
3628							var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
3629							if (pluginOptions)
3630								opts = pluginOptions;
3631
3632							$this.themePluginAnimate(opts);
3633						});
3634				    }
3635
3636					// Show elements inside carousel
3637				    self.$el.find('.owl-item.active [data-appear-animation]:not(.background-image-wrapper), [data-plugin-animated-letters]').removeClass('invisible');
3638
3639				    // Animated Letters
3640				    self.$el.find('.owl-item.active [data-plugin-animated-letters]').trigger('animated.letters.initialize');
3641
3642				    // Background Video
3643				    self.$el.find('.owl-item.cloned.active [data-plugin-video-background]').trigger('video.background.initialize');
3644
3645				}, 500);
3646			    
3647			});
3648		}
3649	};
3650
3651	// expose to scope
3652	$.extend(theme, {
3653		PluginCarouselLight: PluginCarouselLight
3654	});
3655
3656	// jquery plugin
3657	$.fn.themePluginCarouselLight = function(opts) {
3658		return this.map(function() {
3659			var $this = $(this);
3660
3661			if ($this.data(instanceName)) {
3662				return $this.data(instanceName);
3663			} else {
3664				return new PluginCarouselLight($this, opts);
3665			}
3666
3667		});
3668	};
3669
3670}).apply(this, [window.theme, jQuery]);
3671
3672// Carousel
3673(function(theme, $) {
3674
3675	theme = theme || {};
3676
3677	var instanceName = '__carousel';
3678
3679	var PluginCarousel = function($el, opts) {
3680		return this.initialize($el, opts);
3681	};
3682
3683	PluginCarousel.defaults = {
3684		loop: true,
3685		responsive: {
3686			0: {
3687				items: 1
3688			},
3689			479: {
3690				items: 1
3691			},
3692			768: {
3693				items: 2
3694			},
3695			979: {
3696				items: 3
3697			},
3698			1199: {
3699				items: 4
3700			}
3701		},
3702		navText: [],
3703		refresh: false
3704	};
3705
3706	PluginCarousel.prototype = {
3707		initialize: function($el, opts) {
3708			if ($el.data(instanceName)) {
3709				return this;
3710			}
3711
3712			this.$el = $el;
3713
3714			// If has data-icon inside, initialize only after icons get rendered
3715			// Prevent flicking issues
3716			if( $el.find('[data-icon]').get(0) ) {
3717				var self = this;
3718
3719				$(window).on('icon.rendered', function(){
3720					if ($el.data(instanceName)) {
3721						return this;
3722					}
3723
3724					setTimeout(function(){
3725						self
3726							.setData()
3727							.setOptions(opts)
3728							.build();
3729					}, 1000);
3730				});
3731
3732				return this;
3733			}
3734
3735			this
3736				.setData()
3737				.setOptions(opts)
3738				.build();
3739
3740			return this;
3741		},
3742
3743		setData: function() {
3744			this.$el.data(instanceName, this);
3745
3746			return this;
3747		},
3748
3749		setOptions: function(opts) {
3750			this.options = $.extend(true, {}, PluginCarousel.defaults, opts, {
3751				wrapper: this.$el
3752			});
3753
3754			return this;
3755		},
3756
3757		build: function() {
3758			if (!($.isFunction($.fn.owlCarousel))) {
3759				return this;
3760			}
3761
3762			var self = this,
3763				$el = this.options.wrapper;
3764
3765			// Add Theme Class
3766			$el.addClass('owl-theme');
3767
3768			// Add Loading
3769			$el.addClass('owl-loading');
3770
3771			// Force RTL according to HTML dir attribute
3772			if ($('html').attr('dir') == 'rtl') {
3773				this.options = $.extend(true, {}, this.options, {
3774					rtl: true
3775				});
3776			}
3777
3778			if (this.options.items == 1) {
3779				this.options.responsive = {}
3780			}
3781
3782			if (this.options.items > 4) {
3783				this.options = $.extend(true, {}, this.options, {
3784					responsive: {
3785						1199: {
3786							items: this.options.items
3787						}
3788					}
3789				});
3790			}
3791
3792			// Auto Height Fixes
3793			if (this.options.autoHeight) {
3794				var itemsHeight = [];
3795
3796				$el.find('.owl-item').each(function(){
3797					if( $(this).hasClass('active') ) {
3798						itemsHeight.push( $(this).height() );
3799					}
3800				});
3801
3802				$(window).afterResize(function() {
3803					$el.find('.owl-stage-outer').height( Math.max.apply(null, itemsHeight) );
3804				});
3805
3806				$(window).on('load', function() {
3807					$el.find('.owl-stage-outer').height( Math.max.apply(null, itemsHeight) );
3808				});
3809			}
3810
3811			// Initialize OwlCarousel
3812			$el.owlCarousel(this.options).addClass('owl-carousel-init animated fadeIn');
3813
3814			// Remove "animated fadeIn" class to prevent conflicts
3815			setTimeout(function(){
3816				$el.removeClass('animated fadeIn');
3817			}, 1000);
3818
3819			// Owl Carousel Wrapper
3820			if( $el.closest('.owl-carousel-wrapper').get(0) ) {
3821				setTimeout(function(){
3822					$el.closest('.owl-carousel-wrapper').css({
3823						height: ''
3824					});
3825				}, 500);
3826			}
3827
3828			// Owl Carousel Loader
3829			if( $el.prev().hasClass('owl-carousel-loader') ) {
3830				$el.prev().remove();
3831			}
3832
3833			// Nav Offset
3834			self.navigationOffsets();
3835
3836			// Nav Outside
3837			if( $el.hasClass('nav-outside') ) {
3838				$(window).on('owl.carousel.nav.outside', function(){
3839					if( $(window).width() < 992 ) {
3840						self.options.stagePadding = 40;
3841						$el.addClass('stage-margin');
3842					} else {
3843						self.options.stagePadding = 0;
3844						$el.removeClass('stage-margin');
3845					}
3846
3847					$el.owlCarousel('destroy').owlCarousel( self.options );
3848
3849					// Nav Offset
3850					self.navigationOffsets();
3851				});
3852
3853				// Window Resize
3854				$(window).on('load', function(){
3855					$(window).afterResize(function(){
3856						$(window).trigger('owl.carousel.nav.outside');
3857					});
3858				});
3859
3860				// First Load
3861				$(window).trigger('owl.carousel.nav.outside');
3862			}
3863
3864			// Nav style 5 (SVG Arrows)
3865			if( $el.hasClass('nav-svg-arrows-1') ) {
3866				var svg_arrow = '' +
3867					'<svg version="1.1" viewBox="0 0 15.698 8.706" width="17" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
3868						'<polygon stroke="#212121" stroke-width="0.1" fill="#212121" points="11.354,0 10.646,0.706 13.786,3.853 0,3.853 0,4.853 13.786,4.853 10.646,8 11.354,8.706 15.698,4.353 "/>' +
3869					'</svg>';
3870
3871				$el.find('.owl-next, .owl-prev').append( svg_arrow );
3872			}
3873
3874			// Sync
3875			if( $el.attr('data-sync') ) {
3876				$el.on('change.owl.carousel', function(event) {
3877					if (event.namespace && event.property.name === 'position') {
3878					    var target = event.relatedTarget.relative(event.property.value, true);
3879					    $( $el.data('sync') ).owlCarousel('to', target, 300, true);				        
3880				  	}
3881				});
3882			}
3883
3884			// Carousel Center Active Item
3885			if( $el.hasClass('carousel-center-active-item') ) {
3886				var itemsActive    = $el.find('.owl-item.active'),
3887					indexCenter    = Math.floor( ($el.find('.owl-item.active').length - 1) / 2 ),
3888					itemCenter     = itemsActive.eq(indexCenter);
3889
3890				itemCenter.addClass('current');
3891
3892				$el.on('change.owl.carousel', function(event) {
3893				  	$el.find('.owl-item').removeClass('current');
3894					
3895					setTimeout(function(){
3896					  	var itemsActive    = $el.find('.owl-item.active'),
3897					  		indexCenter    = Math.floor( ($el.find('.owl-item.active').length - 1) / 2 ),
3898					  		itemCenter     = itemsActive.eq(indexCenter);
3899
3900					  	itemCenter.addClass('current');
3901					}, 100);
3902				});
3903
3904				// Refresh
3905				$el.trigger('refresh.owl.carousel');
3906
3907			}
3908
3909			// AnimateIn / AnimateOut Fix
3910			if( self.options.animateIn || self.options.animateOut ) {
3911				$el.on('change.owl.carousel', function(event) {
3912
3913					// Hide elements inside carousel
3914				    $el.find('[data-appear-animation], [data-plugin-animated-letters]').addClass('d-none');
3915
3916				    // Animated Letters
3917				    $el.find('[data-plugin-animated-letters]').trigger('animated.letters.destroy');
3918
3919				    // Remove "d-none" class before show the element. This is useful when using background images inside a carousel. Like ken burns effect
3920				    $el.find('.owl-item:not(.active) [data-carousel-onchange-show]').removeClass('d-none');
3921
3922				});
3923
3924				$el.on('changed.owl.carousel', function(event) {
3925					setTimeout(function(){
3926
3927					    // Appear Animation
3928				    	$el.find('[data-appear-animation]').each(function() {
3929							var $this = $(this),
3930								opts;
3931
3932							var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
3933							if (pluginOptions)
3934								opts = pluginOptions;
3935
3936							$this.themePluginAnimate(opts);
3937						});
3938
3939						// Show elements inside carousel
3940					    $el.find('.owl-item.active [data-appear-animation], [data-plugin-animated-letters]').removeClass('d-none');
3941
3942					    // Animated Letters
3943					    $el.find('.owl-item.active [data-plugin-animated-letters]').trigger('animated.letters.initialize');
3944
3945					    // Background Video
3946					    $el.find('.owl-item.cloned.active [data-plugin-video-background]').trigger('video.background.initialize');
3947
3948					}, 10);
3949				    
3950				});
3951			}
3952
3953			// data-icon inside carousel
3954			if( $el.find('[data-icon]').length ) {
3955				$el.on('change.owl.carousel drag.owl.carousel', function(){
3956					$el.find('.owl-item.cloned [data-icon]').each(function(){
3957						var $this = $(this),
3958							opts;
3959
3960						var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
3961						if (pluginOptions)
3962							opts = pluginOptions;
3963
3964						$this.themePluginIcon(opts);	
3965					});
3966				});
3967			}
3968
3969			// Render Background Videos inside carousel. Just a trigger on window is sufficient to render
3970			if( $el.find('[data-plugin-video-background]').get(0) ) {
3971				$(window).resize();
3972			}
3973
3974			// Remove Loading
3975			$el.removeClass('owl-loading');
3976
3977			// Remove Height
3978			$el.css('height', 'auto');
3979
3980			// Carousel Navigate By ID and item index
3981			self.carouselNavigate();
3982
3983			// Refresh Carousel
3984			if( self.options.refresh ) {
3985				$el.owlCarousel('refresh');
3986			}
3987
3988			return this;
3989		},
3990
3991		navigationOffsets: function() {
3992			var self 			 = this,
3993				$el  			 = this.options.wrapper,
3994				navHasTransform  = $el.find('.owl-nav').css('transform') == 'none' ? false : true,
3995				dotsHasTransform = $el.find('.owl-dots').css('transform') == 'none' ? false : true;
3996
3997			// ************* NAV *****************
3998			// Nav Offset - Horizontal
3999			if( self.options.navHorizontalOffset && !self.options.navVerticalOffset ) {
4000				if( !navHasTransform ) {
4001					$el.find('.owl-nav').css({
4002						transform: 'translate3d('+ self.options.navHorizontalOffset +', 0, 0)'
4003					});
4004				} else {
4005					$el.find('.owl-nav').css({
4006						left: self.options.navHorizontalOffset
4007					});
4008				}
4009			}
4010
4011			// Nav Offset - Vertical
4012			if( self.options.navVerticalOffset && !self.options.navHorizontalOffset ) {
4013				if( !navHasTransform ) {
4014					$el.find('.owl-nav').css({
4015						transform: 'translate3d(0, '+ self.options.navVerticalOffset +', 0)'
4016					});
4017				} else {
4018					$el.find('.owl-nav').css({
4019						top: 'calc( 50% - '+ self.options.navVerticalOffset +' )'
4020					});
4021				}
4022			}
4023
4024			// Nav Offset - Horizontal & Vertical
4025			if( self.options.navVerticalOffset && self.options.navHorizontalOffset ) {
4026				if( !navHasTransform ) {
4027					$el.find('.owl-nav').css({
4028						transform: 'translate3d('+ self.options.navHorizontalOffset +', '+ self.options.navVerticalOffset +', 0)'
4029					});
4030				} else {
4031					$el.find('.owl-nav').css({
4032						top: 'calc( 50% - '+ self.options.navVerticalOffset +' )',
4033						left: self.options.navHorizontalOffset
4034					});
4035				}
4036			}
4037
4038			// ********** DOTS *********************
4039			// Dots Offset - Horizontal
4040			if( self.options.dotsHorizontalOffset && !self.options.dotsVerticalOffset ) {
4041				$el.find('.owl-dots').css({
4042					transform: 'translate3d('+ self.options.dotsHorizontalOffset +', 0, 0)'
4043				});
4044			}
4045
4046			// Dots Offset - Vertical
4047			if( self.options.dotsVerticalOffset && !self.options.dotsHorizontalOffset ) {
4048				if( !dotsHasTransform ) {
4049					$el.find('.owl-dots').css({
4050						transform: 'translate3d(0, '+ self.options.dotsVerticalOffset +', 0)'
4051					});
4052				} else {
4053					$el.find('.owl-dots').css({
4054						top: 'calc( 50% - '+ self.options.dotsVerticalOffset +' )'
4055					});
4056				}
4057			}
4058
4059			// Dots Offset - Horizontal & Vertical
4060			if( self.options.dotsVerticalOffset && self.options.dotsHorizontalOffset ) {
4061				$el.find('.owl-dots').css({
4062					transform: 'translate3d('+ self.options.dotsHorizontalOffset +', '+ self.options.dotsVerticalOffset +', 0)'
4063				});
4064			}
4065
4066			return this;
4067		},
4068
4069		carouselNavigate: function() {
4070			var self      = this,
4071				$el       = this.options.wrapper,
4072				$carousel = $el.data('owl.carousel');
4073
4074			if( $('[data-carousel-navigate]').get(0) ) {
4075				$('[data-carousel-navigate-id="#'+ $el.attr('id') +'"]').each(function(){
4076					var $this = $(this),
4077						hasCarousel = $( $this.data('carousel-navigate-id') ).get(0),
4078						toIndex = $this.data('carousel-navigate-to');
4079
4080					if( hasCarousel ) {
4081
4082						$this.on('click', function(){
4083							$carousel.to( parseInt(toIndex) - 1 );
4084						});
4085
4086					}
4087				});
4088
4089				$el.on('change.owl.carousel', function(){
4090					$('[data-carousel-navigate-id="#'+ $el.attr('id') +'"]').removeClass('active');
4091				});
4092
4093				$el.on('changed.owl.carousel', function(e){
4094					$('[data-carousel-navigate-id="#'+ $el.attr('id') +'"][data-carousel-navigate-to="'+ ( e.item.index + 1 ) +'"]').addClass('active');
4095				});
4096			}
4097
4098			return this;
4099		}
4100	};
4101
4102	// expose to scope
4103	$.extend(theme, {
4104		PluginCarousel: PluginCarousel
4105	});
4106
4107	// jquery plugin
4108	$.fn.themePluginCarousel = function(opts) {
4109		return this.map(function() {
4110			var $this = $(this);
4111
4112			if ($this.data(instanceName)) {
4113				return $this.data(instanceName);
4114			} else {
4115				return new PluginCarousel($this, opts);
4116			}
4117
4118		});
4119	}
4120
4121}).apply(this, [window.theme, jQuery]);
4122
4123// Chart Circular
4124(function(theme, $) {
4125
4126	theme = theme || {};
4127
4128	var instanceName = '__chartCircular';
4129
4130	var PluginChartCircular = function($el, opts) {
4131		return this.initialize($el, opts);
4132	};
4133
4134	PluginChartCircular.defaults = {
4135		accX: 0,
4136		accY: -150,
4137		delay: 1,
4138		barColor: '#0088CC',
4139		trackColor: '#f2f2f2',
4140		scaleColor: false,
4141		scaleLength: 5,
4142		lineCap: 'round',
4143		lineWidth: 13,
4144		size: 175,
4145		rotate: 0,
4146		animate: ({
4147			duration: 2500,
4148			enabled: true
4149		})
4150	};
4151
4152	PluginChartCircular.prototype = {
4153		initialize: function($el, opts) {
4154			if ($el.data(instanceName)) {
4155				return this;
4156			}
4157
4158			this.$el = $el;
4159
4160			this
4161				.setData()
4162				.setOptions(opts)
4163				.build();
4164
4165			return this;
4166		},
4167
4168		setData: function() {
4169			this.$el.data(instanceName, this);
4170
4171			return this;
4172		},
4173
4174		setOptions: function(opts) {
4175			this.options = $.extend(true, {}, PluginChartCircular.defaults, opts, {
4176				wrapper: this.$el
4177			});
4178
4179			return this;
4180		},
4181
4182		build: function() {
4183			if (!($.isFunction($.fn.easyPieChart))) {
4184				return this;
4185			}
4186
4187			var self = this,
4188				$el = this.options.wrapper,
4189				value = ($el.attr('data-percent') ? $el.attr('data-percent') : 0),
4190				percentEl = $el.find('.percent');
4191
4192			$.extend(true, self.options, {
4193				onStep: function(from, to, currentValue) {
4194					percentEl.html(parseInt(currentValue));
4195				}
4196			});
4197
4198			$el.attr('data-percent', 0);
4199
4200			$el.easyPieChart(self.options);
4201
4202			setTimeout(function() {
4203
4204				$el.data('easyPieChart').update(value);
4205				$el.attr('data-percent', value);
4206
4207			}, self.options.delay);
4208
4209			return this;
4210		}
4211	};
4212
4213	// expose to scope
4214	$.extend(theme, {
4215		PluginChartCircular: PluginChartCircular
4216	});
4217
4218	// jquery plugin
4219	$.fn.themePluginChartCircular = function(opts) {
4220		return this.map(function() {
4221			var $this = $(this);
4222
4223			if ($this.data(instanceName)) {
4224				return $this.data(instanceName);
4225			} else {
4226				return new PluginChartCircular($this, opts);
4227			}
4228
4229		});
4230	}
4231
4232}).apply(this, [window.theme, jQuery]);
4233
4234// Countdown
4235(function(theme, $) {
4236
4237	theme = theme || {};
4238
4239	var instanceName = '__countdown';
4240
4241	var PluginCountdown = function($el, opts) {
4242		return this.initialize($el, opts);
4243	};
4244
4245	PluginCountdown.defaults = {
4246		date: '2030/06/10 12:00:00',
4247		textDay: 'DAYS',
4248		textHour: 'HRS',
4249		textMin: 'MIN',
4250		textSec: 'SEC',
4251		uppercase: true,
4252		numberClass: '',
4253		wrapperClass: '',
4254		insertHTMLbefore: '',
4255		insertHTMLafter: ''
4256	};
4257
4258	PluginCountdown.prototype = {
4259		initialize: function($el, opts) {
4260			if ($el.data(instanceName)) {
4261				return this;
4262			}
4263
4264			this.$el = $el;
4265
4266			this
4267				.setData()
4268				.setOptions(opts)
4269				.build();
4270
4271			return this;
4272		},
4273
4274		setData: function() {
4275			this.$el.data(instanceName, this);
4276
4277			return this;
4278		},
4279
4280		setOptions: function(opts) {
4281			this.options = $.extend(true, {}, PluginCountdown.defaults, opts, {
4282				wrapper: this.$el
4283			});
4284
4285			return this;
4286		},
4287
4288		build: function() {
4289			if (!($.isFunction($.fn.countTo))) {
4290				return this;
4291			}
4292
4293			var self = this,
4294				$el = this.options.wrapper,
4295				numberClass = ( self.options.numberClass ) ? ' ' + self.options.numberClass : '',
4296				wrapperClass = ( self.options.wrapperClass ) ? ' ' + self.options.wrapperClass : '';
4297
4298			if( self.options.uppercase ) {
4299				$el.countdown(self.options.date).on('update.countdown', function(event) {
4300					var $this = $(this).html(event.strftime(self.options.insertHTMLbefore
4301						+ '<span class="days'+ wrapperClass +'"><span class="'+ numberClass +'">%D</span> '+ self.options.textDay +'</span> '
4302						+ '<span class="hours'+ wrapperClass +'"><span class="'+ numberClass +'">%H</span> '+ self.options.textHour +'</span> '
4303						+ '<span class="minutes'+ wrapperClass +'"><span class="'+ numberClass +'">%M</span> '+ self.options.textMin +'</span> '
4304						+ '<span class="seconds'+ wrapperClass +'"><span class="'+ numberClass +'">%S</span> '+ self.options.textSec +'</span> '
4305						+ self.options.insertHTMLafter
4306					));
4307				});
4308			} else {
4309				$el.countdown(self.options.date).on('update.countdown', function(event) {
4310					var $this = $(this).html(event.strftime(self.options.insertHTMLbefore
4311						+ '<span class="days'+ wrapperClass +'"><span class="'+ numberClass +'">%D</span> '+ self.options.textDay +'</span> '
4312						+ '<span class="hours'+ wrapperClass +'"><span class="'+ numberClass +'">%H</span> '+ self.options.textHour +'</span> '
4313						+ '<span class="minutes'+ wrapperClass +'"><span class="'+ numberClass +'">%M</span> '+ self.options.textMin +'</span> '
4314						+ '<span class="seconds'+ wrapperClass +'"><span class="'+ numberClass +'">%S</span> '+ self.options.textSec +'</span> '
4315						+ self.options.insertHTMLafter
4316					));
4317				});
4318			}
4319
4320			return this;
4321		}
4322	};
4323
4324	// expose to scope
4325	$.extend(theme, {
4326		PluginCountdown: PluginCountdown
4327	});
4328
4329	// jquery plugin
4330	$.fn.themePluginCountdown = function(opts) {
4331		return this.map(function() {
4332			var $this = $(this);
4333
4334			if ($this.data(instanceName)) {
4335				return $this.data(instanceName);
4336			} else {
4337				return new PluginCountdown($this, opts);
4338			}
4339
4340		});
4341	}
4342
4343}).apply(this, [window.theme, jQuery]);
4344
4345// Counter
4346(function(theme, $) {
4347
4348	theme = theme || {};
4349
4350	var instanceName = '__counter';
4351
4352	var PluginCounter = function($el, opts) {
4353		return this.initialize($el, opts);
4354	};
4355
4356	PluginCounter.defaults = {
4357		accX: 0,
4358		accY: 0,
4359		appendWrapper: false,
4360		prependWrapper: false,
4361		speed: 3000,
4362		refreshInterval: 100,
4363		decimals: 0,
4364		onUpdate: null,
4365		onComplete: null
4366	}
4367
4368	PluginCounter.prototype = {
4369		initialize: function($el, opts) {
4370			if ($el.data(instanceName)) {
4371				return this;
4372			}
4373
4374			this.$el = $el;
4375
4376			this
4377				.setData()
4378				.setOptions(opts)
4379				.build();
4380
4381			return this;
4382		},
4383
4384		setData: function() {
4385			this.$el.data(instanceName, this);
4386
4387			return this;
4388		},
4389
4390		setOptions: function(opts) {
4391			this.options = $.extend(true, {}, PluginCounter.defaults, opts, {
4392				wrapper: this.$el
4393			});
4394
4395			return this;
4396		},
4397
4398		build: function() {
4399			if (!($.isFunction($.fn.countTo))) {
4400				return this;
4401			}
4402
4403			var self = this,
4404				$el = this.options.wrapper;
4405
4406			$.extend(self.options, {
4407				onComplete: function() {
4408					
4409					if ($el.data('append')) {
4410						if( self.options.appendWrapper ) {
4411							var appendWrapper = $( self.options.appendWrapper );
4412
4413							appendWrapper.append( $el.data('append') );
4414
4415							$el.html( $el.html() + appendWrapper[0].outerHTML );
4416						} else {
4417							$el.html($el.html() + $el.data('append'));
4418						}
4419					}
4420
4421					if ($el.data('prepend')) {
4422						if( self.options.prependWrapper ) {
4423							var prependWrapper = $( self.options.prependWrapper );
4424
4425							prependWrapper.append( $el.data('prepend') );
4426
4427							$el.html( $el.html() + prependWrapper[0].outerHTML );
4428						} else {
4429							$el.html($el.data('prepend') + $el.html());
4430						}
4431					}
4432				}
4433			});
4434
4435			$el.countTo(self.options);
4436
4437			return this;
4438		}
4439	};
4440
4441	// expose to scope
4442	$.extend(theme, {
4443		PluginCounter: PluginCounter
4444	});
4445
4446	// jquery plugin
4447	$.fn.themePluginCounter = function(opts) {
4448		return this.map(function() {
4449			var $this = $(this);
4450
4451			if ($this.data(instanceName)) {
4452				return $this.data(instanceName);
4453			} else {
4454				return new PluginCounter($this, opts);
4455			}
4456
4457		});
4458	}
4459
4460}).apply(this, [window.theme, jQuery]);
4461
4462// CursorEffect
4463(function(theme, $) {
4464
4465	theme = theme || {};
4466
4467	var instanceName = '__cursorEffect';
4468
4469	var PluginCursorEffect = function($el, opts) {
4470		return this.initialize($el, opts);
4471	};
4472
4473	PluginCursorEffect.defaults = {
4474
4475	}
4476
4477	PluginCursorEffect.prototype = {
4478		initialize: function($el, opts) {
4479			if ($el.data(instanceName)) {
4480				return this;
4481			}
4482
4483			this.$el = $el;
4484
4485			this
4486				.setData()
4487				.setOptions(opts)
4488				.build()
4489				.events();
4490
4491			return this;
4492		},
4493
4494		setData: function() {
4495			this.$el.data(instanceName, this);
4496
4497			return this;
4498		},
4499
4500		setOptions: function(opts) {
4501			this.options = $.extend(true, {}, PluginCursorEffect.defaults, opts, {
4502				wrapper: this.$el
4503			});
4504
4505			return this;
4506		},
4507
4508		build: function() {
4509			var self = this;
4510
4511			// Global Variables for cursor position
4512			self.clientX = -100;
4513			self.clientY = -100;
4514
4515			// Hide Mouse Cursor
4516			if( self.options.hideMouseCursor ) {
4517				self.$el.addClass('hide-mouse-cursor');
4518			}
4519
4520			// Creates the cursor wrapper node
4521			var cursorOuter = document.createElement('DIV');
4522				cursorOuter.className = 'cursor-outer';
4523
4524			// Creates the cursor inner node
4525			var cursorInner = document.createElement('DIV');
4526				cursorInner.className = 'cursor-inner';
4527
4528			// Custom Cursor Outer Color
4529			if( self.options.cursorOuterColor ) {
4530				cursorOuter.style = 'border-color: ' + self.options.cursorOuterColor + ';';
4531			}
4532
4533			// Custom Cursor Inner Color
4534			if( self.options.cursorInnerColor ) {
4535				cursorInner.style = 'background-color: ' + self.options.cursorInnerColor + ';';
4536			}
4537
4538			// Size
4539			if( self.options.size ) {
4540				switch ( self.options.size ) {
4541					case 'small':
4542						self.$el.addClass( 'cursor-effect-size-small' );
4543						break;
4544					
4545					case 'big':
4546						self.$el.addClass( 'cursor-effect-size-big' );
4547						break;
4548				}
4549			}
4550
4551			// Style
4552			if( self.options.style ) {
4553				self.$el.addClass( self.options.style );
4554			}
4555
4556			// Prepend cursor wrapper node to the body
4557			document.body.prepend( cursorOuter );
4558
4559			// Prepend cursor inner node to the body
4560			document.body.prepend( cursorInner );
4561
4562			// Loop for render
4563			var render = function() {
4564				cursorOuter.style.transform = 'translate('+ self.clientX +'px, '+ self.clientY +'px)';
4565				cursorInner.style.transform = 'translate('+ self.clientX +'px, '+ self.clientY +'px)';
4566
4567				self.loopInside = requestAnimationFrame(render);
4568			}
4569			self.loop = requestAnimationFrame(render);
4570
4571			return this;
4572		},
4573
4574		events: function() {
4575			var self = this,
4576				$cursorOuter = $('.cursor-outer'),
4577				$cursorInner = $('.cursor-inner');
4578
4579			var initialCursorOuterBox    = $cursorOuter[0].getBoundingClientRect(),
4580				initialCursorOuterRadius = $cursorOuter.css('border-radius');
4581
4582			// Update Cursor Position
4583			document.addEventListener('mousemove', function(e){
4584				if( !self.isStuck ) {
4585					self.clientX = e.clientX - 20;
4586					self.clientY = e.clientY - 20;
4587				}
4588
4589				$cursorOuter.removeClass('opacity-0');
4590			});
4591
4592			self.isStuck = false;
4593			$('[data-cursor-effect-hover]').on('mouseenter', function(e){
4594
4595				// Identify Event With Hover Class
4596				$cursorOuter.addClass('cursor-outer-hover');
4597				$cursorInner.addClass('cursor-inner-hover');
4598
4599				// Hover Color
4600				var hoverColor = $(this).data('cursor-effect-hover-color');
4601				$cursorOuter.addClass( 'cursor-color-' + hoverColor );
4602				$cursorInner.addClass( 'cursor-color-' + hoverColor );
4603
4604				// Effect Types
4605				switch ( $(this).data('cursor-effect-hover') ) {
4606					case 'fit':
4607						var thisBox = $(this)[0].getBoundingClientRect();
4608
4609						self.clientX = thisBox.x;
4610						self.clientY = thisBox.y;
4611
4612						$cursorOuter.css({
4613							width: thisBox.width,
4614							height: thisBox.height,
4615							'border-radius': $(this).css('border-radius')
4616						}).addClass('cursor-outer-fit');
4617
4618						$cursorInner.addClass('opacity-0');
4619
4620						self.isStuck = true;
4621						break;
4622
4623					case 'plus':
4624						$cursorInner.addClass('cursor-inner-plus');
4625						break;
4626				}
4627			});
4628
4629			$('[data-cursor-effect-hover]').on('mouseleave', function(){
4630				
4631				// Identify Event With Hover Class
4632				$cursorOuter.removeClass('cursor-outer-hover');
4633				$cursorInner.removeClass('cursor-inner-hover');
4634
4635				// Remove Color Class
4636				var hoverColor = $(this).data('cursor-effect-hover-color');
4637				$cursorOuter.removeClass( 'cursor-color-' + hoverColor );
4638				$cursorInner.removeClass( 'cursor-color-' + hoverColor );
4639
4640				// Effect Types
4641				switch ( $(this).data('cursor-effect-hover') ) {
4642					case 'fit':
4643						$cursorOuter.css({
4644							width: initialCursorOuterBox.width,
4645							height: initialCursorOuterBox.height,
4646							'border-radius': initialCursorOuterRadius
4647						}).removeClass('cursor-outer-fit');
4648
4649						$cursorInner.removeClass('opacity-0');
4650
4651						self.isStuck = false;
4652						break;
4653
4654					case 'plus':
4655						$cursorInner.removeClass('cursor-inner-plus');
4656						break;
4657				}
4658			});
4659
4660			$(window).on('scroll', function(){
4661				if( $cursorOuter.hasClass('cursor-outer-fit') ) {
4662					$cursorOuter.addClass('opacity-0').removeClass('cursor-outer-fit');
4663				}
4664			});
4665
4666			return this;
4667		},
4668
4669		destroy: function() {
4670			var self = this;
4671
4672			self.$el.removeClass('hide-mouse-cursor cursor-effect-size-small cursor-effect-size-big cursor-effect-style-square');		
4673
4674			cancelAnimationFrame( self.loop );
4675			cancelAnimationFrame( self.loopInside );
4676
4677			document.querySelector('.cursor-outer').remove();
4678			document.querySelector('.cursor-inner').remove();
4679
4680			self.$el.removeData( instanceName, self );
4681		}
4682	};
4683
4684	// expose to scope
4685	$.extend(theme, {
4686		PluginCursorEffect: PluginCursorEffect
4687	});
4688
4689	// jquery plugin
4690	$.fn.themePluginCursorEffect = function(opts) {
4691		return this.map(function() {
4692			var $this = $(this);
4693
4694			if ($this.data(instanceName)) {
4695				return $this.data(instanceName);
4696			} else {
4697				return new PluginCursorEffect($this, opts);
4698			}
4699
4700		});
4701	}
4702
4703}).apply(this, [window.theme, jQuery]);
4704
4705// Float Element
4706(function(theme, $) {
4707
4708	'use strict';
4709
4710	theme = theme || {};
4711
4712	var instanceName = '__floatElement';
4713
4714	var PluginFloatElement = function($el, opts) {
4715		return this.initialize($el, opts);
4716	};
4717
4718	PluginFloatElement.defaults = {
4719		startPos: 'top',
4720		speed: 3,
4721		horizontal: false,
4722		isInsideSVG: false,
4723		transition: false,
4724		transitionDelay: 0,
4725		transitionDuration: 500
4726	};
4727
4728	PluginFloatElement.prototype = {
4729		initialize: function($el, opts) {
4730			if ($el.data(instanceName)) {
4731				return this;
4732			}
4733
4734			this.$el = $el;
4735
4736			this
4737				.setData()
4738				.setOptions(opts)
4739				.build();
4740
4741			return this;
4742		},
4743
4744		setData: function() {
4745			this.$el.data(instanceName, this);
4746
4747			return this;
4748		},
4749
4750		setOptions: function(opts) {
4751			this.options = $.extend(true, {}, PluginFloatElement.defaults, opts, {
4752				wrapper: this.$el
4753			});
4754
4755			return this;
4756		},
4757
4758		build: function() {
4759			var self = this,
4760				$el = this.options.wrapper,
4761				$window = $(window),
4762				minus;
4763
4764			// If has floating elements inside a SVG. 
4765			// Intersection Observer API do not check elements inside SVG's, so we need initialize trough top parent SVG
4766			if( $el.data('plugin-float-element-svg') ) {
4767				$el.find('[data-plugin-float-element]').each(function(){
4768					var $this = $(this),
4769						opts;
4770
4771					var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
4772					if (pluginOptions)
4773						opts = pluginOptions;
4774
4775					$this.themePluginFloatElement(opts);
4776				});
4777
4778				return this;
4779			}
4780
4781			if( self.options.style ) {
4782				$el.attr('style', self.options.style);
4783			}
4784
4785			if( $window.width() > 767 ) {
4786
4787				// Set Start Position
4788				if( self.options.startPos == 'none' ) {
4789					minus = '';
4790				} else if( self.options.startPos == 'top' ) {
4791					$el.css({
4792						top: 0
4793					});
4794					minus = '';
4795				} else {
4796					$el.css({
4797						bottom: 0
4798					});
4799					minus = '-';
4800				}
4801
4802				// Set Transition
4803				if( self.options.transition ) {
4804					$el.css({
4805						transition: 'ease-out transform '+ self.options.transitionDuration +'ms ' + self.options.transitionDelay + 'ms'
4806					});
4807				}
4808
4809				// First Load
4810				self.movement(minus);	
4811
4812				// Scroll
4813				$window.on('scroll', function(){
4814					self.movement(minus);				   
4815				});
4816
4817			}
4818
4819			return this;
4820		},
4821
4822		movement: function(minus) {
4823			var self = this,
4824				$el = this.options.wrapper,
4825				$window = $(window),
4826				scrollTop = $window.scrollTop(),
4827		    	elementOffset = $el.offset().top,
4828		     	currentElementOffset = (elementOffset - scrollTop),
4829		     	factor = ( self.options.isInsideSVG ) ? 2 : 100;
4830
4831		   	var scrollPercent = factor * currentElementOffset / ($window.height());
4832
4833		   	if( $el.visible( true ) ) {
4834
4835		   		if( !self.options.horizontal ) {
4836
4837		   			$el.css({
4838			   			transform: 'translate3d(0, '+ minus + scrollPercent / self.options.speed +'%, 0)'
4839			   		});
4840
4841		   		} else {
4842
4843		   			$el.css({
4844			   			transform: 'translate3d('+ minus + scrollPercent / self.options.speed +'%, '+ minus + scrollPercent / self.options.speed +'%, 0)'
4845			   		});
4846
4847		   		}
4848		   		
4849		   	}
4850
4851		}
4852	};
4853
4854	// expose to scope
4855	$.extend(theme, {
4856		PluginFloatElement: PluginFloatElement
4857	});
4858
4859	// jquery plugin
4860	$.fn.themePluginFloatElement = function(opts) {
4861		return this.map(function() {
4862			var $this = $(this);
4863
4864			if ($this.data(instanceName)) {
4865				return $this.data(instanceName);
4866			} else {
4867				return new PluginFloatElement($this, opts);
4868			}
4869
4870		});
4871	}
4872
4873}).apply(this, [window.theme, jQuery]);
4874
4875// GDPR
4876(function(theme, $) {
4877
4878	theme = theme || {};
4879
4880	var instanceName = '__gdpr';
4881
4882	var PluginGDPR = function($el, opts) {
4883		return this.initialize($el, opts);
4884	};
4885
4886	PluginGDPR.defaults = {
4887		cookieBarShowDelay: 3000
4888	};
4889
4890	PluginGDPR.prototype = {
4891		initialize: function($el, opts) {
4892			var self = this;
4893
4894			this.$el = $el;
4895
4896			this
4897				.setData()
4898				.setOptions(opts)
4899				.build()
4900				.events();
4901
4902			return this;
4903		},
4904
4905		setData: function() {
4906			this.$el.data(instanceName, this);
4907
4908			return this;
4909		},
4910
4911		setOptions: function(opts) {
4912			this.options = $.extend(true, {}, PluginGDPR.defaults, opts, {
4913				wrapper: this.$el
4914			});
4915
4916			return this;
4917		},
4918
4919		build: function() {
4920			var self = this;
4921
4922			// Show
4923			if( !$.cookie( 'porto-privacy-bar' ) ) {
4924				setTimeout(function(){
4925					self.options.wrapper.addClass('show');
4926				}, self.options.cookieBarShowDelay);
4927			}
4928
4929			// If already has preferences cookie, check inputs according preferences cookie data
4930			if( $.cookie( 'porto-gdpr-preferences' ) ) {
4931				var preferencesArr = $.cookie( 'porto-gdpr-preferences' ).split(',');
4932
4933				for( var i = 0; i < preferencesArr.length; i++ ) {
4934					if( $('input[value="'+ preferencesArr[i] +'"]').get(0) ) {
4935						if( $('input[value="'+ preferencesArr[i] +'"]').is(':checkbox') ) {
4936							$('input[value="'+ preferencesArr[i] +'"]').prop('checked', true);
4937						}
4938					}
4939				}
4940			}
4941
4942			return this;
4943
4944		},
4945
4946		events: function() {
4947			var self = this;
4948
4949			// Agree Trigger
4950			self.options.wrapper.find('.gdpr-agree-trigger').on('click', function(e){
4951				e.preventDefault();
4952
4953				$('.gdpr-preferences-form').find('.gdpr-input').each(function(){
4954					if( $(this).is(':checkbox') || $(this).is(':hidden') ) {
4955						$(this).prop('checked', true);
4956					}
4957				});
4958
4959				$('.gdpr-preferences-form').trigger('submit').removeClass('show');
4960
4961				self.removeCookieBar();
4962			});
4963
4964			// Preferences Trigger
4965			self.options.wrapper.find('.gdpr-preferences-trigger').on('click', function(e){
4966				e.preventDefault();
4967
4968				$('.gdpr-preferences-popup').addClass('show');
4969			});
4970
4971			// Close Popup Button
4972			$('.gdpr-close-popup').on('click', function(e){
4973				e.preventDefault();
4974
4975				$('.gdpr-preferences-popup').removeClass('show');
4976			});
4977
4978			// Close Popup When Click Outside of popup area
4979			$('.gdpr-preferences-popup').on('click', function(e){
4980				if( !$(e.target).closest('.gdpr-preferences-popup-content').get(0) ) {
4981					$('.gdpr-preferences-popup').removeClass('show');
4982				}
4983			});
4984
4985			// Preference Form
4986			$('.gdpr-preferences-form').on('submit', function(e){
4987				e.preventDefault();
4988
4989				var $this = $(this);
4990
4991				// Save Preferences Button
4992				$this.find('button[type="submit"]').text( 'SAVING...' );
4993
4994				// Form Data
4995				var formData = [];
4996				$this.find('.gdpr-input').each(function(){
4997					if( $(this).is(':checkbox') && $(this).is(':checked') || $(this).is(':hidden') ) {
4998						formData.push( $(this).val() );
4999					}
5000				});
5001
5002				$.cookie( 'porto-privacy-bar', true );
5003
5004				setTimeout(function(){
5005					$this.find('button[type="submit"]').text( 'SAVED!' ).removeClass('btn-primary').addClass('btn-success');
5006
5007					setTimeout(function(){
5008						$('.gdpr-preferences-popup').removeClass('show');
5009						self.removeCookieBar();
5010
5011						$this.find('button[type="submit"]').text( 'SAVE PREFERENCES' ).removeClass('btn-success').addClass('btn-primary');
5012
5013						if( $.cookie( 'porto-gdpr-preferences' ) ) {
5014
5015							$.cookie( 'porto-gdpr-preferences', formData );
5016							location.reload();
5017
5018						} else {
5019
5020							$.cookie( 'porto-gdpr-preferences', formData );
5021
5022							if ($.isFunction($.fn['themePluginGDPRWrapper']) && $('[data-plugin-gdpr-wrapper]').length) {
5023
5024								$(function() {
5025									$('[data-plugin-gdpr-wrapper]:not(.manual)').each(function() {
5026										var $this = $(this),
5027											opts;
5028
5029										$this.removeData('__gdprwrapper');
5030
5031										var pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
5032										if (pluginOptions)
5033											opts = pluginOptions;
5034
5035										$this.themePluginGDPRWrapper(opts);
5036									});
5037								});
5038
5039							}
5040
5041						}
5042
5043					}, 500);
5044				}, 1000);
5045			});
5046
5047			// Remove/Reset Cookies
5048			$('.gdpr-reset-cookies').on('click', function(e){
5049				e.preventDefault();
5050
5051				self.clearCookies();
5052
5053				location.reload();
5054			});
5055
5056			// Open Preferences
5057			$('.gdpr-open-preferences').on('click', function(e){
5058				e.preventDefault();
5059
5060				$('.gdpr-preferences-popup').toggleClass('show');
5061			});
5062
5063			return this;
5064		},
5065
5066		removeCookieBar: function() {
5067			var self = this;
5068
5069			self.options.wrapper.addClass('removing').on('transitionend', function(){
5070				setTimeout(function(){
5071					self.options.wrapper.removeClass('show removing');
5072				}, 500);
5073			});
5074
5075			return this;
5076		},
5077
5078		clearCookies: function() {
5079			var self = this;
5080
5081			$.removeCookie( 'porto-privacy-bar' );
5082			$.removeCookie( 'porto-gdpr-preferences' );
5083
5084			return this;
5085		}
5086	};
5087
5088	// expose to scope
5089	$.extend(theme, {
5090		PluginGDPR: PluginGDPR
5091	});
5092
5093	// jquery plugin
5094	$.fn.themePluginGDPR = function(opts) {
5095		return this.map(function() {
5096			var $this = $(this);
5097
5098			if ($this.data(instanceName)) {
5099				return $this.data(instanceName);
5100			} else {
5101				return new PluginGDPR($this, opts);
5102			}
5103
5104		});
5105	}
5106
5107}).apply(this, [window.theme, jQuery]);
5108
5109// GDPR Wrapper
5110(function(theme, $) {
5111
5112	theme = theme || {};
5113
5114	var instanceName = '__gdprwrapper';
5115
5116	var PluginGDPRWrapper = function($el, opts) {
5117		return this.initialize($el, opts);
5118	};
5119
5120	PluginGDPRWrapper.defaults = {
5121
5122	};
5123
5124	PluginGDPRWrapper.prototype = {
5125		initialize: function($el, opts) {
5126			var self = this;
5127
5128			this.$el = $el;
5129
5130			this
5131				.setData()
5132				.setOptions(opts)
5133				.build();
5134				
5135			return this;
5136		},
5137
5138		setData: function() {
5139			this.$el.data(instanceName, this);
5140
5141			return this;
5142		},
5143
5144		setOptions: function(opts) {
5145			this.options = $.extend(true, {}, PluginGDPRWrapper.defaults, opts, {
5146				wrapper: this.$el
5147			});
5148
5149			return this;
5150		},
5151
5152		build: function() {
5153			var self = this;
5154
5155			if( $.cookie( 'porto-gdpr-preferences' ) && $.cookie( 'porto-gdpr-preferences' ).indexOf( self.options.checkCookie ) != -1 ) {
5156
5157				$.ajax({
5158					url: self.options.ajaxURL,
5159					cache: false,
5160					complete: function(data) {
5161					
5162						setTimeout(function() {
5163
5164							self.options.wrapper.html(data.responseText).addClass('show');
5165
5166						}, 1000);
5167
5168					}
5169				});
5170
5171			} else {
5172				self.options.wrapper.addClass('show');
5173			}
5174
5175			return this;
5176
5177		}
5178	};
5179
5180	// expose to scope
5181	$.extend(theme, {
5182		PluginGDPRWrapper: PluginGDPRWrapper
5183	});
5184
5185	// jquery plugin
5186	$.fn.themePluginGDPRWrapper = function(opts) {
5187		return this.map(function() {
5188			var $this = $(this);
5189
5190			if ($this.data(instanceName)) {
5191				return $this.data(instanceName);
5192			} else {
5193				return new PluginGDPRWrapper($this, opts);
5194			}
5195
5196		});
5197	}
5198
5199}).apply(this, [window.theme, jQuery]);
5200
5201// Hover Effect
5202(function(theme, $) {
5203
5204	theme = theme || {};
5205
5206	var instanceName = '__hoverEffect';
5207
5208	var PluginHoverEffect = function($el, opts) {
5209		return this.initialize($el, opts);
5210	};
5211
5212	PluginHoverEffect.defaults = {
5213		effect: 'magnetic',
5214		magneticMx: 0.15,
5215		magneticMy: 0.3,
5216		magneticDeg: 12,
5217		selector: '.thumb-info, .hover-effect-3d-wrapper',
5218		sensitivity: 20
5219	};
5220
5221	PluginHoverEffect.prototype = {
5222		initialize: function($el, opts) {
5223			if ($el.data(instanceName)) {
5224				return this;
5225			}
5226
5227			this.$el = $el;
5228
5229			this
5230				.setData()
5231				.setOptions(opts)
5232				.build();
5233
5234			return this;
5235		},
5236
5237		setData: function() {
5238			this.$el.data(instanceName, this);
5239
5240			return this;
5241		},
5242
5243		setOptions: function(opts) {
5244			this.options = $.extend(true, {}, PluginHoverEffect.defaults, opts, {
5245				wrapper: this.$el
5246			});
5247
5248			return this;
5249		},
5250
5251		build: function() {
5252			var self = this;
5253
5254			if(self.$el.hasClass('hover-effect-3d')) {
5255				self.options.effect = '3d';
5256			}
5257
5258			// Magnetic
5259			if(self.options.effect == 'magnetic') {
5260				self.magnetic();
5261			}
5262
5263			// 3d
5264			if(self.options.effect == '3d') {
5265				self.hover3d();
5266			}
5267
5268			return this;
5269		},
5270
5271		magnetic: function() {
5272			var self = this;
5273
5274			self.$el.mousemove(function(e) {
5275
5276				const pos = this.getBoundingClientRect();
5277				const mx = e.clientX - pos.left - pos.width/2; 
5278				const my = e.clientY - pos.top - pos.height/2;
5279
5280				this.style.transform = 'translate('+ mx * self.options.magneticMx +'px, '+ my * self.options.magneticMx +'px)';
5281
5282			});
5283
5284			self.$el.mouseleave(function(e) {
5285
5286				this.style.transform = 'translate3d(0px, 0px, 0px)';
5287
5288			});
5289
5290			return this;
5291
5292		},
5293
5294		hover3d: function() {
5295			var self = this;
5296
5297			if ($.isFunction($.fn['hover3d'])) {
5298
5299				self.$el.hover3d({
5300					selector: self.options.selector,
5301					sensitivity: self.options.sensitivity
5302				});
5303
5304			}
5305
5306			return this;
5307
5308		}
5309	};
5310
5311	// expose to scope
5312	$.extend(theme, {
5313		PluginHoverEffect: PluginHoverEffect
5314	});
5315
5316	// jquery plugin
5317	$.fn.themePluginHoverEffect = function(opts) {
5318		return this.map(function() {
5319			var $this = $(this);
5320
5321			if ($this.data(instanceName)) {
5322				return $this.data(instanceName);
5323			} else {
5324				return new PluginHoverEffect($this, opts);
5325			}
5326
5327		});
5328	};
5329
5330}).apply(this, [window.theme, jQuery]);
5331
5332// Icon
5333(function(theme, $) {
5334
5335	'use strict';
5336
5337	theme = theme || {};
5338
5339	var instanceName = '__icon';
5340
5341	var PluginIcon = function($el, opts) {
5342		return this.initialize($el, opts);
5343	};
5344
5345	PluginIcon.defaults = {
5346		color: '#2388ED',
5347		animated: false,
5348		delay: 300,
5349		onlySVG: false,
5350		removeClassAfterInit: false,
5351		fadeIn: true,
5352		accY: 0
5353	};
5354
5355	PluginIcon.prototype = {
5356		initialize: function($el, opts) {
5357			if ($el.data(instanceName)) {
5358				return this;
5359			}
5360
5361			this.$el = $el;
5362
5363			this
5364				.setData()
5365				.setOptions(opts)
5366				.build();
5367
5368			return this;
5369		},
5370
5371		setData: function() {
5372			this.$el.data(instanceName, this);
5373
5374			return this;
5375		},
5376
5377		setOptions: function(opts) {
5378			this.options = $.extend(true, {}, PluginIcon.defaults, opts, {
5379				wrapper: this.$el
5380			});
5381
5382			return this;
5383		},
5384
5385		build: function() {
5386			var self  	 = this,
5387				$el   	 = this.options.wrapper,
5388				color 	 = self.options.color,
5389				elTopDistance = $el.offset().top,
5390				windowTopDistance = $(window).scrollTop(),
5391				duration = ( self.options.animated && !self.options.strokeBased ) ? 200 : 100;
5392
5393			// Check origin
5394			if( window.location.protocol === 'file:' ) {
5395				$el.css({
5396					opacity: 1,
5397					width: $el.attr('width')
5398				});
5399
5400				if( self.options.extraClass ) {
5401					$el.addClass( self.options.extraClass );
5402				}
5403
5404				if( self.options.extraClass.indexOf('-color-light') > 0 ) {
5405					$el.css({
5406						filter: 'invert(1)'
5407					});
5408				}
5409
5410				$(window).trigger('icon.rendered');
5411				return;
5412			}
5413
5414			// Duration
5415			if( self.options.duration ) {
5416				duration = self.options.duration;
5417			}
5418
5419			// SVG Content
5420			var SVGContent = $.get({
5421				url: $el.attr('src'), 
5422				success: function(data, status, xhr){
5423					var iconWrapper = self.options.fadeIn ? $('<div class="animated-icon animated fadeIn">'+ xhr.responseText +'</div>') : $('<div class="animated-icon animated">'+ xhr.responseText +'</div>'),
5424						uniqid = 'icon_' + Math.floor(Math.random() * 26) + Date.now();
5425
5426					// Add ID
5427					iconWrapper.find('svg').attr('id', uniqid);
5428
5429					// Identify with filename
5430					iconWrapper.find('svg').attr('data-filename', $el.attr('src').split(/(\\|\/)/g).pop());
5431
5432					if( $el.attr('width') ) {
5433						iconWrapper.find('svg')
5434							.attr('width', $el.attr('width'))
5435							.attr('height', $el.attr('width'));						
5436					}
5437
5438					if( $el.attr('height') ) {
5439						iconWrapper.find('svg')
5440							.attr('height', $el.attr('height'));	
5441					}
5442
5443					if( self.options.svgViewBox ) {
5444						iconWrapper.find('svg')
5445							.attr('viewBox', self.options.svgViewBox);
5446					}
5447
5448					$el.replaceWith(iconWrapper);
5449
5450					if( self.options.extraClass ) {
5451						iconWrapper.addClass( self.options.extraClass );
5452					}
5453
5454					if( self.options.removeClassAfterInit ) {
5455						iconWrapper.removeClass(self.options.removeClassAfterInit);
5456					}
5457
5458					if( self.options.onlySVG ) {
5459						$(window).trigger('icon.rendered');
5460						return this;
5461					}
5462
5463					$el = iconWrapper;
5464
5465					var icon = new Vivus(uniqid, {start: 'manual', type: 'sync', selfDestroy: true, duration: duration, onReady: function(obj){
5466						var styleElement = document.createElementNS("http://www.w3.org/2000/svg", "style"),
5467							animateStyle = '';
5468
5469						// SVG Fill Based
5470						if( self.options.animated && !self.options.strokeBased || !self.options.animated && color && !self.options.strokeBased ) {
5471							animateStyle = 'stroke-width: 0.1px; fill-opacity: 0; transition: ease fill-opacity 300ms;';
5472							
5473							// Set Style on SVG inside object
5474							styleElement.textContent = '#' + uniqid + ' path, #' + uniqid + ' line, #' + uniqid + ' rect, #' + uniqid + ' circle, #' + uniqid + ' polyline { fill: '+ color +'; stroke: '+ color +'; '+ animateStyle + (self.options.svgStyle ? self.options.svgStyle : "") + ' } .finished path { fill-opacity: 1; }';
5475							obj.el.appendChild(styleElement);
5476						}
5477
5478						// SVG Stroke Based
5479						if( self.options.animated && self.options.strokeBased || !self.options.animated && color && self.options.strokeBased ) {
5480
5481							// Set Style on SVG inside object
5482							styleElement.textContent = '#' + uniqid + ' path, #' + uniqid + ' line, #' + uniqid + ' rect, #' + uniqid + ' circle, #' + uniqid + ' polyline { stroke: '+ color +'; ' + (self.options.svgStyle ? self.options.svgStyle : "") + '}';
5483							obj.el.appendChild(styleElement);
5484						}
5485
5486						$.event.trigger('theme.plugin.icon.svg.ready');
5487					}});
5488
5489					// Isn't animated
5490					if( !self.options.animated ) {
5491						setTimeout(function(){
5492							icon.finish();
5493						}, 10);
5494						$el.css({ opacity: 1 });
5495					}
5496
5497					// Animated
5498					if( self.options.animated && $(window).width() > 767 ) {
5499						
5500						// First Load
5501						if( $el.visible( true ) ) {
5502							self.startIconAnimation( icon, $el );
5503						} else if( elTopDistance < windowTopDistance ) {
5504							self.startIconAnimation( icon, $el );
5505						}
5506
5507						// On Scroll
5508						$(window).on('scroll', function(){
5509							if( $el.visible( true ) ) {
5510								self.startIconAnimation( icon, $el );
5511							}
5512						});
5513
5514					} else {
5515						
5516						$el.css({ opacity: 1 });
5517						icon.finish();
5518						
5519						$(window).on('theme.plugin.icon.svg.ready', function(){
5520							setTimeout(function(){
5521								icon.el.setAttribute('class', 'finished');
5522								icon.finish();
5523							}, 300);
5524						});
5525						
5526					}
5527
5528					$(window).trigger('icon.rendered');
5529				}
5530			});
5531
5532			return this;
5533		},
5534
5535		startIconAnimation: function(icon, $el) {
5536			var self = this;
5537
5538			// Animate for better performance
5539			$({to:0}).animate({to:1}, ((self.options.strokeBased) ? self.options.delay : self.options.delay + 300 ), function() {
5540				$el.css({ opacity: 1 });
5541			});
5542
5543			$({to:0}).animate({to:1}, self.options.delay, function() {
5544				icon.play(1);
5545
5546				setTimeout(function(){
5547					icon.el.setAttribute('class', 'finished');
5548				}, icon.duration * 5 );
5549			});
5550		}
5551	};
5552
5553	// expose to scope
5554	$.extend(theme, {
5555		PluginIcon: PluginIcon
5556	});
5557
5558	// jquery plugin
5559	$.fn.themePluginIcon = function(opts) {
5560		return this.map(function() {
5561			var $this = $(this);
5562
5563			if ($this.data(instanceName)) {
5564				return $this.data(instanceName);
5565			} else {
5566				return new PluginIcon($this, opts);
5567			}
5568
5569		});
5570	};
5571
5572}).apply(this, [window.theme, jQuery]);
5573
5574// In Viewport Style
5575(function(theme, $) {
5576
5577	theme = theme || {};
5578
5579	var instanceName = '__inviewportstyle';
5580
5581	var PluginInViewportStyle = function($el, opts) {
5582		return this.initialize($el, opts);
5583	};
5584
5585	PluginInViewportStyle.defaults = {
5586		viewport: window, 
5587		threshold: [0],
5588		modTop: '-200px',
5589		modBottom: '-200px',
5590		style: {'transition': 'all 1s ease-in-out'},
5591		styleIn: '',
5592		styleOut: '',
5593		classIn: '',
5594		classOut: ''
5595	};
5596
5597	PluginInViewportStyle.prototype = {
5598		initialize: function($el, opts) {
5599			if ($el.data(instanceName)) {
5600				return this;
5601			}
5602
5603			this.$el = $el;
5604
5605			this
5606				.setData()
5607				.setOptions(opts)
5608				.build();
5609
5610			return this;
5611		},
5612
5613		setData: function() {
5614			this.$el.data(instanceName, this);
5615
5616			return this;
5617		},
5618
5619		setOptions: function(opts) {
5620			this.options = $.extend(true, {}, PluginInViewportStyle.defaults, opts, {});
5621
5622			return this;
5623		},
5624
5625		build: function() {
5626			var self = this,
5627				el = self.$el.get(0);
5628
5629			self.$el.css(self.options.style);
5630
5631		    if (typeof window.IntersectionObserver === 'function') {
5632			    const un = observeElementInViewport.observeElementInViewport(
5633			        el, function() {
5634			        	self.$el.css(self.options.styleIn);
5635			        	self.$el
5636			        		.addClass(self.options.classIn)
5637			        		.removeClass(self.options.classOut);
5638			        }, function() {
5639			        	self.$el.css(self.options.styleOut);
5640			        	self.$el
5641			        		.addClass(self.options.classOut)
5642			        		.removeClass(self.options.classIn);
5643			        }, {
5644			        	viewport: self.options.viewport, 
5645			            threshold: self.options.threshold,
5646						modTop: self.options.modTop,
5647						modBottom: self.options.modBottom
5648			        }
5649			    )
5650		    };
5651
5652			return this;
5653		}
5654	};
5655
5656	// expose to scope
5657	$.extend(theme, {
5658		PluginInViewportStyle: PluginInViewportStyle
5659	});
5660
5661	// jquery plugin
5662	$.fn.themePluginInViewportStyle = function(opts) {
5663		return this.map(function() {
5664			var $this = $(this);
5665
5666			if ($this.data(instanceName)) {
5667				return $this.data(instanceName);
5668			} else {
5669				return new PluginInViewportStyle($this, opts);
5670			}
5671
5672		});
5673	}
5674
5675}).apply(this, [window.theme, jQuery]);
5676
5677// Lightbox
5678(function(theme, $) {
5679
5680	theme = theme || {};
5681
5682	var instanceName = '__lightbox';
5683
5684	var PluginLightbox = function($el, opts) {
5685		return this.initialize($el, opts);
5686	};
5687
5688	PluginLightbox.defaults = {
5689		tClose: 'Close (Esc)', // Alt text on close button
5690		tLoading: 'Loading...', // Text that is displayed during loading. Can contain %curr% and %total% keys
5691		gallery: {
5692			tPrev: 'Previous (Left arrow key)', // Alt text on left arrow
5693			tNext: 'Next (Right arrow key)', // Alt text on right arrow
5694			tCounter: '%curr% of %total%' // Markup for "1 of 7" counter
5695		},
5696		image: {
5697			tError: '<a href="%url%">The image</a> could not be loaded.' // Error message when image could not be loaded
5698		},
5699		ajax: {
5700			tError: '<a href="%url%">The content</a> could not be loaded.' // Error message when ajax request failed
5701		},
5702		callbacks: {
5703			open: function() {
5704				$('html').addClass('lightbox-opened');
5705			},
5706			close: function() {
5707				$('html').removeClass('lightbox-opened');
5708			}
5709		}
5710	};
5711
5712	PluginLightbox.prototype = {
5713		initialize: function($el, opts) {
5714			if ($el.data(instanceName)) {
5715				return this;
5716			}
5717
5718			this.$el = $el;
5719
5720			this
5721				.setData()
5722				.setOptions(opts)
5723				.build();
5724
5725			return this;
5726		},
5727
5728		setData: function() {
5729			this.$el.data(instanceName, this);
5730
5731			return this;
5732		},
5733
5734		setOptions: function(opts) {
5735			this.options = $.extend(true, {}, PluginLightbox.defaults, opts, {
5736				wrapper: this.$el
5737			});
5738
5739			return this;
5740		},
5741
5742		build: function() {
5743			if (!($.isFunction($.fn.magnificPopup))) {
5744				return this;
5745			}
5746
5747			this.options.wrapper.magnificPopup(this.options);
5748
5749			return this;
5750		}
5751	};
5752
5753	// expose to scope
5754	$.extend(theme, {
5755		PluginLightbox: PluginLightbox
5756	});
5757
5758	// jquery plugin
5759	$.fn.themePluginLightbox = function(opts) {
5760		return this.map(function() {
5761			var $this = $(this);
5762
5763			if ($this.data(instanceName)) {
5764				return $this.data(instanceName);
5765			} else {
5766				return new PluginLightbox($this, opts);
5767			}
5768
5769		});
5770	}
5771
5772}).apply(this, [window.theme, jQuery]);
5773
5774// Loading Overlay
5775(function(theme, $) {
5776
5777	'use strict';
5778
5779	theme = theme || {};
5780
5781	// Default
5782	var loadingOverlayDefaultTemplate = [
5783		'<div class="loading-overlay">',
5784			'<div class="bounce-loader"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>',
5785		'</div>'
5786	].join('');
5787
5788	// Percentage
5789	var loadingOverlayPercentageTemplate = [
5790		'<div class="loading-overlay loading-overlay-percentage">',
5791			'<div class="page-loader-progress-wrapper"><span class="page-loader-progress">0</span><span class="page-loader-progress-symbol">%</span></div>',
5792		'</div>'
5793	].join('');
5794
5795	// Cubes
5796	var loadingOverlayCubesTemplate = [
5797		'<div class="loading-overlay">',
5798			'<div class="bounce-loader"><div class="cssload-thecube"><div class="cssload-cube cssload-c1"></div><div class="cssload-cube cssload-c2"></div><div class="cssload-cube cssload-c4"></div><div class="cssload-cube cssload-c3"></div></div></div>',
5799		'</div>'
5800	].join('');
5801
5802	// Cube Progress
5803	var loadingOverlayCubeProgressTemplate = [
5804		'<div class="loading-overlay">',
5805			'<div class="bounce-loader"><span class="cssload-cube-progress"><span class="cssload-cube-progress-inner"></span></span></div>',
5806		'</div>'
5807	].join('');
5808
5809	// Float Rings
5810	var loadingOverlayFloatRingsTemplate = [
5811		'<div class="loading-overlay">',
5812			'<div class="bounce-loader"><div class="cssload-float-rings-loader"><div class="cssload-float-rings-inner cssload-one"></div><div class="cssload-float-rings-inner cssload-two"></div><div class="cssload-float-rings-inner cssload-three"></div></div></div>',
5813		'</div>'
5814	].join('');
5815
5816	// Floating Bars
5817	var loadingOverlayFloatBarsTemplate = [
5818		'<div class="loading-overlay">',
5819			'<div class="bounce-loader"><div class="cssload-float-bars-container"><ul class="cssload-float-bars-flex-container"><li><span class="cssload-float-bars-loading"></span></li></div></div></div>',
5820		'</div>'
5821	].join('');
5822
5823	// Speeding Wheel
5824	var loadingOverlaySpeedingWheelTemplate = [
5825		'<div class="loading-overlay">',
5826			'<div class="bounce-loader"><div class="cssload-speeding-wheel-container"><div class="cssload-speeding-wheel"></div></div></div>',
5827		'</div>'
5828	].join('');
5829
5830	// Zenith
5831	var loadingOverlayZenithTemplate = [
5832		'<div class="loading-overlay">',
5833			'<div class="bounce-loader"><div class="cssload-zenith-container"><div class="cssload-zenith"></div></div></div>',
5834		'</div>'
5835	].join('');
5836
5837	// Spinning Square
5838	var loadingOverlaySpinningSquareTemplate = [
5839		'<div class="loading-overlay">',
5840			'<div class="bounce-loader"><div class="cssload-spinning-square-loading"></div></div>',
5841		'</div>'
5842	].join('');
5843
5844	// Pulse
5845	var loadingOverlayPulseTemplate = [
5846		'<div class="loading-overlay">',
5847			'<div class="bounce-loader"><div class="wrapper-pulse"><div class="cssload-pulse-loader"></div></div></div>',
5848		'</div>'
5849	].join('');
5850
5851	var LoadingOverlay = function( $wrapper, options, noInheritOptions ) {
5852		return this.initialize( $wrapper, options, noInheritOptions );
5853	};
5854
5855	LoadingOverlay.prototype = {
5856
5857		options: {
5858			css: {},
5859			hideDelay: 500,
5860			progressMinTimeout: 0,
5861			effect: 'default'
5862		},
5863
5864		initialize: function( $wrapper, options, noInheritOptions ) {
5865			this.$wrapper = $wrapper;
5866
5867			this
5868				.setVars()
5869				.setOptions( options, noInheritOptions )
5870				.build()
5871				.events()
5872				.dynamicShowHideEvents();
5873
5874			this.$wrapper.data( 'loadingOverlay', this );
5875		},
5876
5877		setVars: function() {
5878			this.$overlay = this.$wrapper.find('.loading-overlay');
5879			this.pageStatus = null;
5880			this.progress = null;
5881			this.animationInterval = 33;
5882
5883			return this;
5884		},
5885
5886		setOptions: function( options, noInheritOptions ) {
5887			if ( !this.$overlay.get(0) ) {
5888				this.matchProperties();
5889			}
5890			
5891			if( noInheritOptions ) {
5892				this.options     = $.extend( true, {}, this.options, options );
5893			} else {
5894				this.options     = $.extend( true, {}, this.options, options, theme.fn.getOptions(this.$wrapper.data('plugin-options')) );
5895			}
5896
5897			this.loaderClass = this.getLoaderClass( this.options.css.backgroundColor );
5898
5899			return this;
5900		},
5901
5902		build: function() {
5903			var _self = this;
5904
5905			if ( !this.$overlay.closest(document.documentElement).get(0) ) {
5906				if ( !this.$cachedOverlay ) {
5907
5908					switch ( _self.options.effect ) {
5909						case 'percentageProgress1':
5910							this.$overlay = $( loadingOverlayPercentageTemplate ).clone();
5911							break;
5912
5913						case 'percentageProgress2':
5914							this.$overlay = $( loadingOverlayPercentageTemplate ).clone();
5915							this.$overlay
5916								.addClass('loading-overlay-percentage-effect-2')
5917								.prepend('<div class="loading-overlay-background-layer"></div>');
5918							break;
5919
5920						case 'cubes':
5921							this.$overlay = $( loadingOverlayCubesTemplate ).clone();
5922							break;
5923
5924						case 'cubeProgress':
5925							this.$overlay = $( loadingOverlayCubeProgressTemplate ).clone();
5926							break;
5927
5928						case 'floatRings':
5929							this.$overlay = $( loadingOverlayFloatRingsTemplate ).clone();
5930							break;
5931
5932						case 'floatBars':
5933							this.$overlay = $( loadingOverlayFloatBarsTemplate ).clone();
5934							break;
5935
5936						case 'speedingWheel':
5937							this.$overlay = $( loadingOverlaySpeedingWheelTemplate ).clone();
5938							break;
5939
5940						case 'zenith':
5941							this.$overlay = $( loadingOverlayZenithTemplate ).clone();
5942							break;
5943
5944						case 'spinningSquare':
5945							this.$overlay = $( loadingOverlaySpinningSquareTemplate ).clone();
5946							break;
5947
5948						case 'pulse':
5949							this.$overlay = $( loadingOverlayPulseTemplate ).clone();
5950							break;
5951
5952						case 'default':
5953						default:
5954							this.$overlay = $( loadingOverlayDefaultTemplate ).clone();
5955							break;
5956					}
5957					
5958					if ( this.options.css ) {
5959						this.$overlay.css( this.options.css );
5960						this.$overlay.find( '.loader' ).addClass( this.loaderClass );
5961					}
5962				} else {
5963					this.$overlay = this.$cachedOverlay.clone();
5964				}
5965
5966				this.$wrapper.prepend( this.$overlay );
5967			}
5968
5969			if ( !this.$cachedOverlay ) {
5970				this.$cachedOverlay = this.$overlay.clone();
5971			}
5972
5973			if( ['percentageProgress1', 'percentageProgress2'].includes(_self.options.effect) ) {
5974				_self.updateProgress();
5975
5976				if( _self.options.isDynamicHideShow ) {
5977					setTimeout(function(){
5978						_self.progress = 'complete';
5979						
5980						$('.page-loader-progress').text(100);
5981
5982						if( ['percentageProgress2'].includes(_self.options.effect) ) {
5983			            	$('.loading-overlay-background-layer').css({
5984			            		width: '100%'
5985			            	});
5986			            }
5987					}, 2800);
5988				}
5989			}
5990
5991			return this;
5992		},
5993
5994		events: function() {
5995			var _self = this;
5996
5997			if ( this.options.startShowing ) {
5998				_self.show();
5999			}
6000
6001			if ( this.$wrapper.is('body') || this.options.hideOnWindowLoad ) {
6002				$( window ).on( 'load error', function() {
6003					setTimeout(function(){
6004						_self.hide();
6005					}, _self.options.progressMinTimeout);
6006				});
6007			}
6008
6009			if ( this.options.listenOn ) {
6010				$( this.options.listenOn )
6011					.on( 'loading-overlay:show beforeSend.ic', function( e ) {
6012						e.stopPropagation();
6013						_self.show();
6014					})
6015					.on( 'loading-overlay:hide complete.ic', function( e ) {
6016						e.stopPropagation();
6017						_self.hide();
6018					});
6019			}
6020
6021			this.$wrapper
6022				.on( 'loading-overlay:show beforeSend.ic', function( e ) {
6023					if ( e.target === _self.$wrapper.get(0) ) {
6024						e.stopPropagation();
6025						_self.show();
6026						return true;
6027					}
6028					return false;
6029				})
6030				.on( 'loading-overlay:hide complete.ic', function( e ) {
6031					if ( e.target === _self.$wrapper.get(0) ) {
6032						e.stopPropagation();
6033						_self.hide();
6034						return true;
6035					}
6036					return false;
6037				});
6038
6039			if( ['percentageProgress1', 'percentageProgress2'].includes(_self.options.effect) ) {
6040				$(window).on('load', function(){
6041		            setTimeout(function(){
6042			            _self.pageStatus = "complete";
6043
6044			            $('.page-loader-progress').text(100);
6045
6046			            if( ['percentageProgress2'].includes(_self.options.effect) ) {
6047			            	$('.loading-overlay-background-layer').css({
6048			            		width: '100%'
6049			            	});
6050			            }
6051		            }, _self.options.progressMinTimeout);
6052				});
6053			}
6054		        
6055			return this;
6056		},
6057
6058		show: function() {
6059			this.build();
6060
6061			this.position = this.$wrapper.css( 'position' ).toLowerCase();
6062			if ( this.position != 'relative' || this.position != 'absolute' || this.position != 'fixed' ) {
6063				this.$wrapper.css({
6064					position: 'relative'
6065				});
6066			}
6067			this.$wrapper.addClass( 'loading-overlay-showing' );
6068		},
6069
6070		hide: function() {
6071			var _self = this;
6072
6073			setTimeout(function() {
6074				_self.$wrapper.removeClass( 'loading-overlay-showing' );
6075				
6076				if ( this.position != 'relative' || this.position != 'absolute' || this.position != 'fixed' ) {
6077					_self.$wrapper.css({ position: '' });
6078				}
6079
6080				$(window).trigger('loading.overlay.ready');
6081			}, _self.options.hideDelay);
6082		},
6083
6084		updateProgress: function() {
6085			var _self = this;
6086
6087			var render = function() {
6088				if(_self.pageStatus == "complete"){
6089		            $('.page-loader-progress').text(100);
6090		            setTimeout(function(){
6091		                $('.page-loader-progress').addClass('d-none');    
6092		            }, 700);
6093		        }
6094		        else{            
6095		            if(_self.progress == null){
6096		                _self.progress = 1;
6097		            }
6098		           
6099		            _self.progress = _self.progress + 1;
6100		            if(_self.progress >= 0 && _self.progress <= 30){
6101		                _self.animationInterval += 1;
6102		                $('.page-loader-progress').text(_self.progress);
6103		            }
6104		            else if(_self.progress > 30 && _self.progress <= 60){
6105		                _self.animationInterval += 2;
6106		                $('.page-loader-progress').text(_self.progress);
6107		            }
6108		            else if(_self.progress > 60 && _self.progress <= 80){
6109		                _self.animationInterval += 40;
6110		                $('.page-loader-progress').text(_self.progress);
6111		            }
6112		            else if(_self.progress > 80 && _self.progress <= 90){
6113		                _self.animationInterval += 80;
6114		                $('.page-loader-progress').text(_self.progress);
6115		            }
6116		            else if(_self.progress > 90 && _self.progress <= 95){
6117		                _self.animationInterval += 150;
6118		                $('.page-loader-progress').text(_self.progress);
6119		            }
6120		            else if(_self.progress > 95 && _self.progress <= 99){
6121		                _self.animationInterval += 400;
6122		                $('.page-loader-progress').text(_self.progress);
6123		            }
6124		            else if(_self.progress >= 100){
6125		                $('.page-loader-progress').text(99);
6126		            }
6127
6128		            if( ['percentageProgress2'].includes(_self.options.effect) ) {
6129		            	$('.loading-overlay-background-layer').css({
6130		            		width: _self.progress + '%'
6131		            	});
6132		            }
6133		              
6134					self.loopInside = setTimeout(render, _self.animationInterval);
6135		        }
6136
6137			}
6138			render();
6139
6140			return this;
6141		},
6142
6143		matchProperties: function() {
6144			var i,
6145				l,
6146				properties;
6147
6148			properties = [
6149				'backgroundColor',
6150				'borderRadius'
6151			];
6152
6153			l = properties.length;
6154
6155			for( i = 0; i < l; i++ ) {
6156				var obj = {};
6157				obj[ properties[ i ] ] = this.$wrapper.css( properties[ i ] );
6158
6159				$.extend( this.options.css, obj );
6160			}
6161		},
6162
6163		getLoaderClass: function( backgroundColor ) {
6164			if ( !backgroundColor || backgroundColor === 'transparent' || backgroundColor === 'inherit' ) {
6165				return 'black';
6166			}
6167
6168			var hexColor,
6169				r,
6170				g,
6171				b,
6172				yiq;
6173
6174			var colorToHex = function( color ){
6175				var hex,
6176					rgb;
6177
6178				if( color.indexOf('#') >- 1 ){
6179					hex = color.replace('#', '');
6180				} else {
6181					rgb = color.match(/\d+/g);
6182					hex = ('0' + parseInt(rgb[0], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2);
6183				}
6184
6185				if ( hex.length === 3 ) {
6186					hex = hex + hex;
6187				}
6188
6189				return hex;
6190			};
6191
6192			hexColor = colorToHex( backgroundColor );
6193
6194			r = parseInt( hexColor.substr( 0, 2), 16 );
6195			g = parseInt( hexColor.substr( 2, 2), 16 );
6196			b = parseInt( hexColor.substr( 4, 2), 16 );
6197			yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
6198
6199			return ( yiq >= 128 ) ? 'black' : 'white';
6200		},
6201
6202		dynamicShowHide: function( effect ) {
6203			var _self = this;
6204
6205			// Remove Loading Overlay Data
6206			$('body').removeData('loadingOverlay');
6207
6208			// Remove Html Of Loading Overlay
6209			$('.loading-overlay').remove();
6210
6211			if( effect == '' ) {
6212				return this;
6213			}
6214
6215			// Initialize New Loading Overlay (second parameter is to NO inherit data-plugin-options)
6216			$('body').loadingOverlay({
6217				effect: effect ? effect : 'pulse',
6218				isDynamicHideShow: true
6219			}, true);
6220
6221			// Show Loading Overlay Loader
6222			$('body').data('loadingOverlay').show();
6223
6224			// Hide Loading Overlay Loader
6225			setTimeout(function(){
6226				$('body').data('loadingOverlay').hide();
6227			}, 3000);
6228
6229			return this;
6230		},
6231
6232		dynamicShowHideEvents: function() {
6233			var _self = this;
6234
6235			// Button
6236			$(document).off('click.loading-overlay-button').on('click.loading-overlay-button', '.loading-overlay-button', function(e){
6237				e.preventDefault();
6238
6239				_self.dynamicShowHide( $(this).data('effect') );
6240			});
6241
6242			// Select
6243			$(document).off('change.loading-overlay-select').on('change.loading-overlay-select', '.loading-overlay-select', function(){
6244				_self.dynamicShowHide( $(this).val() );
6245			});
6246
6247			return this;
6248		}
6249
6250	};
6251
6252	// expose to scope
6253	$.extend(theme, {
6254		LoadingOverlay: LoadingOverlay
6255	});
6256
6257	// expose as a jquery plugin
6258	$.fn.loadingOverlay = function( opts, noInheritOptions ) {
6259		return this.each(function() {
6260			var $this = $( this );
6261
6262			var loadingOverlay = $this.data( 'loadingOverlay' );
6263			if ( loadingOverlay ) {
6264				return loadingOverlay;
6265			} else {
6266				var options = opts || $this.data( 'loading-overlay-options' ) || {};
6267				return new LoadingOverlay( $this, options, noInheritOptions );
6268			}
6269		});
6270	}
6271
6272	// auto init
6273	$('[data-loading-overlay]').loadingOverlay();
6274
6275}).apply(this, [window.theme, jQuery]);
6276
6277// Masonry
6278(function(theme, $) {
6279
6280	theme = theme || {};
6281
6282	var instanceName = '__masonry';
6283
6284	var PluginMasonry = function($el, opts) {
6285		return this.initialize($el, opts);
6286	};
6287
6288	PluginMasonry.defaults = {
6289
6290	};
6291
6292	PluginMasonry.prototype = {
6293		initialize: function($el, opts) {
6294			if ($el.data(instanceName)) {
6295				return this;
6296			}
6297
6298			this.$el = $el;
6299
6300			this
6301				.setData()
6302				.setOptions(opts)
6303				.build();
6304
6305			return this;
6306		},
6307
6308		setData: function() {
6309			this.$el.data(instanceName, this);
6310
6311			return this;
6312		},
6313
6314		setOptions: function(opts) {
6315			this.options = $.extend(true, {}, PluginMasonry.defaults, opts, {
6316				wrapper: this.$el
6317			});
6318
6319			return this;
6320		},
6321
6322		build: function() {
6323			if (!($.isFunction($.fn.isotope))) {
6324				return this;
6325			}
6326
6327			var self = this,
6328				$window = $(window);
6329
6330			self.$loader = false;
6331
6332			if (self.options.wrapper.parents('.masonry-loader').get(0)) {
6333				self.$loader = self.options.wrapper.parents('.masonry-loader');
6334				self.createLoader();
6335			}
6336
6337			self.options.wrapper.one('layoutComplete', function(event, laidOutItems) {
6338				self.removeLoader();
6339			});
6340
6341			self.options.wrapper.waitForImages(function() {
6342				self.options.wrapper.isotope(self.options);	
6343			});
6344
6345			// IE10/11 fix
6346			if( $('html').hasClass('ie10') || $('html').hasClass('ie11') ) {
6347				var padding = parseInt( self.options.wrapper.children().css('padding-left') ) + parseInt( self.options.wrapper.children().css('padding-right') );
6348			}
6349
6350			$(window).on('resize', function() {
6351				setTimeout(function() {
6352					self.options.wrapper.isotope('layout');
6353				}, 300);
6354			});
6355
6356			setTimeout(function() {
6357				self.removeLoader();
6358			}, 3000);
6359
6360			return this;
6361		},
6362
6363		createLoader: function() {
6364			var self = this;
6365
6366			var loaderTemplate = [
6367				'<div class="bounce-loader">',
6368					'<div class="bounce1"></div>',
6369					'<div class="bounce2"></div>',
6370					'<div class="bounce3"></div>',
6371				'</div>'
6372			].join('');
6373
6374			self.$loader.append(loaderTemplate);
6375
6376			return this;
6377		},
6378
6379		removeLoader: function() {
6380
6381			var self = this;
6382
6383			if (self.$loader) {
6384
6385				self.$loader.removeClass('masonry-loader-showing');
6386
6387				setTimeout(function() {
6388					self.$loader.addClass('masonry-loader-loaded');
6389				}, 300);
6390
6391			}
6392
6393		}
6394	};
6395
6396	// expose to scope
6397	$.extend(theme, {
6398		PluginMasonry: PluginMasonry
6399	});
6400
6401	// jquery plugin
6402	$.fn.themePluginMasonry = function(opts) {
6403		return this.map(function() {
6404			var $this = $(this);
6405
6406			if ($this.data(instanceName)) {
6407				return $this.data(instanceName);
6408			} else {
6409				return new PluginMasonry($this, opts);
6410			}
6411
6412		});
6413	}
6414
6415}).apply(this, [window.theme, jQuery]);
6416
6417// Match Height
6418(function(theme, $) {
6419
6420	theme = theme || {};
6421
6422	var instanceName = '__matchHeight';
6423
6424	var PluginMatchHeight = function($el, opts) {
6425		return this.initialize($el, opts);
6426	};
6427
6428	PluginMatchHeight.defaults = {
6429		byRow: true,
6430		property: 'height',
6431		target: null,
6432		remove: false
6433	};
6434
6435	PluginMatchHeight.prototype = {
6436		initialize: function($el, opts) {
6437			if ($el.data(instanceName)) {
6438				return this;
6439			}
6440
6441			this.$el = $el;
6442
6443			this
6444				.setData()
6445				.setOptions(opts)
6446				.build();
6447
6448			return this;
6449		},
6450
6451		setData: function() {
6452			this.$el.data(instanceName, this);
6453
6454			return this;
6455		},
6456
6457		setOptions: function(opts) {
6458			this.options = $.extend(true, {}, PluginMatchHeight.defaults, opts, {
6459				wrapper: this.$el
6460			});
6461
6462			return this;
6463		},
6464
6465		build: function() {
6466			if (!($.isFunction($.fn.matchHeight))) {
6467				return this;
6468			}
6469
6470			var self = this;
6471
6472			self.options.wrapper.matchHeight(self.options);
6473
6474			return this;
6475		}
6476
6477	};
6478
6479	// expose to scope
6480	$.extend(theme, {
6481		PluginMatchHeight: PluginMatchHeight
6482	});
6483
6484	// jquery plugin
6485	$.fn.themePluginMatchHeight = function(opts) {
6486		return this.map(function() {
6487			var $this = $(this);
6488
6489			if ($this.data(instanceName)) {
6490				return $this.data(instanceName);
6491			} else {
6492				return new PluginMatchHeight($this, opts);
6493			}
6494
6495		});
6496	}
6497
6498}).apply(this, [window.theme, jQuery]);
6499
6500// Parallax
6501(function(theme, $) {
6502
6503	theme = theme || {};
6504
6505	var instanceName = '__parallax';
6506
6507	var PluginParallax = function($el, opts) {
6508		return this.initialize($el, opts);
6509	};
6510
6511	PluginParallax.defaults = {
6512		speed: 1.5,
6513		horizontalPosition: '50%',
6514		offset: 0,
6515		parallaxDirection: 'top',
6516		parallaxHeight: '180%',
6517		parallaxScale: false,
6518		parallaxScaleInvert: false,
6519		scrollableParallax: false,
6520		scrollableParallaxMinWidth: 991,
6521		startOffset: 7,
6522		transitionDuration: '200ms',
6523		cssProperty: 'width',
6524		cssValueStart: 40,
6525		cssValueEnd: 100,
6526		cssValueUnit: 'vw',
6527		mouseParallax: false
6528	};
6529
6530	PluginParallax.prototype = {
6531		initialize: function($el, opts) {
6532			if ($el.data(instanceName)) {
6533				return this;
6534			}
6535
6536			this.$el = $el;
6537
6538			this
6539				.setData()
6540				.setOptions(opts)
6541				.build();
6542
6543			return this;
6544		},
6545
6546		setData: function() {
6547			this.$el.data(instanceName, this);
6548
6549			return this;
6550		},
6551
6552		setOptions: function(opts) {
6553			this.options = $.extend(true, {}, PluginParallax.defaults, opts, {
6554				wrapper: this.$el
6555			});
6556
6557			return this;
6558		},
6559
6560		build: function() {
6561			var self = this,
6562				$window = $(window),
6563				offset,
6564				yPos,
6565				bgpos,
6566				background,
6567				rotateY;
6568
6569			// Mouse Parallax
6570			if( self.options.mouseParallax ) {
6571
6572				$window.mousemove(function(e) {
6573
6574					$('.parallax-mouse-object', self.options.wrapper).each(function() {
6575
6576				        var moving_value = $( this ).attr('data-value');
6577				        var x = (e.clientX * moving_value) / 250;
6578				        var y = (e.clientY * moving_value) / 250;
6579
6580				        $( this ).css('transform', 'translateX(' + x + 'px) translateY(' + y + 'px)');
6581				    });
6582
6583				});
6584
6585				return this;
6586
6587			}
6588
6589			// Scrollable
6590			if( self.options.scrollableParallax && $(window).width() > self.options.scrollableParallaxMinWidth ) {
6591				var $scrollableWrapper = self.options.wrapper.find('.scrollable-parallax-wrapper');
6592
6593				if( $scrollableWrapper.get(0) ) {
6594
6595					var progress 	 = ( $(window).scrollTop() > ( self.options.wrapper.offset().top + $(window).outerHeight() ) ) ? self.options.cssValueEnd : self.options.cssValueStart,
6596						cssValueUnit = self.options.cssValueUnit ? self.options.cssValueUnit : '';
6597
6598					$scrollableWrapper.css({
6599						'background-image' : 'url(' + self.options.wrapper.data('image-src') + ')',
6600						'background-size' : 'cover',
6601						'background-position' : 'center',
6602						'background-attachment' : 'fixed',
6603						'transition' : 'ease '+ self.options.cssProperty +' '+ self.options.transitionDuration,
6604						'width' : progress + '%'
6605					});
6606
6607					$(window).on('scroll', function(e){
6608						if( self.options.wrapper.visible( true ) ) {
6609							var $window = $(window),
6610								scrollTop = $window.scrollTop(),
6611						    	elementOffset = self.options.wrapper.offset().top,
6612						     	currentElementOffset = (elementOffset - scrollTop);
6613
6614						   	var scrollPercent = Math.abs( +( currentElementOffset - $window.height() ) / (self.options.startOffset ? self.options.startOffset : 7) );
6615						 	
6616						 	// Increment progress value according scroll position
6617						 	if( scrollPercent <= self.options.cssValueEnd && progress <= self.options.cssValueEnd ) {
6618						 		progress = self.options.cssValueStart + scrollPercent;
6619						 	}
6620
6621						 	// Adjust CSS end value
6622						 	if( progress > self.options.cssValueEnd ) {
6623						 		progress = self.options.cssValueEnd;
6624						 	}
6625
6626						 	// Adjust CSS start value
6627						 	if( progress < self.options.cssValueStart ) {
6628						 		progress = self.options.cssValueStart;
6629						 	}
6630
6631						 	var styles = {}
6632						 	styles[self.options.cssProperty] = progress + cssValueUnit;
6633
6634							$scrollableWrapper.css(styles);
6635						}
6636					});
6637
6638				}
6639
6640				return;
6641			}
6642
6643			// Create Parallax Element
6644			if( self.options.fadeIn ) {
6645				background = $('<div class="parallax-background fadeIn animated"></div>');
6646			} else {
6647				background = $('<div class="parallax-background"></div>');
6648			}
6649
6650			// Set Style for Parallax Element
6651			background.css({
6652				'background-image' : 'url(' + self.options.wrapper.data('image-src') + ')',
6653				'background-size' : 'cover',
6654				'position' : 'absolute',
6655				'top' : 0,
6656				'left' : 0,
6657				'width' : '100%',
6658				'height' : self.options.parallaxHeight
6659			});
6660
6661			if( self.options.parallaxScale ) {
6662				background.css({
6663					'transition' : 'transform 500ms ease-out'
6664				});
6665			}
6666
6667			// Add Parallax Element on DOM
6668			self.options.wrapper.prepend(background);
6669
6670			// Set Overlfow Hidden and Position Relative to Parallax Wrapper
6671			self.options.wrapper.css({
6672				'position' : 'relative',
6673				'overflow' : 'hidden'
6674			});
6675
6676			// Parallax Effect on Scroll & Resize
6677			var parallaxEffectOnScrolResize = function() {
6678				$window.on('scroll resize', function() {
6679					offset  = self.options.wrapper.offset();
6680					yPos    = -($window.scrollTop() - (offset.top - 100)) / ((self.options.speed + 2 ));
6681					plxPos  = (yPos < 0) ? Math.abs(yPos) : -Math.abs(yPos);
6682					rotateY = ( $('html[dir="rtl"]').get(0) ) ? ' rotateY(180deg)' : ''; // RTL
6683
6684					if( !self.options.parallaxScale ) {
6685
6686						if( self.options.parallaxDirection == 'bottom' ) {
6687							self.options.offset = 250;
6688						}
6689
6690						var y = ( (plxPos - 50) + (self.options.offset) );
6691						if( self.options.parallaxDirection == 'bottom' ) {
6692							y = ( y < 0 ) ? Math.abs( y ) : -Math.abs( y );
6693						}
6694
6695						background.css({
6696							'transform' : 'translate3d(0, '+ y +'px, 0)' + rotateY,
6697							'background-position-x' : self.options.horizontalPosition
6698						});
6699
6700					} else {
6701
6702						var	scrollTop = $window.scrollTop(),
6703					    	elementOffset = self.options.wrapper.offset().top,
6704					     	currentElementOffset = (elementOffset - scrollTop),
6705					   		scrollPercent = Math.abs( +( currentElementOffset - $window.height() ) / (self.options.startOffset ? self.options.startOffset : 7) );
6706
6707					   	scrollPercent = parseInt((scrollPercent >= 100) ? 100 : scrollPercent);
6708
6709					   	var currentScale = (scrollPercent / 100) * 50;
6710
6711					   	if ( !self.options.parallaxScaleInvert ) {
6712							background.css({
6713								'transform' : 'scale(1.' + String(currentScale).padStart(2, '0') + ', 1.' + String(currentScale).padStart(2, '0') + ')'
6714							});
6715						} else {
6716							background.css({
6717								'transform' : 'scale(1.' + String(50 - currentScale).padStart(2, '0') + ', 1.' + String(50 - currentScale).padStart(2, '0') + ')'
6718							});
6719						}
6720
6721					}
6722				});
6723
6724				$window.trigger('scroll');
6725			}
6726
6727			if (!$.browser.mobile) {
6728				parallaxEffectOnScrolResize();
6729			} else {
6730				if( self.options.enableOnMobile == true ) {
6731					parallaxEffectOnScrolResize();
6732				} else {
6733					self.options.wrapper.addClass('parallax-disabled');
6734				}
6735			}
6736
6737			return this;
6738		}
6739	};
6740
6741	// expose to scope
6742	$.extend(theme, {
6743		PluginParallax: PluginParallax
6744	});
6745
6746	// jquery plugin
6747	$.fn.themePluginParallax = function(opts) {
6748		return this.map(function() {
6749			var $this = $(this);
6750
6751			if ($this.data(instanceName)) {
6752				return $this.data(instanceName);
6753			} else {
6754				return new PluginParallax($this, opts);
6755			}
6756
6757		});
6758	}
6759
6760}).apply(this, [window.theme, jQuery]);
6761
6762// Progress Bar
6763(function(theme, $) {
6764
6765	theme = theme || {};
6766
6767	var instanceName = '__progressBar';
6768
6769	var PluginProgressBar = function($el, opts) {
6770		return this.initialize($el, opts);
6771	};
6772
6773	PluginProgressBar.defaults = {
6774		accX: 0,
6775		accY: -50,
6776		delay: 1
6777	};
6778
6779	PluginProgressBar.prototype = {
6780		initialize: function($el, opts) {
6781			if ($el.data(instanceName)) {
6782				return this;
6783			}
6784
6785			this.$el = $el;
6786
6787			this
6788				.setData()
6789				.setOptions(opts)
6790				.build();
6791
6792			return this;
6793		},
6794
6795		setData: function() {
6796			this.$el.data(instanceName, this);
6797
6798			return this;
6799		},
6800
6801		setOptions: function(opts) {
6802			this.options = $.extend(true, {}, PluginProgressBar.defaults, opts, {
6803				wrapper: this.$el
6804			});
6805
6806			return this;
6807		},
6808
6809		build: function() {
6810			var self = this,
6811				$el = this.options.wrapper,
6812				delay = 1;
6813
6814			delay = ($el.attr('data-appear-animation-delay') ? $el.attr('data-appear-animation-delay') : self.options.delay);
6815
6816			$el.addClass($el.attr('data-appear-animation'));
6817
6818			setTimeout(function() {
6819
6820				$el.animate({
6821					width: $el.attr('data-appear-progress-animation')
6822				}, 1500, 'easeOutQuad', function() {
6823					$el.find('.progress-bar-tooltip').animate({
6824						opacity: 1
6825					}, 500, 'easeOutQuad');
6826				});
6827
6828			}, delay);
6829
6830			return this;
6831		}
6832	};
6833
6834	// expose to scope
6835	$.extend(theme, {
6836		PluginProgressBar: PluginProgressBar
6837	});
6838
6839	// jquery plugin
6840	$.fn.themePluginProgressBar = function(opts) {
6841		return this.map(function() {
6842			var $this = $(this);
6843
6844			if ($this.data(instanceName)) {
6845				return $this.data(instanceName);
6846			} else {
6847				return new PluginProgressBar($this, opts);
6848			}
6849
6850		});
6851	}
6852
6853}).apply(this, [window.theme, jQuery]);
6854
6855// Random Images
6856(function(theme, $) {
6857
6858	theme = theme || {};
6859
6860	var instanceName = '__randomimages';
6861
6862	var PluginRandomImages = function($el, opts) {
6863		return this.initialize($el, opts);
6864	};
6865
6866	PluginRandomImages.defaults = {
6867		minWindowWidth: 0,
6868		random: true,
6869		imagesListURL: null,
6870		lightboxImagesListURL: null,
6871        delay: null,
6872        animateIn: 'fadeIn',
6873		animateOut: 'fadeOut',
6874		stopAtImageIndex: false, // The value shoudl be the index value of array with images as string. Eg: '2' 
6875		stopAfterFewSeconds: false, // The value should be in mili-seconds. Eg: 10000 = 10 seconds
6876		stopAfterXTimes: false,
6877		accY: 0
6878	};
6879
6880	PluginRandomImages.prototype = {
6881		initialize: function($el, opts) {
6882			this.$el = $el;
6883            this.st = '';
6884			this.times = 0;
6885			this.perImageIndex = 0;
6886
6887            if( $el.is('img') && typeof opts.imagesListURL == 'undefined' ) {
6888                return false;
6889            }
6890
6891            this
6892				.setData()
6893				.setOptions(opts)
6894				.build();
6895
6896			return this;
6897		},
6898
6899		setData: function() {
6900			this.$el.data(instanceName, this);
6901
6902			return this;
6903		},
6904
6905		setOptions: function(opts) {
6906			this.options = $.extend(true, {}, PluginRandomImages.defaults, opts, {
6907				wrapper: this.$el
6908			});
6909
6910			return this;
6911		},
6912
6913		build: function() {
6914            var self = this;
6915			
6916			// Control the screens size we want to have the plugin working
6917			if( $(window).width() < self.options.minWindowWidth  ) {
6918				return false;
6919			}
6920
6921			// Check if is single image or wrapper with images inside
6922            if( self.$el.is('img') ) {
6923				
6924				// Check it's inside a lightbox
6925				self.isInsideLightbox = self.$el.closest('.lightbox').length ? true : false;
6926
6927				// Push the initial image to lightbox list/array
6928				if( self.isInsideLightbox && self.options.lightboxImagesListURL ) {
6929					self.options.lightboxImagesListURL.push( self.$el.closest('.lightbox').attr('href') );
6930				}
6931	
6932				// Push the current image src to the array
6933				self.options.imagesListURL.push( self.$el.attr('src') );
6934
6935				// Start with lastIndex as the first image loaded on the page
6936				self.lastIndex = self.options.imagesListURL.length - 1;
6937
6938				// Identify the last random image element (if has more than one on the page)
6939				if( self.options.random == false ) {
6940					$('.plugin-random-images').each(function(i){
6941						if( i == $('.plugin-random-images').length - 1 ) {
6942							$(this).addClass('the-last');
6943						}
6944					});
6945				}
6946
6947				// Start the recursive timeout
6948				setTimeout(function(){
6949					self.recursiveTimeout( 
6950						self.perImageTag, 
6951						self.options.delay == null ? 3000 : self.options.delay
6952					);
6953				}, self.options.delay == null ? 300 : self.options.delay / 3);
6954
6955			} else {
6956				
6957				// Start the recursive timeout
6958				setTimeout( self.recursiveTimeout( 
6959					self.perWrapper, 
6960					self.options.delay ? self.options.delay : getPerWrapperHighDelay(), 
6961					false 
6962				), 300);
6963
6964			}
6965
6966			// Stop After Few Seconds
6967			if( self.options.stopAfterFewSeconds ) {
6968				setTimeout(function(){
6969					clearTimeout(self.st);
6970				}, self.options.stopAfterFewSeconds);
6971			}
6972			
6973			return this;
6974
6975		},
6976
6977		perImageTag: function() {
6978			var self = this;
6979
6980			// Generate a random index to make the images rotate randomly
6981			var index = self.options.random ? Math.floor(Math.random() * self.options.imagesListURL.length) : self.lastIndex;
6982
6983			// Avoid repeat the same image
6984			if( self.lastIndex !== '' && self.lastIndex == index ) {
6985				if( self.options.random ) {
6986					while( index == self.lastIndex ) {
6987						index = Math.floor(Math.random() * self.options.imagesListURL.length);
6988					}
6989				} else {
6990					index = index - 1;
6991					if( index == -1 ) {
6992						index = self.options.imagesListURL.length - 1;
6993					}
6994				}
6995			}
6996
6997			// Turn the image ready for animations
6998			self.$el.addClass('animated');
6999
7000			// Remove the entrance animation class and add the out animation class
7001			self.$el.removeClass( self.options.animateIn ).addClass( self.options.animateOut );
7002			
7003			// Change the image src and add the class for entrance animation
7004			setTimeout( function(){
7005				self.$el.attr('src', self.options.imagesListURL[index]).removeClass( self.options.animateOut ).addClass(self.options.animateIn);
7006
7007				if( self.isInsideLightbox && self.options.lightboxImagesListURL ) {
7008					self.$el.closest('.lightbox').attr('href', self.options.lightboxImagesListURL[index]);
7009				}
7010			}, 1000);
7011			
7012			// Save the last index for future checks
7013			self.lastIndex = index;
7014			
7015			// Increment the times var
7016			self.times++;
7017
7018			// Save the index for stopAtImageIndex option
7019			self.perImageIndex = index;
7020
7021			return this;
7022		},
7023
7024		// Iterate the imaes loop and get the higher value
7025		getPerWrapperHighDelay: function() {
7026			var self = this,
7027				$wrapper = self.$el,
7028				delay = 0;
7029
7030			$wrapper.find('img').each(function(){
7031				var $image = $(this);
7032				
7033				if( $image.data('rimage-delay') && parseInt( $image.data('rimage-delay') ) > delay ) {
7034					delay = parseInt( $image.data('rimage-delay') );
7035				}
7036			});
7037
7038			return delay;
7039		},
7040
7041		perWrapper: function() {
7042			var self = this,
7043				$wrapper = self.$el;
7044
7045			// Turns the imageLlistURL into an array
7046			self.options.imagesListURL = [];
7047
7048			// Find all images inside the element wrapper and push their sources to image list array
7049			$wrapper.find('img').each(function(){
7050				var $image = $(this);
7051				self.options.imagesListURL.push( $image.attr('src') ); 
7052			});
7053
7054			// Shuffle the images list array (random effect)
7055			self.options.imagesListURL = self.shuffle( self.options.imagesListURL );
7056
7057			// Iterate over each image and make some checks like delay for each image, animations, etc...
7058			$wrapper.find('img').each(function(index){
7059				var $image = $(this),
7060					animateIn  = $image.data('rimage-animate-in') ? $image.data('rimage-animate-in') : self.options.animateIn,
7061					animateOut = $image.data('rimage-animate-out') ? $image.data('rimage-animate-out') : self.options.animateOut,
7062					delay      = $image.data('rimage-delay') ? $image.data('rimage-delay') : 2000;
7063
7064				$image.addClass('animated');
7065
7066				setTimeout( function(){
7067					$image.removeClass( animateIn ).addClass( animateOut );
7068				}, delay / 2);
7069
7070				setTimeout( function(){
7071					$image.attr('src', self.options.imagesListURL[index]).removeClass( animateOut ).addClass(animateIn);
7072				}, delay);
7073
7074			});
7075			
7076			// Increment the times variable
7077			self.times++;
7078
7079			return this;
7080		},
7081
7082		recursiveTimeout: function(callback, delay) {
7083			var self = this;
7084
7085			var timeout = function() {
7086
7087				if( callback !== null ) {
7088					callback.call(self);
7089				}
7090
7091				// Recursive
7092				self.st = setTimeout(timeout, delay == null ? 1000 : delay);
7093
7094				if( self.options.random == false ) {
7095					if( self.$el.hasClass('the-last') ) {
7096						$('.plugin-random-images').trigger('rimages.start');
7097					} else {
7098						clearTimeout(self.st);
7099					}
7100				}
7101
7102				// Stop At Image Index
7103				if( self.options.stopAtImageIndex && parseInt(self.options.stopAtImageIndex) == self.perImageIndex ) {
7104					clearTimeout(self.st);
7105				}
7106
7107				// Stop After X Timers
7108				if( self.options.stopAfterXTimes == self.times ) {
7109					clearTimeout(self.st);
7110				}
7111			}
7112			timeout();
7113
7114			self.$el.on('rimages.start', function(){
7115				clearTimeout(self.st);
7116				self.st = setTimeout(timeout, delay == null ? 1000 : delay);
7117			});
7118
7119		},
7120		
7121		shuffle: function( array ) {
7122			for (var i = array.length - 1; i > 0; i--) {
7123				var j = Math.floor(Math.random() * (i + 1));
7124				var temp = array[i];
7125				array[i] = array[j];
7126				array[j] = temp;
7127			}
7128
7129			return array;
7130		}
7131
7132	};
7133
7134	// expose to scope
7135	$.extend(theme, {
7136		PluginRandomImages: PluginRandomImages
7137	});
7138
7139	// jquery plugin
7140	$.fn.themePluginRandomImages = function(opts) {
7141		return this.map(function() {
7142			var $this = $(this);
7143
7144			if ($this.data(instanceName)) {
7145				return $this.data(instanceName);
7146			} else {
7147				return new PluginRandomImages($this, opts);
7148			}
7149
7150		});
7151	}
7152
7153}).apply(this, [window.theme, jQuery]);
7154
7155// Read More
7156(function(theme, $) {
7157
7158	theme = theme || {};
7159
7160	var instanceName = '__readmore';
7161
7162	var PluginReadMore = function($el, opts) {
7163		return this.initialize($el, opts);
7164	};
7165
7166	PluginReadMore.defaults = {
7167		buttonOpenLabel: 'Read More <i class="fas fa-chevron-down text-2 ms-1"></i>',
7168		buttonCloseLabel: 'Read Less <i class="fas fa-chevron-up text-2 ms-1"></i>',
7169		enableToggle: true,
7170		maxHeight: 110,
7171		overlayColor: '#FFF',
7172		overlayHeight: 100,
7173		startOpened: false,
7174		align: 'left'
7175	};
7176
7177	PluginReadMore.prototype = {
7178		initialize: function($el, opts) {
7179			var self = this;
7180
7181			this.$el = $el;
7182
7183			this
7184				.setData()
7185				.setOptions(opts)
7186				.build()
7187				.events();
7188
7189			if( self.options.startOpened ) {
7190				self.options.wrapper.find('.readmore-button-wrapper > a').trigger('click');
7191			}
7192
7193			return this;
7194		},
7195
7196		setData: function() {
7197			this.$el.data(instanceName, this);
7198
7199			return this;
7200		},
7201
7202		setOptions: function(opts) {
7203			this.options = $.extend(true, {}, PluginReadMore.defaults, opts, {
7204				wrapper: this.$el
7205			});
7206
7207			return this;
7208		},
7209
7210		build: function() {
7211			var self = this;
7212
7213			self.options.wrapper.addClass('position-relative');
7214
7215			// Overlay
7216			self.options.wrapper.append( '<div class="readmore-overlay"></div>' );
7217
7218			// Check if is Safari
7219			var backgroundCssValue = 'linear-gradient(180deg, rgba(2, 0, 36, 0) 0%, '+ self.options.overlayColor +' 100%)';
7220			if( $('html').hasClass('safari') ) {
7221				backgroundCssValue = '-webkit-linear-gradient(top, rgba(2, 0, 36, 0) 0%, '+ self.options.overlayColor +' 100%)'
7222			}
7223			
7224			self.options.wrapper.find('.readmore-overlay').css({
7225				background: backgroundCssValue,
7226				position: 'absolute',
7227				bottom: 0,
7228				left: 0,
7229				width: '100%',
7230				height: self.options.overlayHeight,
7231				'z-index': 1
7232			});
7233
7234			// Read More Button
7235			self.options.wrapper.find('.readmore-button-wrapper').removeClass('d-none').css({
7236				position: 'absolute',
7237				bottom: 0,
7238				left: 0,
7239				width: '100%',
7240				'z-index': 2
7241			});	
7242
7243			// Button Label
7244			self.options.wrapper.find('.readmore-button-wrapper > a').html( self.options.buttonOpenLabel );
7245
7246			self.options.wrapper.css({
7247				'height': self.options.maxHeight,
7248				'overflow-y': 'hidden'
7249			});
7250
7251			// Alignment
7252			switch ( self.options.align ) {
7253				case 'center':
7254					self.options.wrapper.find('.readmore-button-wrapper').addClass('text-center');
7255					break;
7256
7257				case 'right':
7258					self.options.wrapper.find('.readmore-button-wrapper').addClass('text-right');
7259					break;
7260
7261				case 'left':
7262				default:
7263					self.options.wrapper.find('.readmore-button-wrapper').addClass('text-left');
7264					break;
7265			}
7266
7267			return this;
7268
7269		},
7270
7271		events: function() {
7272			var self = this;
7273
7274			// Read More
7275			self.readMore = function() {
7276				self.options.wrapper.find('.readmore-button-wrapper > a:not(.readless)').on('click', function(e){
7277					e.preventDefault();
7278
7279					var $this = $(this);
7280
7281					setTimeout(function(){
7282						self.options.wrapper.animate({
7283							'height': self.options.wrapper[0].scrollHeight
7284						}, function(){
7285							if( !self.options.enableToggle ) {
7286								$this.fadeOut();
7287							}
7288
7289							$this.html( self.options.buttonCloseLabel ).addClass('readless').off('click');
7290
7291							self.readLess();
7292
7293							self.options.wrapper.find('.readmore-overlay').fadeOut();
7294							self.options.wrapper.css({
7295								'max-height': 'none',
7296								'overflow': 'visible'
7297							});
7298
7299							self.options.wrapper.find('.readmore-button-wrapper').animate({
7300								bottom: -20
7301							});
7302						});
7303					}, 200);
7304				});
7305			}
7306
7307			// Read Less
7308			self.readLess = function() {
7309				self.options.wrapper.find('.readmore-button-wrapper > a.readless').on('click', function(e){
7310					e.preventDefault();
7311
7312					var $this = $(this);
7313
7314					// Button
7315					self.options.wrapper.find('.readmore-button-wrapper').animate({
7316						bottom: 0
7317					});
7318
7319					// Overlay
7320					self.options.wrapper.find('.readmore-overlay').fadeIn();
7321
7322					setTimeout(function(){
7323						self.options.wrapper.height(self.options.wrapper[0].scrollHeight).animate({
7324							'height': self.options.maxHeight
7325						}, function(){
7326							$this.html( self.options.buttonOpenLabel ).removeClass('readless').off('click');
7327
7328							self.readMore();
7329
7330							self.options.wrapper.css({
7331								'overflow': 'hidden'
7332							});
7333						});
7334					}, 200);
7335				});
7336			}
7337
7338			// First Load
7339			self.readMore();
7340
7341			return this;
7342		}
7343	};
7344
7345	// expose to scope
7346	$.extend(theme, {
7347		PluginReadMore: PluginReadMore
7348	});
7349
7350	// jquery plugin
7351	$.fn.themePluginReadMore = function(opts) {
7352		return this.map(function() {
7353			var $this = $(this);
7354
7355			if ($this.data(instanceName)) {
7356				return $this.data(instanceName);
7357			} else {
7358				return new PluginReadMore($this, opts);
7359			}
7360
7361		});
7362	}
7363
7364}).apply(this, [window.theme, jQuery]);
7365
7366// Revolution Slider
7367(function(theme, $) {
7368
7369	theme = theme || {};
7370
7371	var instanceName = '__revolution';
7372
7373	var PluginRevolutionSlider = function($el, opts) {
7374		return this.initialize($el, opts);
7375	};
7376
7377	PluginRevolutionSlider.defaults = {
7378		sliderType: 'standard',
7379		sliderLayout: 'fullwidth',
7380		delay: 9000,
7381		gridwidth: 1170,
7382		gridheight: 500,
7383		spinner: 'spinner3',
7384		disableProgressBar: 'on',
7385		parallax: {
7386			type: 'off',
7387			bgparallax: 'off'
7388		},
7389		navigation: {
7390			keyboardNavigation: 'off',
7391			keyboard_direction: 'horizontal',
7392			mouseScrollNavigation: 'off',
7393			onHoverStop: 'off',
7394			touch: {
7395				touchenabled: 'on',
7396				swipe_threshold: 75,
7397				swipe_min_touches: 1,
7398				swipe_direction: 'horizontal',
7399				drag_block_vertical: false
7400			},
7401			arrows: {
7402				enable: true,
7403				hide_onmobile: false,
7404				hide_under: 0,
7405				hide_onleave: true,
7406				hide_delay: 200,
7407				hide_delay_mobile: 1200,
7408				left: {
7409					h_align: 'left',
7410					v_align: 'center',
7411					h_offset: 30,
7412					v_offset: 0
7413				},
7414				right: {
7415					h_align: 'right',
7416					v_align: 'center',
7417					h_offset: 30,
7418					v_offset: 0
7419				}
7420			}
7421		},
7422
7423		/* ADDONS */
7424	    addOnTypewriter: {
7425			enable: false
7426		},
7427		addOnWhiteboard: {
7428			enable: false,
7429
7430		},
7431	    whiteboard: {
7432	        movehand: {
7433	            src: '../vendor/rs-plugin/revolution-addons/whiteboard/assets/images/hand_point_right.png',
7434	            width: 400,
7435	            height: 1000,
7436	            handtype: 'right',
7437	            transform: {
7438	                transformX: 50,
7439	                transformY: 50
7440	            },
7441	            jittering: {
7442	                distance: '80',
7443	                distance_horizontal: '100',
7444	                repeat: '5',
7445	                offset: '10',
7446	                offset_horizontal: '0'
7447	            },
7448	            rotation: {
7449	                angle: '10',
7450	                repeat: '3'
7451	            }
7452	        },
7453	        writehand: {
7454	            src: '../vendor/rs-plugin/revolution-addons/whiteboard/assets/images/write_right_angle.png',
7455	            width: 572,
7456	            height: 691,
7457	            handtype: 'right',
7458	            transform: {
7459	                transformX: 50,
7460	                transformY: 50
7461	            },
7462	            jittering: {
7463	                distance: '80',
7464	                distance_horizontal: '100',
7465	                repeat: '5',
7466	                offset: '10',
7467	                offset_horizontal: '0'
7468	            },
7469	            rotation:{
7470	                angle: '10',
7471	                repeat: '3'
7472	            }
7473	        }
7474	    },
7475	    addOnParticles: {
7476	    	enable: false
7477	    },
7478	    particles: {
7479			startSlide: "first", 
7480			endSlide: "last", 
7481			zIndex: "1",
7482			particles: {
7483				number: {value: 80}, color: {value: "#ffffff"},
7484				shape: {
7485					type: "circle", stroke: {width: 0, color: "#ffffff", opacity: 1},
7486					image: {src: ""}
7487				},
7488				opacity: {value: 0.5, random: true, min: 0.25, anim: {enable: false, speed: 3, opacity_min: 0, sync: false}},
7489				size: {value: 2, random: false, min: 30, anim: {enable: false, speed: 40, size_min: 1, sync: false}},
7490				line_linked: {enable: true, distance: 150, color: "#ffffff", opacity: 0.4, width: 1},
7491				move: {enable: true, speed: 6, direction: "none", random: true, min_speed: 6, straight: false, out_mode: "out"}
7492			},
7493			interactivity: {
7494				events: {onhover: {enable: false, mode: "repulse"}, onclick: {enable: false, mode: "repulse"}},
7495				modes: {grab: {distance: 400, line_linked: {opacity: 0.5}}, bubble: {distance: 400, size: 40, opacity: 0.4}, repulse: {distance: 200}}
7496			}
7497		},
7498		addOnCountdown: {
7499			enable: false,
7500			targetdate: new Date().getTime() + 864000000, // http://www.freeformatter.com/epoch-timestamp-to-date-converter.html
7501			slidechanges: [{days: 0, hours: 0, minutes: 0, seconds: 0, slide: 2}]
7502		},
7503		addOnSlicey: {
7504			enable: false
7505		},
7506		addOnFilmstrip: {
7507			enable: false
7508		},
7509		addOnBeforeAfter : {
7510			enable: false,
7511			options: {
7512				cursor: "move",
7513			    carousel: false,
7514			    arrowStyles: {
7515			        leftIcon: "fa-icon-caret-left",
7516			        rightIcon: "fa-icon-caret-right",
7517			        topIcon: "fa-icon-caret-up",
7518			        bottomIcon: "fa-icon-caret-down",
7519			        size: "35",
7520			        color: "#ffffff",
7521			        spacing: "10",
7522			        bgColor: "transparent",
7523			        padding: "0",
7524			        borderRadius: "0"
7525			    },
7526			    dividerStyles: {
7527			        width: "1",
7528			        color: "rgba(255, 255, 255, 0.5)"
7529			    }
7530			}
7531		},
7532		addOnPanorama: {
7533			enable: false
7534		},
7535		addOnRevealer: {
7536			enable: false,
7537		},
7538		revealer: {
7539			direction: "open_horizontal",
7540			color: "#ffffff",
7541			duration: "1500",
7542			delay: "0",
7543			easing: "Power2.easeInOut",
7544			overlay_enabled: true,
7545			overlay_color: "#000000",
7546			overlay_duration: "1500",
7547			overlay_delay: "0",
7548			overlay_easing: "Power2.easeInOut",
7549			spinner: "1",
7550			spinnerColor: "#006dd2",
7551			spinnerHtml: "<div class='rsaddon-revealer-spinner rsaddon-revealer-spinner-1'><div class='rsaddon-revealer-1'><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><span style='background: {{color}}'><\/span><\/div><\/div \/>"
7552		},
7553		addOnDuotone: {
7554			enable: false
7555		},
7556		addOnBubblemorph: {
7557			enable: false
7558		},
7559		addOnDistortion: {
7560			enable: false
7561		}
7562		
7563	};
7564
7565	PluginRevolutionSlider.prototype = {
7566		initialize: function($el, opts) {
7567			if ($el.data(instanceName)) {
7568				return this;
7569			}
7570
7571			this.$el = $el;
7572
7573			this
7574				.setData()
7575				.setOptions(opts)
7576				.build()
7577				.events();
7578
7579			return this;
7580		},
7581
7582		setData: function() {
7583			this.$el.data(instanceName, this);
7584
7585			return this;
7586		},
7587
7588		setOptions: function(opts) {
7589			this.options = $.extend(true, {}, PluginRevolutionSlider.defaults, opts, {
7590				wrapper: this.$el
7591			});
7592
7593			return this;
7594		},
7595
7596		build: function() {
7597			if (!($.isFunction($.fn.revolution))) {
7598				return this;
7599			}
7600
7601			// Single Slider Class
7602			if(this.options.wrapper.find('> ul > li').length == 1) {
7603				this.options.wrapper.addClass('slider-single-slide');
7604
7605				// Remove Bullets
7606				// this.options.navigation.bullets.enable = false;
7607				$.extend(this.options.navigation, {
7608					bullets: {
7609						enable: false
7610					}
7611				});
7612
7613			}
7614
7615			// Full Screen Class
7616			if(this.options.sliderLayout == 'fullscreen') {
7617				this.options.wrapper.closest('.slider-container').addClass('fullscreen-slider');
7618			}
7619			
7620			// Initialize Revolution Slider
7621			this.options.wrapper.revolution(this.options);
7622
7623			// Addon Init - Typewriter
7624			if(this.options.addOnTypewriter.enable) {
7625				RsTypewriterAddOn($, this.options.wrapper);
7626			}
7627
7628			// Addon Init - Whiteboard
7629			if(this.options.addOnWhiteboard.enable) {
7630				this.options.wrapper.rsWhiteBoard();
7631			}
7632
7633			// Addon Init - Particles
7634			if(this.options.addOnParticles.enable) {
7635				RsParticlesAddOn(this.options.wrapper);
7636			}
7637
7638			// Addon Init - Countdown
7639			if(this.options.addOnCountdown.enable) {
7640				tp_countdown(this.options.wrapper, this.options.addOnCountdown.targetdate, this.options.addOnCountdown.slidechanges);
7641			}
7642
7643			// Addon Init - Slicey
7644			if(this.options.addOnSlicey.enable) {
7645				this.options.wrapper.revSliderSlicey();
7646			}
7647
7648			// Addon Init - Filmstrip
7649			if(this.options.addOnFilmstrip.enable) {
7650				RsFilmstripAddOn($, this.options.wrapper, '../vendor/rs-plugin/revolution-addons/filmstrip/', false);
7651			}
7652
7653			// Addon Init - Before After
7654			if(this.options.addOnBeforeAfter.enable) {
7655				RevSliderBeforeAfter($, this.options.wrapper, this.options.addOnBeforeAfter.options);
7656			}
7657
7658			// Addon Init - Panorama
7659			if(this.options.addOnPanorama.enable) {
7660				RsAddonPanorama($, this.options.wrapper);
7661			}
7662
7663			// Addon Init - Revealer
7664			if(this.options.addOnRevealer.enable) {
7665				RsRevealerAddOn($, this.options.wrapper, this.options.revealer.spinnerHtml);
7666			}
7667
7668			// Addon Init - Duotone
7669			if(this.options.addOnDuotone.enable) {
7670				RsAddonDuotone($, this.options.wrapper, true, "cubic-bezier(0.645, 0.045, 0.355, 1.000)", "1000");
7671			}
7672
7673			// Addon Init - Bubblemorph
7674			if(this.options.addOnBubblemorph.enable) {
7675				BubbleMorphAddOn($, this.options.wrapper, false);
7676			}
7677
7678			// Addon Init - Distortion
7679			if(this.options.addOnDistortion.enable) {
7680				RsLiquideffectAddOn($, this.options.wrapper);
7681			}
7682
7683			return this;
7684		},
7685
7686		events: function() {
7687
7688			return this;
7689		}
7690	};
7691
7692	// expose to scope
7693	$.extend(theme, {
7694		PluginRevolutionSlider: PluginRevolutionSlider
7695	});
7696
7697	// jquery plugin
7698	$.fn.themePluginRevolutionSlider = function(opts) {
7699		return this.map(function() {
7700			var $this = $(this);
7701
7702			if ($this.data(instanceName)) {
7703				return $this.data(instanceName);
7704			} else {
7705				return new PluginRevolutionSlider($this, opts);
7706			}
7707
7708		});
7709	}
7710
7711}).apply(this, [window.theme, jQuery]);
7712
7713// Scroll Spy
7714(function(theme, $) {
7715
7716	theme = theme || {};
7717
7718	var instanceName = '__scrollSpy';
7719
7720	var PluginScrollSpy = function($el, opts) {
7721		return this.initialize($el, opts);
7722	};
7723
7724	PluginScrollSpy.defaults = {
7725		target: '#header',
7726		debugMode: false
7727	};
7728
7729	PluginScrollSpy.prototype = {
7730		initialize: function($el, opts) {
7731
7732			if( document.querySelector( opts.target ) == null ) {
7733				return false;
7734			}
7735
7736			this.$el = $el;
7737
7738			this
7739				.setData()
7740				.setOptions(opts);
7741
7742			if( this.options.debugMode ) {
7743				this.debugMode();
7744			} 
7745			
7746			this.build();
7747
7748			return this;
7749		},
7750
7751		setData: function() {
7752			this.$el.data(instanceName, this);
7753
7754			return this;
7755		},
7756
7757		setOptions: function(opts) {
7758			this.options = $.extend(true, {}, PluginScrollSpy.defaults, opts, {
7759				wrapper: this.$el
7760			});
7761
7762			return this;
7763		},
7764
7765		build: function() {
7766            var self = this,
7767                target = document.querySelector( self.options.target ) != null ? document.querySelector( self.options.target ) : false,
7768                navItems = target == '#header' || target == '.wrapper-spy' ? target.querySelectorAll('.header-nav .nav > li a') : target.querySelectorAll('.nav > li a');
7769
7770			// Get all section ID's
7771			var sectionIDs = Object.keys(navItems).map(function(key, index) {
7772				return navItems[key].hash;
7773			});
7774
7775			// Remove empty values from sectionIDs array
7776			sectionIDs = sectionIDs.filter(function(value){
7777				return value != ''; 
7778			});
7779
7780			// Store in a global variable
7781			self.sectionIDs = sectionIDs;
7782
7783			for( var i = 0; i < sectionIDs.length; i++ ) {
7784
7785				// Default Root Margin
7786				var rootMargin = '-20% 0px -79.9% 0px';
7787				
7788				// Spy Offset
7789				if( $( sectionIDs[i] ).data('spy-offset') ) {
7790					var rootMarginOffset = $( sectionIDs[i] ).data('spy-offset'),
7791						isNegativeOffset = parseInt( rootMarginOffset ) < 0 ? true : false;
7792
7793					// Mount a new rootMargin based on offset value
7794					rootMargin = rootMargin.split(' ').map(function(element, index){
7795						if( element.indexOf('%') > 0 ) {
7796							var valueToInt = parseInt( element.replace('%','') ),
7797								newValue = 0;
7798
7799							switch ( index ) {
7800								case 0:
7801									if( isNegativeOffset ) {
7802										newValue = valueToInt - rootMarginOffset;
7803									} else {
7804										newValue = Math.abs(valueToInt) + rootMarginOffset;
7805									}
7806									break;
7807
7808								case 2:
7809									if( isNegativeOffset ) {
7810										newValue = valueToInt + rootMarginOffset;
7811									} else {
7812										newValue = Math.abs(valueToInt) - rootMarginOffset;
7813									}
7814									break;
7815							
7816							}
7817
7818							if( isNegativeOffset ) {
7819								newValue = newValue + '%';
7820							} else {
7821								newValue = '-' + newValue + '%';
7822							}
7823
7824							return newValue;
7825						} else {
7826							return element;
7827						}
7828					}).join(' ');
7829				}
7830
7831				var selector = sectionIDs[i],
7832					callback = function() {
7833						var $section = $(this);
7834
7835						if( target == '#header' || target == '.wrapper-spy' ) {
7836							$('#header .header-nav .nav > li a').removeClass('active');
7837							$('#header .header-nav .nav > li a[href="#'+ $section[0].id +'"]').addClass('active');
7838						} else {
7839							$( target ).find('.nav > li a').removeClass('active');
7840							$( target ).find('.nav > li a[href="#'+ $section[0].id +'"]').addClass('active');
7841						}
7842						
7843					}
7844
7845				this.scrollSpyIntObs( selector, callback, { 
7846					rootMargin: rootMargin,
7847					threshold: 0
7848				}, true, i, true);
7849
7850            }
7851
7852            return this;
7853
7854		},
7855
7856		scrollSpyIntObs: function(selector, functionName, intObsOptions, al
7856waysObserve, index, firstLoad) {
7857			var self = this;
7858
7859			var $el = document.querySelectorAll( selector );
7860			var intersectionObserverOptions = {
7861				rootMargin: '0px 0px 200px 0px'
7862			}
7863
7864			if( Object.keys(intObsOptions).length ) {
7865				intersectionObserverOptions = $.extend(intersectionObserverOptions, intObsOptions);
7866			}
7867
7868			var observer = new IntersectionObserver(function(entries) {
7869
7870				for(var i=0; i < entries.length; i++) {
7871					var entry = entries[i];
7872
7873					if (entry.intersectionRatio > 0 ) {
7874						if( typeof functionName === 'string' ) {
7875							var func = Function( 'return ' + functionName )();
7876						} else {
7877							var callback = functionName;
7878
7879							callback.call( $(entry.target) );
7880						}
7881
7882						// Unobserve
7883						if( !alwaysObserve ) {
7884							observer.unobserve(entry.target);   
7885						}
7886
7887					} else {
7888						if( firstLoad == false ) {
7889							if( index == self.sectionIDs.length - 1 ) {
7890								$('#header .header-nav .nav > li a').removeClass('active');
7891								$('#header .header-nav .nav > li a[href="#'+ entry.target.id +'"]').parent().prev().find('a').addClass('active');
7892							}
7893						}
7894						firstLoad = false;
7895
7896					}
7897				}
7898			}, intersectionObserverOptions);
7899			
7900			$( $el ).each(function(){
7901				observer.observe( $(this)[0] );
7902			});
7903
7904			return this;
7905		},
7906
7907		debugMode: function() {
7908			function wrapCallback(cb) {
7909				return (...args) => wrapper(cb, ...args)
7910			}
7911
7912			function addFlashingRect(bounds, style = {}, entry) {
7913				const { width, left, height, top } = bounds
7914				const div = document.createElement("div")
7915				div.style.position = "fixed"
7916				div.style.width = width + "px"
7917				div.style.left = left + "px"
7918				div.style.top = top + "px"
7919				div.style.height = height + "px"
7920				div.style.pointerEvents = "none"
7921				div.style.transition = "opacity 2s ease-in"
7922				div.style.zIndex = 9999999999;
7923				Object.assign(div.style, style)
7924				requestAnimationFrame(() =>
7925					requestAnimationFrame(() => {
7926					div.style.opacity = 0
7927				})
7928				)
7929				div.addEventListener("transitionend", () => {
7930					document.body.removeChild(div)
7931				})
7932				
7933				document.body.appendChild(div)
7934
7935				if( entry ) {
7936					var newdiv = document.createElement("div");
7937					
7938					newdiv.style.backgroundColor = '#000';
7939					newdiv.style.color = '#FFF';
7940					newdiv.style.paddingTop = '10px';
7941					newdiv.style.paddingRight = '10px';
7942					newdiv.style.paddingLeft = '10px';
7943					newdiv.style.paddingBottom = '10px';
7944					newdiv.innerHTML = entry.target.id;
7945					div.appendChild( newdiv );
7946				}
7947				
7948				return div
7949			}
7950
7951			const iodOptions = {
7952				rootColor: "#9428AB",
7953				enterColor: "#B35C00",
7954				exitColor: "#035570",
7955				interColor: "#9CAF00BB",
7956			}
7957
7958			function showEntry(entry) {
7959				addFlashingRect(entry.rootBounds, {
7960					border: `${Math.min(10, entry.rootBounds.height / 2)}px solid ${
7961					iodOptions.rootColor
7962					}`,
7963					overflow: "hidden",
7964					boxSizing: "border-box",
7965				}, entry);
7966			}
7967
7968			function wrapper(cb, entries, observer) {
7969				entries.forEach(showEntry)
7970				return cb(entries, observer)
7971			}
7972
7973			if (typeof window != "undefined") {
7974				window.IntersectionObserver = class extends IntersectionObserver {
7975					constructor(cb, o) {
7976						super(wrapCallback(cb), o)
7977					}
7978				}
7979			}
7980
7981			return this;
7982		}
7983	};
7984
7985	// expose to scope
7986	$.extend(theme, {
7987		PluginScrollSpy: PluginScrollSpy
7988	});
7989
7990	// jquery plugin
7991	$.fn.themePluginScrollSpy = function(opts) {
7992		return this.map(function() {
7993			var $this = $(this);
7994
7995			if ($this.data(instanceName)) {
7996				return $this.data(instanceName);
7997			} else {
7998				return new PluginScrollSpy($this, opts);
7999			}
8000
8001		});
8002	}
8003
8004}).apply(this, [window.theme, jQuery]);
8005
8006// Scroll to Top
8007(function(theme, $) {
8008
8009	theme = theme || {};
8010
8011	$.extend(theme, {
8012
8013		PluginScrollToTop: {
8014
8015			defaults: {
8016				wrapper: $('body'),
8017				offset: 150,
8018				buttonClass: 'scroll-to-top',
8019				iconClass: 'fas fa-chevron-up',
8020				delay: 1000,
8021				visibleMobile: false,
8022				label: false,
8023				easing: 'easeOutBack'
8024			},
8025
8026			initialize: function(opts) {
8027				initialized = true;
8028
8029				// Don't initialize if the page has Section Scroll
8030				if( $('body[data-plugin-section-scroll]').get(0) ) {
8031					return;
8032				}
8033
8034				this
8035					.setOptions(opts)
8036					.build()
8037					.events();
8038
8039				return this;
8040			},
8041
8042			setOptions: function(opts) {
8043				this.options = $.extend(true, {}, this.defaults, opts);
8044
8045				return this;
8046			},
8047
8048			build: function() {
8049				var self = this,
8050					$el;
8051
8052				// Base HTML Markup
8053				$el = $('<a />')
8054					.addClass(self.options.buttonClass)
8055					.attr({
8056						'href': '#',
8057					})
8058					.append(
8059						$('<i />')
8060						.addClass(self.options.iconClass)
8061				);
8062
8063				// Visible Mobile
8064				if (!self.options.visibleMobile) {
8065					$el.addClass('hidden-mobile');
8066				}
8067
8068				// Label
8069				if (self.options.label) {
8070					$el.append(
8071						$('<span />').html(self.options.label)
8072					);
8073				}
8074
8075				this.options.wrapper.append($el);
8076
8077				this.$el = $el;
8078
8079				return this;
8080			},
8081
8082			events: function() {
8083				var self = this,
8084					_isScrolling = false;
8085
8086				// Click Element Action
8087				self.$el.on('click', function(e) {
8088					e.preventDefault();
8089					$('html').animate({
8090						scrollTop: 0
8091					}, self.options.delay, self.options.easing);
8092					return false;
8093				});
8094
8095				// Show/Hide Button on Window Scroll event.
8096				$(window).scroll(function() {
8097
8098					if (!_isScrolling) {
8099
8100						_isScrolling = true;
8101
8102						if ($(window).scrollTop() > self.options.offset) {
8103
8104							self.$el.stop(true, true).addClass('visible');
8105							_isScrolling = false;
8106
8107						} else {
8108
8109							self.$el.stop(true, true).removeClass('visible');
8110							_isScrolling = false;
8111
8112						}
8113
8114					}
8115
8116				});
8117
8118				return this;
8119			}
8120
8121		}
8122
8123	});
8124
8125}).apply(this, [window.theme, jQuery]);
8126
8127// Scrollable
8128(function(theme, $) {
8129
8130	theme = theme || {};
8131
8132	var instanceName = '__scrollable';
8133
8134	var PluginScrollable = function($el, opts) {
8135		return this.initialize($el, opts);
8136	};
8137
8138	PluginScrollable.updateModals = function() {
8139		PluginScrollable.updateBootstrapModal();
8140	};
8141
8142	PluginScrollable.updateBootstrapModal = function() {
8143		var updateBoostrapModal;
8144
8145		updateBoostrapModal = typeof $.fn.modal !== 'undefined';
8146		updateBoostrapModal = updateBoostrapModal && typeof $.fn.modal.Constructor !== 'undefined';
8147		updateBoostrapModal = updateBoostrapModal && typeof $.fn.modal.Constructor.prototype !== 'undefined';
8148		updateBoostrapModal = updateBoostrapModal && typeof $.fn.modal.Constructor.prototype.enforceFocus !== 'undefined';
8149
8150		if ( !updateBoostrapModal ) {
8151			return false;
8152		}
8153
8154		var originalFocus = $.fn.modal.Constructor.prototype.enforceFocus;
8155		$.fn.modal.Constructor.prototype.enforceFocus = function() {
8156			originalFocus.apply( this );
8157
8158			var $scrollable = this.$element.find('.scrollable');
8159			if ( $scrollable ) {
8160				if ( $.isFunction($.fn['themePluginScrollable'])  ) {
8161					$scrollable.themePluginScrollable();
8162				}
8163
8164				if ( $.isFunction($.fn['nanoScroller']) ) {
8165					$scrollable.nanoScroller();
8166				}
8167			}
8168		};
8169	};
8170
8171	PluginScrollable.defaults = {
8172		contentClass: 'scrollable-content',
8173		paneClass: 'scrollable-pane',
8174		sliderClass: 'scrollable-slider',
8175		alwaysVisible: true,
8176		preventPageScrolling: true
8177	};
8178
8179	PluginScrollable.prototype = {
8180		initialize: function($el, opts) {
8181			if ( $el.data( instanceName ) ) {
8182				return this;
8183			}
8184
8185			this.$el = $el;
8186
8187			this
8188				.setData()
8189				.setOptions(opts)
8190				.build();
8191
8192			return this;
8193		},
8194
8195		setData: function() {
8196			this.$el.data(instanceName, this);
8197
8198			return this;
8199		},
8200
8201		setOptions: function(opts) {
8202			this.options = $.extend(true, {}, PluginScrollable.defaults, opts, {
8203				wrapper: this.$el
8204			});
8205
8206			return this;
8207		},
8208
8209		build: function() {
8210			this.options.wrapper.nanoScroller(this.options);
8211
8212			return this;
8213		}
8214	};
8215
8216	// expose to scope
8217	$.extend(theme, {
8218		PluginScrollable: PluginScrollable
8219	});
8220
8221	// jquery plugin
8222	$.fn.themePluginScrollable = function(opts) {
8223		return this.each(function() {
8224			var $this = $(this);
8225
8226			if ($this.data(instanceName)) {
8227				return $this.data(instanceName);
8228			} else {
8229				return new PluginScrollable($this, opts);
8230			}
8231
8232		});
8233	};
8234
8235	$(function() {
8236		PluginScrollable.updateModals();
8237	});
8238
8239}).apply(this, [window.theme, jQuery]);
8240
8241// Section Scroll
8242(function(theme, $) {
8243
8244	theme = theme || {};
8245
8246	var instanceName = '__sectionScroll';
8247
8248	var PluginSectionScroll = function($el, opts) {
8249		return this.initialize($el, opts);
8250	};
8251
8252	PluginSectionScroll.defaults = {
8253		targetClass: '.section',
8254		dotsNav: true,
8255		changeHeaderLogo: true,
8256		headerLogoDark: 'img/logo-default-slim.png',
8257		headerLogoLight: 'img/logo-default-slim-dark.png'
8258	};
8259
8260	PluginSectionScroll.prototype = {
8261		initialize: function($el, opts) {
8262			if ($el.data(instanceName)) {
8263				return this;
8264			}
8265
8266			this.$el = $el;
8267
8268			this
8269				.setData()
8270				.setOptions(opts)
8271				.build()
8272				.events();
8273
8274			return this;
8275		},
8276
8277		setData: function() {
8278			this.$el.data(instanceName, this);
8279
8280			return this;
8281		},
8282
8283		setOptions: function(opts) {
8284			this.options = $.extend(true, {}, PluginSectionScroll.defaults, opts, {
8285				wrapper: this.$el
8286			});
8287
8288			return this;
8289		},
8290
8291		build: function() {
8292			var self = this,
8293				$el = this.options.wrapper;
8294
8295			// Check type of header and change the target for header (by change header color purpose)
8296			if( $('html').hasClass('side-header-overlay-full-screen') ) {
8297				self.$header = $('.sticky-wrapper');
8298			} else {
8299				self.$header = $('#header');
8300			}
8301
8302			// Turn the section full height or not depeding on the content size
8303			self.updateSectionsHeight();
8304
8305			// Wrap all sections in a section wrapper
8306			$( this.options.targetClass ).wrap('<div class="section-wrapper"></div>');
8307
8308			// Set the section wrapper height
8309	  		$('.section-wrapper').each(function(){
8310	  			$(this).height( $(this).find('.section-scroll').outerHeight() );
8311	  		});
8312
8313	  		// Add active class to the first section on page load
8314	  		$('.section-wrapper').first().addClass('active');
8315			
8316	        var	flag = false,
8317	            scrollableFlag = false,
8318	        	touchDirection = '',
8319	        	touchstartY = 0,
8320	        	touchendY = 0;
8321
8322	        $(window).on('touchstart', function(event) {
8323			    touchstartY = event.changedTouches[0].screenY;
8324			});
8325
8326	        var wheelEvent = 'onwheel' in document ? 'wheel' : document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';
8327	        if( $(window).width() < 992 && $('html').hasClass('touch') ) {
8328	        	wheelEvent = 'onwheel' in document ? 'wheel touchend' : document.onmousewheel !== undefined ? 'mousewheel touchend' : 'DOMMouseScroll touchend';
8329	        }
8330
8331        	if( $(window).width() < 992 ) {
8332	    		$('html').removeClass('overflow-hidden');
8333			    $(window).on('scroll', function(){
8334
8335		    		var index = 0;
8336		    		$('.section-scroll').each(function(){
8337		    			if( $(this).offset().top <= $(window).scrollTop() + 50 ) {
8338		    				var $currentSection2 = $('.section-wrapper').eq( index ).find('.section-scroll');
8339
8340			            	$('.section-scroll-dots-navigation > ul > li').removeClass('active');
8341							$('.section-scroll-dots-navigation > ul > li').eq( index ).addClass('active');
8342
8343							$(window).trigger({
8344								type: 'section.scroll.mobile.change.header.color',
8345								currentSection: $currentSection2
8346							});
8347		    			}
8348
8349		    			index++;
8350		    		});
8351		    		
8352			    });
8353
8354			    $(window).on('section.scroll.mobile.change.header.color', function(e){
8355			    	if( typeof e.currentSection == 'undefined' ) {
8356			    		return;
8357			    	}
8358
8359			    	var $currentSection = e.currentSection,
8360			    		headerColor     = $currentSection.data('section-scroll-header-color');
8361								    	
8362			    	$('#header .header-nav').removeClass('header-nav-light-text header-nav-dark-text').addClass('header-nav-' + headerColor + '-text');
8363			    	$('#header .header-nav-features').removeClass('header-nav-features-dark header-nav-features-light').addClass('header-nav-features-' + headerColor);
8364			    	$('#header .header-social-icons').removeClass('social-icons-icon-dark social-icons-icon-light').addClass('social-icons-icon-' + headerColor);
8365
8366			    	// Change Logo
8367			    	if( self.options.changeHeaderLogo && headerColor != undefined ) {
8368				    	if( headerColor == 'light' ) {
8369				    		$('#header .header-logo img').attr('src', self.options.headerLogoLight);
8370				    	} else if( headerColor == 'dark' ) {
8371				    		$('#header .header-logo img').attr('src', self.options.headerLogoDark);
8372				    	}
8373			    	}
8374
8375			    	self.$header.css({
8376			    		opacity: 1
8377			    	});
8378
8379			    });
8380        	}
8381
8382	        $(window).on(wheelEvent, function(e){
8383	        	if( $(window).width() < 992 ) {
8384	        		return;
8385	        	}
8386
8387	        	if( $(window).width() < 992 && $('html').hasClass('touch') ) {
8388		        	if( $(e.target).closest('.section-scroll-dots-navigation').get(0) || $(e.target).closest('.header-body').get(0) || $(e.target).closest('.owl-carousel').get(0) ) {
8389		        		return;
8390		        	}
8391		        }
8392
8393		        // Side Header Overlay Full Screen
8394		        if( $('html.side-header-overlay-full-screen.side-header-hide').get(0) ) {
8395		        	return;
8396		        }
8397
8398	        	var wheelDirection = e.originalEvent.wheelDelta == undefined ? e.originalEvent.deltaY > 0 : e.originalEvent.wheelDelta < 0;
8399	        	if( $(window).width() < 992 && $('html').hasClass('touch') ) {
8400		        	touchendY = event.changedTouches[0].screenY;
8401	        		
8402				    if( touchendY <= touchstartY ) {
8403				    	touchDirection = 'up';
8404				    }
8405
8406				    if( touchendY >= touchstartY ) {
8407				    	touchDirection = 'down';
8408				    }
8409
8410				    if( touchendY == touchstartY ) {
8411				    	return;
8412				    }
8413	        	}
8414
8415	        	var $currentSection = $('.section-wrapper').eq( self.getCurrentIndex() ).find('.section-scroll'),
8416            		$nextSection = self.getNextSection(wheelDirection, touchDirection),
8417            		nextSectionOffsetTop;
8418
8419            	// If is the last section, then change the offsetTop value
8420            	if( self.getCurrentIndex() == $('.section-wrapper').length - 1 ) {
8421            		nextSectionOffsetTop = $(document).height();
8422            	} else {
8423            		nextSectionOffsetTop = $nextSection.offset().top;
8424            	}
8425
8426			    if( $(window).width() < 992 && $('html').hasClass('touch') ) {
8427				    setTimeout(function(){
8428					    if( $('.section-wrapper').eq( self.getCurrentIndex() ).find('.section-scroll').hasClass('section-scroll-scrollable') ) {
8429					    	$('html').removeClass('overflow-hidden');
8430					    } else {
8431					    	$('html').addClass('overflow-hidden');
8432					    }
8433				    }, 1200);
8434				}
8435
8436	        	// For non full height sections
8437	        	if( $currentSection.hasClass('section-scroll-scrollable') ) {
8438	        		if( !flag && !scrollableFlag ) {
8439
8440		        		// Scroll Direction
8441		        		if(wheelDirection || touchDirection == 'up') {
8442		        			if( ( $(window).scrollTop() + $(window).height() ) >= nextSectionOffsetTop ) {
8443		        				flag = true;
8444								setTimeout(function(){
8445									$(window).trigger('section.scroll.change.header.color');
8446
8447					            	setTimeout(function(){
8448										flag = false;
8449									}, 500);
8450								}, 1000);
8451
8452		        				if( self.getCurrentIndex() == ( $('.section-wrapper').length - 1 )  ) {
8453						    		return false;
8454						    	}
8455
8456		        				// Move to the next section
8457		        				self.moveTo( $currentSection.offset().top + $currentSection.outerHeight() );
8458
8459		        				// Change Section Active Class
8460					   			self.changeSectionActiveState( $nextSection );
8461
8462					   			self.$header.css({
8463							    	opacity: 0,
8464							    	transition: 'ease opacity 500ms'
8465							    });
8466					        }
8467
8468			        		if( !$('html').hasClass('touch') ) {
8469				        		for( var i = 1; i < 100; i++ ) {
8470					        		$('body, html').scrollTop( $(window).scrollTop() + 1 );
8471
8472					        		if( ( $(window).scrollTop() + $(window).height() ) >= nextSectionOffsetTop ) {
8473					        			scrollableFlag = true;
8474										setTimeout(function(){
8475											$(window).trigger('section.scroll.change.header.color');
8476							            	scrollableFlag = false;
8477										}, 500);
8478					        			break;
8479					        		}
8480				        		}
8481				        	}
8482					    } else {
8483					    	if( $(window).scrollTop() <= $currentSection.offset().top ) {
8484					    		flag = true;
8485								setTimeout(function(){
8486									$(window).trigger('section.scroll.change.header.color');
8487
8488					            	setTimeout(function(){
8489										flag = false;
8490									}, 500);
8491								}, 1000);
8492
8493					    		if( self.getCurrentIndex() == 0  ) {
8494						    		return false;
8495						    	}
8496
8497					   			// Move to the next section
8498		        				self.moveTo( $currentSection.offset().top - $(window).height() );
8499
8500		        				// Change Section Active Class
8501					   			self.changeSectionActiveState( $nextSection );
8502
8503					   			self.$header.css({
8504							    	opacity: 0,
8505							    	transition: 'ease opacity 500ms'
8506							    });
8507					        }
8508
8509					    	if( !$('html').hasClass('touch') ) {
8510				        		for( var i = 1; i < 100; i++ ) {
8511					        		$('body, html').scrollTop( $(window).scrollTop() - 1 );
8512
8513					        		if( $(window).scrollTop() <= $currentSection.offset().top ) {
8514					        			scrollableFlag = true;
8515										setTimeout(function(){
8516											$(window).trigger('section.scroll.change.header.color');
8517							            	scrollableFlag = false;
8518										}, 500);
8519					        			break;
8520					        		}
8521				        		}
8522				        	}
8523					    }
8524
8525			   			// Change Dots Active Class
8526				        self.changeDotsActiveState();
8527
8528		        		return;
8529
8530		        	}
8531	        	}
8532
8533	        	// For full height sections
8534	        	if( !flag && !scrollableFlag ) {
8535				    if(wheelDirection || touchDirection == 'up') {
8536				    	if( self.getCurrentIndex() == ( $('.section-wrapper').length - 1 )  ) {
8537				    		return false;
8538				    	}
8539
8540				   		// Change Section Active Class
8541			   			self.changeSectionActiveState( $nextSection );
8542
8543				   		setTimeout(function(){
8544				   			// Move to the next section
8545	        				self.moveTo( $nextSection.offset().top );
8546
8547				   		}, 150);
8548				    } else {
8549				    	if( self.getCurrentIndex() == 0  ) {
8550				    		return false;
8551				    	}
8552
8553				   		// Change Section Active Class
8554			   			self.changeSectionActiveState( $nextSection );
8555
8556				   		if( $nextSection.height() > $(window).height() ) {
8557				   			// Move to the next section
8558	        				self.moveTo( $currentSection.offset().top - $(window).height() );
8559				   		} else {
8560					        setTimeout(function(){
8561					   			// Move to the next section
8562		        				self.moveTo( $nextSection.offset().top );
8563
8564					   		}, 150);
8565				   		}
8566				    }
8567
8568				    // Change Dots Active Class
8569			        self.changeDotsActiveState();
8570
8571				    self.$header.css({
8572				    	opacity: 0,
8573				    	transition: 'ease opacity 500ms'
8574				    });
8575
8576				    // Style next section
8577	            	$nextSection.css({
8578	            		position: 'relative',
8579	            		opacity: 1,
8580	            		'z-index': 1,
8581	            		transform: 'translate3d(0,0,0) scale(1)'
8582	            	});
8583
8584	            	// Style previous section
8585	            	$currentSection.css({
8586	            		position: 'fixed',
8587	            		width: '100%',
8588	            		top: 0,
8589	            		left: 0,
8590	            		opacity: 0,
8591	            		'z-index': 0,
8592	            		transform: 'translate3d(0,0,-10px) scale(0.7)',
8593	            		transition: 'ease transform 600ms, ease opacity 600ms',
8594	            	});
8595
8596					setTimeout(function(){
8597						$currentSection.css({
8598		            		position: 'relative',
8599		            		opacity: 1,
8600		            		transform: 'translate3d(0,0,-10px) scale(1)'
8601		            	});
8602
8603						$(window).trigger('section.scroll.change.header.color');
8604
8605		            	setTimeout(function(){
8606							flag = false;
8607						}, 500);
8608					}, 1000);
8609
8610					flag = true;
8611
8612				}
8613
8614				return;
8615	        });
8616
8617	        // Dots Navigation
8618	        if( this.options.dotsNav ) {
8619	        	self.dotsNavigation();
8620	        }
8621
8622	        // First Load
8623	        setTimeout(function(){
8624		        if( $(window.location.hash).get(0) ) {
8625		        	self.moveTo( $(window.location.hash).parent().offset().top );
8626
8627		        	self.changeSectionActiveState( $(window.location.hash) );
8628
8629		        	// Change Dots Active Class
8630			        self.changeDotsActiveState();
8631
8632		        	self.updateHash( true );
8633		        } else {
8634		        	var hash  = window.location.hash,
8635		        		index = hash.replace('#','');
8636
8637		        	if( !hash ) {
8638		        		index = 1;
8639		        	}
8640
8641		        	self.moveTo( $('.section-wrapper').eq( index - 1 ).offset().top );
8642
8643		        	self.changeSectionActiveState( $('.section-wrapper').eq( index - 1 ).find('.section-scroll') );
8644
8645		        	// Change Dots Active Class
8646			        self.changeDotsActiveState();
8647
8648		        	self.updateHash( true );
8649		        }
8650
8651				$(window).trigger('section.scroll.ready');
8652				$(window).trigger('section.scroll.change.header.color');
8653			}, 500);
8654
8655			return this;
8656		},
8657
8658		updateSectionsHeight: function() {
8659			var self = this;
8660
8661			$('.section-scroll').css({ height: '' });
8662
8663			$('.section-scroll').each(function(){
8664				if( $(this).outerHeight() < ( $(window).height() + 3 ) ) {
8665					$(this).css({ height: '100vh' });		
8666				} else {
8667					$(this).addClass('section-scroll-scrollable');
8668				}
8669			});
8670
8671			// Set the section wrapper height
8672	  		$('.section-wrapper').each(function(){
8673	  			$(this).height( $(this).find('.section-scroll').outerHeight() );
8674	  		});
8675
8676			return this;
8677		},
8678
8679		updateHash: function( first_load ){
8680			var self = this;
8681
8682			if( !window.location.hash ) {
8683				window.location.hash = 1;
8684			} else {
8685				if(!first_load) {
8686					var $section = $('.section-wrapper').eq( self.getCurrentIndex() ).find('.section-scroll'),
8687						section_id = $section.attr('id') ? $section.attr('id') : $section.parent().index() + 1;
8688
8689					window.location.hash = section_id;
8690				}
8691			}
8692
8693			return this;
8694		},
8695
8696		getCurrentIndex: function() {
8697			var self = this,
8698				currentIndex = 0;
8699
8700			currentIndex = $('.section-wrapper.active').index();
8701
8702			return currentIndex;
8703		},
8704
8705		moveTo: function( $scrollTopValue, first_load ) {
8706			var self = this;
8707
8708			$('body, html').animate({
8709   				scrollTop: $scrollTopValue
8710   			}, 1000, 'easeOutQuint');
8711
8712   			setTimeout(function(){
8713	   			self.updateHash();
8714   			}, 500);
8715
8716			return this;
8717		},
8718
8719		getNextSection: function(wheelDirection, touchDirection) {
8720			var self = this,
8721				$nextSection = '';
8722
8723			// Scroll Direction
8724        	if(wheelDirection || touchDirection == 'up') {
8725				$nextSection = $('.section-wrapper').eq( self.getCurrentIndex() + 1 ).find('.section-scroll');
8726        	} else {
8727        		$nextSection = $('.section-wrapper').eq( self.getCurrentIndex() - 1 ).find('.section-scroll');
8728        	}
8729
8730			return $nextSection;
8731		},
8732
8733		changeSectionActiveState: function( $nextSection ) {
8734			var self = this;
8735
8736			$('.section-wrapper').removeClass('active');
8737	   		$nextSection.parent().addClass('active');
8738
8739			return this;
8740		},
8741
8742		changeDotsActiveState: function() {
8743			var self = this;
8744
8745			$('.section-scroll-dots-navigation > ul > li').removeClass('active');
8746			$('.section-scroll-dots-navigation > ul > li').eq( self.getCurrentIndex() ).addClass('active');
8747
8748			return this;
8749		},
8750
8751		dotsNavigation: function() {
8752			var self = this;
8753
8754			var dotsNav = $('<div class="section-scroll-dots-navigation"><ul class="list list-unstyled"></ul></div>'),
8755        		currentSectionIndex = self.getCurrentIndex();
8756
8757        	if( self.options.dotsClass ) {
8758        		dotsNav.addClass( self.options.dotsClass );
8759        	}
8760
8761        	for( var i = 0; i < $('.section-scroll').length; i++ ) {
8762        		var title = $('.section-wrapper').eq( i ).find('.section-scroll').data('section-scroll-title');
8763
8764        		dotsNav.find('> ul').append( '<li'+ ( ( currentSectionIndex == i ) ? ' class="active"' : '' ) +'><a href="#'+ i +'" data-nav-id="'+ i +'"><span>'+ title +'</span></a></li>' );
8765        	}
8766
8767        	$('.body').append( dotsNav );
8768
8769        	dotsNav.find('a[data-nav-id]').on('click touchstart', function(e){
8770        		e.preventDefault();
8771        		var $this = $(this);
8772
8773        		$('.section-scroll').css({
8774        			opacity: 0,
8775        			transition: 'ease opacity 300ms'
8776        		});
8777
8778        		self.$header.css({
8779			    	opacity: 0,
8780			    	transition: 'ease opacity 500ms'
8781			    });
8782
8783        		setTimeout(function(){
8784	        		self.moveTo( $('.section-wrapper').eq( $this.data('nav-id') ).offset().top )
8785
8786		   			$('.section-wrapper').removeClass('active');
8787			   		$('.section-wrapper').eq( $this.data('nav-id') ).addClass('active');
8788
8789	        		$('.section-wrapper').eq( self.getCurrentIndex() ).find('.section-scroll').css({
8790	        			opacity: 1
8791	        		});
8792
8793	        		setTimeout(function(){
8794		        		$('.section-scroll').css({ opacity: 1 });
8795
8796		        		$(window).trigger('section.scroll.change.header.color');
8797	        		}, 500);
8798
8799	        		if( $(window).width() > 991 ) {
8800		        		self.changeDotsActiveState();
8801	        		}
8802        		}, 500);
8803        	});
8804
8805			return this;
8806		},
8807
8808		events: function() {
8809			var self = this;
8810
8811			$(window).on('section.scroll.ready', function(){
8812				$(window).scrollTop(0);
8813			});
8814
8815			$(window).on('section.scroll.change.header.color', function(){
8816		    	var headerColor = $('.section-wrapper').eq( self.getCurrentIndex() ).find('.section-scroll').data('section-scroll-header-color');
8817		    	
8818		    	$('#header .header-nav').removeClass('header-nav-light-text header-nav-dark-text').addClass('header-nav-' + headerColor + '-text');
8819		    	$('#header .header-nav-features').removeClass('header-nav-features-dark header-nav-features-light').addClass('header-nav-features-' + headerColor);
8820		    	$('#header .header-social-icons').removeClass('social-icons-icon-dark social-icons-icon-light').addClass('social-icons-icon-' + headerColor);
8821
8822		    	// Change Logo
8823		    	if( self.options.changeHeaderLogo && headerColor != undefined ) {
8824			    	if( headerColor == 'light' ) {
8825			    		$('#header .header-logo img').attr('src', self.options.headerLogoLight);
8826			    	} else if( headerColor == 'dark' ) {
8827			    		$('#header .header-logo img').attr('src', self.options.headerLogoDark);
8828			    	}
8829		    	}
8830
8831		    	self.$header.css({
8832		    		opacity: 1
8833		    	});
8834		    });
8835
8836			$(document).ready(function(){
8837			    $(window).afterResize(function(){
8838			    	self.updateSectionsHeight();
8839
8840			    	if( $(window).width() < 992 ) {
8841			    		$('html').removeClass('overflow-hidden');
8842			    	}
8843			    });
8844			});
8845
8846		    return this;
8847		}
8848	};
8849
8850	// expose to scope
8851	$.extend(theme, {
8852		PluginSectionScroll: PluginSectionScroll
8853	});
8854
8855	// jquery plugin
8856	$.fn.themePluginSectionScroll = function(opts) {
8857		return this.map(function() {
8858			var $this = $(this);
8859
8860			if ($this.data(instanceName)) {
8861				return $this.data(instanceName);
8862			} else {
8863				return new PluginSectionScroll($this, opts);
8864			}
8865
8866		});
8867	};
8868
8869}).apply(this, [window.theme, jQuery]);
8870
8871// Sort
8872(function(theme, $) {
8873
8874	theme = theme || {};
8875
8876	var instanceName = '__sort';
8877
8878	var PluginSort = function($el, opts) {
8879		return this.initialize($el, opts);
8880	};
8881
8882	PluginSort.defaults = {
8883		useHash: true,
8884		itemSelector: '.isotope-item',
8885		layoutMode: 'masonry',
8886		filter: '*',
8887		hiddenStyle: {
8888			opacity: 0
8889		},
8890		visibleStyle: {
8891			opacity: 1
8892		},
8893		stagger: 30,
8894		isOriginLeft: ($('html').attr('dir') == 'rtl' ? false : true)
8895	};
8896
8897	PluginSort.prototype = {
8898		initialize: function($el, opts) {
8899			if ($el.data(instanceName)) {
8900				return this;
8901			}
8902
8903			this.$el = $el;
8904
8905			this
8906				.setData()
8907				.setOptions(opts)
8908				.build();
8909
8910			return this;
8911		},
8912
8913		setData: function() {
8914			this.$el.data(instanceName, this);
8915
8916			return this;
8917		},
8918
8919		setOptions: function(opts) {
8920			this.options = $.extend(true, {}, PluginSort.defaults, opts, {
8921				wrapper: this.$el
8922			});
8923
8924			return this;
8925		},
8926
8927		build: function() {
8928			if (!($.isFunction($.fn.isotope))) {
8929				return this;
8930			}
8931
8932			var self = this,
8933				$source = this.options.wrapper,
8934				$destination = $('.sort-destination[data-sort-id="' + $source.attr('data-sort-id') + '"]'),
8935				$window = $(window);
8936
8937			if ($destination.get(0)) {
8938
8939				self.$source = $source;
8940				self.$destination = $destination;
8941				self.$loader = false;
8942
8943				self.setParagraphHeight($destination);
8944
8945				if (self.$destination.parents('.sort-destination-loader').get(0)) {
8946					self.$loader = self.$destination.parents('.sort-destination-loader');
8947					self.createLoader();
8948				}
8949
8950				$destination.attr('data-filter', '*');
8951
8952				$destination.one('layoutComplete', function(event, laidOutItems) {
8953					self.removeLoader();
8954
8955					// If has data-plugin-sticky on the page we need recalculate sticky position
8956					if( $('[data-plugin-sticky]').length ) {
8957						setTimeout(function(){
8958							$('[data-plugin-sticky]').each(function(){
8959								$(this).data('__sticky').build();
8960								$(window).trigger('resize');
8961							});
8962						}, 500);
8963					}
8964				});
8965
8966				// IE10/11 fix
8967				if( $('html').hasClass('ie10') || $('html').hasClass('ie11') ) {
8968					var padding = parseInt( self.options.wrapper.children().css('padding-left') ) + parseInt( self.options.wrapper.children().css('padding-right') );
8969				}
8970
8971				$destination.waitForImages(function() {
8972					$destination.isotope(self.options);
8973					self.events();
8974				});
8975
8976
8977				setTimeout(function() {
8978					self.removeLoader();
8979				}, 3000);
8980
8981			}
8982
8983			return this;
8984		},
8985
8986		events: function() {
8987			var self = this,
8988				filter = null,
8989				$window = $(window);
8990
8991			self.$source.find('a').click(function(e) {
8992				e.preventDefault();
8993
8994				filter = $(this).parent().data('option-value');
8995
8996				self.setFilter(filter);
8997
8998				if (e.originalEvent) {
8999					self.$source.trigger('filtered');
9000				}
9001
9002				return this;
9003			});
9004
9005			self.$destination.trigger('filtered');
9006			self.$source.trigger('filtered');
9007
9008			if (self.options.useHash) {
9009				self.hashEvents();
9010			}
9011
9012			$window.on('resize sort.resize', function() {
9013				setTimeout(function() {
9014					self.$destination.isotope('layout');
9015				}, 300);
9016			});
9017
9018			setTimeout(function() {
9019				$window.trigger('sort.resize');
9020			}, 300);
9021
9022			return this;
9023		},
9024
9025		setFilter: function(filter) {
9026			var self = this,
9027				page = false,
9028				currentFilter = filter;
9029
9030			self.$source.find('.active').removeClass('active');
9031			self.$source.find('li[data-option-value="' + filter + '"], li[data-option-value="' + filter + '"] > a').addClass('active');
9032
9033			self.options.filter = currentFilter;
9034
9035			if (self.$destination.attr('data-current-page')) {
9036				currentFilter = currentFilter + '[data-page-rel=' + self.$destination.attr('data-current-page') + ']';
9037			}
9038
9039			self.$destination.attr('data-filter', filter).isotope({
9040				filter: currentFilter
9041			}).one('arrangeComplete', function( event, filteredItems ) {
9042				
9043				if (self.options.useHash) {
9044					if (window.location.hash != '' || self.options.filter.replace('.', '') != '*') {
9045						window.location.hash = self.options.filter.replace('.', '');
9046					}
9047				}
9048				
9049				$(window).trigger('scroll');
9050
9051			}).trigger('filtered');
9052
9053			return this;
9054		},
9055
9056		hashEvents: function() {
9057			var self = this,
9058				hash = null,
9059				hashFilter = null,
9060				initHashFilter = '.' + location.hash.replace('#', '');
9061
9062			// Check if has scroll to section trough URL hash and prevent the sort plugin from show nothing
9063			if( $(location.hash).length ) {
9064				initHashFilter = '.';
9065			}
9066
9067			if (initHashFilter != '.' && initHashFilter != '.*') {
9068				self.setFilter(initHashFilter);
9069			}
9070
9071			$(window).on('hashchange', function(e) {
9072
9073				hashFilter = '.' + location.hash.replace('#', '');
9074				hash = (hashFilter == '.' || hashFilter == '.*' ? '*' : hashFilter);
9075
9076				self.setFilter(hash);
9077
9078			});
9079
9080			return this;
9081		},
9082
9083		setParagraphHeight: function() {
9084			var self = this,
9085				minParagraphHeight = 0,
9086				paragraphs = $('span.thumb-info-caption p', self.$destination);
9087
9088			paragraphs.each(function() {
9089				if ($(this).height() > minParagraphHeight) {
9090					minParagraphHeight = ($(this).height() + 10);
9091				}
9092			});
9093
9094			paragraphs.height(minParagraphHeight);
9095
9096			return this;
9097		},
9098
9099		createLoader: function() {
9100			var self = this;
9101
9102			var loaderTemplate = [
9103				'<div class="bounce-loader">',
9104					'<div class="bounce1"></div>',
9105					'<div class="bounce2"></div>',
9106					'<div class="bounce3"></div>',
9107				'</div>'
9108			].join('');
9109
9110			self.$loader.append(loaderTemplate);
9111
9112			return this;
9113		},
9114
9115		removeLoader: function() {
9116
9117			var self = this;
9118
9119			if (self.$loader) {
9120
9121				self.$loader.removeClass('sort-destination-loader-showing');
9122
9123				setTimeout(function() {
9124					self.$loader.addClass('sort-destination-loader-loaded');
9125				}, 300);
9126
9127			}
9128
9129		}
9130
9131	};
9132
9133	// expose to scope
9134	$.extend(theme, {
9135		PluginSort: PluginSort
9136	});
9137
9138	// jquery plugin
9139	$.fn.themePluginSort = function(opts) {
9140		return this.map(function() {
9141			var $this = $(this);
9142
9143			if ($this.data(instanceName)) {
9144				return $this.data(instanceName);
9145			} else {
9146				return new PluginSort($this, opts);
9147			}
9148
9149		});
9150	}
9151
9152}).apply(this, [window.theme, jQuery]);
9153
9154// Star Rating
9155(function(theme, $) {
9156
9157	theme = theme || {};
9158
9159	var instanceName = '__starrating';
9160
9161	var PluginStarRating = function($el, opts) {
9162		return this.initialize($el, opts);
9163	};
9164
9165	PluginStarRating.defaults = {
9166		theme: 'krajee-fas',
9167		color: 'primary',
9168		showClear: false,
9169		showCaption: false
9170	};
9171
9172	PluginStarRating.prototype = {
9173		initialize: function($el, opts) {
9174			this.$el = $el;
9175
9176			this
9177				.setData()
9178				.setOptions(opts)
9179				.build();
9180
9181			return this;
9182		},
9183
9184		setData: function() {
9185			this.$el.data(instanceName, this);
9186
9187			return this;
9188		},
9189
9190		setOptions: function(opts) {
9191			this.options = $.extend(true, {}, PluginStarRating.defaults, opts, {
9192				wrapper: this.$el
9193			});
9194
9195			return this;
9196		},
9197
9198		build: function() {
9199
9200			if (!($.isFunction($.fn.rating))) {
9201				return this;
9202			}
9203
9204			var self = this;
9205
9206			self.options.wrapper
9207				.rating(self.options);
9208
9209			self.options.wrapper.parents('.rating-container')
9210				.addClass('rating-' + self.options.color);
9211
9212			if( self.options.extraClass ) {
9213				self.options.wrapper.parents('.rating-container')
9214					.addClass(self.options.extraClass);
9215			}
9216
9217			return this;
9218
9219		}
9220	};
9221
9222	// expose to scope
9223	$.extend(theme, {
9224		PluginStarRating: PluginStarRating
9225	});
9226
9227	// jquery plugin
9228	$.fn.themePluginStarRating = function(opts) {
9229		return this.map(function() {
9230			var $this = $(this);
9231
9232			if ($this.data(instanceName)) {
9233				return $this.data(instanceName);
9234			} else {
9235				return new PluginStarRating($this, opts);
9236			}
9237
9238		});
9239	}
9240
9241}).apply(this, [window.theme, jQuery]);
9242
9243// Sticky
9244(function(theme, $) {
9245	
9246	theme = theme || {};
9247	
9248	var instanceName = '__sticky';
9249
9250	var PluginSticky = function($el, opts) {
9251		return this.initialize($el, opts);
9252	};
9253
9254	PluginSticky.defaults = {
9255		minWidth: 991,
9256		activeClass: 'sticky-active'
9257	};
9258
9259	PluginSticky.prototype = {
9260		initialize: function($el, opts) {
9261			if ( $el.data( instanceName ) ) {
9262				return this;
9263			}
9264
9265			this.$el = $el;
9266
9267			this
9268				.setData()
9269				.setOptions(opts)
9270				.build()
9271				.events();
9272
9273			return this;
9274		},
9275
9276		setData: function() {
9277			this.$el.data(instanceName, this);
9278
9279			return this;
9280		},
9281
9282		setOptions: function(opts) {
9283			this.options = $.extend(true, {}, PluginSticky.defaults, opts, {
9284				wrapper: this.$el
9285			});
9286
9287			return this;
9288		},
9289
9290		build: function() {
9291			if (!($.isFunction($.fn.pin))) {
9292				return this;
9293			}
9294
9295			var self = this,
9296				$window = $(window);
9297			
9298			self.options.wrapper.pin(self.options);
9299
9300			if( self.options.wrapper.hasClass('sticky-wrapper-transparent') ) {
9301				self.options.wrapper.parent().addClass('position-absolute w-100');
9302			}
9303
9304			$window.afterResize(function() {
9305				self.options.wrapper.removeAttr('style').removeData('pin');
9306				self.options.wrapper.pin(self.options);
9307				$window.trigger('scroll');
9308			});
9309
9310			// Change Logo Src
9311			if( self.options.wrapper.find('img').attr('data-change-src') ) {
9312				var $logo      = self.options.wrapper.find('img'),
9313					logoSrc    = $logo.attr('src'),
9314					logoNewSrc = $logo.attr('data-change-src');
9315
9316				self.changeLogoSrc = function(activate) {
9317					if(activate) {
9318						$logo.attr('src', logoNewSrc);
9319					} else {
9320						$logo.attr('src', logoSrc);
9321					}
9322				}
9323			}
9324			
9325			return this;
9326		},
9327
9328		events: function() {
9329			var self = this,
9330				$window = $(window),
9331				$logo = self.options.wrapper.find('img'),
9332				sticky_activate_flag = true,
9333				sticky_deactivate_flag = false,
9334				class_to_check = ( self.options.wrapper.hasClass('sticky-wrapper-effect-1') ) ? 'sticky-effect-active' : 'sticky-active';
9335
9336			$window.on('scroll sticky.effect.active', function(){
9337				if( self.options.wrapper.hasClass( class_to_check ) ) {		
9338					if( sticky_activate_flag ) {			
9339						if( $logo.attr('data-change-src') ) {
9340							self.changeLogoSrc(true);
9341						}
9342
9343						sticky_activate_flag = false;
9344						sticky_deactivate_flag = true;
9345					}
9346				} else {	
9347					if( sticky_deactivate_flag ) {				
9348						if( $logo.attr('data-change-src') ) {
9349							self.changeLogoSrc(false);
9350						}
9351
9352						sticky_deactivate_flag = false;
9353						sticky_activate_flag = true;
9354					}
9355				}
9356			});
9357
9358			var is_backing = false;
9359			if( self.options.stickyStartEffectAt ) {
9360
9361				// First Load
9362				if( self.options.stickyStartEffectAt < $window.scrollTop() ) {
9363					self.options.wrapper.addClass('sticky-effect-active');
9364
9365					$window.trigger('sticky.effect.active');
9366				}
9367
9368				$window.on('scroll', function(){
9369					if( self.options.stickyStartEffectAt < $window.scrollTop() ) {	
9370						self.options.wrapper.addClass('sticky-effect-active');
9371						is_backing = true;
9372
9373						$window.trigger('sticky.effect.active');
9374					} else {	
9375						if( is_backing ) {
9376							self.options.wrapper.find('.sticky-body').addClass('position-fixed');
9377							is_backing = false;
9378						}
9379
9380						if( $window.scrollTop() == 0 ) {
9381							self.options.wrapper.find('.sticky-body').removeClass('position-fixed');
9382						}
9383
9384						self.options.wrapper.removeClass('sticky-effect-active');
9385					}
9386				});
9387			}
9388
9389			// Refresh Sticky Plugin if click in a data-toggle="collapse"
9390			if( $('[data-bs-toggle="collapse"]').get(0) ) {
9391
9392				$('[data-bs-toggle="collapse"]').on('click', function(){
9393					setTimeout(function(){
9394						self.build();
9395						$(window).trigger('scroll');
9396					}, 1000);
9397				});
9398
9399			}
9400		}
9401	};
9402
9403	// expose to scope
9404	$.extend(theme, {
9405		PluginSticky: PluginSticky
9406	});
9407
9408	// jquery plugin
9409	$.fn.themePluginSticky = function(opts) {
9410		return this.map(function() {
9411			var $this = $(this);
9412
9413			if ($this.data(instanceName)) {
9414				return $this.data(instanceName);
9415			} else {
9416				return new PluginSticky($this, opts);
9417			}
9418			
9419		});
9420	}
9421
9422}).apply(this, [ window.theme, jQuery ]);
9423
9424// Toggle
9425(function(theme, $) {
9426
9427	theme = theme || {};
9428
9429	var instanceName = '__toggle';
9430
9431	var PluginToggle = function($el, opts) {
9432		return this.initialize($el, opts);
9433	};
9434
9435	PluginToggle.defaults = {
9436		duration: 350,
9437		isAccordion: false
9438	};
9439
9440	PluginToggle.prototype = {
9441		initialize: function($el, opts) {
9442			if ($el.data(instanceName)) {
9443				return this;
9444			}
9445
9446			this.$el = $el;
9447
9448			this
9449				.setData()
9450				.setOptions(opts)
9451				.build();
9452
9453			return this;
9454		},
9455
9456		setData: function() {
9457			this.$el.data(instanceName, this);
9458
9459			return this;
9460		},
9461
9462		setOptions: function(opts) {
9463			this.options = $.extend(true, {}, PluginToggle.defaults, opts, {
9464				wrapper: this.$el
9465			});
9466
9467			return this;
9468		},
9469
9470		build: function() {
9471			var self = this,
9472				$wrapper = this.options.wrapper,
9473				$items = $wrapper.find('> .toggle'),
9474				$el = null;
9475
9476			$items.each(function() {
9477				$el = $(this);
9478
9479				if ($el.hasClass('active')) {
9480					$el.find('> p').addClass('preview-active');
9481					$el.find('> .toggle-content').slideDown(self.options.duration);
9482				}
9483
9484				self.events($el);
9485			});
9486
9487			if (self.options.isAccordion) {
9488				self.options.duration = self.options.duration / 2;
9489			}
9490
9491			return this;
9492		},
9493
9494		events: function($el) {
9495			var self = this,
9496				previewParCurrentHeight = 0,
9497				previewParAnimateHeight = 0,
9498				toggleContent = null;
9499
9500			$el.find('> label, > .toggle-title').click(function(e) {
9501
9502				var $this = $(this),
9503					parentSection = $this.parent(),
9504					parentWrapper = $this.parents('.toggle'),
9505					previewPar = null,
9506					closeElement = null;
9507
9508				if (self.options.isAccordion && typeof(e.originalEvent) != 'undefined') {
9509					closeElement = parentWrapper.find('.toggle.active > label, .toggle.active > .toggle-title');
9510
9511					if (closeElement[0] == $this[0]) {
9512						return;
9513					}
9514				}
9515
9516				parentSection.toggleClass('active');
9517
9518				// Preview Paragraph
9519				if (parentSection.find('> p').get(0)) {
9520
9521					previewPar = parentSection.find('> p');
9522					previewParCurrentHeight = previewPar.css('height');
9523					previewPar.css('height', 'auto');
9524					previewParAnimateHeight = previewPar.css('height');
9525					previewPar.css('height', previewParCurrentHeight);
9526
9527				}
9528
9529				// Content
9530				toggleContent = parentSection.find('> .toggle-content');
9531
9532				if (parentSection.hasClass('active')) {
9533
9534					$(previewPar).animate({
9535						height: previewParAnimateHeight
9536					}, self.options.duration, function() {
9537						$(this).addClass('preview-active');
9538					});
9539
9540					toggleContent.slideDown(self.options.duration, function() {
9541						if (closeElement) {
9542							closeElement.trigger('click');
9543						}
9544					});
9545
9546				} else {
9547
9548					$(previewPar).animate({
9549						height: 0
9550					}, self.options.duration, function() {
9551						$(this).removeClass('preview-active');
9552					});
9553
9554					toggleContent.slideUp(self.options.duration);
9555
9556				}
9557
9558			});
9559		}
9560	};
9561
9562	// expose to scope
9563	$.extend(theme, {
9564		PluginToggle: PluginToggle
9565	});
9566
9567	// jquery plugin
9568	$.fn.themePluginToggle = function(opts) {
9569		return this.map(function() {
9570			var $this = $(this);
9571
9572			if ($this.data(instanceName)) {
9573				return $this.data(instanceName);
9574			} else {
9575				return new PluginToggle($this, opts);
9576			}
9577
9578		});
9579	}
9580
9581}).apply(this, [window.theme, jQuery]);
9582
9583// Tweets
9584(function(theme, $) {
9585
9586	theme = theme || {};
9587
9588	var instanceName = '__tweets';
9589
9590	var PluginTweets = function($el, opts) {
9591		return this.initialize($el, opts);
9592	};
9593
9594	PluginTweets.defaults = {
9595		username: null,
9596		count: 2,
9597		URL: 'php/twitter-feed.php',
9598		iconColor: false
9599	};
9600
9601	PluginTweets.prototype = {
9602		initialize: function($el, opts) {
9603			if ($el.data(instanceName)) {
9604				return this;
9605			}
9606
9607			this.$el = $el;
9608
9609			this
9610				.setData()
9611				.setOptions(opts)
9612				.build();
9613
9614			return this;
9615		},
9616
9617		setData: function() {
9618			this.$el.data(instanceName, this);
9619
9620			return this;
9621		},
9622
9623		setOptions: function(opts) {
9624			this.options = $.extend(true, {}, PluginTweets.defaults, opts, {
9625				wrapper: this.$el
9626			});
9627
9628			return this;
9629		},
9630
9631		build: function() {
9632			if (this.options.username == null || this.options.username == '') {
9633				return this;
9634			}
9635
9636			var self = this,
9637				$wrapper = this.options.wrapper;
9638
9639			$.ajax({
9640				type: 'GET',
9641				data: {
9642					twitter_screen_name: self.options.username,
9643					tweets_to_display: self.options.count,
9644					icon_color: self.options.iconColor
9645				},
9646				url: self.options.URL,
9647			}).done(function(html) {
9648				$wrapper.html(html).find('a').attr('target','_blank');
9649			});
9650
9651			return this;
9652		}
9653	};
9654
9655	// expose to scope
9656	$.extend(theme, {
9657		PluginTweets: PluginTweets
9658	});
9659
9660	// jquery plugin
9661	$.fn.themePluginTweets = function(opts) {
9662		return this.map(function() {
9663			var $this = $(this);
9664
9665			if ($this.data(instanceName)) {
9666				return $this.data(instanceName);
9667			} else {
9668				return new PluginTweets($this, opts);
9669			}
9670
9671		});
9672	}
9673
9674}).apply(this, [window.theme, jQuery]);
9675
9676// Validation
9677(function(theme, $) {
9678
9679	theme = theme || {};
9680
9681	$.extend(theme, {
9682
9683		PluginValidation: {
9684
9685			defaults: {
9686				formClass: 'needs-validation',
9687				validator: {
9688					highlight: function(element) {
9689						$(element)
9690							.addClass('is-invalid')
9691							.removeClass('is-valid')
9692							.parent()
9693							.removeClass('has-success')
9694							.addClass('has-danger');
9695					},
9696					success: function(label, element) {
9697						$(element)
9698							.removeClass('is-invalid')
9699							.addClass('is-valid')
9700							.parent()
9701							.removeClass('has-danger')
9702							.addClass('has-success')
9703							.find('label.error')
9704							.remove();
9705					},
9706					errorPlacement: function(error, element) {
9707						if (element.attr('type') == 'radio' || element.attr('type') == 'checkbox') {
9708							error.appendTo(element.parent().parent());
9709						} else {
9710							error.insertAfter(element);
9711						}
9712					}
9713				}
9714			},
9715
9716			initialize: function(opts) {
9717				initialized = true;
9718
9719				this
9720					.setOptions(opts)
9721					.build();
9722
9723				return this;
9724			},
9725
9726			setOptions: function(opts) {
9727				this.options = $.extend(true, {}, this.defaults, opts);
9728
9729				return this;
9730			},
9731
9732			build: function() {
9733				var self = this;
9734
9735				if (!($.isFunction($.validator))) {
9736					return this;
9737				}
9738
9739				self.setMessageGroups();
9740
9741				$.validator.setDefaults(self.options.validator);
9742
9743				$('.' + self.options.formClass).validate();
9744
9745				return this;
9746			},
9747
9748			setMessageGroups: function() {
9749
9750				$('.checkbox-group[data-msg-required], .radio-group[data-msg-required]').each(function() {
9751					var message = $(this).data('msg-required');
9752					$(this).find('input').attr('data-msg-required', message);
9753				});
9754
9755			}
9756
9757		}
9758
9759	});
9760
9761}).apply(this, [window.theme, jQuery]);
9762
9763// Video Background
9764(function(theme, $) {
9765
9766	theme = theme || {};
9767
9768	var instanceName = '__videobackground';
9769
9770	var PluginVideoBackground = function($el, opts) {
9771		return this.initialize($el, opts);
9772	};
9773
9774	PluginVideoBackground.defaults = {
9775		overlay: false,
9776		volume: 1,
9777		playbackRate: 1,
9778		muted: true,
9779		loop: true,
9780		autoplay: true,
9781		position: '50% 50%',
9782		posterType: 'detect',
9783		className: 'vide-video-wrapper'
9784	};
9785
9786	PluginVideoBackground.prototype = {
9787		initialize: function($el, opts) {
9788			this.$el = $el;
9789
9790			this
9791				.setData()
9792				.setOptions(opts)
9793				.build()
9794				.events();
9795
9796			return this;
9797		},
9798
9799		setData: function() {
9800			this.$el.data(instanceName, this);
9801
9802			return this;
9803		},
9804
9805		setOptions: function(opts) {
9806			this.options = $.extend(true, {}, PluginVideoBackground.defaults, opts, {
9807				path: this.$el.data('video-path'),
9808				wrapper: this.$el
9809			});
9810
9811			return this;
9812		},
9813
9814		build: function() {
9815			var self = this;
9816
9817			if (!($.isFunction($.fn.vide)) || (!this.options.path)) {
9818				return this;
9819			}
9820
9821			if (this.options.overlay) {
9822
9823				var overlayClass = this.options.overlayClass;
9824
9825				this.options.wrapper.prepend(
9826					$('<div />').addClass(overlayClass)
9827				);
9828			}
9829
9830			this.options.wrapper
9831				.vide(this.options.path, this.options)
9832				.first()
9833				.css('z-index', 0);
9834
9835			// Change Poster
9836			self.changePoster();
9837
9838			// Initialize Vide inside a carousel
9839			if( self.options.wrapper.closest('.owl-carousel').get(0) ) {
9840				self.options.wrapper.closest('.owl-carousel').on('initialized.owl.carousel', function(){
9841					$('.owl-item.cloned')
9842						.find('[data-plugin-video-background] .vide-video-wrapper')
9843						.remove();
9844
9845					$('.owl-item.cloned')
9846						.find('[data-plugin-video-background]')
9847						.vide(self.options.path, self.options)
9848						.first()
9849						.css('z-index', 0);
9850
9851					self.changePoster( self.options.wrapper.closest('.owl-carousel') );
9852				});
9853			}
9854
9855			// Play Video Button
9856			var $playButton = self.options.wrapper.find('.video-background-play');
9857
9858			if( $playButton.get(0) ) {
9859				var $playWrapper = self.options.wrapper.find('.video-background-play-wrapper');
9860
9861				self.options.wrapper.find('.video-background-play').on('click', function(e){
9862					e.preventDefault();
9863
9864					if( $playWrapper.get(0) ) {
9865						$playWrapper.animate({
9866							opacity: 0
9867						}, 300, function(){
9868							$playWrapper.parent().height( $playWrapper.outerHeight() );
9869							$playWrapper.remove();
9870						});
9871					} else {
9872						$playButton.animate({
9873							opacity: 0
9874						}, 300, function(){
9875							$playButton.remove();
9876						});
9877					}
9878
9879					setTimeout(function(){
9880						self.options.wrapper.find('video')[0].play();
9881					}, 500)
9882				});
9883			}
9884
9885			$(window).trigger('vide.video.inserted.on.dom');
9886
9887			return this;
9888		},
9889
9890		changePoster: function( $carousel ) {
9891			var self = this;
9892
9893			// If it's inside carousel
9894			if( $carousel && self.options.changePoster ) {
9895				$carousel.find('.owl-item [data-plugin-video-background] .vide-video-wrapper').css({
9896					'background-image': 'url(' + self.options.changePoster + ')'
9897				});
9898
9899				return this;
9900			}
9901
9902			if( self.options.changePoster ) {
9903				self.options.wrapper.find('.vide-video-wrapper').css({
9904					'background-image': 'url(' + self.options.changePoster + ')'
9905				});
9906			}
9907
9908			return this;
9909		},
9910
9911		events: function() {
9912			var self = this;
9913
9914			// Initialize
9915			self.options.wrapper.on('video.background.initialize', function(){
9916				self.build();
9917			});
9918
9919			return this;
9920		}
9921	};
9922
9923	// expose to scope
9924	$.extend(theme, {
9925		PluginVideoBackground: PluginVideoBackground
9926	});
9927
9928	// jquery plugin
9929	$.fn.themePluginVideoBackground = function(opts) {
9930		return this.map(function() {
9931			var $this = $(this);
9932
9933			if ($this.data(instanceName)) {
9934				return $this.data(instanceName);
9935			} else {
9936				return new PluginVideoBackground($this, opts);
9937			}
9938
9939		});
9940	}
9941
9942}).apply(this, [window.theme, jQuery]);
9943
9944// Account
9945(function(theme, $) {
9946
9947	theme = theme || {};
9948
9949	var initialized = false;
9950
9951	$.extend(theme, {
9952
9953		Account: {
9954
9955			defaults: {
9956				wrapper: $('#headerAccount')
9957			},
9958
9959			initialize: function($wrapper, opts) {
9960				if (initialized) {
9961					return this;
9962				}
9963
9964				initialized = true;
9965				this.$wrapper = ($wrapper || this.defaults.wrapper);
9966
9967				this
9968					.setOptions(opts)
9969					.events();
9970
9971				return this;
9972			},
9973
9974			setOptions: function(opts) {
9975				this.options = $.extend(true, {}, this.defaults, opts, theme.fn.getOptions(this.$wrapper.data('plugin-options')));
9976
9977				return this;
9978			},
9979
9980			events: function() {
9981				var self = this;
9982
9983				$(window).on('load', function(){
9984					$(document).ready(function(){
9985						setTimeout(function(){
9986
9987							self.$wrapper.find('input').on('focus', function() {
9988								self.$wrapper.addClass('open');
9989
9990								$(document).mouseup(function(e) {
9991									if (!self.$wrapper.is(e.target) && self.$wrapper.has(e.target).length === 0) {
9992										self.$wrapper.removeClass('open');
9993									}
9994								});
9995							});
9996
9997						}, 1500);
9998					});
9999				});
10000
10001				$('#headerSignUp').on('click', function(e) {
10002					e.preventDefault();
10003					self.$wrapper.addClass('signup').removeClass('signin').removeClass('recover');
10004					self.$wrapper.find('.signup-form input:first').focus();
10005				});
10006
10007				$('#headerSignIn').on('click', function(e) {
10008					e.preventDefault();
10009					self.$wrapper.addClass('signin').removeClass('signup').removeClass('recover');
10010					self.$wrapper.find('.signin-form input:first').focus();
10011				});
10012
10013				$('#headerRecover').on('click', function(e) {
10014					e.preventDefault();
10015					self.$wrapper.addClass('recover').removeClass('signup').removeClass('signin');
10016					self.$wrapper.find('.recover-form input:first').focus();
10017				});
10018
10019				$('#headerRecoverCancel').on('click', function(e) {
10020					e.preventDefault();
10021					self.$wrapper.addClass('signin').removeClass('signup').removeClass('recover');
10022					self.$wrapper.find('.signin-form input:first').focus();
10023				});
10024			}
10025
10026		}
10027
10028	});
10029
10030}).apply(this, [window.theme, jQuery]);
10031
10032// Nav
10033(function(theme, $) {
10034
10035	theme = theme || {};
10036
10037	var initialized = false;
10038
10039	$.extend(theme, {
10040
10041		Nav: {
10042
10043			defaults: {
10044				wrapper: $('#mainNav'),
10045				scrollDelay: 600,
10046				scrollAnimation: 'easeOutQuad'
10047			},
10048
10049			initialize: function($wrapper, opts) {
10050				if (initialized) {
10051					return this;
10052				}
10053
10054				initialized = true;
10055				this.$wrapper = ($wrapper || this.defaults.wrapper);
10056
10057				this
10058					.setOptions(opts)
10059					.build()
10060					.events();
10061
10062				return this;
10063			},
10064
10065			setOptions: function(opts) {
10066				this.options = $.extend(true, {}, this.defaults, opts, theme.fn.getOptions(this.$wrapper.data('plugin-options')));
10067
10068				return this;
10069			},
10070
10071			build: function() {
10072				var self = this,
10073					$html = $('html'),
10074					$header = $('#header'),
10075					$headerNavMain = $('#header .header-nav-main'),
10076					thumbInfoPreview;
10077
10078				// Preview Thumbs
10079				if( self.$wrapper.find('a[data-thumb-preview]').length ) {
10080					self.$wrapper.find('a[data-thumb-preview]').each(function() {
10081						thumbInfoPreview = $('<span />').addClass('thumb-info thumb-info-preview')
10082												.append($('<span />').addClass('thumb-info-wrapper')
10083													.append($('<span />').addClass('thumb-info-image').css('background-image', 'url(' + $(this).data('thumb-preview') + ')')
10084											   )
10085										   );
10086
10087						$(this).append(thumbInfoPreview);
10088					});
10089				}
10090
10091				// Side Header / Side Header Hamburguer Sidebar (Reverse Dropdown)
10092				if($html.hasClass('side-header') || $html.hasClass('side-header-hamburguer-sidebar')) {
10093					
10094					// Side Header Right / Side Header Hamburguer Sidebar Right
10095					if($html.hasClass('side-header-right') || $html.hasClass('side-header-hamburguer-sidebar-right')) {
10096						if(!$html.hasClass('side-header-right-no-reverse')) {
10097							$header.find('.dropdown-submenu').addClass('dropdown-reverse');
10098						}
10099					}
10100
10101				} else {
10102					
10103					// Reverse
10104					var checkReverseFlag = false;
10105					self.checkReverse = function() {
10106						if( !checkReverseFlag ) {
10107							self.$wrapper.find('.dropdown, .dropdown-submenu').removeClass('dropdown-reverse');
10108
10109							self.$wrapper.find('.dropdown:not(.manual):not(.dropdown-mega), .dropdown-submenu:not(.manual)').each(function() {
10110								if(!$(this).find('.dropdown-menu').visible( false, true, 'horizontal' )  ) {
10111									$(this).addClass('dropdown-reverse');
10112								}
10113							});
10114
10115							checkReverseFlag = true;
10116						}
10117					}
10118
10119					$(window).on('resize', function(){
10120						checkReverseFlag = false;
10121					});
10122
10123					$header.on('mouseover', function(){
10124						self.checkReverse();
10125					});
10126
10127				}
10128
10129				// Clone Items
10130				if($headerNavMain.hasClass('header-nav-main-clone-items')) {
10131
10132			    	$headerNavMain.find('nav > ul > li > a').each(function(){
10133				    	var parent = $(this).parent(),
10134				    		clone  = $(this).clone(),
10135				    		clone2 = $(this).clone(),
10136				    		wrapper = $('<span class="wrapper-items-cloned"></span>');
10137
10138				    	// Config Classes
10139				    	$(this).addClass('item-original');
10140				    	clone2.addClass('item-two');
10141
10142				    	// Insert on DOM
10143				    	parent.prepend(wrapper);
10144				    	wrapper.append(clone).append(clone2);
10145				    });
10146
10147				}
10148
10149				// Floating
10150				if($('#header.header-floating-icons').length && $(window).width() > 991) {
10151
10152					var menuFloatingAnim = {
10153						$menuFloating: $('#header.header-floating-icons .header-container > .header-row'),
10154
10155						build: function() {
10156							var self = this;
10157
10158							self.init();
10159						},
10160						init: function(){
10161							var self  = this,
10162								divisor = 0;
10163
10164							$(window).scroll(function() {
10165							    var scrollPercent = 100 * $(window).scrollTop() / ($(document).height() - $(window).height()),
10166							    	st = $(this).scrollTop();
10167
10168								divisor = $(document).height() / $(window).height();
10169
10170							    self.$menuFloating.find('.header-column > .header-row').css({
10171							    	transform : 'translateY( calc('+ scrollPercent +'vh - '+ st / divisor +'px) )' 
10172							    });
10173							});
10174						}
10175					}
10176
10177					menuFloatingAnim.build();
10178
10179				}
10180
10181				// Slide
10182				if($('.header-nav-links-vertical-slide').length) {
10183					var slideNavigation = {
10184						$mainNav: $('#mainNav'),
10185						$mainNavItem: $('#mainNav li'),
10186
10187						build: function(){
10188							var self = this;
10189
10190							self.menuNav();
10191						},
10192						menuNav: function(){
10193							var self = this;
10194
10195							self.$mainNavItem.on('click', function(e){
10196								var currentMenuItem 	= $(this),
10197									currentMenu 		= $(this).parent(),
10198									nextMenu        	= $(this).find('ul').first(),
10199									prevMenu        	= $(this).closest('.next-menu'),
10200									isSubMenu       	= currentMenuItem.hasClass('dropdown') || currentMenuItem.hasClass('dropdown-submenu'),
10201									isBack          	= currentMenuItem.hasClass('back-button'),
10202									nextMenuHeightDiff  = ( ( nextMenu.find('> li').length * nextMenu.find('> li').outerHeight() ) - nextMenu.outerHeight() ),
10203									prevMenuHeightDiff  = ( ( prevMenu.find('> li').length * prevMenu.find('> li').outerHeight() ) - prevMenu.outerHeight() );
10204
10205								if( isSubMenu ) {
10206									currentMenu.addClass('next-menu');
10207									nextMenu.addClass('visible');
10208									currentMenu.css({
10209										overflow: 'visible',
10210										'overflow-y': 'visible'
10211									});
10212									
10213									if( nextMenuHeightDiff > 0 ) {
10214										nextMenu.css({
10215											overflow: 'hidden',
10216											'overflow-y': 'scroll'
10217										});
10218									}
10219
10220									for( i = 0; i < nextMenu.find('> li').length; i++ ) {
10221										if( nextMenu.outerHeight() < ($('.header-row-side-header').outerHeight() - 100) ) {
10222											nextMenu.css({
10223												height: nextMenu.outerHeight() + nextMenu.find('> li').outerHeight()
10224											});
10225										}
10226									}
10227
10228									nextMenu.css({
10229										'padding-top': nextMenuHeightDiff + 'px'
10230									});
10231								}
10232
10233								if( isBack ) {
10234									currentMenu.parent().parent().removeClass('next-menu');
10235									currentMenu.removeClass('visible');
10236
10237									if( prevMenuHeightDiff > 0 ) {
10238										prevMenu.css({
10239											overflow: 'hidden',
10240											'overflow-y': 'scroll'
10241										});
10242									}
10243								}
10244
10245								e.stopPropagation();
10246							});
10247						}
10248					}
10249
10250					$(window).trigger('resize');
10251					
10252					if( $(window).width() > 991 ) {
10253						slideNavigation.build();
10254					}
10255
10256					$(document).ready(function(){
10257						$(window).afterResize(function(){
10258							if( $(window).width() > 991 ) {
10259								slideNavigation.build();
10260							}
10261						});
10262					});
10263				}
10264
10265				// Header Nav Main Mobile Dark
10266				if($('.header-nav-main-mobile-dark').length) {
10267					$('#header:not(.header-transparent-dark-bottom-border):not(.header-transparent-light-bottom-border)').addClass('header-no-border-bottom');
10268				}
10269
10270				// Keyboard Navigation / Accessibility
10271				if( $(window).width() > 991 ) {
10272					var focusFlag = false;
10273					$header.find('.header-nav-main nav > ul > li > a').on('focus', function(){
10274						
10275						if( $(window).width() > 991 ) {
10276							if( !focusFlag ) {
10277								focusFlag = true;
10278								$(this).trigger('blur');
10279								
10280								self.focusMenuWithChildren();
10281							}
10282						}
10283
10284					});
10285				}
10286				
10287				return this;
10288			},
10289
10290			focusMenuWithChildren: function() {
10291				// Get all the link elements within the primary menu.
10292				var links, i, len,
10293					menu = document.querySelector( 'html:not(.side-header):not(.side-header-hamburguer-sidebar):not(.side-header-overlay-full-screen) .header-nav-main > nav' );
10294
10295				if ( ! menu ) {
10296					return false;
10297				}
10298
10299				links = menu.getElementsByTagName( 'a' );
10300
10301				// Each time a menu link is focused or blurred, toggle focus.
10302				for ( i = 0, len = links.length; i < len; i++ ) {
10303					links[i].addEventListener( 'focus', toggleFocus, true );
10304					links[i].addEventListener( 'blur', toggleFocus, true );
10305				}
10306
10307				//Sets or removes the .focus class on an element.
10308				function toggleFocus() {
10309					var self = this;
10310
10311					// Move up through the ancestors of the current link until we hit .primary-menu.
10312					while ( -1 === self.className.indexOf( 'header-nav-main' ) ) {
10313						// On li elements toggle the class .focus.
10314						if ( 'li' === self.tagName.toLowerCase() ) {
10315							if ( -1 !== self.className.indexOf( 'accessibility-open' ) ) {
10316								self.className = self.className.replace( ' accessibility-open', '' );
10317							} else {
10318								self.className += ' accessibility-open';
10319							}
10320						}
10321						self = self.parentElement;
10322					}
10323				}
10324			},
10325
10326			events: function() {
10327				var self    = this,
10328					$html   = $('html'),
10329					$header = $('#header'),
10330					$window = $(window),
10331					headerBodyHeight = $('.header-body').outerHeight();
10332
10333				if( $header.hasClass('header') ) {
10334					$header = $('.header');
10335				}
10336
10337				$header.find('a[href="#"]').on('click', function(e) {
10338					e.preventDefault();
10339				});
10340
10341				// Mobile Arrows
10342				if( $html.hasClass('side-header-hamburguer-sidebar') ) {
10343					$header.find('.dropdown-toggle, .dropdown-submenu > a')
10344						.append('<i class="fas fa-chevron-down fa-chevron-right"></i>');
10345				} else {
10346					$header.find('.dropdown-toggle, .dropdown-submenu > a')
10347						.append('<i class="fas fa-chevron-down"></i>');
10348				}
10349				
10350				$header.find('.dropdown-toggle[href="#"], .dropdown-submenu a[href="#"], .dropdown-toggle[href!="#"] .fa-chevron-down, .dropdown-submenu a[href!="#"] .fa-chevron-down').on('click', function(e) {
10351					e.preventDefault();
10352					if ($window.width() < 992) {
10353						$(this).closest('li').toggleClass('open');
10354
10355						// Adjust Header Body Height
10356						var height = ( $header.hasClass('header-effect-shrink') && $html.hasClass('sticky-header-active') ) ? theme.StickyHeader.options.stickyHeaderContainerHeight : headerBodyHeight;
10357						$('.header-body').animate({
10358					 		height: ($('.header-nav-main nav').outerHeight(true) + height) + 10
10359					 	}, 0);
10360					}
10361				});
10362
10363				$header.find('li a.active').addClass('current-page-active');
10364
10365				// Add Open Class
10366				$header.find('.header-nav-click-to-open .dropdown-toggle[href="#"], .header-nav-click-to-open .dropdown-submenu a[href="#"], .header-nav-click-to-open .dropdown-toggle > i').on('click', function(e) {
10367					if( !$('html').hasClass('side-header-hamburguer-sidebar') && $window.width() > 991 ) {
10368						e.preventDefault();
10369						e.stopPropagation();
10370					}
10371
10372					if ($window.width() > 991) {
10373						e.preventDefault();
10374						e.stopPropagation();
10375
10376						$header.find('li a.active').removeClass('active');
10377
10378						if( $(this).prop('tagName') == 'I' ) {
10379							$(this).parent().addClass('active');
10380						} else {
10381							$(this).addClass('active');
10382						}
10383
10384						if (!$(this).closest('li').hasClass('open')) {
10385
10386							var $li = $(this).closest('li'),
10387								isSub = false;
10388
10389							if( $(this).prop('tagName') == 'I' ) {
10390								$('#header .dropdown.open').removeClass('open');
10391								$('#header .dropdown-menu .dropdown-submenu.open').removeClass('open');
10392							}
10393
10394							if ( $(this).parent().hasClass('dropdown-submenu') ) {
10395								isSub = true;
10396							}
10397
10398							$(this).closest('.dropdown-menu').find('.dropdown-submenu.open').removeClass('open');
10399							$(this).parent('.dropdown').parent().find('.dropdown.open').removeClass('open');
10400
10401							if (!isSub) {
10402								$(this).parent().find('.dropdown-submenu.open').removeClass('open');
10403							}
10404
10405							$li.addClass('open');
10406
10407							$(document).off('click.nav-click-to-open').on('click.nav-click-to-open', function (e) {
10408								if (!$li.is(e.target) && $li.has(e.target).length === 0) {
10409									$li.removeClass('open');
10410									$li.parents('.open').removeClass('open');
10411									$header.find('li a.active').removeClass('active');
10412									$header.find('li a.current-page-active').addClass('active');
10413								}
10414							});
10415
10416						} else {
10417							$(this).closest('li').removeClass('open');
10418							$header.find('li a.active').removeClass('active');
10419							$header.find('li a.current-page-active').addClass('active');
10420						}
10421
10422						$window.trigger({
10423							type: 'resize',
10424							from: 'header-nav-click-to-open'
10425						});
10426					}
10427				});
10428
10429				// Collapse Nav
10430				$header.find('[data-collapse-nav]').on('click', function(e) {
10431					$(this).parents('.collapse').removeClass('show');
10432				});
10433
10434				// Top Features
10435				$header.find('.header-nav-features-toggle').on('click', function(e) {
10436					e.preventDefault();
10437
10438					var $toggleParent = $(this).parent();
10439
10440					if (!$(this).siblings('.header-nav-features-dropdown').hasClass('show')) {
10441
10442						var $dropdown = $(this).siblings('.header-nav-features-dropdown');
10443
10444						$('.header-nav-features-dropdown.show').removeClass('show');
10445
10446						$dropdown.addClass('show');
10447
10448						$(document).off('click.header-nav-features-toggle').on('click.header-nav-features-toggle', function (e) {
10449							if (!$toggleParent.is(e.target) && $toggleParent.has(e.target).length === 0) {
10450								$('.header-nav-features-dropdown.show').removeClass('show');
10451							}
10452						});
10453
10454						if ($(this).attr('data-focus')) {
10455							$('#' + $(this).attr('data-focus')).focus();
10456						}
10457
10458					} else {
10459						$(this).siblings('.header-nav-features-dropdown').removeClass('show');
10460					}
10461				});
10462
10463				// Hamburguer Menu
10464				var $hamburguerMenuBtn = $('.hamburguer-btn:not(.side-panel-toggle)'),
10465					$hamburguerSideHeader = $('#header.side-header, #header.side-header-overlay-full-screen');
10466				
10467				$hamburguerMenuBtn.on('click', function(){
10468					if($(this).attr('data-set-active') != 'false') {
10469						$(this).toggleClass('active');
10470					}
10471					$hamburguerSideHeader.toggleClass('side-header-hide');
10472					$html.toggleClass('side-header-hide');
10473
10474					$window.trigger('resize');
10475				});
10476
10477				$('.hamburguer-close:not(.side-panel-toggle)').on('click', function(){
10478					$('.hamburguer-btn:not(.hamburguer-btn-side-header-mobile-show)').trigger('click');
10479				});				
10480				
10481				// Set Header Body Height when open mobile menu
10482				$('.header-nav-main nav').on('show.bs.collapse', function () {
10483				 	$(this).removeClass('closed');
10484
10485				 	// Add Mobile Menu Opened Class
10486				 	$('html').addClass('mobile-menu-opened');
10487
10488			 		$('.header-body').animate({
10489				 		height: ($('.header-body').outerHeight() + $('.header-nav-main nav').outerHeight(true)) + 10
10490				 	});
10491
10492				 	// Header Below Slider / Header Bottom Slider - Scroll to menu position
10493				 	if( $('#header').is('.header-bottom-slider, .header-below-slider') && !$('html').hasClass('sticky-header-active') ) {
10494				 		self.scrollToTarget( $('#header'), 0 );
10495				 	}
10496				});
10497
10498				// Set Header Body Height when collapse mobile menu
10499				$('.header-nav-main nav').on('hide.bs.collapse', function () {
10500				 	$(this).addClass('closed');
10501
10502				 	// Remove Mobile Menu Opened Class
10503				 	$('html').removeClass('mobile-menu-opened');
10504
10505			 		$('.header-body').animate({
10506				 		height: ($('.header-body').outerHeight() - $('.header-nav-main nav').outerHeight(true))
10507				 	}, function(){
10508				 		$(this).height('auto');
10509				 	});
10510				});
10511
10512				// Header Effect Shrink - Adjust header body height on mobile
10513				$window.on('stickyHeader.activate', function(){
10514					if( $window.width() < 992 && $header.hasClass('header-effect-shrink') ) {
10515						if( $('.header-btn-collapse-nav').attr('aria-expanded') == 'true' ) {
10516							$('.header-body').animate({
10517						 		height: ( $('.header-nav-main nav').outerHeight(true) + theme.StickyHeader.options.stickyHeaderContainerHeight ) + ( ($('.header-nav-bar').length) ? $('.header-nav-bar').outerHeight() : 0 ) 
10518						 	});
10519						}
10520					}
10521				});
10522
10523				$window.on('stickyHeader.deactivate', function(){
10524					if( $window.width() < 992 && $header.hasClass('header-effect-shrink') ) {
10525						if( $('.header-btn-collapse-nav').attr('aria-expanded') == 'true' ) {
10526							$('.header-body').animate({
10527						 		height: headerBodyHeight + $('.header-nav-main nav').outerHeight(true) + 10
10528						 	});
10529						}
10530					}
10531				});
10532
10533				// Remove Open Class on Resize		
10534				$window.on('resize.removeOpen', function(e) {
10535					if( e.from == 'header-nav-click-to-open' ) {
10536						return;
10537					}
10538					
10539					setTimeout(function() {
10540						if( $window.width() > 991 ) {
10541							$header.find('.dropdown.open').removeClass('open');
10542						}
10543					}, 100);
10544				});
10545
10546				// Side Header - Change value of initial header body height
10547				$(document).ready(function(){
10548					if( $window.width() > 991 ) {
10549						var flag = false;
10550						
10551						$window.on('resize', function(e) {
10552							if( e.from == 'header-nav-click-to-open' ) {
10553								return;
10554							}
10555
10556							$header.find('.dropdown.open').removeClass('open');
10557
10558							if( $window.width() < 992 && flag == false ) {
10559								headerBodyHeight = $('.header-body').outerHeight();
10560								flag = true;
10561
10562								setTimeout(function(){
10563									flag = false;
10564								}, 500);
10565							}
10566						});
10567					}
10568				});
10569
10570				// Side Header - Set header height on mobile
10571				if( $html.hasClass('side-header') ) {
10572					if( $window.width() < 992 ) {
10573						$header.css({
10574							height: $('.header-body .header-container').outerHeight() + (parseInt( $('.header-body').css('border-top-width') ) + parseInt( $('.header-body').css('border-bottom-width') ))
10575						});
10576					}
10577
10578					$(document).ready(function(){
10579						$window.afterResize(function(){
10580							if( $window.width() < 992 ) {
10581								$header.css({
10582									height: $('.header-body .header-container').outerHeight() + (parseInt( $('.header-body').css('border-top-width') ) + parseInt( $('.header-body').css('border-bottom-width') ))
10583								});
10584							} else {
10585								$header.css({
10586									height: ''
10587								});
10588							}
10589						});
10590					});
10591				}
10592
10593				// Anchors Position
10594				if( $('[data-hash]').length ) {
10595					$('[data-hash]').on('mouseover', function(){
10596						var $this = $(this);
10597
10598						if( !$this.data('__dataHashBinded') ) {
10599							var target = $this.attr('href'),
10600								offset = ($this.is("[data-hash-offset]") ? $this.data('hash-offset') : 0),
10601								delay  = ($this.is("[data-hash-delay]") ? $this.data('hash-delay') : 0),
10602								force  = ($this.is("[data-hash-force]") ? true : false),
10603								windowWidth = $(window).width();
10604
10605							// Hash Offset SM
10606							if ($this.is("[data-hash-offset-sm]") && windowWidth > 576) {
10607								offset = $this.data('hash-offset-sm');
10608							}
10609							
10610							// Hash Offset MD
10611							if ($this.is("[data-hash-offset-md]") && windowWidth > 768) {
10612								offset = $this.data('hash-offset-md');
10613							}
10614							
10615							// Hash Offset LG
10616							if ($this.is("[data-hash-offset-lg]") && windowWidth > 992) {
10617								offset = $this.data('hash-offset-lg');
10618							}
10619							
10620							// Hash Offset XL
10621							if ($this.is("[data-hash-offset-xl]") && windowWidth > 1200) {
10622								offset = $this.data('hash-offset-xl');
10623							}
10624							
10625							// Hash Offset XXL
10626							if ($this.is("[data-hash-offset-xxl]") && windowWidth > 1400) {
10627								offset = $this.data('hash-offset-xxl');
10628							}
10629
10630							if( !$(target).length ) {
10631								target = target.split('#');
10632								target = '#'+target[1];
10633							}
10634
10635							if( target.indexOf('#') != -1 && $(target).length) {
10636								$this.on('click', function(e) {
10637									e.preventDefault();
10638
10639									if( !$(e.target).is('i') || force ) {
10640
10641										setTimeout(function(){
10642
10643											// Close Collapse if open
10644											$this.parents('.collapse.show').collapse('hide');
10645
10646											// Close Side Header
10647											$hamburguerSideHeader.addClass('side-header-hide');
10648											$html.addClass('side-header-hide');
10649											
10650											$window.trigger('resize');
10651
10652											self.scrollToTarget(target, offset);
10653
10654											// Data Hash Trigger Click
10655											if( $this.data('hash-trigger-click') ) {
10656
10657												var $clickTarget = $( $this.data('hash-trigger-click') ),
10658													clickDelay = $this.data('hash-trigger-click-delay') ? $this.data('hash-trigger-click-delay') : 0;
10659
10660												if( $clickTarget.length ) {
10661
10662													setTimeout(function(){
10663														// If is a "Tabs" plugin link
10664														if( $clickTarget.closest('.nav-tabs').length ) {
10665															new bootstrap.Tab( $clickTarget[0] ).show();
10666														} else {
10667															$clickTarget.trigger('click');
10668														}
10669														
10670													}, clickDelay);
10671												}
10672
10673											}
10674
10675										}, delay);
10676										
10677									}
10678
10679									return;
10680								});
10681							}
10682
10683							$(this).data('__dataHashBinded', true);
10684						}
10685					});
10686				}
10687
10688				// Floating
10689				if($('#header.header-floating-icons').length) {
10690
10691					$('#header.header-floating-icons [data-hash]').off().each(function() {
10692
10693						var target = $(this).attr('href'),
10694							offset = ($(this).is("[data-hash-offset]") ? $(this).data('hash-offset') : 0);
10695
10696						if($(target).length) {
10697							$(this).on('click', function(e) {
10698								e.preventDefault();
10699
10700									$('html, body').animate({
10701										scrollTop: $(target).offset().top - offset
10702									}, 600, 'easeOutQuad', function() {
10703
10704									});
10705
10706								return;
10707							});
10708						}
10709
10710					});
10711
10712				}
10713
10714				// Side Panel Toggle
10715				if( $('.side-panel-toggle').length ) {
10716					var init_html_class = $('html').attr('class');
10717
10718					$('.side-panel-toggle').on('click', function(e){
10719						var extra_class = $(this).data('extra-class'),
10720							delay       = ( extra_class ) ? 100 : 0,
10721							isActive    = $(this).data('is-active') ? $(this).data('is-active') : false;
10722
10723						e.preventDefault();
10724
10725						if( isActive ) {
10726							$('html').removeClass('side-panel-open');
10727							$(this).data('is-active', false);
10728							return false;
10729						}
10730
10731						if( extra_class ) {
10732							$('.side-panel-wrapper').css('transition','none');
10733							$('html')
10734								.removeClass()
10735								.addClass( init_html_class )
10736								.addClass( extra_class );
10737						}
10738						setTimeout(function(){
10739							$('.side-panel-wrapper').css('transition','');
10740							$('html').toggleClass('side-panel-open');
10741						}, delay);
10742
10743						$(this).data('is-active', true);						
10744					});
10745
10746					$(document).on('click', function(e){
10747						if( !$(e.target).closest('.side-panel-wrapper').length && !$(e.target).hasClass('side-panel-toggle') ) {
10748							$('.hamburguer-btn.side-panel-toggle:not(.side-panel-close)').removeClass('active');
10749							$('html').removeClass('side-panel-open');
10750							$('.side-panel-toggle').data('is-active', false);
10751						}
10752					});
10753				}
10754
10755				return this;
10756			},
10757
10758			scrollToTarget: function(target, offset) {
10759				var self = this,
10760					targetPosition = $(target).offset().top;
10761
10762				$('body').addClass('scrolling');
10763
10764				$('html, body').animate({
10765					scrollTop: $(target).offset().top - offset
10766				}, self.options.scrollDelay, self.options.scrollAnimation, function() {
10767					$('body').removeClass('scrolling');
10768
10769					// If by some reason the scroll finishes in a wrong position, this code will run the scrollToTarget() again until get the correct position
10770					// We need do it just one time to prevent infinite recursive loop at scrollToTarget() function
10771					if( $(target).offset().top !=  targetPosition) {
10772						$('html, body').animate({
10773							scrollTop: $(target).offset().top - offset
10774						}, 1, self.options.scrollAnimation, function() {});
10775					}
10776				});
10777
10778				return this;
10779
10780			}
10781
10782		}
10783
10784	});
10785
10786}).apply(this, [window.theme, jQuery]);
10787
10788
10789// Newsletter
10790(function(theme, $) {
10791
10792	theme = theme || {};
10793
10794	var initialized = false;
10795
10796	$.extend(theme, {
10797
10798		Newsletter: {
10799
10800			defaults: {
10801				wrapper: $('#newsletterForm')
10802			},
10803
10804			initialize: function($wrapper, opts) {
10805				if (initialized) {
10806					return this;
10807				}
10808
10809				initialized = true;
10810				this.$wrapper = ($wrapper || this.defaults.wrapper);
10811
10812				this
10813					.setOptions(opts)
10814					.build();
10815
10816				return this;
10817			},
10818
10819			setOptions: function(opts) {
10820				this.options = $.extend(true, {}, this.defaults, opts, theme.fn.getOptions(this.$wrapper.data('plugin-options')));
10821
10822				return this;
10823			},
10824
10825			build: function() {
10826				if (!($.isFunction($.fn.validate))) {
10827					return this;
10828				}
10829
10830				var self = this,
10831					$email = self.$wrapper.find('#newsletterEmail'),
10832					$success = $('#newsletterSuccess'),
10833					$error = $('#newsletterError');
10834
10835				self.$wrapper.validate({
10836					submitHandler: function(form) {
10837
10838						$.ajax({
10839							type: 'POST',
10840							url: self.$wrapper.attr('action'),
10841							data: {
10842								'email': $email.val()
10843							},
10844							dataType: 'json',
10845							success: function(data) {
10846								if (data.response == 'success') {
10847
10848									$success.removeClass('d-none');
10849									$error.addClass('d-none');
10850
10851									$email
10852										.val('')
10853										.blur()
10854										.closest('.control-group')
10855										.removeClass('success')
10856										.removeClass('error');
10857
10858								} else {
10859
10860									$error.html(data.message);
10861									$error.removeClass('d-none');
10862									$success.addClass('d-none');
10863
10864									$email
10865										.blur()
10866										.closest('.control-group')
10867										.removeClass('success')
10868										.addClass('error');
10869
10870								}
10871							}
10872						});
10873
10874					},
10875					rules: {
10876						newsletterEmail: {
10877							required: true,
10878							email: true
10879						}
10880					},
10881					errorPlacement: function(error, element) {
10882
10883					}
10884				});
10885
10886				return this;
10887			}
10888
10889		}
10890
10891	});
10892
10893}).apply(this, [window.theme, jQuery]);
10894
10895// Search
10896(function(theme, $) {
10897
10898	theme = theme || {};
10899
10900	var initialized = false;
10901
10902	$.extend(theme, {
10903
10904		Search: {
10905
10906			defaults: {
10907				wrapper: $('#searchForm')
10908			},
10909
10910			initialize: function($wrapper, opts) {
10911				if (initialized) {
10912					return this;
10913				}
10914
10915				initialized = true;
10916				this.$wrapper = ($wrapper || this.defaults.wrapper);
10917
10918				this
10919					.setOptions(opts)
10920					.build();
10921
10922				return this;
10923			},
10924
10925			setOptions: function(opts) {
10926				this.options = $.extend(true, {}, this.defaults, opts, theme.fn.getOptions(this.$wrapper.data('plugin-options')));
10927
10928				return this;
10929			},
10930
10931			build: function() {
10932				if (!($.isFunction($.fn.validate))) {
10933					return this;
10934				}
10935
10936				this.$wrapper.validate({
10937					errorPlacement: function(error, element) {}
10938				});
10939
10940				// Search Reveal
10941				theme.fn.execOnceTroughEvent( '#header', 'mouseover.search.reveal', function(){
10942					$('.header-nav-features-search-reveal').each(function() {
10943						var $el = $(this),
10944							$header = $('#header'),
10945							$html = $('html');
10946
10947						$el.find('.header-nav-features-search-show-icon').on('click', function() {
10948							$el.addClass('show');
10949							$header.addClass('search-show');
10950							$html.addClass('search-show');
10951							$('#headerSearch').focus();
10952						});
10953
10954						$el.find('.header-nav-features-search-hide-icon').on('click', function() {
10955							$el.removeClass('show');
10956							$header.removeClass('search-show');
10957							$html.removeClass('search-show');
10958						});
10959					});
10960				} );
10961
10962				return this;
10963			}
10964
10965		}
10966
10967	});
10968
10969}).apply(this, [window.theme, jQuery]);
10970
10971// Sticky Header
10972(function(theme, $) {
10973
10974	theme = theme || {};
10975
10976	var initialized = false;
10977
10978	$.extend(theme, {
10979
10980		StickyHeader: {
10981
10982			defaults: {
10983				wrapper: $('#header'),
10984				headerBody: $('#header .header-body'),
10985				stickyEnabled: true,
10986				stickyEnableOnBoxed: true,
10987				stickyEnableOnMobile: false,
10988				stickyStartAt: 0,
10989				stickyStartAtElement: false,
10990				stickySetTop: 0,
10991				stickyEffect: '',
10992				stickyHeaderContainerHeight: false,
10993				stickyChangeLogo: false,
10994				stickyChangeLogoWrapper: true,
10995				stickyForce: false,
10996				stickyScrollUp: false,
10997				stickyScrollValue: 0
10998			},
10999
11000			initialize: function($wrapper, opts) {
11001				if (initialized) {
11002					return this;
11003				}				
11004
11005				initialized = true;
11006				this.$wrapper = ($wrapper || this.defaults.wrapper);
11007
11008				if( this.$wrapper.hasClass('header') ) {
11009					this.$wrapper = $('.header[data-plugin-options]');
11010				}
11011
11012				this
11013					.setOptions(opts)
11014					.build()
11015					.events();
11016
11017				return this;
11018			},
11019
11020			setOptions: function(opts) {
11021				this.options = $.extend(true, {}, this.defaults, opts, theme.fn.getOptions(this.$wrapper.data('plugin-options')));
11022				return this;
11023			},
11024
11025			build: function() {
11026				if( $(window).width() < 992 && this.options.stickyEnableOnMobile == false ) {
11027					$('html').addClass('sticky-header-mobile-disabled');
11028					return this;
11029				}
11030
11031				if (!this.options.stickyEnableOnBoxed && $('html').hasClass('boxed') || $('html').hasClass('side-header-hamburguer-sidebar') && !this.options.stickyForce || !this.options.stickyEnabled) {
11032					return this;
11033				}
11034
11035				var self = this;
11036
11037				if( self.options.wrapper.hasClass('header') ) {
11038					self.options.wrapper = $('.header');
11039					self.options.headerBody = $('.header .header-body');
11040				}
11041				
11042				var	$html = $('html'),
11043					$window = $(window),
11044					sideHeader = $html.hasClass('side-header'),
11045					initialHeaderTopHeight = self.options.wrapper.find('.header-top').outerHeight(),
11046					initialHeaderContainerHeight = self.options.wrapper.find('.header-container').outerHeight(),
11047					minHeight;
11048
11049				// HTML Classes
11050				$html.addClass('sticky-header-enabled');
11051
11052				if (parseInt(self.options.stickySetTop) < 0) {
11053					$html.addClass('sticky-header-negative');
11054				}
11055
11056				if (self.options.stickyScrollUp) {
11057					$html.addClass('sticky-header-scroll-direction');
11058				}				
11059
11060				// Notice Top Bar First Load
11061				if( $('.notice-top-bar').get(0) ) {
11062					if (parseInt(self.options.stickySetTop) == 1 || self.options.stickyEffect == 'shrink') {
11063						$('.body').on('transitionend webkitTransitionEnd oTransitionEnd', function () {
11064						    setTimeout(function(){
11065								if( !$html.hasClass('sticky-header-active') ) {
11066								    self.options.headerBody.animate({
11067								    	top: $('.notice-top-bar').outerHeight()
11068								    }, 300, function(){
11069								    	if( $html.hasClass('sticky-header-active') ) {
11070								    		self.options.headerBody.css('top', 0);
11071								    	}
11072								    });
11073								}
11074						    }, 0);
11075						});
11076					}					
11077				}
11078
11079				// Set Start At
11080				if(self.options.stickyStartAtElement) {
11081
11082					var $stickyStartAtElement = $(self.options.stickyStartAtElement);
11083
11084					$(window).on('scroll resize sticky.header.resize', function() {
11085						self.options.stickyStartAt = $stickyStartAtElement.offset().top;
11086					});
11087
11088					$(window).trigger('sticky.header.resize');
11089				}
11090
11091				// Define Min Height value
11092				if( self.options.wrapper.find('.header-top').get(0) ) {
11093					minHeight = ( initialHeaderTopHeight + initialHeaderContainerHeight );
11094				} else {
11095					minHeight = initialHeaderContainerHeight;
11096				}
11097
11098				// Set Wrapper Min-Height
11099				if( !sideHeader ) {
11100					if( !$('.header-logo-sticky-change').get(0) ) {
11101						self.options.wrapper.css('height', self.options.headerBody.outerHeight());
11102					} else {
11103						$window.on('stickyChangeLogo.loaded', function(){
11104							self.options.wrapper.css('height', self.options.headerBody.outerHeight());
11105						});
11106					}
11107
11108					if( self.options.stickyEffect == 'shrink' ) {
11109						
11110						// Prevent wrong visualization of header when reload on middle of page
11111						$(document).ready(function(){
11112							if( $window.scrollTop() >= self.options.stickyStartAt ) {
11113								self.options.wrapper.find('.header-container').on('transitionend webkitTransitionEnd oTransitionEnd', function(){
11114									self.options.headerBody.css('position', 'fixed');
11115								});
11116							} else {
11117								if( !$html.hasClass('boxed') ) {
11118									self.options.headerBody.css('position', 'fixed');
11119								}
11120							}
11121						});
11122
11123						self.options.wrapper.find('.header-container').css('height', initialHeaderContainerHeight);
11124						self.options.wrapper.find('.header-top').css('height', initialHeaderTopHeight);
11125					}
11126				}
11127
11128				// Sticky Header Container Height
11129				if( self.options.stickyHeaderContainerHeight ) {
11130					self.options.wrapper.find('.header-container').css('height', self.options.wrapper.find('.header-container').outerHeight());
11131				}
11132
11133				// Boxed
11134				if($html.hasClass('boxed') && self.options.stickyEffect == 'shrink') {
11135					self.boxedLayout();
11136				}
11137
11138				// Check Sticky Header / Flags prevent multiple runs at same time
11139				var activate_flag   	 = true,
11140					deactivate_flag 	 = false,
11141					initialStickyStartAt = self.options.stickyStartAt;
11142
11143				self.checkStickyHeader = function() {
11144
11145					// Notice Top Bar
11146					var $noticeTopBar = $('.notice-top-bar');
11147					if ( $noticeTopBar.get(0) ) {
11148						self.options.stickyStartAt = ( $noticeTopBar.data('sticky-start-at') ) ? $noticeTopBar.data('sticky-start-at') : $('.notice-top-bar').outerHeight();
11149					} else {
11150						if( $html.hasClass('boxed') ) {
11151							self.options.stickyStartAt = initialStickyStartAt + 25;
11152						} else {
11153							self.options.stickyStartAt = initialStickyStartAt;
11154						}
11155					}
11156
11157					if( $window.width() > 991 && $html.hasClass('side-header') ) {
11158						$html.removeClass('sticky-header-active');
11159						activate_flag = true;
11160						return;
11161					}
11162
11163					if ($window.scrollTop() >= parseInt(self.options.stickyStartAt)) {
11164						if( activate_flag ) {
11165							self.activateStickyHeader();
11166							activate_flag = false;
11167							deactivate_flag = true;
11168						}
11169					} else {
11170						if( deactivate_flag ) {
11171							self.deactivateStickyHeader();
11172							deactivate_flag = false;
11173							activate_flag = true;
11174						}
11175					}
11176
11177					// Scroll Up
11178					if (self.options.stickyScrollUp) {
11179						
11180					    // Get the new Value
11181					    self.options.stickyScrollNewValue = window.pageYOffset;
11182
11183					    //Subtract the two and conclude
11184					    if(self.options.stickyScrollValue - self.options.stickyScrollNewValue < 0){
11185					        $html.removeClass('sticky-header-scroll-up').addClass('sticky-header-scroll-down');
11186					    } else if(self.options.stickyScrollValue - self.options.stickyScrollNewValue > 0){
11187					        $html.removeClass('sticky-header-scroll-down').addClass('sticky-header-scroll-up');
11188					    }
11189
11190					    // Update the old value
11191					    self.options.stickyScrollValue = self.options.stickyScrollNewValue;
11192
11193					}
11194				};
11195				
11196				// Activate Sticky Header
11197				self.activateStickyHeader = function() {
11198					if ($window.width() < 992) {
11199						if (self.options.stickyEnableOnMobile == false) {
11200							self.deactivateStickyHeader();
11201							self.options.headerBody.css({
11202								position: 'relative'
11203							});
11204							return false;
11205						}
11206					} else {
11207						if (sideHeader) {
11208							self.deactivateStickyHeader();
11209							return;
11210						}
11211					}
11212
11213					$html.addClass('sticky-header-active');
11214
11215					// Sticky Effect - Reveal
11216					if( self.options.stickyEffect == 'reveal' ) {
11217
11218						self.options.headerBody.css('top','-' + self.options.stickyStartAt + 'px');
11219
11220						self.options.headerBody.animate({
11221							top: self.options.stickySetTop
11222						}, 400, function() {});
11223
11224					}
11225
11226					// Sticky Effect - Shrink
11227					if( self.options.stickyEffect == 'shrink' ) {
11228
11229						// If Header Top
11230						if( self.options.wrapper.find('.header-top').get(0) ) {
11231							self.options.wrapper.find('.header-top').css({
11232								height: 0,
11233								'min-height': 0,
11234								overflow: 'hidden'
11235							});
11236						}
11237
11238						// Header Container
11239						if( self.options.stickyHeaderContainerHeight ) {
11240							self.options.wrapper.find('.header-container').css({
11241								height: self.options.stickyHeaderContainerHeight,
11242								'min-height': 0
11243							});
11244						} else {
11245							self.options.wrapper.find('.header-container').css({
11246								height: (initialHeaderContainerHeight / 3) * 2, // two third of container height
11247								'min-height': 0
11248							});
11249
11250							var y = initialHeaderContainerHeight - ((initialHeaderContainerHeight / 3) * 2);
11251							$('.main').css({
11252								transform: 'translate3d(0, -'+ y +'px, 0)',
11253								transition: 'ease transform 300ms'
11254							}).addClass('has-sticky-header-transform');
11255
11256							if($html.hasClass('boxed')) {
11257								self.options.headerBody.css('position','fixed');
11258							}
11259						}
11260
11261					}
11262
11263					self.options.headerBody.css('top', self.options.stickySetTop);
11264
11265					if (self.options.stickyChangeLogo) {
11266						self.changeLogo(true);
11267					}
11268
11269					// Set Elements Style
11270					if( $('[data-sticky-header-style]').length ) {
11271						$('[data-sticky-header-style]').each(function() {
11272							var $el = $(this),
11273								css = theme.fn.getOptions($el.data('sticky-header-style-active')),
11274								opts = theme.fn.getOptions($el.data('sticky-header-style'));
11275
11276							if( $window.width() > opts.minResolution ) {
11277								$el.css(css);
11278							}
11279						});
11280					}
11281
11282					$.event.trigger({
11283						type: 'stickyHeader.activate'
11284					});
11285				};
11286
11287				// Deactivate Sticky Header
11288				self.deactivateStickyHeader = function() {
11289					$html.removeClass('sticky-header-active');
11290
11291					if ( $(window).width() < 992 && self.options.stickyEnableOnMobile == false) {
11292						return false;
11293					}
11294
11295					// Sticky Effect - Shrink
11296					if( self.options.stickyEffect == 'shrink' ) {
11297
11298						// Boxed Layout
11299						if( $html.hasClass('boxed') ) {
11300
11301							// Set Header Body Position Absolute
11302							self.options.headerBody.css('position','absolute');
11303
11304							if( $window.scrollTop() > $('.body').offset().top ) {
11305								// Set Header Body Position Fixed
11306								self.options.headerBody.css('position','fixed');								
11307							}
11308
11309						} else {
11310							// Set Header Body Position Fixed
11311							self.options.headerBody.css('position','fixed');
11312						}
11313
11314						// If Header Top
11315						if( self.options.wrapper.find('.header-top').get(0) ) {
11316							self.options.wrapper.find('.header-top').css({
11317								height: initialHeaderTopHeight,
11318								overflow: 'visible'
11319							});
11320
11321							// Fix [data-icon] issue when first load is on middle of the page
11322							if( self.options.wrapper.find('.header-top [data-icon]').length ) {
11323								theme.fn.intObsInit( '.header-top [data-icon]:not(.svg-inline--fa)', 'themePluginIcon' );
11324							}
11325						}
11326
11327						// Header Container
11328						self.options.wrapper.find('.header-container').css({
11329							height: initialHeaderContainerHeight
11330						});
11331
11332					}
11333
11334					self.options.headerBody.css('top', 0);
11335
11336					if (self.options.stickyChangeLogo) {
11337						self.changeLogo(false);
11338					}
11339
11340					// Set Elements Style
11341					if( $('[data-sticky-header-style]').length ) {
11342						$('[data-sticky-header-style]').each(function() {
11343							var $el = $(this),
11344								css = theme.fn.getOptions($el.data('sticky-header-style-deactive')),
11345								opts = theme.fn.getOptions($el.data('sticky-header-style'));
11346
11347							if( $window.width() > opts.minResolution ) {
11348								$el.css(css);
11349							}
11350						});
11351					}
11352
11353					$.event.trigger({
11354						type: 'stickyHeader.deactivate'
11355					});
11356				};
11357
11358				// Always Sticky
11359				if (parseInt(self.options.stickyStartAt) <= 0) {
11360					self.activateStickyHeader();
11361				}
11362
11363				// Set Logo
11364				if (self.options.stickyChangeLogo) {
11365
11366					var $logoWrapper = self.options.wrapper.find('.header-logo'),
11367						$logo = $logoWrapper.find('img'),
11368						logoWidth = $logo.attr('width'),
11369						logoHeight = $logo.attr('height'),
11370						logoSmallTop = parseInt($logo.attr('data-sticky-top') ? $logo.attr('data-sticky-top') : 0),
11371						logoSmallWidth = parseInt($logo.attr('data-sticky-width') ? $logo.attr('data-sticky-width') : 'auto'),
11372						logoSmallHeight = parseInt($logo.attr('data-sticky-height') ? $logo.attr('data-sticky-height') : 'auto');
11373
11374					if (self.options.stickyChangeLogoWrapper) {
11375						$logoWrapper.css({
11376							'width': $logo.outerWidth(true),
11377							'height': $logo.outerHeight(true)
11378						});
11379					}
11380
11381					self.changeLogo = function(activate) {
11382						if(activate) {
11383							
11384							$logo.css({
11385								'top': logoSmallTop,
11386								'width': logoSmallWidth,
11387								'height': logoSmallHeight
11388							});
11389
11390						} else {
11391							
11392							$logo.css({
11393								'top': 0,
11394								'width': logoWidth,
11395								'height': logoHeight
11396							});
11397
11398						}
11399					}
11400
11401					$.event.trigger({
11402						type: 'stickyChangeLogo.loaded'
11403					});
11404
11405				}
11406
11407				// Side Header
11408				var headerBodyHeight,
11409					flag = false;
11410
11411				self.checkSideHeader = function() {
11412					if($window.width() < 992 && flag == false) {
11413						headerBodyHeight = self.options.headerBody.height();
11414						flag = true;
11415					}
11416
11417					if(self.options.stickyStartAt == 0 && sideHeader) {
11418						self.options.wrapper.css('min-height', 0);
11419					}
11420
11421					if(self.options.stickyStartAt > 0 && sideHeader && $window.width() < 992) {
11422						self.options.wrapper.css('min-height', headerBodyHeight);
11423					}
11424				}
11425
11426				return this;
11427			},
11428
11429			events: function() {
11430				var self = this;
11431
11432				if( $(window).width() < 992 && this.options.stickyEnableOnMobile == false ) {
11433					return this;
11434				}
11435
11436				if (!this.options.stickyEnableOnBoxed && $('body').hasClass('boxed') || $('html').hasClass('side-header-hamburguer-sidebar') && !this.options.stickyForce || !this.options.stickyEnabled) {
11437					return this;
11438				}
11439
11440				if (!self.options.alwaysStickyEnabled) {
11441					$(window).on('scroll resize', function() {
11442						if ( $(window).width() < 992 && self.options.stickyEnableOnMobile == false) {
11443							self.options.headerBody.css({
11444								position: ''
11445							});
11446
11447							if( self.options.stickyEffect == 'shrink' ) {
11448								self.options.wrapper.find('.header-top').css({
11449									height: ''
11450								});
11451							}
11452
11453							self.deactivateStickyHeader();
11454						} else {
11455							self.checkStickyHeader();
11456						}
11457					});
11458				} else {
11459					self.activateStickyHeader();
11460				}
11461
11462				$(window).on('load resize', function(){
11463					self.checkSideHeader();
11464				});
11465
11466				$(window).on('layout.boxed', function(){
11467					self.boxedLayout();
11468				});
11469
11470				return this;
11471			},
11472
11473			boxedLayout: function(){
11474				var self = this,
11475					$window = $(window);
11476
11477				if($('html').hasClass('boxed') && self.options.stickyEffect == 'shrink') {
11478					if( (parseInt(self.options.stickyStartAt) == 0) && $window.width() > 991) {
11479						self.options.stickyStartAt = 30;
11480					}
11481
11482					// Set Header Body Position Absolute
11483					self.options.headerBody.css({
11484						position: 'absolute',
11485						top: 0
11486					});
11487
11488					// Set position absolute because top margin from boxed layout
11489					$window.on('scroll', function(){
11490						if( $window.scrollTop() > $('.body').offset().top ) {
11491							self.options.headerBody.css({
11492								'position' : 'fixed',
11493								'top' : 0
11494							});								
11495						} else {
11496							self.options.headerBody.css({
11497								'position' : 'absolute',
11498								'top' : 0
11499							});
11500						}
11501					});
11502				}
11503
11504				return this;
11505			}
11506
11507		}
11508
11509	});
11510
11511}).apply(this, [window.theme, jQuery]);

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