!function(){const o=window.navigator.userAgent;Object.entries({android:/android/i,iphone:/iPhone/i,ipad:/iPad/i}).forEach((([n,i])=>{o.match(i)&&document.body.classList.add(`tec-is-${n}`)}))}(),window.tec=window.tec||{},window.tec.common=window.tec.common||{},window.tec.common.userAgent={};
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../safe-active-element","../unique-id","../version","../widget"],t):t(jQuery)}(function(l){"use strict";var a;return l.widget("ui.tabs",{version:"1.13.3",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(a=/#.*$/,function(t){var e=t.href.replace(a,""),i=location.href.replace(a,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=l.uniqueSort(t.disabled.concat(l.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=l(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,a=location.hash.substring(1);return null===i&&(a&&this.tabs.each(function(t,e){if(l(e).attr("aria-controls")===a)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):l()}},_tabKeydown:function(t){var e=l(l.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),a=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case l.ui.keyCode.RIGHT:case l.ui.keyCode.DOWN:i++;break;case l.ui.keyCode.UP:case l.ui.keyCode.LEFT:a=!1,i--;break;case l.ui.keyCode.END:i=this.anchors.length-1;break;case l.ui.keyCode.HOME:i=0;break;case l.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case l.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,a),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===l.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===l.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===l.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==l.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"===t?this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=l.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!l.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=l()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=l()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var o=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){l(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){l(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return l("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=l(),this.anchors.each(function(t,e){var i,a,s,n=l(e).uniqueId().attr("id"),h=l(e).closest("li"),r=h.attr("aria-controls");o._isLocal(e)?(s=(i=e.hash).substring(1),a=o.element.find(o._sanitizeSelector(i))):(s=h.attr("aria-controls")||l({}).uniqueId()[0].id,(a=o.element.find(i="#"+s)).length||(a=o._createPanel(s)).insertAfter(o.panels[t-1]||o.tablist),a.attr("aria-live","polite")),a.length&&(o.panels=o.panels.add(a)),r&&h.data("ui-tabs-aria-controls",r),h.attr({"aria-controls":s,"aria-labelledby":n}),a.attr("aria-labelledby",n)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return l("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=l(e),!0===t||-1!==l.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=l(this).outerHeight(!0)}),this.panels.each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,l(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,a=l(t.currentTarget).closest("li"),s=a[0]===i[0],n=s&&e.collapsible,h=n?l():this._getPanelForTab(a),r=i.length?this._getPanelForTab(i):l(),i={oldTab:i,oldPanel:r,newTab:n?l():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||s&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!n&&this.tabs.index(a),this.active=s?l():a,this.xhr&&this.xhr.abort(),r.length||h.length||l.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,a=e.newPanel,s=e.oldPanel;function n(){i.running=!1,i._trigger("activate",t,e)}function h(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&i.options.show?i._show(a,i.options.show,n):(a.show(),n())}this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),h()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),s.hide(),h()),s.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&s.length?e.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=t.length?t:this.active).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:l.noop}))},_findActive:function(t){return!1===t?l():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+l.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){l.data(this,"ui-tabs-destroy")?l(this).remove():l(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=l(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?l.map(t,function(t){return t!==i?t:null}):l.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==l.inArray(t,e))return;e=Array.isArray(e)?l.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,a){t=this._getIndex(t);function s(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(i,"ui-tabs-loading"),h.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr}var n=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),h=this._getPanelForTab(i),r={tab:i,panel:h};this._isLocal(t[0])||(this.xhr=l.ajax(this._ajaxSettings(t,a,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),h.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){h.html(t),n._trigger("load",a,r),s(i,e)},1)}).fail(function(t,e){setTimeout(function(){s(t,e)},1)})))},_ajaxSettings:function(t,i,a){var s=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return s._trigger("beforeLoad",i,l.extend({jqXHR:t,ajaxSettings:e},a))}}},_getPanelForTab:function(t){t=l(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==l.uiBackCompat&&l.widget("ui.tabs",l.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),l.ui.tabs});
(function(e){var t=e.event,n,r;n=t.special.debouncedresize={setup:function(){e(this).on("resize",n.handler)},teardown:function(){e(this).off("resize",n.handler)},handler:function(e,i){var s=this,o=arguments,u=function(){e.type="debouncedresize";t.dispatch.apply(s,o)};if(r){clearTimeout(r)}i?u():r=setTimeout(u,n.threshold)},threshold:150}})(jQuery);
(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isLowIE=n.isIE8=document.all&&!document.addEventListener,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],u="",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=s,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos==="auto"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=x("bg").on("click"+j,function(){n.close()}),n.wrap=x("wrap").attr("tabindex",-1).on("click"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=x("container",n.wrap)),n.contentContainer=x("content"),n.st.preloader&&(n.preloader=x("preloader",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n["init"+i].call(n)}y("BeforeOpen"),n.st.showCloseBtn&&(n.st.closeBtnInside?(w(f,function(a,b,c,d){c.close_replaceWith=z(d.type)}),u+=" mfp-close-btn-in"):n.wrap.append(z())),n.st.alignTop&&(u+=" mfp-align-top"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:"hidden",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:"absolute"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos==="auto"&&!n.fixedContentPos)&&n.bgOverlay.css({height:s.height(),position:"absolute"}),n.st.enableEscapeKey&&s.on("keyup"+j,function(a){a.keyCode===27&&n.close()}),r.on("resize"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(u+=" mfp-auto-cursor"),u&&n.wrap.addClass(u);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a("body, html").css("overflow","hidden"):m.overflow="hidden");var p=n.st.mainClass;return n.isIE7&&(p+=" mfp-ie7"),p&&n._addClassToMFP(p),n.updateItemHTML(),y("BuildControls"),a("html").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||a(document.body)),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),s.on("focusin"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),y(g),b},close:function(){if(!n.isOpen)return;y(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){y(b);var c=l+" "+k+" ";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+" "),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:""};n.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}s.off("keyup"+j+" focusin"+j),n.ev.off(j),n.wrap.attr("class","mfp-wrap").removeAttr("style"),n.bgOverlay.attr("class","mfp-bg"),n.container.attr("class","mfp-container"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n.st.autoFocusLast&&n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,y(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css("height",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css("height",n.wH),y("Resize")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;y("BeforeChange",[n.currItem?n.currItem.type:"",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;y("FirstMarkupParse",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}t&&t!==b.type&&n.container.removeClass("mfp-"+t+"-holder");var e=n["get"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,y(h,b),t=b.type,n.container.prepend(n.contentContainer),y("AfterChange")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(".mfp-close").length||n.content.append(z()):n.content=a:n.content="",y(e),n.container.addClass("mfp-"+b+"-holder"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass("mfp-"+e[f])){d=e[f];break}c.src=c.el.attr("data-mfp-src"),c.src||(c.src=c.el.attr("href"))}return c.type=d||n.st.type||"inline",c.index=b,c.parsed=!0,n.items[b]=c,y("ElementParse",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d="click.magnificPopup";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey||b.altKey||b.shiftKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass("mfp-s-"+q),!b&&a==="loading"&&(b=n.st.tLoading);var c={status:a,text:b};y("UpdateStatus",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),n.container.addClass("mfp-s-"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass("mfp-close")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?s.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(c,d){if(d===undefined||d===!1)return!0;e=c.split("_");if(e.length>1){var f=b.find(j+"-"+e[0]);if(f.length>0){var g=e[1];g==="replaceWith"?f[0]!==d[0]&&f.replaceWith(d):g==="img"?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(j+"-"+c).html(d)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C="inline",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(C),w(b+"."+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D="mfp-"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("<div>");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var H="ajax",I,J=function(){I&&a(document.body).removeClass(I)},K=function(){J(),n.req&&n.req.abort()};a.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){n.types.push(H),I=n.st.ajax.cursor,w(b+"."+H,K),w("BeforeChange."+H,K)},getAjax:function(b){I&&a(document.body).addClass(I),n.updateStatus("loading");var c=a.extend({url:b.src,success:function(c,d,e){var f={data:c,xhr:e};y("ParseAjax",f),n.appendContent(a(f.data),H),b.finished=!0,J(),n._setFocus(),setTimeout(function(){n.wrap.addClass(k)},16),n.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),b.finished=b.loadError=!0,n.updateStatus("error",n.st.ajax.tError.replace("%url%",b.src))}},n.st.ajax.settings);return n.req=a.ajax(c),""}}});var L,M=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=".image";n.types.push("image"),w(g+d,function(){n.currItem.type==="image"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off("resize"+j)}),w("Resize"+d,n.resizeImage),n.isLowIE&&w("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){L&&clearInterval(L),L=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(L),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,y("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:M(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(L&&clearInterval(L),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var N,O=function(){return N===undefined&&(N=document.createElement("p").style.MozTransform!==undefined),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;w("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y("ZoomAnimationEnded")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return O()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var P="iframe",Q="//about:blank",R=function(a){if(n.currTemplate[P]){var b=n.currTemplate[P].find("iframe");b.length&&(a||(b[0].src=Q),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(b+"."+P,function(){R()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}});var S=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=n.st.gallery,d=".mfp-gallery";n.direction=!0;if(!c||!c.enabled)return!1;u+=" mfp-gallery",w(g+d,function(){c.navigateByImgClick&&n.wrap.on("click"+d,".mfp-img",function(){if(n.items.length>1)return n.next(),!1}),s.on("keydown"+d,function(a){a.keyCode===37?n.prev():a.keyCode===39&&n.next()})}),w("UpdateStatus"+d,function(a,b){b.text&&(b.text=T(b.text,n.currItem.index,n.items.length))}),w(f+d,function(a,b,d,e){var f=n.items.length;d.counter=f>1?T(c.tCounter,e.index,f):""}),w("BuildControls"+d,function(){if(n.items.length>1&&c.arrows&&!n.arrowLeft){var b=c.arrowMarkup,d=n.arrowLeft=a(b.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(m),e=n.arrowRight=a(b.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(m);d.click(function(){n.prev()}),e.click(function(){n.next()}),n.container.append(d.add(e))}}),w(h+d,function(){n._preloadTimeout&&clearTimeout(n._preloadTimeout),n._preloadTimeout=setTimeout(function(){n.preloadNearbyImages(),n._preloadTimeout=null},16)}),w(b+d,function(){s.off(d),n.wrap.off("click"+d),n.arrowRight=n.arrowLeft=null})},next:function(){n.direction=!0,n.index=S(n.index+1),n.updateItemHTML()},prev:function(){n.direction=!1,n.index=S(n.index-1),n.updateItemHTML()},goTo:function(a){n.direction=a>=n.index,n.index=a,n.updateItemHTML()},preloadNearbyImages:function(){var a=n.st.gallery.preload,b=Math.min(a[0],n.items.length),c=Math.min(a[1],n.items.length),d;for(d=1;d<=(n.direction?c:b);d++)n._preloadItem(n.index+d);for(d=1;d<=(n.direction?b:c);d++)n._preloadItem(n.index-d)},_preloadItem:function(b){b=S(b);if(n.items[b].preloaded)return;var c=n.items[b];c.parsed||(c=n.parseEl(b)),y("LazyLoad",c),c.type==="image"&&(c.img=a('<img class="mfp-img" />').on("load.mfploader",function(){c.hasSize=!0}).on("error.mfploader",function(){c.hasSize=!0,c.loadError=!0,y("LazyLoadError",c)}).attr("src",c.src)),c.preloaded=!0}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=n.st.retina,b=a.ratio;b=isNaN(b)?b():b,b>1&&(w("ImageHasSize."+U,function(a,c){c.img.css({"max-width":c.img[0].naturalWidth/b,width:"100%"})}),w("ElementParse."+U,function(c,d){d.src=a.replaceSrc(d,b)}))}}}}),A()});
(function($){
"use strict";
$.fn.mfnMenu=function(options){
var menu=$(this);
var defaults={
addLast: false,
arrows: false,
delay: 100,
hoverClass: 'hover',
mobileInit: 768,
responsive: true
};
options=$.extend(defaults, options);
var init=function(){
$('li:has(ul)', menu).addClass('submenu');
$('li:has(ul)', menu).append('<a class="menu-toggle" href="#" aria-label="'+ mfn.accessibility.translation.toggleSubmenu +'"></a>').on('click', '.menu-toggle', function(e){
e.preventDefault();
if($('#Header_creative.dropdown.scroll').length){
$('#Header_creative').css('overflow-y','visible').css('overflow-y','hidden');
}});
menu.children('li:has(ul.mfn-megamenu)').addClass('mfn-megamenu-parent');
$('.submenu ul li:last-child', menu).addClass('last-item');
if(options.addLast){
$('> li:last-child', menu).addClass('last')
.prev().addClass('last');
}
if(options.arrows){
$('li ul li:has(ul) > a', menu).append('<i class="menu-arrow icon-right-open"></i>');
}};
var doMenu=function(){
if((window.innerWidth >=options.mobileInit)||(!options.responsive)){
$('> li, ul:not(.mfn-megamenu) li', menu).on('mouseenter', function(){
$(this).stop(true, true).addClass(options.hoverClass);
$(this).children('ul').stop(true, true).fadeIn(options.delay);
}).on('mouseleave', function(){
$(this).stop(true, true).removeClass(options.hoverClass);
$(this).children('ul').stop(true, true).fadeOut(options.delay);
});
}else{
$('li', menu).off('hover');
$('li > .menu-toggle', menu).off('click').on('click', function(e){
e.preventDefault();
var el=$(this).closest('li');
if(el.hasClass(options.hoverClass)){
el.removeClass(options.hoverClass)
.children('ul').stop(true, true).fadeOut(options.delay);
}else{
el.addClass(options.hoverClass)
.children('ul').stop(true, true).fadeIn(options.delay);
}});
}};
$(window).on('resize', doMenu);
var __constructor=function(){
init();
doMenu();
};
__constructor();
};})(jQuery);
(function(e){e.fn.visible=function(t,n,r){var i=e(this).eq(0),s=i.get(0),o=e(window),u=o.scrollTop(),a=u+o.height(),f=o.scrollLeft(),l=f+o.width(),c=i.offset().top,h=c+i.height(),p=i.offset().left,d=p+i.width(),v=t===true?h:c,m=t===true?c:h,g=t===true?d:p,y=t===true?p:d,b=n===true?s.offsetWidth*s.offsetHeight:true,r=r?r:"both";if(r==="both")return!!b&&m<=a&&v>=u&&y<=l&&g>=f;else if(r==="vertical")return!!b&&m<=a&&v>=u;else if(r==="horizontal")return!!b&&y<=l&&g>=f}})(jQuery);
function animateElement(){jQuery(".animate").each(jQuery(window).width()>=96?function(a,n){var n=jQuery(n),i=jQuery(this).attr("data-anim-type"),t=jQuery(this).attr("data-anim-delay");n.visible(!0)&&setTimeout(function(){n.addClass(i)},t)}:function(a,n){var n=jQuery(n),i=jQuery(this).attr("data-anim-type"),t=jQuery(this).attr("data-anim-delay");setTimeout(function(){n.addClass(i)},t)})}function randomClass(){var a=Math.ceil(Math.random()*classAmount);return classesArray[a]}function animateOnce(a,n){"random"==n&&(n=randomClass()),jQuery(a).removeClass("trigger infinite "+triggerClasses).addClass("trigger").addClass(n).one("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){jQuery(this).removeClass("trigger infinite "+triggerClasses)})}function animateInfinite(a,n){"random"==n&&(n=randomClass()),jQuery(a).removeClass("trigger infinite "+triggerClasses).addClass("trigger infinite").addClass(n).one("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){jQuery(this).removeClass("trigger infinite "+triggerClasses)})}function animateEnd(a){jQuery(a).removeClass("trigger infinite "+triggerClasses)}jQuery(document).ready(function(){jQuery("html").hasClass("no-js")&&jQuery("html").removeClass("no-js").addClass("js"),animateElement()}),jQuery(window).on('resize',function(){animateElement()}),jQuery(window).on('scroll',function(){animateElement(),jQuery(window).scrollTop()+jQuery(window).height()==jQuery(document).height()&&animateElement()});var triggerClasses="flash strobe shakeH shakeV bounce tada wave spinCW spinCCW slingshotCW slingshotCCW wobble pulse pulsate heartbeat panic",classesArray=new Array,classesArray=triggerClasses.split(" "),classAmount=classesArray.length;
!function(t){"use strict";t.fn.enllax=function(r){var a=t(window).height(),n=t(document).height(),o=t.extend({ratio:0,type:"background",direction:"vertical"},r),e=t("[data-enllax-ratio]");e.each(function(){var r,e,s,i=t(this),c=i.offset().top,l=i.outerHeight(),p=i.data("enllax-ratio"),d=i.data("enllax-type"),x=i.data("enllax-direction");r=p?p:o.ratio,e=d?d:o.type,s=x?x:o.direction;var f=Math.round(c*r),u=Math.round((c-a/2+l)*r);"background"==e?"vertical"==s?i.css({"background-position":"center "+-f+"px"}):"horizontal"==s&&i.css({"background-position":-f+"px center"}):"foreground"==e&&("vertical"==s?i.css({"-webkit-transform":"translateY("+u+"px)","-moz-transform":"translateY("+u+"px)",transform:"translateY("+u+"px)"}):"horizontal"==s&&i.css({"-webkit-transform":"translateX("+u+"px)","-moz-transform":"translateX("+u+"px)",transform:"translateX("+u+"px)"})),t(window).on("scroll",function(){var o=t(this).scrollTop();f=Math.round((c-o)*r),u=Math.round((c-a/2+l-o)*r),"background"==e?"vertical"==s?i.css({"background-position":"center "+-f+"px"}):"horizontal"==s&&i.css({"background-position":-f+"px center"}):"foreground"==e&&n>o&&("vertical"==s?i.css({"-webkit-transform":"translateY("+u+"px)","-moz-transform":"translateY("+u+"px)",transform:"translateY("+u+"px)"}):"horizontal"==s&&i.css({"-webkit-transform":"translateX("+u+"px)","-moz-transform":"translateX("+u+"px)",transform:"translateX("+u+"px)"}))})})}}(jQuery);
var mfnSetup={
translate: null
};
(function($){
"use strict";
var has3d=function(){
if(!window.getComputedStyle){
return false;
}
var el=document.createElement('div'),
has3d;
document.body.insertBefore(el, null);
if(el.style.transform!==undefined){
el.style.transform="translateY(0px) translateX(-50%)";
has3d=window.getComputedStyle(el).getPropertyValue('transform');
}
document.body.removeChild(el);
return (has3d!==undefined&&has3d!==null&&has3d.length > 0&&has3d!=="none");
};
var __construct=function(){
if(has3d()){
mfnSetup.translate=function(el, x, y){
el.css('transform', 'translateY(' + y + ') translateX(-50%)');
};}else{
/*mfnSetup.translate=function(el, x, y){
el.css({
"left": x,
"top": y
});
};*/
}};
__construct();
})(jQuery);
(function($){
"use strict";
$.fn.mfnParallax=function(){
var el=$(this),
parent=el.parent(),
speed=500,
element, parentPos, windowH;
var imageSize=function(img){
var w, h, l, t;
var imageW=img.get(0).clientWidth;
var imageH=img.get(0).clientHeight;
var parentW=img.parent().outerWidth();
var parentH=img.parent().outerHeight();
var windowH=$(window).height();
if(windowH > parentH){
parentH=windowH;
}
var diff=imageW / parentW;
if((imageH / diff) < parentH){
w=imageW / (imageH / parentH);
h=parentH;
if(w > imageW){
w=imageW;
h=imageH;
}}else{
w=parentW;
h=imageH / diff;
}
l=(parentW - w) / 2;
t=(parentH - h) / 2;
return [w, h, l, t];
};
var parallax=function(){
var scrollTop=$(window).scrollTop(),
scrollDiff, ratio, translateTop;
if(parentPos!==undefined){
if(scrollTop >=parentPos.min&&scrollTop <=parentPos.max){
scrollDiff=scrollTop - parentPos.min;
ratio=scrollDiff / parentPos.height;
translateTop=windowH + (ratio * speed) - scrollDiff - (speed * (windowH / parentPos.height));
mfnSetup.translate(el, element.left + "px", -Math.round(translateTop) + "px");
}}
};
var init=function(){
windowH=$(window).height();
var initElement=function(){
var size=imageSize(el);
el.removeAttr('style').css({
});
mfnSetup.translate(el, size[2] + "px", size[3] + "px");
return {
'width': size[0],
'height': size[1],
'left': size[2],
'top': size[3]
};};
element=initElement();
var initParent=function(){
var min=parent.offset().top - $(window).height();
var max=parent.offset().top + $(parent).outerHeight();
return {
'min': min,
'max': max,
'height': max - min
};};
parentPos=initParent();
parent.css('background-image','unset');
};
var reload=function(){
setTimeout(function(){
init();
parallax();
}, 50);
};
reload();
$(window).on('scroll', parallax);
};
$(window).on('load resize', function(){
if($(".mfn-parallax").length){
$(".mfn-parallax").each(function(){
$(this).mfnParallax();
});
}});
})(jQuery);
function queryLoopMasonry(){
jQuery('.mfn-query-loop-masonry:not(.mfn-initialized)').each(function(){
let $masonry=jQuery(this);
$masonry.imagesLoaded(function(){
$masonry.isotope({
itemSelector: '.mfn-queryloop-item-wrapper',
layoutMode: 'masonry',
isOriginLeft: jQuery('body').hasClass('rtl') ? false:true
});
$masonry.addClass('mfn-initialized');
});
});
}
function msnryGalleryInit(){
jQuery('.gallery.equal-heights:not(.mfn-images-loaded)').each(function(){
var $el=jQuery(this);
$el.imagesLoaded(function(){
$el.addClass('mfn-images-loaded');
});
});
jQuery('.sections_group .gallery, .mcb-section .gallery, .elementor-section .gallery').each(function(){
var $el=jQuery(this);
var id=$el.attr('id');
if($el.hasClass('mfn-initialized')) return;
$el.children('br').remove();
$el.find('.gallery-icon').children('a')
.wrap('<div class="image_frame scale-with-grid"><div class="image_wrapper"></div></div>')
.prepend('<div class="mask"></div>')
.children('img')
;
if($el.hasClass('file')){
$el.find('.gallery-icon a')
.attr('rel', 'prettyphoto[' + id + ']')
.attr('data-elementor-lightbox-slideshow', id);
}
$el.find('.gallery-item').each(function(){
var title=jQuery(this).data('title');
var description=jQuery(this).data('description');
jQuery('.gallery-icon a', jQuery(this))
.attr('data-elementor-lightbox-title', title)
.attr('data-elementor-lightbox-description', description);
});
if($el.hasClass('masonry')){
$el.imagesLoaded(function(){
$el.isotope({
itemSelector: '.gallery-item',
layoutMode: 'masonry',
isOriginLeft: jQuery('body').hasClass('rtl') ? false:true
});
$el.addClass('mfn-initialized');
});
}});
}
function redrawAllRevolutionSliders(){
let slidersFound=false;
for (const prop in window){
if(prop.startsWith('revapi')&&typeof window[prop]==='object'&&window[prop]!==null){
const revapiInstance=window[prop];
if(typeof revapiInstance.revredraw==='function'){
slidersFound=true;
setTimeout(function(){
revapiInstance.revredraw();
console.log(`Revolution Slider instance (${prop}) redrawn.`);
}, 50);
}}
}}
(function($){
"use strict";
var scrollTicker, lightboxAttr, sidebar,
body=$('body'),
rtl=$('body').hasClass('rtl'),
simple=$('body').hasClass('style-simple'),
isBlocks=$('body').hasClass('builder-blocks'),
topBarTop='0',
headerH=0,
currWidth=$(window).width(),
newWidth=$(window).width(),
screen='desktop',
mobileInitW=mfn.mobileInit ? mfn.mobileInit:1240,
consents={};
if(! mfn.lightbox.disable){
if(!(mfn.lightbox.disableMobile&&(window.innerWidth < 768) )){
lightboxAttr={
title: mfn.lightbox.title ? mfn.lightbox.title:false,
};}}
var cookies={
get: function(name){
if(document.cookie!==""){
var cookies=document.cookie.split(/; */);
for (var cookie of cookies){
var [ cookieName, cookieVal ]=cookie.split("=");
if(cookieName===name){
return decodeURIComponent(cookieVal);
}}
}
return false;
},
set: function(name, value, expires){
if(navigator.cookieEnabled){
var cookieDate=new Date();
var cookieText='';
expires=expires||365;
value=encodeURIComponent(value);
cookieDate.setTime(cookieDate.getTime() + (expires * 24 * 60 * 60 * 1000));
cookieText +=name +"="+ value;
cookieText +="; expires=" + cookieDate.toUTCString() + ';';
cookieText +="; path=" + mfn.home_url + '/';
document.cookie=cookieText;
}},
};
var consent={
popup:$('#mfn-consent-mode'),
tabs:function($el, id){
var $li;
if($el){
$li=$el.closest('li');
id=$li.data('id');
}else{
$li=$('.tab[data-id="'+ id +'"]');
}
$li.addClass('is-active')
.siblings().removeClass('is-active');
$('#'+ id).addClass('is-active')
.siblings().removeClass('is-active');
$('.mfn-cookies').attr('data-tab',id);
},
open:function(){
if(! this.popup.length){
return;
}
if($('body').hasClass('mfn-ui')) return;
consents=cookies.get('mfnConsent');
try {
consents=JSON.parse(consents);
if(! consents){
throw new Error('');
}
gtag('consent', 'update', consents);
} catch (e){
consents={
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
}
body.addClass('mfn-cookies-open');
if(body.hasClass('gdpr2-scroll-disable')){
$('html').addClass('mfn-popup-browser-scroll-disabled');
}}
},
reopen:function(){
if($('body').hasClass('mfn-ui')) return;
body.addClass('mfn-cookies-open');
this.popup.show()
.children().show();
if(body.hasClass('gdpr2-scroll-disable')){
$('html').addClass('mfn-popup-browser-scroll-disabled');
}},
close:function(){
var closeAnimation=this.popup.attr('data-animation');
switch(true){
case 'fade'===closeAnimation:
this.popup.fadeOut(300);
break;
case 'slide'===closeAnimation:
this.popup.fadeOut(300);
this.popup.children().slideUp(300);
break;
default:
body.removeClass('mfn-cookies-open');
}
setTimeout(function(){
body.removeClass('mfn-cookies-open');
if(body.hasClass('gdpr2-scroll-disable')){
$('html').removeClass('mfn-popup-browser-scroll-disabled');
}
$(document).trigger('mfn:gdpr2:close');
}, 300);
},
set:function(){
var expires=this.popup.attr('data-expires');
expires=parseInt(expires)||365;
gtag('consent', 'update', consents);
cookies.set('mfnConsent', JSON.stringify(consents), expires);
consent.close();
},
all:function(){
consents={
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted'
}
consent.set();
},
selected:function(){
if($('#cookies_analytics').is(":checked")){
consents.analytics_storage='granted';
}
if($('#cookies_marketing').is(":checked")){
consents.ad_storage='granted';
consents.ad_user_data='granted';
consents.ad_personalization='granted';
}
consent.set();
},
deny:function(){
consents={
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
}
consent.set();
},
};
function topBarTopPosition(){
topBarTop=parseInt($('#Top_bar').css('top'), 10);
var scrollPos=$(window).scrollTop();
if(scrollPos > 0){
window.scrollTo(0, 0);
$(window).scrollTop(0);
topBarTop=parseInt($('#Top_bar').css('top'), 10);
window.scrollTo(0, scrollPos);
}
if(topBarTop < 0){
topBarTop=0;
}
topBarTop=topBarTop + 'px';
}
function adminBarH(){
var height=0;
if($('body').hasClass('admin-bar')){
var actionBarH=$('#wpadminbar').innerHeight()||0;
height +=actionBarH;
}
if($('body').hasClass('woocommerce-demo-store')){
var demoStoreH=$('body > p.demo_store').innerHeight()||0;
height +=demoStoreH;
}
return height;
}
function mfnSticky(){
if(! $('body').hasClass('sticky-header')){
return false;
}
if($('body').hasClass('header-creative')&&window.innerWidth >=768){
return false;
}
var startY=headerH;
var windowY=$(window).scrollTop();
var topBarH=$('#Top_bar').height()||0;
if(windowY > startY){
if(!($('#Top_bar').hasClass('is-sticky')) ){
$('.header_placeholder').css('height', topBarH);
$('#Top_bar')
.addClass('is-sticky')
.css('top', -60)
.animate({
'top': adminBarH() + 'px'
}, 300);
headerWidth();
$(document).trigger('mfn:header:sticky:on');
}}else{
if($('#Top_bar').hasClass('is-sticky')){
$('.header_placeholder').css('height', 0);
$('#Top_bar').stop()
.removeClass('is-sticky')
.css('top', topBarTop);
stickyLogo();
headerWidth();
$(document).trigger('mfn:header:sticky:off');
}}
}
function stickyLogo(){
if(window.devicePixelRatio <=1){
return false;
}
var parent=$('#Top_bar #logo'),
el=$('img.logo-main', parent),
height=el.data('height');
if(! parent.hasClass('retina')){
return false;
}
if($('body').hasClass('logo-overflow')){
}else if(height > parent.data('height')){
height=parent.data('height');
}
el.css('max-height', height + 'px');
}
function mfnStickyH(){
var topBarH=$('#Top_bar').innerHeight()||0;
if($('body').hasClass('header-below')){
var sliderH=$('.mfn-main-slider').innerHeight()||0;
headerH=topBarH + sliderH;
}else{
var actionBarH=$('#Action_bar').innerHeight()||0;
headerH=topBarH + actionBarH;
}}
function mfnMobileSticky(){
if(! $('body').hasClass('.mobile-sticky')){
return false;
}
if($(window).width() >=768){
return false;
}
var menuH,
windowH=$(window).height()||0,
logoH=$('#Top_bar .logo').height()||0,
offset=adminBarH() + logoH;
if(( ! $('#Top_bar').hasClass('is-sticky'))&&$('#Action_bar').is(':visible')){
offset +=$('#Action_bar').height()||0;
}
menuH=windowH - offset;
if(menuH < 176){
menuH=176;
}
$('#Top_bar #menu').css('max-height', menuH + 'px');
}
function headerWidth(){
var rightW=$('.top_bar_right').outerWidth()||0;
rightW=Math.ceil(rightW);
if($('body').hasClass('header-modern')){
rightW +=10;
}
var parentW=$('#Top_bar .one').width()||0;
var leftW=parentW - rightW;
}
function fixStickyHeaderH(){
var stickyH=0;
var topBar=$('.sticky-header #Top_bar');
if(topBar.length){
if(topBar.hasClass('is-sticky')){
stickyH=$('.sticky-header #Top_bar').innerHeight()||0;
}else{
topBar.addClass('is-sticky');
stickyH=$('.sticky-header #Top_bar').innerHeight()||0;
topBar.removeClass('is-sticky');
}}else if($('.mfn-header-tmpl-builder').length){
var height=15;
var shift=0;
if($('#mfn-header-template').hasClass('mfn-hasSticky')){
height=$('#mfn-header-template').outerHeight();
shift=parseFloat($('#mfn-header-template').css('top'));
}else if($('#mfn-header-template').hasClass('mfn-header-tmpl-fixed')){
height=$('#mfn-header-template').outerHeight();
shift=parseFloat($('#mfn-header-template').css('top'));
}else if($('#mfn-header-template').hasClass('mfn-mobile-header-tmpl-fixed')&&$(window).width() < 767){
height=$('#mfn-header-template').outerHeight();
shift=parseFloat($('#mfn-header-template').css('top'));
}
stickyH=height + shift;
return stickyH;
}
if($(window).width() < mobileInitW){
if($(window).width() < 768){
if(!$('body').hasClass('mobile-sticky')){
stickyH=0;
}}else{
if(!$('body').hasClass('tablet-sticky')){
stickyH=0;
}}
}else{
if($('body').hasClass('header-creative')){
stickyH=0;
}}
return stickyH;
}
function mfnSidebar(){
if($('.mcb-sidebar').length){
var maxH=$('#Content .sections_group').outerHeight();
$('.mcb-sidebar').each(function(){
$(this).css('min-height', 0);
if($(this).height() > maxH){
maxH=$(this).height();
}});
$('.mcb-sidebar').css('min-height', maxH + 'px');
if(sidebar){
sidebar.stickySidebar('updateSticky');
}}
}
function mfnIntroH(){
var windowH=$(window).height()||0;
var headerWrapperH=$('#Header_wrapper').height()||0;
windowH=windowH - headerWrapperH - adminBarH();
$('#Intro.full-screen').each(function(){
var el=$(this),
inner=$('.intro-inner', el),
innerH=inner.height()||0;
el.css('padding', 0).css('min-height', windowH);
var padding=(windowH - innerH) / 2;
inner.css('padding-top', padding).css('padding-bottom', padding);
});
}
function mfnFooter(){
var footerH=$('#Footer').height()||0;
if($('.footer-fixed #Footer, .footer-sliding #Footer').length){
footerH=footerH - 1;
$('#Content').css('margin-bottom', footerH + 'px');
}
if($('.footer-stick #Footer').length){
var headerWrapperH=$('#Header_wrapper').height()||0;
var headerFooterH=headerWrapperH + footerH;
var documentH=$(document).height() - adminBarH();
if(( documentH <=$(window).height())&&(headerFooterH <=$(window).height()) ){
$('#Footer').addClass('is-sticky');
}else{
$('#Footer').removeClass('is-sticky');
}}
}
function backToTopSticky(){
if($('#back_to_top.sticky.scroll').length){
var el=$('#back_to_top.sticky.scroll');
if(scrollTicker){
window.clearTimeout(scrollTicker);
scrollTicker=null;
}
el.addClass('focus');
scrollTicker=window.setTimeout(function(){
el.removeClass('focus');
}, 1500);
}}
function preloader(){
$('body.preloader').animate({
opacity: 1
}, 100, function(){
$('html').removeClass('preloading');
});
}
function hashNav(){
var hash=window.location.hash;
if(hash){
if(hash.indexOf("&") > -1||hash.indexOf("/") > -1||hash.indexOf("?") > -1){
return false;
}
if(hash.indexOf("wpcf7") > -1){
cf7popup(hash);
}
if($(hash).length){
$(window).scrollTop(0, 0);
setTimeout(function(){
var offset=0,
headerH=fixStickyHeaderH(),
tabH=$(hash).siblings('.ui-tabs-nav').innerHeight()||0;
if($('body').hasClass('mhb')){
var currentView=$('.mhb-view').filter(':visible');
headerH=currentView.height()||0;
}
offset=headerH + tabH;
$('html, body').animate({
scrollTop: $(hash).offset().top - offset
}, 500);
}, 500);
}}
}
function onePageActive(){
if($('body').hasClass('one-page')){
var stickyH=$('.sticky-header #Top_bar').innerHeight()||0;
if($('#mfn-header-template').length) stickyH=$('#mfn-header-template').innerHeight()||0;
var windowT=$(window).scrollTop();
var start=windowT + stickyH + adminBarH() + 1;
var first=false;
$('[data-id]:not(.elementor-element), section[data-id]').each(function(){
if($(this).attr('data-id')&&(-1==$(this).attr('data-id').indexOf('#')) ){
return true;
}
if($(this).visible(true)){
if(!first){
first=$(this);
}else if(($(this).offset().top < start)&&($(this).offset().top > first.offset().top)){
first=$(this);
}}
if(first){
var newActive=first.attr('data-id');
var active='[data-hash="' + newActive + '"]';
if(newActive){
var menu=$('#menu, .mhb-menu');
if($('#mfn-header-template').length) menu=$('#mfn-header-template .mfn-header-menu');
menu.find('li').removeClass('current-menu-item current-menu-parent current-menu-ancestor current_page_item current_page_parent current_page_ancestor');
$(active, menu)
.closest('li').addClass('current-menu-item')
.closest('.menu > li').addClass('current-menu-item');
}}
});
}}
function cf7popup(hash){
if(hash&&$(hash).length){
var id=$(hash).closest('.popup-content').attr('id');
$('a.popup-link[href="#' + id + '"]:not(.once)')
.addClass('once')
.trigger('click');
}}
$(document).on('mfnPopupInit', function(){
if($('.mfn-popup-tmpl.mfn-popup-active .chart:not(.mfn-initialized)').length){
$('.mfn-popup-tmpl.mfn-popup-active .chart:not(.mfn-initialized)').each(function(){
var lineW=simple ? 4:8;
$(this).addClass('mfn-initialized');
$(this).easyPieChart({
animate: 1000,
lineCap: 'circle',
lineWidth: lineW,
size: 140,
scaleColor: false
});
});
}
if($('.mfn-popup-tmpl.mfn-popup-active .before_after.twentytwenty-container:not(.mfn-initialized)').length){
$('.mfn-popup-tmpl.mfn-popup-active .before_after.twentytwenty-container:not(.mfn-initialized)').each(function(){
var el=$(this);
el.addClass('mfn-initialized');
el.imagesLoaded().done(function(instance, image){
queueMicrotask(()=> el.twentytwenty());
});
});
}
if($('.mfn-popup-tmpl.mfn-popup-active .downcount:not(.mfn-initialized)').length){
$('.mfn-popup-tmpl.mfn-popup-active .downcount:not(.mfn-initialized)').each(function(){
var el=$(this);
el.addClass('mfn-initialized');
el.downCount({
date: el.attr('data-date'),
offset: el.attr('data-offset')
});
});
}
if($('.mfn-popup-tmpl.mfn-popup-active .animate-math .number:not(.mfn-initialized)').length){
$('.mfn-popup-tmpl.mfn-popup-active .animate-math .number:not(.mfn-initialized)').each(function(){
var el=$(this);
var duration=Math.floor((Math.random() * 1000) + 1000);
var to=el.attr('data-to');
el.addClass('mfn-initialized');
$({
property: 0
}).animate({
property: to
}, {
duration: duration,
easing: 'linear',
step: function(){
el.text(Math.floor(this.property));
},
complete: function(){
el.text(this.property);
}});
});
}});
$(document).on('mfn:ajax:refresh', function(){
if($('.mfn-looped-items-slider').length){
queryLoopSlider();
}
bannerBox.init();
mfnReadMore.prepare();
mfnTabber.sliding_bg();
if($('.mfn-advanced-filters').length) mfnAdvancedFilters.prepare();
if($('.mfn-floating-placeholder').length){
$('.mfn-floating-placeholder .mfn-input-wrapper input').each(function(){
if($(this).val().length){
$(this).closest('.mfn-input-wrapper').addClass('mfn-not-empty');
}else{
$(this).closest('.mfn-input-wrapper').removeClass('mfn-not-empty');
}});
}
$('.downcount:not(.mfn-initialized)').each(function(){
var el=$(this);
el.addClass('mfn-initialized');
el.downCount({
date: el.attr('data-date'),
offset: el.attr('data-offset')
});
});
})
$(document).ready(function(){
if($('.mfn-off-canvas-sidebar').length){
offCanvasSidebar.init();
}
if($('.mfn-advanced-filters').length){
mfnAdvancedFilters.init();
}
mfnTabber.init();
if($(window).width() < 767&&!$('.mfn-off-canvas-sidebar').length){
offCanvasSidebar.mobile();
screen='mobile';
}else if($(window).width() < 959){
screen='tablet';
}
if($('.mfn-floating-placeholder').length){
$(document).on('blur change', '.mfn-floating-placeholder .mfn-input-wrapper input', function(){
if($(this).val().length){
$(this).closest('.mfn-input-wrapper').addClass('mfn-not-empty');
}else{
$(this).closest('.mfn-input-wrapper').removeClass('mfn-not-empty');
}});
$('.mfn-floating-placeholder .mfn-input-wrapper input').each(function(){
if($(this).val().length){
$(this).closest('.mfn-input-wrapper').addClass('mfn-not-empty');
}else{
$(this).closest('.mfn-input-wrapper').removeClass('mfn-not-empty');
}});
}
if($('body').hasClass('single-post')&&$('.mfn-tmp-elementor-content').length&&$('.column.column_post_content').length){
$('.column.column_post_content .mcb-item-post_content-inner').html($('.mfn-tmp-elementor-content').html());
$('.mfn-tmp-elementor-content').remove();
}
if($('.mfn-share-post-copy-link').length){
$('.mfn-share-post-copy-link').on('click', function(e){
e.preventDefault();
var $link=$(this);
navigator.clipboard.writeText(window.location.href);
$link.addClass('tooltip').attr('data-tooltip', mfn.translation.success_message);
setTimeout(function(){
$link.removeClass('tooltip').removeAttr('data-tooltip');
}, 2000);
});
}
if($('.mfn-image-hotspot').length){
mfn_hotspot.init();
}
if($('.mfn-go-to').length){
$(document).on('click', '.mfn-go-to', function(e){
e.preventDefault();
let target=$(this).attr('data-mfngoto');
let offset=0;
if(target=='last'){
offset=$('#Content .mfn-builder-content > .section').last().offset().top;
}else if(target=='prev'){
if(!$(this).closest('.section').prev('.section').length){console.error('BeTheme: Prev section doesnt exists'); return; }
offset=$(this).closest('.section').prev('.section').offset().top;
}else{
if(!$(this).closest('.section').next('.section').length){console.error('BeTheme: Next section doesnt exists'); return; }
offset=$(this).closest('.section').next('.section').offset().top;
}
offset=offset -(fixStickyHeaderH() + adminBarH());
$('html,body').animate({ scrollTop: offset }, 500);
});
}
let js_tooltip={
button: false,
offset_top: false,
offset_left: false,
init: function(){
$('.js-tooltip').on('mouseenter', function(){
js_tooltip.button=$(this);
if(typeof js_tooltip.button.attr('data-tooltip')=='undefined') return;
$('body').append('<span class="js-tooltip-txt">'+js_tooltip.button.attr('data-tooltip')+'</span>');
js_tooltip.position();
}).on('mouseleave', function(){
if($('.js-tooltip-txt').length) $('.js-tooltip-txt').remove();
js_tooltip.button=false;
});
$(window).on('scroll', function(){
if(js_tooltip.button) js_tooltip.position();
});
},
position: function(){
let offset=js_tooltip.button.offset();
js_tooltip.offset_top=offset.top - $(window).scrollTop() - 8;
js_tooltip.offset_left=offset.left + (js_tooltip.button.outerWidth()/2);
if(js_tooltip.button&&$('.js-tooltip-txt').length) $('.js-tooltip-txt').css({ top: js_tooltip.offset_top+'px', left: js_tooltip.offset_left+'px' });
}}
if($('.js-tooltip').length) js_tooltip.init();
if($('.mfn-copy-to-clipboard').length){
$(document).on('click', '.mfn-copy-to-clipboard', function(e){
e.preventDefault();
let code=$(this).attr('data-mfncopycode');
let button=$(this);
let org_label=button.find('.button_label').text();
let copied_txt=button.attr('data-mfncopyconfirm');
navigator.clipboard.writeText(code);
if(button.hasClass('js-tooltip')){
org_label=button.attr('data-tooltip');
button.attr('data-tooltip', copied_txt);
if($('.js-tooltip-txt').length) $('.js-tooltip-txt').remove();
button.trigger('mouseenter');
}else{
button.find('.button_label').text(copied_txt);
}
button.on('mouseleave', function(){
button.blur();
});
setTimeout(function(){
if(button.hasClass('js-tooltip')){
button.attr('data-tooltip', org_label);
if($('.js-tooltip-txt').length) $('.js-tooltip-txt').remove();
button.trigger('mouseenter');
}else{
button.find('.button_label').text(org_label);
}}, 2000);
});
}
if($('.mfn-language-switcher-dropdown:not(.mfn-initialized)').length){
$('.mfn-language-switcher-dropdown:not(.mfn-initialized)').each(function(){
let that=$(this);
that.addClass('mfn-initialized');
let $ul=that.find('ul');
let $current=$ul.find('li.wpml-ls-current-language');
$current.append($ul.clone());
$ul.children('li:not(.wpml-ls-current-language)').remove();
$current.find('ul li.wpml-ls-current-language').remove();
if(that.hasClass('mfn-language-switcher-dropdown-icon')){
let icon_html='';
if(that.attr('data-icon')=='image'){
icon_html='<span class="mfn-arrow-icon"><img src="'+that.attr('data-path')+'" alt=""></span>';
}else if(that.attr('data-icon')=='icon'){
icon_html='<span class="mfn-arrow-icon"><i class="'+that.attr('data-path')+'"></i></span>';
}
$current.children('a').append(icon_html);
}});
$(document).on('click', '.mfn-language-switcher-dropdown ul li.wpml-ls-current-language > a', function(e){
if($(window).width() < 1240) e.preventDefault();
$(this).parent('li').toggleClass('hover');
}).on('mouseleave', '.mfn-language-switcher-dropdown ul li.wpml-ls-current-language.hover', function(e){
$('.mfn-language-switcher-dropdown ul li.hover').removeClass('hover');
});
}
class Isotope {
constructor(){
this.runIsotopes=this.runIsotopes.bind(this);
this.itemToModify={};
this.ajaxObjects=[];
}
get getList(){
return [
{
name: 'Portfolio - Isotope',
location: '.blog_wrapper .isotope:not(.masonry), .portfolio_wrapper .isotope:not(.masonry-flat, .masonry-hover, .masonry-minimal)',
beforeActive: ()=> null,
afterActive: ()=> null,
settings: {
itemSelector: '.isotope-item',
layoutMode: 'fitRows',
isOriginLeft: rtl ? false:true
}},
{
name: 'Portfolio - Masonry Flat',
location: '.portfolio_wrapper .masonry-flat',
beforeActive: ()=> null,
afterActive: ()=> null,
settings: {
itemSelector: '.isotope-item',
percentPosition: true,
masonry: { columnWidth: 1 },
isOriginLeft: rtl ? false:true
}},
{
name: 'Blog & Portfolio & Shop - Masonry',
location: '.isotope.masonry, .isotope.masonry-hover, .isotope.masonry-minimal',
beforeActive: ()=> null,
afterActive: ()=> null,
settings: {
itemSelector: '.isotope-item',
layoutMode: 'masonry',
isOriginLeft: rtl ? false:true
}},
{
name: 'Filters - Isotope Event on Click',
location: 'body:not(.tax-portfolio-types,.archive.category,.archive.tag,.archive.author) .isotope-filters .filters_wrapper',
beforeActive: ()=> null,
afterActive: ({location})=> {
const filterButtons=$(location).find('li:not(.close) a');
filterButtons.on('click', (e)=> {
e.preventDefault();
const buttonClicked=$(e.target);
let isoWrapper=$('.isotope'),
filters=buttonClicked.closest('.isotope-filters'),
parent=filters.attr('data-parent');
if(parent){
parent=filters.closest('.' + parent);
isoWrapper=parent.find('.isotope').first();
}
filters.find('li').removeClass('current-cat');
buttonClicked.closest('li').addClass('current-cat');
this.isotopeFilter(buttonClicked, isoWrapper);
})
},
settings: 'do-not-run'
},
...this.ajaxObjects
]
}
addEventListener(onEvent, doWhat){
return $(document).on(`isotope:${onEvent}`, doWhat)
}
queryIsotopeAPI(location, apiAction, actionToPass){
return $(location).isotope(apiAction, actionToPass);
};
triggerIsotopeEvent(doWhat){
return $(document).trigger(`isotope:${doWhat}`)
}
addIsotopeLocation(payload){
if(!payload.location) return console.error('MfnIsotope Error: No Location Provided!');
this.ajaxObjects.push({
name: payload.name ? payload.name:'No name applied - Dynamic Isotope Function',
location: payload.location,
beforeActive: payload.beforeActive ? payload.beforeActive:()=> null,
afterActive: payload.afterActive ? payload.afterActive:()=> null,
settings: payload.settings ? payload.settings:{}}
);
$(payload.location).isotope(payload.settings)
}
isotopeFilter(domEl, isoWrapper){
if(!domEl||!isoWrapper) return console.error('MfnIsotope Error: isotopeFilter, missing one of the values!');
const filter=domEl.attr('data-rel');
isoWrapper.isotope({ filter });
queueMicrotask(()=> $(window).trigger('resize'));
setTimeout(function(){
mfnIsotope.triggerIsotopeEvent('arrange');
}, 500);
}
runIsotopes(resize=true){
const isotopeList=this.getList;
isotopeList.map(item=> {
if($(item.location).length){
item.beforeActive(item)
if(resize){
$(window).trigger('resize');
}
if('do-not-run'!==item.settings){
queueMicrotask(()=> $(item.location).isotope(item.settings));
}
item.afterActive(item);
}});
}}
const mfnIsotope=new Isotope;
mfnIsotope.runIsotopes();
class Waypoints {
constructor(){
this.runWaypoints=this.runWaypoints.bind(this);
}
get getList(){
return [
{
name: 'Chart',
location: '.sections_group .chart, .elementor-section .chart',
beforeActive: ()=> {},
afterActive: ()=> {},
settings: ()=> {
return {
offset: '100%',
triggerOnce: true,
handler: function(){
var el=$(this.element).length ? $(this.element):$(this);
var lineW=simple ? 4:8;
el.easyPieChart({
animate: 1000,
lineCap: 'circle',
lineWidth: lineW,
size: 140,
scaleColor: false
});
if(typeof this.destroy!=='undefined'&&$.isFunction(this.destroy)){
this.destroy();
}}
}}
},
{
name: 'Progress Icons',
location: '.progress_icons',
beforeActive: ()=> {},
afterActive: ()=> {},
settings: ()=> {
return {
offset: '100%',
triggerOnce: true,
handler: function(){
var el=$(this.element).length ? $(this.element):$(this);
var active=el.attr('data-active');
var color=el.attr('data-color');
var transparent=el.hasClass('transparent');
var icon=el.find('.progress_icon');
var timeout=200;
icon.each(function(i){
if(i < active){
var time=(i + 1) * timeout;
setTimeout(function(){
$(icon[i]).addClass('themebg');
if(transparent){
$(icon[i]).css('color', color);
}else{
$(icon[i]).css('background-color', color);
}}, time);
}});
if(typeof this.destroy!=='undefined'&&$.isFunction(this.destroy)){
this.destroy();
}}
}}
},
{
name: 'Animate Math | Counter, Quick Fact, etc.',
location: '#Wrapper .animate-math .number',
beforeActive: ()=> {},
afterActive: ()=> {},
settings: ()=> {
return {
offset: '100%',
triggerOnce: true,
handler: function(){
var el=$(this.element).length ? $(this.element):$(this);
var duration=el.attr('data-duration') * 1||Math.floor((Math.random() * 1000) + 1000);
var thousands_separator=el.attr('data-thousands-separator')||0;
var to=el.attr('data-to');
$({
property: 0
}).animate({
property: to
}, {
duration: duration,
easing: 'linear',
step: function(){
if('comma'==thousands_separator){
el.text(Math.floor(this.property).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","))
}else if('dot'==thousands_separator){
el.text(Math.floor(this.property).toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."))
}else if('space'==thousands_separator){
el.text(Math.floor(this.property).toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "))
}else{
el.text(Math.floor(this.property));
}},
complete: function(){
if('comma'==thousands_separator){
el.text(Math.floor(this.property).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","))
}else if('dot'==thousands_separator){
el.text(Math.floor(this.property).toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."))
}else if('space'==thousands_separator){
el.text(Math.floor(this.property).toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "))
}else{
el.text(Math.floor(this.property));
}}
});
if(typeof this.destroy!=='undefined'&&$.isFunction(this.destroy)){
this.destroy();
}}
}}
},
{
name: 'Infinite Scroll | Blog & Portfolio',
location: '.mfn-infinite-load-button',
infiniteLoadButton: $('.mfn-infinite-load-button a'),
beforeActive: ()=> {},
afterActive: ({infiniteLoadButton})=> {
},
settings: ({infiniteLoadButton, location})=> {
return {
handler: function(direction){
infiniteScrollFunction($(location), infiniteLoadButton, direction);
},
offset: function(){
var offsetPosition=-(($(this)[0].element.scrollHeight) - (window.innerHeight / 1.2));
return offsetPosition;
}}
}},
{
name: 'Bars List',
location: '.bars_list',
beforeActive: ()=> {},
afterActive: ({infiniteLoadButton})=> {},
settings: ()=> {
return {
offset: '100%',
triggerOnce: true,
handler: function(){
var el=$(this.element).length ? $(this.element):$(this);
el.addClass('hover');
if(typeof this.destroy!=='undefined'&&$.isFunction(this.destroy)){
this.destroy();
}}
}}
}
]
}
runWaypoints(){
const waypoints=this.getList;
waypoints.map(item=> {
if($(item.location).length){
item.beforeActive(item)
queueMicrotask(()=> $(item.location).waypoint(item.settings(item)));
item.afterActive(item);
}})
}}
const mfnWaypoints=new Waypoints;
mfnWaypoints.runWaypoints();
$(document).on('mfn:waypoints', function(){
mfnWaypoints.runWaypoints();
})
if($('.promo_bar_slider').length){
promoBarSlider();
}
if($('.mfn-looped-items-slider').length){
queryLoopSlider();
}
headerTemplate.init();
footerTemplate.init();
bannerBox.init();
mfnSideMenu.init();
mfnReadMore.init();
if($('.mfn-menu-item-megamenu').length){
headerMegamenu.init();
}
function sidebarSticky(){
var spacing=fixStickyHeaderH();
if(! mfn.sidebarSticky){
return false;
}
if($('.woocommerce-store-notice').length){
spacing +=$('.woocommerce-store-notice').outerHeight()||0;
}
sidebar=$('.mcb-sidebar .widget-area').stickySidebar({
topSpacing: spacing
});
}
sidebarSticky();
$(window).on('debouncedresize', function(){
if($(window).width() < 767){
screen='mobile';
}else if($(window).width() < 959){
screen='tablet';
}else if($(window).width() > 960){
screen='desktop';
}
bannerBox.init();
newWidth=$(window).width();
if(newWidth!=currWidth){
currWidth=$(window).width();
headerTemplate.init();
footerTemplate.init();
}
if($(window).width() < 767&&!$('.mfn-off-canvas-sidebar').length){
offCanvasSidebar.mobile();
}else{
$('html').removeClass('mfn-ofcs-opened');
}});
$('.overlay-menu-toggle').on('click',function(e){
e.preventDefault();
$(this).toggleClass('focus');
$('#Overlay').stop(true, true).fadeToggle(500);
var menuH=$('#Overlay nav').height()||0;
menuH=menuH / 2;
$('#Overlay nav').css('margin-top', '-' + menuH + 'px');
});
$('#Overlay').on('click', '.menu-item > a', function(){
$('.overlay-menu-toggle').trigger('click');
});
$('.header-overlay').on('keydown', function(event){
if(27==event.keyCode){
$('.overlay-menu-toggle.focus').trigger('click');
}});
$('.responsive-menu-toggle').on('click', function(e){
e.preventDefault();
var el=$(this);
var menu=$('#Top_bar #menu');
var menuWrap=menu.closest('.top_bar_left');
el.toggleClass('active');
if(el.hasClass('is-sticky')&&el.hasClass('active')&&(window.innerWidth < 768)){
var top=0;
if(menuWrap.length){
top=menuWrap.offset().top - adminBarH();
}
$('body,html').animate({
scrollTop: top
}, 200);
}
menu.stop(true, true).slideToggle(200);
});
$('#Top_bar #menu').on('click', 'a:not(.menu-toggle)', function(){
var $menuButton=$('.responsive-menu-toggle.active');
if($menuButton.length){
setTimeout(function(){
$menuButton.trigger('click');
},300);
}});
function sideSlide(){
var slide=$('#Side_slide');
var overlay=$('#body_overlay');
var ssMobileInitW=mobileInitW;
var pos='right';
var shiftSlide=-slide.data('width');
var shiftBody=shiftSlide / 2;
var constructor=function(){
if(!slide.hasClass('enabled')){
$('nav#menu').detach().appendTo('#Side_slide .menu_wrapper');
slide.addClass('enabled');
}};
var destructor=function(){
if(slide.hasClass('enabled')){
close();
$('nav#menu').detach().prependTo('#Top_bar .menu_wrapper');
slide.removeClass('enabled');
}};
var reload=function(){
if(window.innerWidth < ssMobileInitW){
constructor();
}else if($('body').hasClass('header-shop')){
if($('#Top_bar').hasClass('is-sticky')){
$(document).trigger('mfn:header:sticky:on');
}else{
$(document).trigger('mfn:header:sticky:off');
}}else{
destructor();
}};
var init=function(){
if(slide.hasClass('left')){
pos='left';
}
if($('body').hasClass('responsive-off')){
ssMobileInitW=0;
}
if($('body').hasClass('header-simple')){
ssMobileInitW=9999;
}
if($('#Top_bar').hasClass('is-sticky')){
$(document).trigger('mfn:header:sticky:on');
}
reload();
};
var reset=function(time){
$('.lang-active.active', slide).removeClass('active').children('i').attr('class', 'icon-down-open-mini');
$('.lang-wrapper', slide).fadeOut(0);
$('.icon.search.active', slide).removeClass('active');
$('.search-wrapper', slide).fadeOut(0);
$('.menu_wrapper, .social', slide).fadeIn(time);
};
var button=function(){
if(pos=='left'){
slide.animate({
'left': 0
}, 300);
$('body').animate({
'right': shiftBody
}, 300);
}else{
slide.animate({
'right': 0
}, 300);
$('body').animate({
'left': shiftBody
}, 300);
}
overlay.fadeIn(300);
$('body').addClass('side-slide-is-open');
reset(0);
};
var close=function(){
if(pos=='left'){
slide.animate({
'left': shiftSlide
}, 300);
$('body').animate({
'right': 0
}, 300);
}else{
slide.animate({
'right': shiftSlide
}, 300);
$('body').animate({
'left': 0
}, 300);
}
overlay.fadeOut(300);
$('body').removeClass('side-slide-is-open');
if($('body').hasClass('keyboard-support')){
$('#Side_slide').attr('aria-expanded', 'false');
}
if($('rs-module').length){
setTimeout(function(){
$(window).trigger('resize');
redrawAllRevolutionSliders();
}, 310);
}};
$('.icon.search', slide).on('click', function(e){
e.preventDefault();
var el=$(this);
if(el.hasClass('active')){
$('.search-wrapper', slide).fadeOut(0);
$('.menu_wrapper, .social', slide).fadeIn(300);
}else{
$('.search-wrapper', slide).fadeIn(300);
$('.menu_wrapper, .social', slide).fadeOut(0);
$('.lang-active.active', slide).removeClass('active').children('i').attr('class', 'icon-down-open-mini');
$('.lang-wrapper', slide).fadeOut(0);
}
el.toggleClass('active');
});
$('a.submit', slide).on('click', function(e){
e.preventDefault();
$('#side-form').submit();
});
$('.lang-active', slide).on('click', function(e){
e.preventDefault();
var el=$(this);
if(el.hasClass('active')){
$('.lang-wrapper', slide).fadeOut(0);
$('.menu_wrapper, .social', slide).fadeIn(300);
el.children('i').attr('class', 'icon-down-open-mini');
}else{
$('.lang-wrapper', slide).fadeIn(300);
$('.menu_wrapper, .social', slide).fadeOut(0);
el.children('i').attr('class', 'icon-up-open-mini');
$('.icon.search.active', slide).removeClass('active');
$('.search-wrapper', slide).fadeOut(0);
}
el.toggleClass('active');
});
$('.responsive-menu-toggle').off('click');
$('.responsive-menu-toggle').on('click', function(e){
e.preventDefault();
button();
});
overlay.on('click', function(e){
close();
});
$('.close', slide).on('click', function(e){
e.preventDefault();
close();
});
$(slide).on('click', '.menu_wrapper a:not(.menu-toggle), .action_button', function(e){
if($(this).hasClass('mega-menu-link')){
return;
}
if('#'==$(this).attr('href')){
e.preventDefault();
return;
}
setTimeout(function(){
close();
},500);
});
$(slide).on('click', function(e){
if($(e.target).is(slide)){
reset(300);
}});
$(window).on('debouncedresize', reload);
if($('body').hasClass('header-shop')){
$(document).on('mfn:header:sticky:on', function(){
if(window.innerWidth >=ssMobileInitW){
$('#Top_bar .menu_wrapper').css('min-height', '70px');
constructor();
}});
$(document).on('mfn:header:sticky:off', function(){
if(window.innerWidth >=ssMobileInitW){
destructor();
}});
}
init();
}
if($('body').hasClass('mobile-side-slide')){
sideSlide();
}
msnryGalleryInit();
$('.sections_group .wp-block-gallery').each(function(index){
var el=$(this);
var link=$('.blocks-gallery-item a, .wp-block-image a', el);
if((/\.(gif|jpg|jpeg|png)$/i).test(link.attr('href'))){
link.attr('rel', 'prettyphoto[wp5-gallery-' + index + ']');
}});
$('.widget_media_gallery .gallery').each(function(){
var el=$(this);
var id=el.attr('id');
$('.gallery-icon a', el).attr('rel', 'prettyphoto[widget-' + id + ']');
});
$('a[rel^="prettyphoto[portfolio]"]').each(function(){
var el=$(this);
var parent=el.closest('.column');
var index=$('.column').index(parent);
el.attr('rel', 'prettyphoto[portfolio-' + index + ']');
});
$('.elementor-page .woocommerce-product-gallery .woocommerce-product-gallery__image a').attr('href','');
function lightbox(){
var galleries=[];
var init=function(){
if(lightboxAttr){
compatibility();
setType();
constructor();
}};
var compatibility=function(){
$('a[rel^="prettyphoto"], a.prettyphoto, a[rel^="prettyphoto"]').each(function(){
var el=$(this);
var rel=el.attr('rel');
if(rel){
rel=rel.replace('prettyphoto', 'lightbox');
}else{
rel='lightbox';
}
el.removeClass('prettyphoto').attr('rel', rel);
});
};
var isGallery=function(rel){
if(!rel){
return false;
}
var regExp=/\[(?:.*)\]/;
var gallery=regExp.exec(rel);
if(gallery){
gallery=gallery[0];
gallery=gallery.replace('[', '').replace(']', '');
return gallery;
}
return false;
};
var setGallery=function(gallery){
if(galleries.indexOf(gallery)==-1){
galleries.push(gallery);
return true;
}
return false;
};
var getType=function(src){
if(src.match(/youtube\.com\/watch/i)||src.match(/youtube\.com\/embed/i)||src.match(/youtu\.be/i)){
return 'iframe';
}else if(src.match(/youtube-nocookie\.com/i)){
return 'iframe';
}else if(src.match(/vimeo\.com/i)){
return 'iframe';
}else if(src.match(/\biframe=true\b/i)){
return 'ajax';
}else if(src.match(/\bajax=true\b/i)){
return 'ajax';
}else if(src.match(/\.mp4/i)){
return 'mp4';
}else if(src.substr(0, 1)=='#'){
return 'inline';
}else{
return 'image';
}};
var setType=function(){
$('a[rel^="lightbox"]').each(function(){
var el=$(this);
var href=el.attr('href');
var rel=el.attr('rel');
if(el.closest('.wpb_column').length){
}
if(href){
var gallery=isGallery(rel);
if(gallery){
el.attr('data-lightbox-type', 'gallery');
setGallery(gallery);
return true;
}
el.attr('data-lightbox-type', getType(href));
if(getType(href)=='iframe'){
el.attr('href', href.replace('&rel=0', ''));
}}
});
};
var constructor=function(){
if(!galleries.length
&& !$('a[rel^="lightbox"][data-lightbox-type="image"]').length
&& !$('a[rel^="lightbox"][data-lightbox-type="iframe"]').length
&& !$('a[rel^="lightbox"][data-lightbox-type="inline"]').length
&& !$('a[rel^="lightbox"][data-lightbox-type="mp4"]').length
&& !$('a[rel^="pdf-lightbox"]').length
) return;
var attr={
autoFocusLast: false,
removalDelay: 160,
image: {
titleSrc: function(item){
var img=item.el.closest('.image_wrapper, li').find('img').first();
if(lightboxAttr.title&&img.length){
return img.attr('alt');
}else{
return false;
}}
}};
$('a[rel^="lightbox"][data-lightbox-type="image"]').magnificPopup({
autoFocusLast: attr.autoFocusLast,
removalDelay: attr.removalDelay,
type: 'image',
image: attr.image
});
$('a[rel^="lightbox"][data-lightbox-type="iframe"]').magnificPopup({
autoFocusLast: attr.autoFocusLast,
removalDelay: attr.removalDelay,
type: 'iframe',
iframe: {
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1&rel=0'
},
youtu_be: {
index: 'youtu.be/',
id: '/',
src: '//www.youtube.com/embed/%id%?autoplay=1&rel=0'
},
nocookie: {
index: 'youtube-nocookie.com/embed/',
id: '/',
src: '//www.youtube-nocookie.com/embed/%id%?autoplay=1&rel=0'
}}
}});
$('a[rel^="lightbox"][data-lightbox-type="mp4"]').magnificPopup({
autoFocusLast: attr.autoFocusLast,
removalDelay: attr.removalDelay,
type: 'iframe',
iframe: {
markup: '<div class="mfp-mp4 popup-content">'+
'<video controls mute autoplay>'+
'<source class="mfp-source" type="video/mp4">'+
'</video>'+
'<div class="mfp-close"></div>'+
'</div>',
patterns: {
mp4: {
src: '%id%',
}},
srcAction: 'source_src',
}});
$('a[rel^="pdf-lightbox"]').magnificPopup({
autoFocusLast: attr.autoFocusLast,
removalDelay: attr.removalDelay,
type: 'iframe'
});
$('a[rel^="lightbox"][data-lightbox-type="inline"]').magnificPopup({
autoFocusLast: attr.autoFocusLast,
type: 'inline',
midClick: true,
callbacks: {
open: function(){
$('.mfp-content').children().addClass('mfp-inline')
},
beforeClose: function(){
$('.mfp-content').children().removeClass('mfp-inline');
}}
});
for (var i=0, len=galleries.length; i < len; i++){
var gallery='[' + galleries[i] + ']';
gallery='a[rel^="lightbox' + gallery + '"]:visible';
$(gallery).magnificPopup({
autoFocusLast: attr.autoFocusLast,
removalDelay: attr.removalDelay,
type: 'image',
image: attr.image,
gallery: {
enabled: true,
tCounter: '<span class="mfp-counter">%curr% / %total%</span>'
}});
}
$('.elementor-page a[rel^="lightbox"]:not(.popup-link):not(.rs-layer):not([data-lightbox-type="iframe"])').off('click');
setTimeout(function(){
var $doc=$('body');
var $events=$._data($doc[0],"events");
if($events&&$events.click){
for(var i=$events.click.length-1; i>=0; i--){
var handler=$events.click[i];
if(handler&&handler.selector&&handler.selector.indexOf('lightbox')!==-1){
$('.wpb_column a[rel^="lightbox"]:not(.popup-link)').off('click');
}}
}},0);
};
var reload=function(){
$('a[rel^="lightbox"]').off('click');
constructor();
};
init();
mfnIsotope.addEventListener('arrange', reload);
$(document).ajaxComplete(function(){
reload();
});
}
lightbox();
$(document).on('mfnPopupInit', function(){
lightbox();
});
$(document).on('mfn:tabber:open', function(){
lightbox();
});
function mainMenu(){
var mmMobileInitW=mobileInitW;
if($('body').hasClass('header-simple')||$('#Header_creative.dropdown').length){
mmMobileInitW=9999;
}
$('#menu > ul.menu').mfnMenu({
addLast: true,
arrows: true,
mobileInit: mmMobileInitW,
responsive: mfn.responsive
});
$('#secondary-menu > ul.secondary-menu').mfnMenu({
mobileInit: mmMobileInitW,
responsive: mfn.responsive
});
}
mainMenu();
function onePageScroll(){
if(!$('body').hasClass('one-page')){
var menu=$('#menu');
if(menu.find('li.scroll').length > 1){
menu.find('li.current-menu-item:not(:first)').removeClass('current-menu-item currenet-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor');
menu.on('click','a',function(){
$(this).closest('li').siblings('li').removeClass('current-menu-item currenet-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor');
$(this).closest('li').addClass('current-menu-item');
});
}}
}
onePageScroll();
function onePageMenu(){
if($('body').hasClass('one-page')){
var menu=$('#menu');
if($('#mfn-header-template').length) menu=$('#mfn-header-template .mfn-header-menu');
$('a[href]', menu).each(function(){
var url=$(this).attr('href');
if(url&&url.split('#')[1]){
var hash='#' + url.split('#')[1];
if(hash&&$(hash).length){
$(this).attr('data-hash', hash);
$(hash).attr('data-id', hash);
}
var vcHash='#' + url.split('#')[1];
var vcClass='.vc_row.' + url.split('#')[1];
if(vcClass&&$(vcClass).length){
$(this).attr('data-hash', vcHash);
$(vcClass).attr('data-id', vcHash);
}}
});
var hash;
var activeSelector='li.current-menu-item, li.current-menu-parent, li.current-menu-ancestor, li.current-page-ancestor, li.current_page_item, li.current_page_parent, li.current_page_ancestor';
var activeClasses='current-menu-item current-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor';
if($(activeSelector, menu).length){
$(activeSelector, menu)
.not(':first').removeClass(activeClasses);
hash=$(activeSelector, menu).find('a[data-hash]').attr('data-hash');
if(hash){
hash='[data-id="' + hash + '"]';
if($(hash).length&&$(hash).visible(true)){
}else{
$(activeSelector, menu).removeClass('current-menu-item current-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor')
.closest('li').removeClass('current-menu-item current-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor');
}}else{
}}else{
var first=$('li:first-child', menu);
var firstA=first.children('a');
if(firstA.attr('data-hash')){
hash=firstA.attr('data-hash');
hash='[data-id="' + hash + '"]';
if($(hash).length&&($(hash).offset().top==adminBarH())){
first.addClass('current-menu-item');
}}
}
var menu_item=$('#menu a[data-hash]');
if($('#mfn-header-template').length) menu_item=$('#mfn-header-template .mfn-header-menu a[data-hash]');
menu_item.on('click', function(e){
e.preventDefault();
if($('html').hasClass('mfn-header-tmpl-burger-sidebar-opened')){
$('html').removeClass('mfn-header-tmpl-burger-sidebar-opened scrollbar-hidden');
}
menu.find('li').removeClass('current-menu-item');
$(this)
.closest('li').addClass('current-menu-item')
.closest('.menu > li').addClass('current-menu-item');
var hash=$(this).attr('data-hash');
hash='[data-id="' + hash + '"]';
if(window.innerWidth < 768){
$('.responsive-menu-toggle').removeClass('active');
$('#Top_bar #menu').hide();
}
var headerFixedAbH=$('.header-fixed.ab-show #Action_bar').innerHeight()||0;
var tabsHeaderH=$(hash).siblings('.ui-tabs-nav').innerHeight()||0;
var offset=headerFixedAbH + tabsHeaderH + adminBarH();
var stickyH=fixStickyHeaderH();
if($('body').hasClass('header-below')&&$('#Content').length){
if($(hash).offset().top < ($('#Content').offset().top + 60)){
stickyH=-1;
}}
$('html, body').animate({
scrollTop: $(hash).offset().top - offset - stickyH
}, 500);
if($(this).closest('.column_header_burger').length){
$('body').trigger('click');
}});
}}
onePageMenu();
var cHeader='body:not(.header-open) #Header_creative',
cHeaderEl=$(cHeader),
cHeaderCurrnet;
function creativeHeader(){
$('.creative-menu-toggle').on('click', function(e){
e.preventDefault();
cHeaderEl.addClass('active');
$('.creative-menu-toggle, .creative-social', cHeaderEl).fadeOut(500);
$('#Action_bar', cHeaderEl).fadeIn(500);
});
}
creativeHeader();
$(document).on('mouseenter', cHeader, function(){
cHeaderCurrnet=1;
});
$(document).on('mouseleave', cHeader, function(){
cHeaderCurrnet=null;
setTimeout(function(){
if(!cHeaderCurrnet){
cHeaderEl.removeClass('active');
$('.creative-menu-toggle, .creative-social', cHeaderEl).fadeIn(500);
$('#Action_bar', cHeaderEl).fadeOut(500);
}}, 1000);
});
function creativeHeaderFix(){
if($('body').hasClass('header-creative')&&window.innerWidth >=768){
if($('#Top_bar').hasClass('is-sticky')){
$('#Top_bar').removeClass('is-sticky');
}}
}
$(document).on("click", ".mfn-header-tmpl .mfn-header-menu-toggle", function(e){
e.preventDefault();
if($(this).closest('.mcb-column').hasClass('mfn-header-tmpl-menu-active')){
$(document).unbind('click', hideSidebarTmplBurger);
$(this).closest('.mcb-column').removeClass('mfn-header-tmpl-menu-active');
removeBringToFront();
if($('.mfn-header-tmpl-classic-menu').length) $('.mfn-header-tmpl-classic-menu').remove();
$(this).closest('.mcb-column-inner').find('.mfn-header-tmpl-menu-sidebar').attr('aria-expanded', false);
$('html').removeClass('mfn-header-tmpl-burger-sidebar-opened scrollbar-hidden');
}else{
$(document).bind('click', hideSidebarTmplBurger);
$(this).closest('.mcb-column').addClass('mfn-header-tmpl-menu-active');
$(this).closest('.mcb-column').addClass('mfn-bring-to-front');
$(this).closest('.mcb-wrap').addClass('mfn-bring-to-front');
$(this).closest('.mcb-section').addClass('mfn-bring-to-front');
$(this).closest('.mcb-column-inner').find('.mfn-header-tmpl-menu-sidebar').attr('aria-expanded', true);
if($(this).closest('.mcb-column-inner').find('.mfn-header-classic-mobile-menu').length){
var offset_top=$(this).closest('.section').offset().top + $(this).closest('.section').outerHeight() - $(window).scrollTop();
$('body').append('<style class="mfn-header-tmpl-classic-menu">.mfn-header-tmpl-menu-sidebar.mfn-header-classic-mobile-menu{ top: '+offset_top+'px; max-height: '+($(window).height() - offset_top)+'px} .column_header_burger.mfn-header-tmpl-menu-active:before{ top: '+offset_top+'px; max-height: '+($(window).height() - offset_top)+'px}</style>');
}
$('html').addClass('mfn-header-tmpl-burger-sidebar-opened');
var htmlW=$('html').width();
if($('html').width()!=htmlW){
$('html').addClass('scrollbar-hidden');
}}
});
$(document).on("click", ".mfn-header-tmpl-menu-sidebar .mfn-header-menu .mfn-menu-li a", function (e){
if($(this).closest('#mfn-header-template').length) return;
const $a=$(this);
const href=$a.attr("href")||"";
const $html=$("html");
const $header=$(".mfn-header-tmpl.mfn-header-main");
if(href==="#"){
e.preventDefault();
$a.closest("li").toggleClass("current-menu-item");
return;
}
let hash="";
const hashIndex=href.indexOf("#");
if(hashIndex!==-1) hash=href.slice(hashIndex + 1);
if(!hash) return;
const $target=$("#" + CSS.escape(hash));
if(!$target.length) return;
e.preventDefault();
const isFixedOrSticky =
$header.hasClass("mfn-header-tmpl-fixed")||$header.hasClass("mfn-hasSticky");
const headerH=isFixedOrSticky ? $header.outerHeight():0;
const $li=$a.closest("li");
$li.closest("ul").find("li.current-menu-item").removeClass("current-menu-item");
$li.addClass("current-menu-item");
const scrollOffset=$target.offset().top - headerH;
$("html, body").stop(true).animate({ scrollTop: scrollOffset }, 500);
$(document).off("click", hideSidebarTmplBurger);
$a.closest(".mcb-column").removeClass("mfn-header-tmpl-menu-active");
removeBringToFront();
if($html.hasClass("mfn-header-tmpl-burger-sidebar-opened")){
$html.removeClass("mfn-header-tmpl-burger-sidebar-opened scrollbar-hidden");
}}
);
$(document).on("click", ".mfn-off-canvas-sidebar .widget_nav_menu ul.menu li a", function(e){
let href=$(this).attr('href');
if($(href).length&&href.startsWith("#")){
e.preventDefault();
let header_h=0;
if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-tmpl-fixed')||$('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-hasSticky')){
header_h=$('.mfn-header-tmpl.mfn-header-main').outerHeight();
}
$(this).closest('ul').find('li.current-menu-item').removeClass('current-menu-item');
$(this).closest('li').addClass('current-menu-item');
let scroll_offset=$(href).offset().top - header_h;
$('body, html').animate({ scrollTop: scroll_offset }, 500);
if($('html').hasClass('mfn-ofcs-opened')){
$('html').removeClass('mfn-ofcs-opened');
}}
});
function hideSidebarTmplBurger(e){
var div=$('.mfn-header-tmpl-menu-sidebar');
if(!div.is(e.target)&&div.has(e.target).length===0){
$('.mfn-header-tmpl-menu-active').removeClass('mfn-header-tmpl-menu-active');
div.attr('aria-expanded', 'false');
$(document).unbind('click', hideSidebarTmplBurger);
removeBringToFront();
if($('.mfn-header-tmpl-classic-menu').length) $('.mfn-header-tmpl-classic-menu').remove();
$('html').removeClass('mfn-header-tmpl-burger-sidebar-opened scrollbar-hidden');
}}
function removeBringToFront(){
if($('.mfn-bring-to-front').length){
$('.mfn-bring-to-front').removeClass('mfn-bring-to-front');
}}
$(document).on("click", "body:not(.mfn-ui) .mfn-sidemenu-tmpl .mfn-searchbar-toggle, body:not(.mfn-ui) .mfn-header-tmpl .mfn-searchbar-toggle, .mfn-header-tmpl .search_wrapper .mfn-close-icon, .mfn-sidemenu-tmpl .search_wrapper .mfn-close-icon", function(e){
e.preventDefault();
if($(this).closest('.mcb-column-inner').hasClass('mfn-searchbar-active')){
$(this).closest('.mcb-column-inner').removeClass('mfn-searchbar-active');
$('html').removeClass('mfn-popup-browser-scroll-disabled');
$('body').removeClass('search-overlay-opened');
removeBringToFront();
}else{
$(this).closest('.mcb-column-inner').addClass('mfn-searchbar-active');
$(this).closest('.mcb-column').addClass('mfn-bring-to-front');
$(this).closest('.mcb-wrap').addClass('mfn-bring-to-front');
$(this).closest('.mcb-section').addClass('mfn-bring-to-front');
if($(this).closest('.mcb-column-inner').find('input.field').length){
$(this).closest('.mcb-column-inner').find('input.field').focus();
}
if($('body').hasClass('search-scroll-disable')){
$('html').addClass('mfn-popup-browser-scroll-disabled');
}
$('body').addClass('search-overlay-opened');
}});
$(".search_button:not(.has-input), #Top_bar .icon_close").on('click', function(e){
e.preventDefault();
if($(this).closest('.mfn-header-tmpl').length){
$(this).closest('.mcb-column').toggleClass('mfn-searchbar-active');
}else{
const search=$('.search_wrapper')
if(search.css('display')==='none'){
search.fadeIn().find('.field').focus();
if($('body').hasClass('search-scroll-disable')){
$('html').addClass('mfn-popup-browser-scroll-disabled');
}
$('body').addClass('search-overlay-opened');
setTimeout(function(){ search.addClass('mfn-loaded') }, 300);
}else{
search.fadeOut().removeClass('mfn-loaded');
$('html').removeClass('mfn-popup-browser-scroll-disabled');
$('body').removeClass('search-overlay-opened');
}}
});
$(document).on('keydown', function(e){
if(e.key==='Escape'&&$('.search_wrapper').is(':visible')&&$('body').hasClass('search-overlay-opened')){
$('.search_wrapper .icon_close').trigger('click');
}});
function mfnWPML(){
$('#menu .menu-item-language:not(.menu-item-language-current)').each(function(){
var el=$(this).children('a');
if(!el.children('span:not(.icl_lang_sel_bracket)').length){
el.wrapInner('<span></span>');
}});
$('#menu span.icl_lang_sel_bracket').each(function(){
var el=$(this);
el.replaceWith(el.html());
});
}
mfnWPML();
function breadcrumbsRemoveLastLink(){
if(!$('.breadcrumbs.no-link').length) return;
$('.breadcrumbs.no-link').each(function(){
var el=$(this).find('li').last();
var text=el.text();
el.html(text);
});
}
breadcrumbsRemoveLastLink();
$('.downcount:not(.mfn-initialized)').each(function(){
var el=$(this);
el.addClass('mfn-initialized');
el.downCount({
date: el.attr('data-date'),
offset: el.attr('data-offset')
});
});
$('.tooltip, .hover_box')
.on('touchstart', function(){
$(this).toggleClass('hover');
})
.on('touchend', function(){
$(this).removeClass('hover');
});
$("#popup_contact .footer_button").on('click', function(e){
e.preventDefault();
$(this).parent().toggleClass('focus');
});
if($('#Header_creative.scroll').length&&window.innerWidth >=1240){
$('#Header_creative.scroll').niceScroll({
autohidemode: false,
cursorborder: 0,
cursorborderradius: 5,
cursorcolor: '#222222',
cursorwidth: 0,
horizrailenabled: false,
mousescrollstep: 40,
scrollspeed: 60
});
}
$('.sliding-top-control').on('click', function(e){
e.preventDefault();
$('#Sliding-top .widgets_wrapper').slideToggle();
$('#Sliding-top').toggleClass('active');
});
$('body').on('click', '.alert .close', function(e){
e.preventDefault();
$(this).closest('.alert').hide(300);
});
$('.fixed-nav').appendTo('body');
$('.feature_list').each(function(){
var col=$(this).attr('data-col') ? $(this).attr('data-col'):4;
$(this).find('li:nth-child(' + col + 'n):not(:last-child)').after('<hr />');
});
function checkIE(){
var ua=window.navigator.userAgent;
var msie=ua.indexOf("MSIE ");
if(msie > 0&&parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)))==9){
$("body").addClass("ie");
}}
checkIE();
var ua=navigator.userAgent,
isMobileWebkit=/WebKit/.test(ua)&&/Mobile/.test(ua);
if(! isMobileWebkit&&window.innerWidth >=768){
if(mfn.parallax=='stellar'){
$.stellar({
horizontalScrolling: false,
responsive: true
});
}else{
$(window).enllax();
}}else{
$('div[data-enllax-ratio], div[data-stellar-ratio]').css('background-attachment', 'scroll');
}
if($('.mfn-query-pagination-infiniteload .next').length){
var mfnQueryPaginationWaypoint=new Waypoint({
element: $('.mfn-query-pagination-infiniteload .next'),
handler: function(direction){
$(this.element).trigger('click');
},
offset: '100%'
})
}
if($('.mfn-query-pagination-loadmore .next').length){
$(document).on('click', '.mfn-query-pagination-loadmore .next', function(e){
e.preventDefault();
if($(this).hasClass('loading')) return;
let button=$(this);
let wrapper='.'+button.closest('.mcb-section').attr('class').replaceAll('  ', '.').replaceAll(' ', '.');
let href=button.attr('href');
button.addClass('loading');
$.get(href, function(data){
$(wrapper+' .section_wrapper').append($(wrapper+' .section_wrapper', data).html());
if($(wrapper+' .mfn-query-pagination', data).length) $(wrapper+' .mfn-query-pagination').replaceWith($(wrapper+' .mfn-query-pagination', data));
if($(wrapper+' .isotope').length){
$(wrapper+' .isotope').imagesLoaded().progress(function(){
$(wrapper+' .isotope').isotope('reloadItems');
});
}
lightbox();
if($(wrapper).find('.mfn-query-loop-masonry').length){
queryLoopMasonry();
}
if($(wrapper+' .mfn-query-pagination').hasClass('mfn-query-pagination-infiniteload')){
mfnQueryPaginationWaypoint.destroy();
$(wrapper).imagesLoaded(function(){
$(window).trigger('resize');
if($('.mfn-query-pagination-infiniteload .next').length){
mfnQueryPaginationWaypoint=new Waypoint({
element: $('.mfn-query-pagination-infiniteload .next'),
handler: function(direction){
$(this.element).trigger('click');
},
offset: '100%'
})
}});
}});
});
}
$(document).on('click', '.pager_load_more', function(e){
e.preventDefault();
var el=$(this);
var pager=el.closest('.pager_lm');
var href=el.attr('href');
var index=$('.content_wrapper .lm_wrapper').index(el.closest('.mcb-column-inner').find('.lm_wrapper'));
el.fadeOut(50);
pager.addClass('loading');
$.get(href, function(data){
var content=$('.content_wrapper .lm_wrapper', data).eq(index).html();
var $content;
if(content.indexOf('<')===-1){
$content=$('<div>').text(content);
}else{
$content=$(content);
}
href=$('.content_wrapper .lm_wrapper:eq(' + index + ')', data).next().find('.pager_load_more').attr('href');
if($('.content_wrapper .lm_wrapper:eq(' + index + ')').hasClass('isotope')){
const location='.content_wrapper .lm_wrapper:eq(' + index + ')';
$(location).append($content);
mfnIsotope.queryIsotopeAPI(location, 'appended', $content);
mfnIsotope.addIsotopeLocation({ name: 'Load More - Ajax', location });
if($(location).find('.isotope-item').length){
$(location).imagesLoaded().progress(function(){
$(location).isotope('reloadItems');
});
}}else if($('.content_wrapper .lm_wrapper:eq(' + index + ')').hasClass('mfn-woo-products')){
if(typeof href==='undefined'){
href=$('.content_wrapper .lm_wrapper:eq(' + index + ') .pager_load_more', data).attr('href');
}
$('.content_wrapper .lm_wrapper:eq(' + index + ') ul.products').append($content.html());
var $listing=$('.content_wrapper .lm_wrapper:eq(' + index + ') ul.products.isotope');
if($listing.length){
$listing.imagesLoaded().progress(function(){
$listing.isotope('reloadItems');
});
}}else{
$content.hide().appendTo('.content_wrapper .lm_wrapper:eq(' + index + ')').fadeIn(1000);
}
pager.removeClass('loading');
if(href){
el.fadeIn();
el.attr('href', href);
}
lightbox();
if($('.lm_wrapper.isotope').length){
$('.lm_wrapper.isotope').imagesLoaded().progress(function(){
mfnIsotope.queryIsotopeAPI('.lm_wrapper.isotope');
});
}});
});
$('.filters_buttons .open').on('click', function(e){
e.preventDefault();
var type=$(this).closest('li').attr('class');
$('.filters_wrapper').show(200);
$('.filters_wrapper ul.' + type).show(200);
$('.filters_wrapper ul:not(.' + type + ')').hide();
});
$('.filters_wrapper .close a').on('click', function(e){
e.preventDefault();
$('.filters_wrapper').hide(200);
});
$('.portfolio_next_js').on('click', function(e){
e.preventDefault();
var item=$(this).closest('.portfolio-item').next();
if(item.length){
$('html, body').animate({
scrollTop: item.offset().top - fixStickyHeaderH()
}, 500);
}});
$('.portfolio_prev_js').on('click', function(e){
e.preventDefault();
var item=$(this).closest('.portfolio-item').prev();
if(item.length){
$('html, body').animate({
scrollTop: item.offset().top - fixStickyHeaderH()
}, 500);
}});
$('body').on('click', '.scroll > a, a.scroll, .mcb-column.scroll a', function(e){
var urlL=location.href.replace(/#.*/, '');
var urlT=this.href.replace(/#.*/, '');
if(urlL==urlT){
e.preventDefault();
}
var hash=this.hash;
var headerFixedAbH=$('.header-fixed.ab-show #Action_bar').innerHeight()||0;
var tabsHeaderH=$(hash).siblings('.ui-tabs-nav').innerHeight()||0;
var offset=headerFixedAbH + tabsHeaderH + adminBarH();
if($(this).parents('.table_of_content').length){
offset +=30;
}
if(hash&&$(hash).length){
$('html, body').animate({
scrollTop: $(hash).offset().top - offset - fixStickyHeaderH()
}, 500);
}});
$('.jq-tabs').tabs();
$('.fake-tabs > ul').on('click', 'a', function(e){
e.preventDefault();
var $li=$(this).closest('li');
var tab=$li.data('tab');
if($li.hasClass('active')){
return;
}
$li.addClass('active')
.siblings().removeClass('active');
$('.tab-'+ tab).addClass('active').attr('tabindex', 0)
.siblings('.tab').removeClass('active').attr('tabindex', -1);
$(window).trigger('resize');
});
$('body').on('click', '.mfn-toggle .toggle-bar', function(){
var $parent=$(this).parent(),
$toggle=$(this).closest('.mfn-toggle');
var speed=100;
if($parent.hasClass('active')){
if($toggle.is('.mfn-toggle-open-all')){
return;
}
$parent.removeClass('active')
.children('.toggle-content').slideUp(speed);
}else{
$parent.addClass('active')
.children('.toggle-content').slideDown(speed);
if(! $toggle.is('.mfn-toggle-open-more')){
$parent.siblings().removeClass('active')
.children('.toggle-content').slideUp(speed);
}}
setTimeout(function(){
$(window).trigger('resize');
}, speed);
});
$('.mfn-acc').each(function(){
var el=$(this);
if(el.hasClass('openAll')||el.find('.wpb_toggle_title_active').length){
el.find('.question')
.addClass('active')
.children(".answer")
.show();
}else{
var activeTab=el.attr('data-active-tab');
if(el.hasClass('open1st')) activeTab=1;
if(activeTab){
el.find('.question').eq(activeTab - 1)
.addClass('active')
.children(".answer")
.show();
}}
});
$('.mfn-acc .question > .title').on('click', function(){
if($(this).parent().hasClass('active')){
$(this).parent().removeClass('active').children(".answer").slideToggle(100);
}else{
if(!$(this).closest('.mfn-acc').hasClass('toggle')){
$(this).parents(".mfn-acc").children().each(function(){
if($(this).hasClass('active')){
$(this).removeClass('active').children(".answer").slideToggle(100);
}});
}
$(this).parent().addClass('active');
$(this).next(".answer").slideToggle(100);
}
setTimeout(function(){
$(window).trigger('resize');
}, 50);
});
$('.wpb_wrapper .vc_tta-panel-title').on('click', 'a', function(){
setTimeout(function(){
$(window).trigger('resize');
}, 50);
});
$('.helper .link.toggle').on('click', function(e){
e.preventDefault();
var el=$(this);
var id=el.attr('data-rel');
var parent=el.closest('.helper');
if(el.hasClass('active')){
el.removeClass('active');
parent.find('.helper_content > .item-' + id).slideUp(200);
setTimeout(function(){
parent.find('.helper_content > .item-' + id).removeClass('active');
}, 200);
}else{
parent.find('.links > .link.active').removeClass('active');
parent.find('.helper_content > .item.active').slideUp(200);
el.addClass('active');
parent.find('.helper_content > .item-' + id).addClass('active').hide().slideDown(200);
}
setTimeout(function(){
$(window).trigger('resize');
}, 50);
});
$(document).on('click', '.mfn-love', function(e){
e.preventDefault();
var el=$(this);
if(el.hasClass('loved')){
return false;
}
el.addClass('loved');
var post={
action: 'mfn_love',
post_id: el.attr('data-id')
};
$.post(mfn.ajax, post, function(data){
el.find('.label').html(data);
});
return false;
});
$('#back_to_top').on('click', function(){
$('body,html').animate({
scrollTop: 0
}, 500);
return false;
});
$('.section .section-nav').on('click', function(){
var el=$(this);
var section=el.closest('.section');
var offset=fixStickyHeaderH() + adminBarH();
if(el.hasClass('prev')){
if(section.prev().length){
$('html, body').animate({
scrollTop: section.prev().offset().top - offset
}, 500);
}}else{
if(section.next().length){
$('html, body').animate({
scrollTop: section.next().offset().top - offset
}, 500);
}}
});
$('#Intro .intro-next').on('click', function(){
var intro=$(this).closest('#Intro');
if(intro.next().length){
$('html, body').animate({
scrollTop: intro.next().offset().top - fixStickyHeaderH() - adminBarH()
}, 500);
}});
$('.widget_mfn_menu ul.submenus-click, .widget_mfn_menu ul.submenus-click-mobile').each(function(){
var el=$(this);
if(el.is('.submenus-click-mobile')&&$(window).width() > 767){
return;
}
$('a', el).on('click', function(e){
var li=$(this).closest('li');
if(li.hasClass('hover')||!li.hasClass('menu-item-has-children')){
}else{
e.preventDefault();
li.siblings('li').removeClass('hover')
.find('li').removeClass('hover');
$(this).closest('li').addClass('hover');
}});
});
function addToCart(){
$('body').on('click', '.add_to_cart_button', function(){
$(this)
.closest('.product')
.addClass('adding-to-cart')
.removeClass('added-to-cart');
});
$('body').on('added_to_cart', function(){
$('.adding-to-cart')
.removeClass('adding-to-cart')
.addClass('added-to-cart');
});
}
addToCart();
$('.woocommerce-product-rating').on('click', function(){
var el;
if($('.product_tabs_wrapper.fake-tabs').length){
el=$('.product_tabs_wrapper.fake-tabs');
$('li[data-tab="reviews"] a', el).trigger('click');
}else if($('.woocommerce-content .jq-tabs').length){
el=$('.woocommerce-content .jq-tabs');
$('.ui-tabs-nav a[href="#tab-reviews"]', el).trigger('click');
}else{
el=$('.woocommerce-content .accordion');
$('#reviews').closest('.question:not(.active)').children('.title').trigger('click');
}
var actionBarH=$('.header-fixed.ab-show #Action_bar').innerHeight()||0;
var offset=actionBarH + adminBarH();
$('html, body').animate({
scrollTop: el.offset().top - offset - fixStickyHeaderH()
}, 500);
});
$('body').on('click', '.quantity-change', function(e){
e.preventDefault();
var $el=$(this),
$input=$(this).siblings('input');
var step=parseFloat($input.attr('step'))||1,
minAttr=$input.attr('min'),
min=typeof minAttr!==typeof undefined&&minAttr!==false ? parseFloat(minAttr):1,
max=parseFloat($input.attr('max'))||9999,
current=$input.val() ? parseFloat($input.val()):min,
val=0;
if($el.hasClass('plus')){
val=current + step;
if(val > max){
val=current;
}}else{
val=current - step;
if(val < min){
val=current;
}}
val=Math.round(val * 10) / 10;
$input.val(val).trigger('change');
});
$(document).ajaxComplete(function(){
setTimeout(function(){
$(window).trigger('resize');
mfnSidebar();
}, 100);
});
$(window).on('debouncedresize', function(){
mfnIsotope.runIsotopes(false);
mfnFooter();
headerWidth();
mfnSidebar();
mfnIntroH();
creativeHeaderFix();
});
$('.mfn-cookies').on('click','.cookies-tab-nav a', function(e){
e.preventDefault();
consent.tabs($(this), false);
});
$('.mfn-cookies').on('click','#consent_customize', function(e){
e.preventDefault();
consent.tabs(false, 'details');
});
$('.mfn-cookies').on('click','#consent_allow', function(e){
e.preventDefault();
consent.all();
});
$('.mfn-cookies').on('click','#consent_selected', function(e){
e.preventDefault();
consent.selected();
});
$('.mfn-cookies').on('click','#consent_deny', function(e){
e.preventDefault();
consent.deny();
});
$('.mfn-cookies-reopen').on('click', function(e){
consent.reopen();
});
mfnSliderBlog();
mfnSliderClients();
mfnSliderOffer();
mfnSliderOfferThumb();
mfnSliderShop();
sliderPortfolio();
sliderTestimonials();
mfnFooter();
headerWidth();
mfnSidebar();
mfnIntroH();
hashNav();
gdpr();
consent.open();
tableContentAttachId();
topBarTopPosition();
if(!$('body').hasClass('mfn-ui')) mfnPopup.init();
});
$(window).on('scroll', function(){
mfnSticky();
mfnMobileSticky();
backToTopSticky();
onePageActive();
});
$(window).on('load', function(){
preloader();
queryLoopMasonry();
alignHeights();
function elementorDisableOnePage(){
if(! $('body').hasClass('one-page')){
return false;
}
setTimeout(function(){
var doc=$(document),
$events=$("a[href*='#']").length ? $._data(doc[0],"events"):null;
if($events&&$events.click){
for(var i=$events.click.length-1; i>=0; i--){
var handler=$events.click[i];
if(handler&&handler.namespace!="mPS2id"&&handler.selector==='a[href*="#"]') doc.off("click",handler.handler);
}}
}, 300);
}
elementorDisableOnePage();
function liveSearchItemZindex(){
$('.column_livesearch').each(function(){
$(this).closest('.mcb-wrap').addClass('has-live-search-element')
.closest('.mcb-section').addClass('has-live-search-element');
});
}
liveSearchItemZindex();
function retinaLogo(){
if(window.devicePixelRatio <=1){
return false;
}
var el, src, height,
parent=$('#Top_bar #logo'),
parentH=parent.data('height');
var maxH={
sticky: {
init: 35,
noPadding: 60,
overflow: 110
},
mobile: {
mini: 50,
miniNoPadding: 60
},
mobileSticky: {
init: 50,
noPadding: 60,
overflow: 80
}};
$('#Top_bar #logo img').each(function(index){
el=$(this);
src=el.data('retina');
height=el.height()||0;
if(el.hasClass('logo-main')){
if($('body').hasClass('logo-overflow')){
}else if(height > parentH){
height=parentH;
}}
if(el.hasClass('logo-sticky')){
if($('body').hasClass('logo-overflow')){
if(height > maxH.sticky.overflow){
height=maxH.sticky.overflow;
}}else if($('body').hasClass('logo-no-sticky-padding')){
if(height > maxH.sticky.noPadding){
height=maxH.sticky.noPadding;
}}else if(height > maxH.sticky.init){
height=maxH.sticky.init;
}}
if(el.hasClass('logo-mobile')){
if($('body').hasClass('mobile-header-mini')){
if(parent.data('padding') > 0){
if(height > maxH.mobile.mini){
height=maxH.mobile.mini;
}}else{
if(height > maxH.mobile.miniNoPadding){
height=maxH.mobile.miniNoPadding;
}}
}}
if(el.hasClass('logo-mobile-sticky')){
if($('body').hasClass('logo-no-sticky-padding')){
if(height > maxH.mobileSticky.noPadding){
height=maxH.mobileSticky.noPadding;
}}else if(height > maxH.mobileSticky.init){
height=maxH.mobileSticky.init;
}}
if(src){
el.parent().addClass('retina');
el.attr('src', src).css('max-height', height + 'px');
}});
}
setTimeout(function(){
retinaLogo();
}, 0);
$('#Wrapper .before_after.twentytwenty-container:not(.mfn-initialized)').each(function(){
var el=$(this);
el.addClass('mfn-initialized');
el.imagesLoaded().done(function(instance, image){
queueMicrotask(()=> el.twentytwenty());
});
});
if(lightboxAttr){
$('a[data-rel^="prettyPhoto"]:not(.popup-link), a[rel^="lightbox"]:not(.popup-link)').each(function(){
$(this).off('click.prettyphoto');
});
}
mfnStickyH();
mfnSticky();
mfnMobileSticky();
mfnIntroH();
setTimeout(function(){
$(window).trigger('resize');
mfnSidebar();
sliderSlider();
}, 0);
});
$(document).on('mouseup',function(e){
if($('.widget_mfn_menu ul.submenus-click').length&&($('.widget_mfn_menu ul.submenus-click').has(e.target).length===0)){
$('.widget_mfn_menu ul.submenus-click li').removeClass('hover');
}
if($('.menu_wrapper').length&&($('.menu_wrapper').has(e.target).length===0)){
if($('.responsive-menu-toggle').hasClass('active')){
$('.responsive-menu-toggle').trigger('click');
}}
if($('#popup_contact').length&&($('#popup_contact').has(e.target).length===0)){
if($('#popup_contact').hasClass('focus')){
$('#popup_contact .footer_button').trigger('click');
}}
if($('html').hasClass('mfn-ofcs-opened')&&!$('.mfn-off-canvas-sidebar').is(e.target)&&$('.mfn-off-canvas-sidebar').has(e.target).length===0){
$('html').removeClass('mfn-ofcs-opened');
}});
function slickAutoResponsive(slider, max, size, round=false){
if(!max){
max=5;
}
if(!size){
size=380;
}
var width=slider.width()||0;
var count;
if(round){
count=Math.floor(width / size);
}else{
count=Math.ceil(width / size);
}
if(count < 1) count=1;
if(count > max) count=max;
return count;
}
function mfnSliderOfferThumb(){
var pager=function(el, i){
var img=$(el.$slides[i]).find('.thumbnail:first').html();
return '<a>' + img + '</a>';
};
$('.offer_thumb_ul').each(function(){
var slider=$(this);
slider.slick({
cssEase: 'ease-out',
arrows: false,
dots: true,
infinite: true,
touchThreshold: 10,
speed: 300,
adaptiveHeight: true,
appendDots: slider.siblings('.slider_pagination'),
customPaging: pager,
rtl: rtl ? true:false,
autoplay: mfn.slider.offer ? true:false,
autoplaySpeed: mfn.slider.offer ? mfn.slider.offer:5000,
slidesToShow: 1,
slidesToScroll: 1
});
$(window).on('debouncedresize', function(){
var height=slider.siblings('.slider_pagination').height();
slider.closest('.offer_thumb ').css('min-height',height);
});
});
}
function mfnSliderOffer(){
$('.offer_ul').each(function(){
var slider=$(this);
slider.slick({
cssEase: 'ease-out',
dots: false,
infinite: true,
touchThreshold: 10,
speed: 300,
prevArrow: '<a class="slider_prev" href="#" aria-label="previous slide"><span class="button_icon"><i class="icon-up-open-big"></i></span></a>',
nextArrow: '<a class="slider_next" href="#" aria-label="next slide"><span class="button_icon"><i class="icon-down-open-big"></i></span></a>',
adaptiveHeight: true,
rtl: rtl ? true:false,
autoplay: mfn.slider.offer ? true:false,
autoplaySpeed: mfn.slider.offer ? mfn.slider.offer:5000,
slidesToShow: 1,
slidesToScroll: 1
});
slider.siblings('.slider_pagination').addClass('show');
slider.on('afterChange', function(event, slick, currentSlide, nextSlide){
slider.siblings('.slider_pagination').find('.current').text(currentSlide + 1);
});
});
}
function mfnSliderShop(){
var pager=function(el, i){
return '<a>' + i + '</a>';
};
$('.shop_slider_ul').each(function(){
var slider=$(this);
var slidesToShow=4;
var count=slider.closest('.shop_slider').data('count');
if(slidesToShow > count){
slidesToShow=count;
if(slidesToShow < 1){
slidesToShow=1;
}}
slider.slick({
cssEase: 'ease-out',
dots: true,
infinite: true,
touchThreshold: 10,
speed: 300,
prevArrow: '<a class="button the-icon slider_prev" href="#" aria-label="previous slide"><i class="icon-left-open-big"></i></a>',
nextArrow: '<a class="button the-icon slider_next" href="#" aria-label="next slide"><i class="icon-right-open-big"></i></a>',
appendArrows: slider.siblings('.blog_slider_header').children('.slider_navigation'),
appendDots: slider.siblings('.slider_pager'),
customPaging: pager,
rtl: rtl ? true:false,
autoplay: mfn.slider.shop ? true:false,
autoplaySpeed: mfn.slider.shop ? mfn.slider.shop:5000,
slidesToShow: slickAutoResponsive(slider, slidesToShow),
slidesToScroll: slickAutoResponsive(slider, slidesToShow)
});
$(window).on('debouncedresize', function(){
slider.slick('slickSetOption', 'slidesToShow', slickAutoResponsive(slider, slidesToShow), false);
slider.slick('slickSetOption', 'slidesToScroll', slickAutoResponsive(slider, slidesToShow), true);
});
});
}
function mfnSliderBlog(){
var pager=function(el, i){
return '<a>' + i + '</a>';
};
$('.blog_slider_ul').each(function(){
var slider=$(this);
var slidesToShow=4;
var count=slider.closest('.blog_slider').data('count');
var singlePostMode=slider.closest('.blog_slider').hasClass('single_post_mode');
if(slidesToShow > count){
slidesToShow=count;
if(slidesToShow < 1){
slidesToShow=1;
}}
if(singlePostMode){
slidesToShow=1;
}
slider.slick({
cssEase: 'ease-out',
dots: true,
infinite: true,
touchThreshold: 10,
speed: 300,
prevArrow: '<a class="button the-icon slider_prev" href="#" aria-label="previous slide"><i class="icon-left-open-big"></i></a>',
nextArrow: '<a class="button the-icon slider_next" href="#" aria-label="next slide"><i class="icon-right-open-big"></i></a>',
appendArrows: slider.siblings('.blog_slider_header').children('.slider_navigation'),
appendDots: slider.siblings('.slider_pager'),
customPaging: pager,
rtl: rtl ? true:false,
autoplay: mfn.slider.blog ? true:false,
autoplaySpeed: mfn.slider.blog ? mfn.slider.blog:5000,
slidesToShow: slickAutoResponsive(slider, slidesToShow),
slidesToScroll: slickAutoResponsive(slider, slidesToShow)
});
$(window).on('debouncedresize', function(){
slider.slick('slickSetOption', 'slidesToShow', slickAutoResponsive(slider, slidesToShow), false);
slider.slick('slickSetOption', 'slidesToScroll', slickAutoResponsive(slider, slidesToShow), true);
});
});
}
function mfnSliderClients(){
$('.clients_slider_ul').each(function(){
var slider=$(this);
var clientsPerSlide=slider.closest('.clients_slider').attr('data-client-per-slide') ? parseInt(slider.closest('.clients_slider').attr('data-client-per-slide')):4;
var navigationPosition=slider.closest('.clients_slider').attr('data-navigation-position')||false;
var appendArrows=(navigationPosition=='content') ? slider:slider.siblings('.blog_slider_header').children('.slider_navigation');
var size=400;
var calc=()=> slickAutoResponsive(slider, clientsPerSlide, size - (clientsPerSlide * 40), true);
var calcScroll=calc;
var slidesToScroll=slider.closest('.clients_slider').attr('data-slides-to-scroll') ? parseInt(slider.closest('.clients_slider').attr('data-slides-to-scroll')):calc();
if(1===slidesToScroll){
calcScroll=()=> slickAutoResponsive(slider, 1, size - (clientsPerSlide * 40), true);
}
slider.slick({
cssEase: 'ease-out',
dots: false,
infinite: true,
touchThreshold: 10,
speed: 300,
prevArrow: '<a class="button the-icon slider_prev" href="#" aria-label="previous slide"><i class="icon-left-open-big"></i></a>',
nextArrow: '<a class="button the-icon slider_next" href="#" aria-label="next slide"><i class="icon-right-open-big"></i></a>',
appendArrows: appendArrows,
rtl: rtl ? true:false,
autoplay: mfn.slider.clients ? true:false,
autoplaySpeed: mfn.slider.clients ? mfn.slider.clients:5000,
slidesToShow: calc(),
slidesToScroll: calcScroll()
});
$(window).on('debouncedresize', function(){
slider.slick('slickSetOption', 'slidesToShow', calc(), false);
slider.slick('slickSetOption', 'slidesToScroll', calcScroll(), true);
});
});
}
function sliderPortfolio(){
$('.portfolio_slider_ul').each(function(){
var slider=$(this);
var size=380;
var scroll=5;
if(slider.closest('.portfolio_slider').data('size')){
size=slider.closest('.portfolio_slider').data('size');
}
if(slider.closest('.portfolio_slider').data('size')){
scroll=slider.closest('.portfolio_slider').data('scroll');
}
slider.slick({
cssEase: 'ease-out',
dots: false,
infinite: true,
touchThreshold: 10,
speed: 300,
prevArrow: '<a class="slider_nav slider_prev themebg" href="#" aria-label="previous slide"><i class="icon-left-open-big"></i></a>',
nextArrow: '<a class="slider_nav slider_next themebg" href="#" aria-label="next slide"><i class="icon-right-open-big"></i></a>',
rtl: rtl ? true:false,
autoplay: mfn.slider.portfolio ? true:false,
autoplaySpeed: mfn.slider.portfolio ? mfn.slider.portfolio:5000,
slidesToShow: slickAutoResponsive(slider, 5, size),
slidesToScroll: slickAutoResponsive(slider, scroll, size)
});
$(window).on('debouncedresize', function(){
slider.slick('slickSetOption', 'slidesToShow', slickAutoResponsive(slider, 5, size), false);
slider.slick('slickSetOption', 'slidesToScroll', slickAutoResponsive(slider, scroll, size), true);
});
});
}
function promoBarSlider(){
$('.promo_bar_slider').each(function(){
var $slider=$(this);
if($slider.hasClass('mfn-initialized')) return;
$slider.addClass('mfn-initialized');
var speedAttr=$slider.attr('data-speed');
var speed=parseInt(speedAttr, 10);
if(isNaN(speed)||speed <=0) speed=5;
speed *=1000;
var $slides=$slider.find('.pbs_one');
if(!$slides.length) return;
$slides.removeClass('pbs-active pbs-active-ends');
$slides.first().addClass('pbs-active');
var transitionDuration=300;
function changeSlide(){
var $current=$slider.find('.pbs_one.pbs-active');
var $next=$current.next('.pbs_one');
if(!$next.length) $next=$slides.first();
$current.addClass('pbs-active-ends');
setTimeout(function(){
$current.removeClass('pbs-active pbs-active-ends');
$next.addClass('pbs-active');
}, transitionDuration);
}
if($slides.length > 1){
setInterval(changeSlide, speed);
}});
}
function queryLoopSlider(){
$('body:not(.mfn-ui) .mfn-looped-items-slider').each(function(i){
const swipers=[];
var $slider=$(this);
let swiperClass='mfn-ql-slider-'+i;
$slider.addClass(swiperClass);
var swiperParams={
spaceBetween: parseInt($slider.attr('data-space_mobile')),
slidesPerView: $slider.hasClass('mfn-slider-linear') ? 'auto':parseInt($slider.attr('data-columns-mobile')),
};
if(typeof $slider.attr('data-dots')!=='undefined'&&$slider.attr('data-dots')=='1'){
$slider.parent().append('<div class="swiper-pagination mfn-swiper-pagination-'+i+'"></div>');
swiperParams['pagination']={
el: ".mfn-swiper-pagination-"+i,
clickable: true,
};
if($slider.attr('data-dots-count')=='dynamic'){
swiperParams['pagination']['dynamicBullets']=true;
}}
if($slider.closest('.mfn-looped-items').hasClass('mfn-ql-slider-wrapper-offset')&&$slider.attr('data-infinity')=='1'){
swiperParams['loop']=true;
swiperParams['centeredSlides']=true;
$slider.parent().css({ 'max-width': '100%'});
}else if($slider.attr('data-infinity')=='1'){
swiperParams['loop']=true;
}
swiperParams['speed']=parseFloat($slider.attr('data-speed'));
if($slider.attr('data-arrows')=='1'){
$slider.parent().append('<div class="swiper-button-next mfn-swiper-arrow mfn-swiper-button-next-'+i+'"><i class="'+$slider.attr('data-arrownext')+'"></i></div><div class="swiper-button-prev mfn-swiper-arrow mfn-swiper-button-prev-'+i+'"><i class="'+$slider.attr('data-arrowprev')+'"></i></div>');
swiperParams['navigation']={
nextEl: ".mfn-swiper-button-next-"+i,
prevEl: ".mfn-swiper-button-prev-"+i,
};}
if(!$('body').hasClass('mfn-ui')&&typeof $slider.attr('data-autoplay')!=='undefined'&&parseFloat($slider.attr('data-autoplay')) > 0){
swiperParams['autoplay']={
delay: $slider.hasClass('mfn-slider-linear') ? 0.1:parseFloat($slider.attr('data-autoplay')),
disableOnInteraction: true,
};
if($slider.attr('data-pausehover')=='1'){
swiperParams['autoplay']['pauseOnMouseEnter']=true;
}else{
swiperParams['autoplay']['pauseOnMouseEnter']=false;
}}
if(!$('body').hasClass('mfn-ui')&&typeof $slider.attr('data-mousewheel')!=='undefined'&&$slider.attr('data-mousewheel') > 0){
swiperParams['mousewheel']=true;
}
if($('body').hasClass('mfn-ui')){
swiperParams['allowTouchMove']=true;
}
if($slider.closest('.mfn-popup-tmpl').length){
swiperParams['observer']=true;
swiperParams['observeParents']=true;
}
swiperParams['breakpoints']={
768: {
spaceBetween: $slider.attr('data-animationtype')=='cube' ? 0:parseInt($slider.attr('data-space_desktop')),
slidesPerView: $slider.hasClass('mfn-slider-linear') ? 'auto':parseInt($slider.attr('data-columns-tablet'))
},
960: {
spaceBetween: $slider.attr('data-animationtype')=='cube' ? 0:parseInt($slider.attr('data-space_desktop')),
slidesPerView: $slider.hasClass('mfn-slider-linear') ? 'auto':parseInt($slider.attr('data-columns-laptop'))
},
1441: {
spaceBetween: $slider.attr('data-animationtype')=='cube' ? 0:parseInt($slider.attr('data-space_desktop')),
slidesPerView: $slider.hasClass('mfn-slider-linear') ? 'auto':parseInt($slider.attr('data-columns'))
}};
if($slider.attr('data-animationtype')!='slide'){
swiperParams['effect']=$slider.attr('data-animationtype');
swiperParams['grabCursor']=true;
if($slider.attr('data-animationtype')=='fade'){
swiperParams['fadeEffect']={ crossFade: true };
swiperParams['centeredSlides']=true;
}}
swipers[i]=new Swiper('.'+swiperClass, swiperParams);
swipers[i].on('slideChange', function (){
$(window).trigger('scroll');
});
if(($slider.attr('data-animationtype')=='cube'||$slider.attr('data-animationtype')=='flip'||$slider.attr('data-animationtype')=='cards')&&$slider.closest('.mfn-looped-items-slider-wrapper').hasClass('mfn-arrows-standard')){
let sw_arr_wi=$slider.closest('.mfn-looped-items-slider-wrapper').find('.mfn-swiper-arrow').outerWidth()+'px';
$('body').append('<style>.mfn-ql-slider-'+i+'{ --mfn-swiper-arrow-width: '+sw_arr_wi+' }</style>')
$(window).trigger('resize');
}});
}
function sliderSlider(){
var pager=function(el, i){
return '<a>' + i + '</a>';
};
$('.content_slider_ul').each(function(){
var slider=$(this);
var count=1;
var centerMode=false;
if(slider.closest('.content_slider').hasClass('carousel')){
count=slickAutoResponsive(slider);
$(window).on('debouncedresize', function(){
slider.slick('slickSetOption', 'slidesToShow', slickAutoResponsive(slider), false);
slider.slick('slickSetOption', 'slidesToScroll', slickAutoResponsive(slider), true);
});
}
if(slider.closest('.content_slider').hasClass('center')){
centerMode=true;
}
slider.slick({
cssEase: 'cubic-bezier(.4,0,.2,1)',
dots: true,
infinite: true,
touchThreshold: 10,
speed: 300,
centerMode: centerMode,
centerPadding: '20%',
prevArrow: '<a class="button the-icon slider_prev" href="#" aria-label="previous slide"><i class="icon-left-open-big"></i></a>',
nextArrow: '<a class="button the-icon slider_next" href="#" aria-label="next slide"><i class="icon-right-open-big"></i></a>',
adaptiveHeight: true,
appendDots: slider.siblings('.slider_pager'),
customPaging: pager,
rtl: rtl ? true:false,
autoplay: mfn.slider.slider ? true:false,
autoplaySpeed: mfn.slider.slider ? mfn.slider.slider:5000,
slidesToShow: count,
slidesToScroll: count
});
var clickEvent=false;
slider.on('dragstart', '.slick-slide a[rel="lightbox"]', function(event){
if(lightboxAttr){
var events=$._data(this,'events');
if(events&&Object.prototype.hasOwnProperty.call(events, 'click')){
clickEvent=events.click[0];
$(this).addClass('off-click').off('click');
}}
});
slider.on('afterChange', function(event, slick, currentSlide, nextSlide){
if(lightboxAttr){
$('a.off-click[rel="lightbox"]', slider).removeClass('off-click').on('click', clickEvent);
}});
});
}
function sliderTestimonials(){
var pager=function(el, i){
var img=$(el.$slides[i]).find('.single-photo-img').html();
return '<a>' + img + '</a>';
};
$('.testimonials_slider_ul').each(function(){
var slider=$(this);
slider.slick({
cssEase: 'ease-out',
dots: true,
infinite: true,
touchThreshold: 10,
speed: 300,
prevArrow: '<a class="button the-icon slider_prev" href="#" aria-label="previous slide"><i class="icon-left-open-big"></i></a>',
nextArrow: '<a class="button the-icon slider_next" href="#" aria-label="next slide"><i class="icon-right-open-big"></i></a>',
adaptiveHeight: true,
appendDots: slider.siblings('.slider_pager'),
customPaging: pager,
rtl: rtl ? true:false,
autoplay: mfn.slider.testimonials ? true:false,
autoplaySpeed: mfn.slider.testimonials ? mfn.slider.testimonials:5000,
slidesToShow: 1,
slidesToScroll: 1
});
});
}
let mfnTabber={
init: function(){
$(document).on('mouseover', '.mfn-tabber-open-on-hover .mfn-tabber-nav li a', function(e){
if(!$(this).parent('li').hasClass('active')){
let tab=$(this).attr('data-tab');
$(this).parent('li').siblings('li').removeClass('active');
$(this).closest('.mfn-section-tabber').find('.mfn-tabber-content.active').removeClass('active');
$(this).parent('li').addClass('active');
$(this).closest('.mfn-section-tabber').find(tab).addClass('active');
$(document).trigger('mfn:tabber:open');
$(window).trigger('resize');
}}).on('click', '.mfn-tabber-nav li a', function(e){
if(!$(this).parent('li').hasClass('active')){
e.preventDefault();
let tab=$(this).attr('data-tab');
$(this).parent('li').siblings('li').removeClass('active');
$(this).closest('.mfn-section-tabber').find('.mfn-tabber-content.active').removeClass('active');
$(this).parent('li').addClass('active');
$(this).closest('.mfn-section-tabber').find(tab).addClass('active');
$(document).trigger('mfn:tabber:open');
$(window).trigger('resize');
}else if($(this).attr('href')=='#'||$('body').hasClass('mfn-ui')){
e.preventDefault();
}});
if($('body').hasClass('mfn-ui')){
setTimeout(mfnTabber.sliding_bg, 800);
}else{
setTimeout(mfnTabber.sliding_bg, 300);
}},
sliding_bg: function(){
if(!$('.mfn-tabber-nav.mfn-tabber-nav-hover-sliding').length) return;
$('.mfn-tabber-nav.mfn-tabber-nav-hover-sliding').each(function(){
let wrapper=$(this);
let li=wrapper.find('li.active');
let helper=wrapper.find('.mfn-tabber-nav-slide-helper');
let offset_left=li.position().left;
let offset_top=li.position().top;
helper.css({ top: offset_top, left: offset_left, width: li.outerWidth(), height: li.outerHeight() });
});
$('.mfn-tabber-open-on-click .mfn-tabber-nav.mfn-tabber-nav-hover-sliding li').on('click', function(){
let li=$(this);
let helper=li.closest('ul').find('.mfn-tabber-nav-slide-helper');
let offset_left=li.position().left;
let offset_top=li.position().top;
helper.css({ top: offset_top, left: offset_left, width: li.outerWidth(), height: li.outerHeight() });
});
$('.mfn-tabber-open-on-hover .mfn-tabber-nav.mfn-tabber-nav-hover-sliding li').on('mouseover', function(){
let li=$(this);
let helper=li.closest('ul').find('.mfn-tabber-nav-slide-helper');
let offset_left=li.position().left;
let offset_top=li.position().top;
helper.css({ top: offset_top, left: offset_left, width: li.outerWidth(), height: li.outerHeight() });
});
if($('.mfn-tabber-nav.mfn-tabber-nav-hover-sliding li.active').length){
$('.mfn-tabber-nav.mfn-tabber-nav-hover-sliding li.active')
}}
}
let mfnAdvancedFilters={
form: false,
init: function(){
if(!$('.mfn-advanced-filters').length) return;
this.prepare();
$(document).on('click', '.mfn-advanced-filters .mfn-advanced-filters-expand', function(e){
e.preventDefault();
if($(this).hasClass('mfn-expanded')){
$(this).removeClass('mfn-expanded');
$(this).text($(this).attr('data-more'));
$(this).closest('.mfn-form-row-wrapper').find('li.mfn-opt-expandable').addClass('mfn-opt-hidden').removeClass('mfn-opt-expandable');
}else{
$(this).addClass('mfn-expanded');
$(this).text($(this).attr('data-less'));
$(this).closest('.mfn-form-row-wrapper').find('li.mfn-opt-hidden').removeClass('mfn-opt-hidden').addClass('mfn-opt-expandable');
}});
$(document).on('click', '.mfn-advanced-filters-accordion .mfn-advanced-filters-group-label', function(e){
e.preventDefault();
let row=$(this).closest('.mfn-form-row');
if(row.hasClass('open')){
row.removeClass('open');
$(this).siblings('.mfn-form-row-wrapper').slideUp(300);
}else{
row.addClass('open');
$(this).siblings('.mfn-form-row-wrapper').slideDown(300);
}})
if($('.mfn-advanced-filters .mfn-advanced-filters-rate')){
$(document).on('click', '.mfn-advanced-filters .mfn-advanced-filters-rate li', function(){
$(this).toggleClass('active');
let helper_arr=[];
$(this).closest('.mfn-advanced-filters-rate').find('li.active').each(function(el){
helper_arr.push($(this).attr('data-rate'));
});
$(this).closest('.mfn-advanced-filters-rate').find('.mfn-advanced-rate-input').val(helper_arr.join(',')).trigger('change');
});
}
$(document).on('change', 'form.mfn-active-filters input', function(e){
mfnAdvancedFilters.ajax($(this).closest('form'));
});
$(document).on('change', 'form.mfn-advanced-filters-auto-submit input, form.mfn-advanced-filters-auto-submit select', function(e){
mfnAdvancedFilters.ajax($(this).closest('form'));
}).on('submit', 'form.mfn-advanced-filters-auto-submit', function(e){
e.preventDefault();
mfnAdvancedFilters.ajax($(this));
});
$(document).on('submit', 'form.mfn-advanced-filters-ajax-submit', function(e){
e.preventDefault();
mfnAdvancedFilters.ajax($(this));
});
$(document).on('click', '.mfn-active-filters .mfn-reset-filters', function(e){
e.preventDefault();
$(this).closest('form').empty();
mfnAdvancedFilters.ajax($(this).closest('form'));
});
},
prepare: function(){
if($('.mfn-active-filters .mfn-active-filters-find-title').length){
$('.mfn-active-filters .mfn-active-filters-find-title:not(.initialized)').each(function(i, el){
$(el).addClass('initialized');
let selector='[name="'+$(el).find('input').attr('name')+'"]';
let searched_input=$('.mfn-advanced-filters '+selector);
if($(el).find('input').val().length){
let label=searched_input.closest('.mfn-form-row').find('.mfn-advanced-filters-label-name').length ? searched_input.closest('.mfn-form-row').find('.mfn-advanced-filters-label-name').first().text():'';
if(typeof searched_input.attr('placeholder')!='undefined'&&searched_input.closest('.mfn-floating-placeholder').length){
if(label.length) $(el).append(label+' ');
$(el).append(searched_input.attr('placeholder')+': '+$(el).find('input').val());
}else if(searched_input.hasClass('mfn-advanced-rate-input')&&label.length){
if(label.length) $(el).append(label+': ');
$(el).append($(el).find('input').val());
}else{
$(el).append(searched_input.closest('.mfn-form-row').find('.mfn-advanced-filters-group-label h4').first().text()+': '+$(el).find('input').val());
}}else{
$(el).remove();
}});
}
$('.mfn-advanced-filters:not(.initialized)').each(function(i, el){
mfnAdvancedFilters.form=$(el);
mfnAdvancedFilters.form.addClass('initialized');
if(mfnAdvancedFilters.form.find('.mfn-advanced-filters-slider').length){
mfnAdvancedFilters.slider();
}
if(mfnAdvancedFilters.form.find('.mfn-advanced-filters-range-slider').length){
mfnAdvancedFilters.slider_range();
}});
},
ajax: ($form)=> {
var url=$form.attr('action')||location.origin + location.pathname;
var method=($form.attr('method')||'GET').toUpperCase();
var data=$form.serialize();
if($form.closest('.mfn-sidemenu-tmpl.mfn-sidemenu-active').length){
$form.closest('.mfn-sidemenu-tmpl.mfn-sidemenu-active').find('.mfn-sidemenu-closebutton').trigger('click');
}
var $content=$('#Content');
$content.addClass('is-loading');
$form.find('input,select,button').prop('disabled', true);
$form.find('button.mfn-btn').addClass('loading disabled');
if($('.mfn-archive-product-tmpl-builder .mfn-woo-list-perpage li.active input').length&&$('.mfn-archive-product-tmpl-builder .mfn-woo-list-perpage li.active input').val().length) data +='&per_page='+$('.mfn-archive-product-tmpl-builder .mfn-woo-list-perpage li.active input').val();
if($('.mfn-archive-product-tmpl-builder .woocommerce-ordering select').length&&$('.mfn-archive-product-tmpl-builder .woocommerce-ordering select').val().length) data +='&orderby='+$('.mfn-archive-product-tmpl-builder .woocommerce-ordering select').val();
if($('.mfn-archive-product-tmpl-builder .mfn-woo-list-style li.active input').length&&$('.mfn-archive-product-tmpl-builder .mfn-woo-list-style li.active input').val().length) data +='&layout='+$('.mfn-archive-product-tmpl-builder .mfn-woo-list-style li.active input').val();
$.ajax({
url: url,
type: method,
data: data,
dataType: 'html'
}).done(function(html){
var $html=$('<div>').append($.parseHTML(html));
var $newContent=$html.find('#Content');
if($newContent.length){
$content.replaceWith($newContent);
if($('.mfn-sidemenu-tmpl').length){
$('.mfn-sidemenu-tmpl').each(function(){
let id=$(this).attr('id');
$(this).replaceWith($html.find('#'+id));
});
}
if(method==='GET'){
var newUrl=url + (url.indexOf('?')>-1 ? '&':'?') + data;
window.history.replaceState({}, '', newUrl);
}}else{
window.location.href=method==='GET' ? (url + (url.indexOf('?')>-1?'&':'?') + data):url;
}}).fail(function(){
window.location.href=method==='GET' ? (url + (url.indexOf('?')>-1?'&':'?') + data):url;
}).always(function(){
$form.find('input,select,button').prop('disabled', false);
$('#Content').removeClass('is-loading');
$form.find('button.mfn-btn').removeClass('loading disabled');
$(document).trigger('mfn:ajax:refresh');
});
},
slider: function(){
mfnAdvancedFilters.form.find('.mfn-advanced-filters-slider').each(function(i, slider){
let input=$(this).closest('.mfn-form-row-wrapper').find('input.mfn-ui-slider-input');
let min=input.attr('min').length ? input.attr('min'):'0';
let max=input.attr('max').length ? input.attr('max'):'500';
let val=input.val().length ? input.val():'';
$(this).slider({
step: 1,
min: parseFloat(min),
max: parseFloat(max),
range: "min",
value: val,
create: function (){
$(this).find(".ui-slider-handle").append('<span class="mfn-ui-tip"></span>');
$(this).find(".mfn-ui-tip").text($(this).slider("value"));
},
slide: function(event, ui){
input.val(ui.value);
if(!input.parent('.mfn-input-wrapper').hasClass('mfn-not-empty')) input.parent('.mfn-input-wrapper').addClass('mfn-not-empty');
$(this).find(".mfn-ui-tip").text(ui.value);
},
stop: function(){
input.trigger('change');
}});
});
},
slider_range: function(){
mfnAdvancedFilters.form.find('.mfn-advanced-filters-range-slider').each(function(i, slider){
let input_min=$(this).closest('.mfn-advanced-filters-slider-wrapper').find('input.mfn-ui-slider-input-min');
let input_max=$(this).closest('.mfn-advanced-filters-slider-wrapper').find('input.mfn-ui-slider-input-max');
let min=typeof input_min.attr('min')!='undefined' ? input_min.attr('min'):'0';
let max=typeof input_max.attr('max')!='undefined' ? input_max.attr('max'):'500';
let val_min=input_min.val().length ? input_min.val():min;
let val_max=input_max.val().length ? input_max.val():max;
$(this).slider({
range: true,
step: 1,
min: parseFloat(min),
max: parseFloat(max),
values: [ parseFloat(val_min), parseFloat(val_max) ],
create: function (event, ui){
$(this).find(".ui-slider-handle").append('<span class="mfn-ui-tip"></span>');
$(this).find(".mfn-ui-tip").first().text(val_min);
$(this).find(".mfn-ui-tip").last().text(val_max);
},
slide: function(event, ui){
$(ui.handle).closest('.mfn-form-row-wrapper').find('input.mfn-ui-slider-input-min').val(ui.values[ 0 ]);
$(ui.handle).closest('.mfn-form-row-wrapper').find('input.mfn-ui-slider-input-max').val(ui.values[ 1 ]);
if(!$(ui.handle).closest('.mfn-form-row-wrapper').find('.mfn-input-wrapper').hasClass('mfn-not-empty')) $(ui.handle).closest('.mfn-form-row-wrapper').find('.mfn-input-wrapper').addClass('mfn-not-empty');
$(ui.handle).find(".mfn-ui-tip").text(ui.value);
},
stop: function(){
input_min.trigger('change');
}});
});
}}
$(document).on('click', '.mfn-gdpr-button', function(){
var closeAnimation=$('.mfn-gdpr-button').attr('data-animation');
var barAligment=$('#mfn-gdpr').attr('data-aligment');
switch(true){
case 'none'===closeAnimation:
$('#mfn-gdpr').css('display', 'none');
break;
case 'fade'===closeAnimation:
$('#mfn-gdpr').fadeOut(300);
break;
case 'slide'===closeAnimation&&'top'===barAligment:
$('#mfn-gdpr').slideUp(300);
break;
default:
$('#mfn-gdpr').slideToggle(300);
break;
}
setTimeout(function(){
$('#mfn-gdpr').removeClass('show');
gdpr_set_cookie();
}, 300);
});
function gdpr_set_cookie(){
if(navigator.cookieEnabled){
var cookieDays=$('.mfn-gdpr-button').attr('data-cookiedays')||365;
var cookieDate=new Date();
var cookieText='';
cookieDate.setTime(cookieDate.getTime() + (cookieDays * 24 * 60 * 60 * 1000));
cookieText +="mfn-gdpr=1";
cookieText +="; expires=" + cookieDate.toUTCString() + ';';
cookieText +="; path=" + mfn.home_url + '/';
document.cookie=cookieText;
}}
function gdpr(){
if(document.cookie!==""){
var cookies=document.cookie.split(/; */);
for (var cookie of cookies){
var [ cookieName ]=cookie.split("=");
if(cookieName==='mfn-gdpr'){
return;
}}
}
$('#mfn-gdpr').addClass('show');
}
function infiniteScrollFunction(infiniteLoadContainer, infiniteLoadButton, scrollDirection){
var screenHeight=document.body.clientHeight;
if(infiniteLoadContainer.attr('data-attr')===$(infiniteLoadButton).attr('href')){
return;
}else if(scrollDirection==='down'){
infiniteLoadContainer.attr('data-attr', $(infiniteLoadButton).attr('href'));
infiniteLoadButton.click();
setTimeout(function(){
var heightAfterLoadDifference=(document.body.clientHeight - screenHeight);
if(heightAfterLoadDifference < 249){
infiniteScrollFunction(infiniteLoadContainer, infiniteLoadButton, scrollDirection);
}}, 500);
}}
/*  function infiniteScrollPortfolio(){
var infiniteLoadContainer=$('.mfn-infinite-load-button');
var infiniteLoadButton=$('.mfn-infinite-load-button a');
$(infiniteLoadContainer).waypoint({
handler: function(direction){
infiniteScrollFunction(infiniteLoadContainer, infiniteLoadButton, direction);
},
offset: function(){
var offsetPosition=-(($(this)[0].element.scrollHeight) - (window.innerHeight / 1.2));
return offsetPosition;
}});
} */
$('body').on('click', ".table_of_content .toggle", function(e){
e.preventDefault();
if($('.table_of_content').hasClass('hide')){
$('.table_of_content').removeClass('hide');
$('.table_of_content_wrapper').slideDown({
duration: 400,
always: function(){
$('.table_of_content').removeClass('hide_on_start');
}});
}else{
$('.table_of_content_wrapper').slideUp({
duration: 400
});
$('.table_of_content').addClass('hide');
}});
function tableContentAttachId(){
const container=$('.table_of_content');
let tags;
let anchorNumber=0;
let anchorDom=$('.table_of_content_wrapper').find('a');
if(tags=container.attr('data-tags')){
tags=tags.split(/[ ,]+/).join(',');
let columns=$('#Content .mfn-builder-content .column_column, #Content .mfn-builder-content .column_post_content, #Content .mfn-builder-content .column_heading, #Content .mfn-builder-content .column_fancy_heading, .the_content_wrapper:not(.is-elementor), .elementor-widget:not(.elementor-widget-mfn_table_of_contents)');
if($('#Content .mfn-single-post-tmpl-builder .column_post_content').length){
columns=$('#Content .mfn-single-post-tmpl-builder .column_post_content .column_column, #Content .mfn-single-post-tmpl-builder .column_post_content, #Content .mfn-single-post-tmpl-builder .column_post_content .column_heading, #Content .mfn-single-post-tmpl-builder .column_post_content .column_fancy_heading, .the_content_wrapper:not(.is-elementor), .elementor-widget:not(.elementor-widget-mfn_table_of_contents)');
}else if($('#Content .mfn-single-portfolio-tmpl-builder .column_post_content').length){
columns=$('#Content .mfn-single-portfolio-tmpl-builder .column_post_content .column_column, #Content .mfn-single-portfolio-tmpl-builder .column_post_content, #Content .mfn-single-portfolio-tmpl-builder .column_post_content .column_heading, #Content .mfn-single-portfolio-tmpl-builder .column_post_content .column_fancy_heading, .the_content_wrapper:not(.is-elementor), .elementor-widget:not(.elementor-widget-mfn_table_of_contents)');
}
$(columns).each(( index, element)=> {
let headingsNoticed=$(element).find(tags);
$(headingsNoticed).each(( index, element)=> {
if($(element).attr('id')){
const idSet='#'+$(element).attr('id');
$(anchorDom[anchorNumber]).attr('href', idSet);
}else{
let id=$(anchorDom[anchorNumber]).attr('href');
if(typeof id!=='undefined') $(element).attr('id', id.substr(1));
}
anchorNumber++;
})
})
}}
var offCanvasSidebar={
init: function(){
$(document).on('click', '.mfn-off-canvas-switcher', function(e){
e.preventDefault();
if($('html').hasClass('mfn-ofcs-opened')){
$('html').removeClass('mfn-ofcs-opened');
}else{
$('html').addClass('mfn-ofcs-opened');
}});
},
mobile: function(){
if($('.sidebar .widget-area').length&&$('body').hasClass('ofcs-mobile')){
if(!$('.mfn-off-canvas-sidebar').length){
$('body').append('<div class="mfn-off-canvas-overlay"></div><div class="mfn-off-canvas-sidebar"><div class="mfn-off-canvas-switcher"><i class="icon-list" aria-label="off-canvas sidebar toggle"></i></div><div class="mfn-off-canvas-content-wrapper"><div class="mfn-off-canvas-content"></div></div></div>');
}
if($('body').hasClass('woocommerce-shop')&&!$('.mfn-woo-filters-wrapper .mfn-off-canvas-switcher').length){
$('.mfn-woo-filters-wrapper').append('<a class="open-filters mfn-off-canvas-switcher" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" aria-label="off-canvas sidebar toggle"><defs><style>.path{fill:none;stroke:#000;stroke-miterlimit:10;}</style></defs><g><line x1="8" y1="11" x2="14" y2="11" class="path"></line><line x1="2" y1="11" x2="4" y2="11" class="path"></line><line x1="12" y1="5" x2="14" y2="5" class="path"></line><line x1="2" y1="5" x2="8" y2="5" class="path"></line><circle cx="6" cy="11" r="2" class="path"></circle><circle cx="10" cy="5" r="2" class="path"></circle></g></svg></a>');
}
var $ofcs=$('.mfn-off-canvas-sidebar .mfn-off-canvas-content-wrapper .mfn-off-canvas-content');
$ofcs.empty();
$('.sidebar .widget-area').each(function(){
$ofcs.append($(this));
});
offCanvasSidebar.init();
}}
}
function alignHeights(){
var i=0;
if(!$('.mfn-align-heights').length) return;
$('.mfn-align-heights').each(function(){
var max=0;
var newclass='mfn-align-cont-'+i;
$(this).addClass(newclass);
$("<style type='text/css'> ."+newclass+" .mfn-align-me{ height: auto;} </style>").appendTo("body");
$("."+newclass+" .mfn-align-me").each(function(){
if($(this).outerHeight() > max){max=$(this).outerHeight();}});
$("<style type='text/css'> ."+newclass+" .mfn-align-me{ height: "+max+"px;} </style>").appendTo("body");
i++;
});
}
$(window).on('debouncedresize', alignHeights);
var headerMegamenu={
init: function(){
if($('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children').length){
$('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children > a').on('click', function(e){
let href=$(this).attr('href');
if(!$(this).parent('li').hasClass('mfn-li-childrens-show')){
e.preventDefault();
e.stopPropagation();
$(this).siblings('ul').slideDown(300);
$(this).parent('li').addClass('mfn-li-childrens-show');
}else if(href==''||href=='#'){
e.preventDefault();
e.stopPropagation();
$(this).siblings('ul').slideUp(300);
$(this).parent('li').removeClass('mfn-li-childrens-show');
}});
}
if($('.column_megamenu_menu ul.mfn-mm-menu-horizontal.mfn-mm-submenu-on-click li').length){
$('.column_megamenu_menu ul.mfn-mm-menu-horizontal.mfn-mm-submenu-on-click li > a').on('click', function(e){
if($(this).closest('li').hasClass('menu-item-has-children')&&!$(this).closest('li').hasClass('mfn-li-hover')){
e.preventDefault();
e.stopPropagation();
$(this).closest('li').addClass('mfn-li-hover');
}});
}
if($('ul.mfn-menu-submenu-on-hover li.mfn-menu-item-has-megamenu, li.mfn-theme-options-menu.mfn-menu-item-has-megamenu').length){
$('ul.mfn-menu-submenu-on-hover li.mfn-menu-item-has-megamenu, li.mfn-theme-options-menu.mfn-menu-item-has-megamenu').on('mouseenter mousemove', function(){
if($(this).find('.mfn-megamenu-full-width').length||$(this).find('.mfn-megamenu-grid').length){
headerMegamenu.setLeft($(this));
}});
}
if($('ul.mfn-menu-submenu-on-click li.mfn-menu-item-has-megamenu').length){
$('ul.mfn-menu-submenu-on-click li.mfn-menu-item-has-megamenu > a.mfn-menu-link').on('click', function(e){
let href=$(this).attr('href');
if($(this).closest('li').find('.mfn-megamenu-full-width').length||$(this).closest('li').find('.mfn-megamenu-grid').length){
headerMegamenu.setLeft($(this).closest('li'));
}
if(href==''||href=='#'){
e.preventDefault();
e.stopPropagation();
if($(this).closest('li').hasClass('mfn-li-hover')){
$(this).closest('li').removeClass('mfn-li-hover');
$(document).unbind('click', headerTemplate.bindUnclick);
$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');
}else{
$('ul.mfn-menu-submenu-on-click li.mfn-menu-item-has-megamenu.mfn-li-hover').removeClass('mfn-li-hover');
$(this).closest('li').addClass('mfn-li-hover');
$(document).bind('click', headerTemplate.bindUnclick);
headerTemplate.animContentAddClass();
}}else if(!$(this).closest('li').hasClass('mfn-li-hover')){
e.preventDefault();
e.stopPropagation();
if(!$(this).closest('li.mfn-li-hover').length){
$('.mfn-header-tmpl ul li.mfn-li-hover').removeClass('mfn-li-hover');
}else if($(this).closest('li.mfn-li-hover').find('li.mfn-li-hover').length){
$(this).closest('li.mfn-li-hover').find('li.mfn-li-hover').removeClass('mfn-li-hover');
}
if(!$(this).closest('.mfn-megamenu-menu').length&&!$(this).closest('li.mfn-li-hover').length){
if($('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children.mfn-li-childrens-show').length){
$('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children.mfn-li-childrens-show ul').slideUp();
$('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children.mfn-li-childrens-show').removeClass('mfn-li-childrens-show');
}}
headerTemplate.animContentAddClass();
$(this).parent('li').addClass('mfn-li-hover');
$(document).bind('click', headerTemplate.bindUnclick);
}
headerMegamenu.afterShow();
});
}},
afterShow: function(){
bannerBox.init();
$(window).trigger('resize');
},
setLeft: function($li){
var $mm=$li.find('.mfn-menu-item-megamenu');
var left=$li.offset().left;
$mm.css('width', $(window).width()+'px');
$mm.css('left', '-'+left+'px');
$mm.addClass('mfn-mm-grid-set');
}}
var footerTemplate={
init: function(){
if($('body').hasClass('mfn-footer-stick')){
footerTemplate.isSticky();
}
if($('body').hasClass('mfn-footer-sliding')||$('body').hasClass('mfn-footer-fixed')){
setTimeout(footerTemplate.isSliding(), 300);
}
return;
},
isSticky: function(){
var offsetTop=$('.mfn-footer-tmpl').offset().top + $('.mfn-footer-tmpl').outerHeight();
if(offsetTop < $(window).height()){
$('.mfn-footer-tmpl').addClass('is-sticky');
}else{
$('.mfn-footer-tmpl').removeClass('is-sticky');
}},
isSliding: function(){
var footer=$('.mfn-footer-tmpl').outerHeight();
$('#Content').css('margin-bottom', footer);
}}
var bannerBox={
init: function(){
setTimeout(bannerBox.set, 300);
},
set: function(){
if($('body').hasClass('mfn-ui')) return;
if(!$('.column_banner_box .hidden-desc').length) return;
if($(".mfn-banner-box .last-visible-el").length){
$(".mfn-banner-box .last-visible-el").removeClass('last-visible-el');
$('.hidden-wrapper .hidden-desc').removeAttr('style');
}
$(".mfn-banner-box").each(function(){
if($(this).find('.hidden-desc').length){
if($(this).find('.hidden-desc').prev().length) $(this).find('.hidden-desc').prev().addClass("last-visible-el");
var hd_h=$(this).find('.hidden-wrapper').outerHeight();
$(this).find('.hidden-desc').css({ '--mfn-banner-box-height': hd_h + 'px' });
}});
}};
var mfn_hotspot={
init: function(){
if($(window).width() >=960){
mfn_hotspot.hover();
}else{
mfn_hotspot.click();
}},
hover: function(e){
$('.mfn-image-hotspot .hotspot-point').on('mouseenter', function(){
$(this).addClass('is-active');
}).on('mouseleave', function(){
$(this).removeClass('is-active');
});
$('.mfn-image-hotspot').on('mouseleave', function(){
$('.mfn-image-hotspot .hotspot-point.is-active').removeClass('is-active');
});
},
click: function(){
$('.mfn-image-hotspot .hotspot-point').on('click', function(){
if($('.mfn-image-hotspot .hotspot-point.is-active').length) $('.mfn-image-hotspot .hotspot-point.is-active').removeClass('is-active');
$(this).addClass('is-active');
$(document).bind('click', mfn_hotspot.bindUnclick);
})
},
bindUnclick: function(e){
if(!$('.mfn-image-hotspot .hotspot-point').is(e.target)&&$('.mfn-image-hotspot .hotspot-point').has(e.target).length===0){
if($('.mfn-image-hotspot .hotspot-point.is-active').length) $('.mfn-image-hotspot .hotspot-point.is-active').removeClass('is-active');
$(document).unbind('click', mfn_hotspot.bindUnclick);
}}
};
var headerTemplate={
hasSticky: false,
isMobile: false,
offsetScroll: 60,
hasBodyOffset: false,
height: 0,
type: 'default',
animContentOnHover: function(){
if($('.mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu').hasClass('mfn-menu-submenu-on-hover')){
$('.mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.mfn-menu-item-has-megamenu, .mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.menu-item-has-children').on('mouseenter mousemove', function(){
headerTemplate.animContentAddClass();
}).on('mouseenter', function(){
$(window).trigger('resize');
});
}
$('.mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.mfn-menu-item-has-megamenu, .mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.menu-item-has-children').on('mouseleave', function(){
$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');
});
},
animContentAddClass: function(){
if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-content-blur')){
$('body').addClass('mfn-content-blur');
}else if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-content-gray')){
$('body').addClass('mfn-content-gray');
}else if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-content-overlay')){
$('body').addClass('mfn-content-overlay');
}},
openOnClick: function(){
$(document).on('click', '.mfn-header-tmpl .mfn-header-menu.mfn-menu-submenu-on-click li.menu-item-has-children > a.mfn-menu-link', function(e){
let href=$(this).attr('href');
if($(this).closest('li').find('.mfn-megamenu-full-width').length||$(this).closest('li').find('.mfn-megamenu-grid').length){
headerMegamenu.setLeft($(this).closest('li'));
}
if(href==''||href=='#'){
e.preventDefault();
e.stopPropagation();
if($(this).closest('li').hasClass('mfn-li-hover')){
$(this).closest('li').removeClass('mfn-li-hover');
$(document).unbind('click', headerTemplate.bindUnclick);
$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');
}else{
$(this).closest('li').siblings('li').removeClass('mfn-li-hover');
$(this).closest('li').addClass('mfn-li-hover');
$(document).bind('click', headerTemplate.bindUnclick);
headerTemplate.animContentAddClass();
}}else if(!$(this).closest('li').hasClass('mfn-li-hover')){
e.preventDefault();
e.stopPropagation();
$(this).closest('li').siblings('li').removeClass('mfn-li-hover');
headerTemplate.animContentAddClass();
$(this).parent('li').addClass('mfn-li-hover');
$(document).bind('click', headerTemplate.bindUnclick);
}
$(window).trigger('resize')
});
},
bindUnclick: function(e){
var $li=$('.mfn-header-tmpl ul li.mfn-li-hover');
if(!$li.is(e.target)&&!$li.find(e.target).length){
$li.removeClass('mfn-li-hover');
$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');
$(document).unbind('click', headerTemplate.bindUnclick);
}},
closeable: function(){
if($('body').hasClass('mfn-ui')) return;
$('.mfn-header-tmpl .close-closeable-section').on('click', function(){
var $section=$(this).closest('.mcb-section');
$section.addClass('closeable-hidden').slideUp(300, function(){
headerTemplate.resetOffset();
headerTemplate.offset();
});
if(typeof $section.attr('data-close-days')!=='undefined'&&$section.attr('data-close-days')!='0'){
var days=$section.attr('data-close-days');
var uid=$section.attr('data-uid');
var date=new Date();
date.setTime(date.getTime()+(parseInt(days)*24*60*60*1000));
var expires="; expires="+date.toGMTString();
document.cookie="mfn_closed_section_"+uid+"=1"+expires+"; path=/"
}});
},
resetOffset: function(){
if(headerTemplate.type!='default'&&headerTemplate.hasBodyOffset){
$('#Wrapper').css({ 'padding-top': $('.mfn-header-tmpl').outerHeight() });
}},
detectHover: function(){
$('.mfn-header-tmpl .mfn-menu-submenu-on-hover .mfn-menu-item-has-megamenu.mfn-menu-li').on('mouseenter', function(){
headerMegamenu.afterShow();
});
},
offset: function(){
if(headerTemplate.hasSticky&&!headerTemplate.isMobile) return;
headerTemplate.offsetScroll=0;
var _screen='default';
if(headerTemplate.isMobile) _screen='header-mobile';
$('.mfn-header-tmpl .mfn-'+_screen+'-section.hide-on-scroll:not(.closeable-hidden)').each(function(){
headerTemplate.offsetScroll +=$(this).outerHeight();
});
},
init: function(){
headerTemplate.hasBodyOffset=false;
if(!$('body').hasClass('mfn-ui')&&$('.mfn-header-tmpl').find('.section.closeable-active').length){
$('.mfn-header-tmpl').find('.section.closeable-active').each(function(){
if(headerTemplate.readcookie('mfn_closed_section_'+$(this).attr('data-uid'))||headerTemplate.readcookie('mfn_closed_section')==$(this).attr('data-uid')){
$(this).remove();
}else{
$(this).removeClass('mfn-temporary-hidden');
}});
}
if($(window).width() < 767&&$('.mfn-header-tmpl').hasClass('mfn-hasMobile')){
headerTemplate.isMobile=true;
headerTemplate.type=$('.mfn-header-tmpl').attr('data-mobile-type');
if($('.mfn-header-tmpl').hasClass('mfn-mobile-header-body-offset')){
headerTemplate.hasBodyOffset=true;
}else{
headerTemplate.hasBodyOffset=false;
}}else{
headerTemplate.isMobile=false;
headerTemplate.type=$('.mfn-header-tmpl').attr('data-type');
if($('.mfn-header-tmpl').hasClass('mfn-header-body-offset')){
headerTemplate.hasBodyOffset=true;
}else{
headerTemplate.hasBodyOffset=false;
}}
if($('.mfn-header-tmpl .mfn-menu-submenu-on-click:not(.initialized)').length){
$('.mfn-header-tmpl .mfn-menu-submenu-on-click').addClass('initialized');
headerTemplate.openOnClick();
}
if($('.mfn-header-tmpl .mfn-menu-submenu-on-hover .mfn-menu-item-has-megamenu.mfn-menu-li').length){
headerTemplate.detectHover();
}
if($('.mfn-header-tmpl').hasClass('mfn-header-content-blur')||$('.mfn-header-tmpl').hasClass('mfn-header-content-gray')||$('.mfn-header-tmpl').hasClass('mfn-header-content-overlay')){
headerTemplate.animContentOnHover();
}
if($('.mfn-header-tmpl').hasClass('mfn-hasSticky')){
headerTemplate.hasSticky=true;
}else{
headerTemplate.hasSticky=false;
}
if($('body style.tmp-mfn-header-template').length) $('body style.tmp-mfn-header-template').remove();
if($('.mfn-header-tmpl .close-closeable-section').length) headerTemplate.closeable();
if($('body').hasClass('mfn-header-scrolled')&&!$('.mfn-builder-active').length) $('body').removeClass('mfn-header-scrolled');
headerTemplate.getHeight();
headerTemplate.offset();
headerTemplate.scroll();
if($(window).scrollTop() > 10){
$(window).trigger('scroll');
}
if($('#wpadminbar').length){
let admin_bar_h=$('#wpadminbar').outerHeight();
if($('.mfn-header-tmpl.mfn-header-tmpl-fixed').length) $('.mfn-header-tmpl.mfn-header-tmpl-fixed').css({'margin-top': admin_bar_h});
if($(window).width() < 767&&$('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').length) $('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').css({'margin-top': admin_bar_h});
}},
scroll: function(){
if($('.mfn-header-tmpl').hasClass('mfn-header-tmpl-default')&&headerTemplate.hasSticky&&!headerTemplate.isMobile){
$('body').append('<style class="tmp-mfn-header-template">html body.mfn-header-scrolled{padding-top: '+headerTemplate.height+'px;}</style>');
}
$(window).scroll(function(){
var scrolled=$(this).scrollTop();
var scroll_offset=headerTemplate.offsetScroll;
if(headerTemplate.hasSticky&&!headerTemplate.isMobile) scroll_offset=headerTemplate.height;
if(scrolled > scroll_offset){
$('body').addClass('mfn-header-scrolled');
if(($('.mfn-header-tmpl').hasClass('mfn-header-tmpl-fixed')&&!headerTemplate.isMobile)||($('.mfn-header-tmpl').hasClass('mfn-mobile-header-tmpl-fixed')&&headerTemplate.isMobile)&&$('.mfn-header-tmpl .hide-on-scroll:not(.closeable-hidden)').length){
if(headerTemplate.hasSticky&&!headerTemplate.isMobile){
$('.mfn-header-tmpl').css({'top': 0});
}else{
$('.mfn-header-tmpl').css({'top': '-'+headerTemplate.offsetScroll+'px'});
}}
}else{
$('body').removeClass('mfn-header-scrolled');
if(($('.mfn-header-tmpl').hasClass('mfn-header-tmpl-fixed')&&!headerTemplate.isMobile)||($('.mfn-header-tmpl').hasClass('mfn-mobile-header-tmpl-fixed')&&headerTemplate.isMobile)&&$('.mfn-header-tmpl .hide-on-scroll:not(.closeable-hidden)').length){
$('.mfn-header-tmpl').css({'top': '-'+scrolled+'px'});
}
if($('#wpadminbar').length){
let admin_bar_h=$('#wpadminbar').outerHeight();
if($('.mfn-header-tmpl.mfn-header-tmpl-fixed').length) $('.mfn-header-tmpl.mfn-header-tmpl-fixed').css({'margin-top': admin_bar_h});
if($(window).width() < 767&&$('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').length) $('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').css({'margin-top': admin_bar_h});
}}
});
},
getHeight: function(){
headerTemplate.height=$('.mfn-header-tmpl').outerHeight();
if(headerTemplate.type!='default'&&headerTemplate.hasBodyOffset){
$('#Wrapper').css({ 'padding-top':headerTemplate.height });
}else{
$('#Wrapper').removeAttr('style');
}
$('.mfn-header-tmpl').removeAttr('style');
},
readcookie: function(name){
var nameEQ=name+"=";
var ca=document.cookie.split(';');
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==' ')c=c.substring(1,c.length);
if(c.indexOf(nameEQ)==0) return c.substring(nameEQ.length,c.length)
}
return null
},
}
let mfnMarqueeText={
win_width: 1920,
init: function(){
if(!$('.mfn-marquee-text-wrapper').length) return;
this.win_width=$(window).width();
setTimeout(function(){
mfnMarqueeText.set();
}, 100);
},
set: function(){
$('.mfn-marquee-text-wrapper:not(.initialized)').each(function(i, el){
if(!$(this).find('.mfn-marquee-text').length) return;
$(this).addClass('initialized');
let track=$(this).find('.mfn-marquee-text');
let width=track.outerWidth();
document.body.style.display='table';
document.body.offsetHeight;
document.body.style.display='';
if(width==0) return;
let divi=Math.round((mfnMarqueeText.win_width / width)) + 1;
let iter=Math.round(Math.ceil(divi / 2) * 2);
if(iter < 2) return;
let track_html=track.html();
for (var j=1; j <=iter; j++){
track.append(track_html);
}
let count=track.find('.mfn-marquee-item').length;
if(count % 2!==0){
track.append(track_html);
}});
}}
mfnMarqueeText.init();
$(document).on('mfn:ajax:refresh', mfnMarqueeText.init);
let mfnReadMore={
init: function(){
if($('body').hasClass('mfn-ui')) return false;
if(!$('.mfn-read-more').length) return false;
mfnReadMore.prepare();
mfnReadMore.click();
},
prepare: function(){
if($('body').hasClass('mfn-ui')) return false;
$('.mfn-read-more').each(function(){
let this_wrapper=$(this).closest('.column');
let copy=this_wrapper.nextAll('.column').addClass('mfn-read-more-hidden');
if(copy.length){
$.each(copy, function(i, item){
this_wrapper.before(item);
});
}});
},
click: function(){
$(document).on('click', '.mfn-read-more', function(e){
e.preventDefault();
let icon=false;
let box=$(this);
let wrapper=box.closest('.mcb-wrap');
let label1=box.attr('data-title1');
let label2=box.attr('data-title2');
let icon1=box.attr('data-icon1');
let icon2=box.attr('data-icon2');
let label=box.find(box.attr('data-label_path'));
icon=box.find(box.attr('data-icon_path'));
if(wrapper.hasClass('mfn-read-more-expanded')){
wrapper.find('.mfn-read-more-hidden').removeClass('showed').slideUp(500);
wrapper.removeClass('mfn-read-more-expanded');
label.html(label1);
if(icon1!=''&&icon.length){
icon.html('<i class="'+icon1+'"></i>');
}else{
icon.remove();
}}else{
wrapper.find('.mfn-read-more-hidden').addClass('showed').slideDown(500);
wrapper.addClass('mfn-read-more-expanded');
label.html(label2);
if(icon2!=''){
if(icon.length){
icon.html('<i class="'+icon2+'"></i>');
}else{
if(box.find('.mfn-icon-box').length){
box.find('.mfn-icon-box').prepend('<span class="'+box.attr('data-icon_path').replace('.', '')+'"><i class="'+icon2+'"></i></span>');
}else{
box.prepend('<span class="'+box.attr('data-icon_path').replace('.', '')+'"><i class="'+icon2+'"></i></span>');
}}
}}
$(window).trigger('resize');
setTimeout(function(){
$(window).trigger('resize');
}, 600);
});
}}
let mfnPopup={
init: function(){
if($('body').hasClass('elementor-editor-active')) return;
$(document).on('click', '.open-mfn-popup', function(e){
e.preventDefault();
let popup_id=$(this).attr('data-mfnpopup');
if(popup_id=='popup_id_required'){
alert('Popup ID id required');
}else if(!$(popup_id).length){
alert('We cannot find popup with inserted ID');
}else{
mfnPopup.showPopup($(popup_id));
}});
if(!$('body').hasClass('mfn-cookies-open')) mfnPopup.open();
$(document).on('click', '.exit-mfn-popup', function(e){
e.preventDefault();
let $popup=$(this).closest('.mfn-popup-tmpl');
mfnPopup.hidePopup($popup);
});
},
open: function(){
if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-scroll').length) mfnPopup.showOnScroll();
if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-start-delay').length) mfnPopup.showOnDelay();
if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-exit').length) mfnPopup.showOnExit();
if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-scroll-to-element').length) mfnPopup.showOnScrollToElement();
if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-start').length) mfnPopup.showOnStart();
},
hidePopup: function($popup){
if($popup.find('video').length) $popup.find('video').get(0).pause();
if($popup.find('iframe').length){
var popup_iframe=$popup.find('iframe')[0];
var ifr_src=$(popup_iframe).attr('src');
if(typeof ifr_src!='undefined'){
if(ifr_src.includes('youtu')) popup_iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
if(ifr_src.includes('vimeo')){
$(popup_iframe).attr('src', ifr_src);
}}
}
$popup.removeClass('mfn-popup-active');
$('html').removeClass('mfn-popup-browser-scroll-disabled');
if($('style.mfn-popup-tmpl-blur-'+$popup.attr('data-id')).length){
$('style.mfn-popup-tmpl-blur-'+$popup.attr('data-id')).remove();
}
if($popup.hasClass('mfn-popup-tmpl-display-cookie-based')||$popup.hasClass('mfn-popup-tmpl-display-one')){
let days=365;
if($popup.hasClass('mfn-popup-tmpl-display-cookie-based')) days=parseInt($popup.attr('data-cookie'));
let cookie_name='mfn_popup_'+$popup.attr('data-id');
mfnPopup.addCookie(days, cookie_name);
}},
showPopup: function($popup){
let cookie_name='mfn_popup_'+$popup.attr('data-id');
if(mfnPopup.checkCookie(cookie_name)) return;
if(typeof $popup.attr('data-blur')!=='undefined'){
$('body').append('<style class="mfn-popup-tmpl-blur-'+$popup.attr('data-id')+'">#Wrapper{ filter: blur('+$popup.attr('data-blur')+'px) }</style>');
}
if(!$popup.hasClass('mfn-popup-active')) $popup.addClass('mfn-popup-active mfn-popup-showed');
if($popup.hasClass('mfn-popup-tmpl-hide-automatically-delay')) mfnPopup.hideAutomatically($popup);
if($popup.hasClass('mfn-popup-tmpl-close-button-show-delay')) mfnPopup.showExitButton($popup);
if(!$('body').hasClass('mfn-ui')&&$popup.hasClass('mfn-popup-close-on-overlay-click')){
$popup.bind('click',  mfnPopup.closeOverlayClick);
}
if(!$popup.hasClass('mfn-popup-browser-scroll-enabled')){
$('html').addClass('mfn-popup-browser-scroll-disabled');
}
bannerBox.set();
if($popup.find('.slick-initialized').length){
$popup.find('.slick-initialized').slick('refresh');
}
$(document).trigger('mfnPopupInit');
},
closeOverlayClick: function(e){
var div=$(e.delegateTarget).find('.mfn-popup-tmpl-content-wrapper');
if(!div.is(e.target)&&div.has(e.target).length===0){
mfnPopup.hidePopup($(e.delegateTarget));
$(e.delegateTarget).unbind('click', mfnPopup.closeOverlayClick);
}},
hideAutomatically: function($popup){
if($('body').hasClass('mfn-ui')) return;
let delay=parseInt($popup.attr('data-hidedelay'));
setTimeout(function(){ mfnPopup.hidePopup($popup); }, delay);
},
showExitButton: function($popup){
let delay=parseInt($popup.attr('data-closebuttondelay'));
setTimeout(function(){ $popup.addClass('mfn-closebutton-active'); }, delay);
},
showOnScroll: function(){
$('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-scroll').each(function(){
let $popup=$(this);
let scroll_offset=parseInt($popup.attr('data-display'));
$(window).on('scroll', function(){
if($(window).scrollTop() > scroll_offset&&!$popup.hasClass('mfn-popup-showed')) mfnPopup.showPopup($popup);
});
});
},
showOnScrollToElement: function(){
$('body').imagesLoaded(function(){
$('.mfn-popup-tmpl.mfn-popup-tmpl-display-scroll-to-element').each(function(){
let $popup=$(this);
let scroll_offset=$($popup.attr('data-display')).length ? parseInt($($popup.attr('data-display')).offset().top):100;
$(window).on('scroll', function(){
if($(window).scrollTop() > scroll_offset&&!$popup.hasClass('mfn-popup-showed')) mfnPopup.showPopup($popup);
});
});
});
},
showOnDelay: function(){
$('.mfn-popup-tmpl.mfn-popup-tmpl-display-start-delay').each(function(){
let $popup=$(this);
let delay=parseInt($popup.attr('data-display'));
setTimeout(function(){
mfnPopup.showPopup($popup)
}, delay);
});
},
showOnExit: function(){
$('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-exit').each(function(){
let $popup=$(this);
$(document).on('mouseleave', function(){
mfnPopup.showPopup($popup)
});
});
},
showOnStart: function(){
$('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-start').each(function(){
let $popup=$(this);
mfnPopup.showPopup($popup)
});
},
addCookie(days, cookie_name){
let date=new Date();
date.setTime(date.getTime()+(parseInt(days)*24*60*60*1000));
let expires="; expires="+date.toGMTString();
document.cookie=cookie_name+"=true"+expires+"; path=/";
},
checkCookie(cookie_name){
var nameEQ=cookie_name+"=";
var ca=document.cookie.split(';');
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==' ') c=c.substring(1,c.length);
if(c.indexOf(nameEQ)==0) return c.substring(nameEQ.length,c.length)
}
return null
}}
$(document).on('mfn:gdpr2:close', function(){
mfnPopup.open();
});
var mfnReadMoreTermDesc=function($el){
var $el=$el.closest('.mfn-desc-expandable');
var start=$el.css('max-height'),
height;
$el.css('max-height','unset');
height=$el.outerHeight();
$el.css('max-height',start);
$el.animate({
'maxHeight': height + 'px'
},500);
$el.find('.read-more').animate({
'opacity': 0
},500,function(){
$(this).hide();
});
};
$(document).on('click', '.mfn-desc-expandable .read-more .read-more-button', function(e){
e.preventDefault();
mfnReadMoreTermDesc($(this));
});
var mfnSideMenu={
id: '',
wrapper: false,
hash: false,
submenu: false,
backup: {},
init: function(){
if($('.mfn-menu-tabs-wrapper').length) mfnSideMenu.menutabs();
if($('.mfn-sidemenu-menu.mfn-menu-submenu-on.mfn-menu-submenu-toggled').length) mfnSideMenu.toggleSubmenu();
if($('.mfn-sidemenu-menu.mfn-menu-submenu-on.mfn-menu-submenu-replace').length) mfnSideMenu.replaceSubmenu();
if($('a.mfn-open-sidebar').length){
mfnSideMenu.click();
mfnSideMenu.closeClick();
}
$(document).on('click', '.mfn-sidemenu-menu li a', function(e){
var href=$(this).attr('href');
if(href=='#'&&$(this).siblings('.outer-menu-sub').length){
e.preventDefault();
$(this).siblings('.outer-menu-sub').trigger('click');
}else if(href.includes('#')){
var href_split=href.split('#');
if(!$('#'+href_split[1]).length) return;
e.preventDefault();
$(this).closest('li').addClass('current-menu-item').siblings('li').removeClass('current-menu-item');
var offset=$('#'+href_split[1]).offset().top;
offset=offset -(fixStickyHeaderH() + adminBarH());
$('body, html').animate({scrollTop: offset}, 500);
mfnSideMenu.id=$(this).closest('.mfn-sidemenu-tmpl').attr('data-id');
mfnSideMenu.hide();
}});
},
closeClick: function(){
$(document).on('click', '.mfn-sidemenu-closebutton', function(e){
e.preventDefault();
mfnSideMenu.id=$(this).closest('.mfn-sidemenu-tmpl').attr('data-id');
mfnSideMenu.hide();
});
},
hide: function(){
$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).removeClass('mfn-sidemenu-active');
$('html').addClass('mfn-closing-sidemenu-'+mfnSideMenu.id);
$('html').removeClass('mfn-sidemenu-'+mfnSideMenu.id+'-active');
$('html').removeClass('mfn-sidemenu-move-content-'+$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-align'));
$('html').removeClass('mfn-sidemenu-bodyscroll-'+$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-bodyscroll'));
$('html').removeClass('mfn-sidemenu-entrance-'+$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-entrance'));
setTimeout(function(){
$('html').removeClass('mfn-closing-sidemenu-'+mfnSideMenu.id);
redrawAllRevolutionSliders();
}, 310);
if(!$('body').hasClass('mfn-ui')&&$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).hasClass('mfn-sidemenu-close-on-overlay-click')){
$(document).unbind('click', mfnSideMenu.closeOverlayClick);
}},
click: function(){
$(document).on('click', 'a.mfn-open-sidebar', function(e){
e.preventDefault();
mfnSideMenu.id=String($(this).attr('data-sidemenu'));
if(!$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).length) return;
$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).addClass('mfn-sidemenu-active');
$('html').addClass('mfn-sidemenu-entrance-'+$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-entrance'));
$('html').addClass('mfn-sidemenu-'+mfnSideMenu.id+'-active');
if($('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-entrance')=='move-content'){
$('html').addClass('mfn-sidemenu-move-content-'+$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-align'));
}
if(!$('body').hasClass('mfn-ui')&&$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).hasClass('mfn-sidemenu-close-on-overlay-click')){
$(document).bind('click',  mfnSideMenu.closeOverlayClick);
}
setTimeout(function(){
$('html').addClass('mfn-sidemenu-bodyscroll-'+$('#mfn-sidemenu-tmpl-'+mfnSideMenu.id).attr('data-bodyscroll'));
},300);
});
},
closeOverlayClick: function(e){
var div=$('.mfn-sidemenu-tmpl');
if(!div.is(e.target)&&div.has(e.target).length===0&&!$(e.target).closest('.mfn-menu-wrapper').length){
mfnSideMenu.hide();
}},
menutabs: function(){
$(document).on('click', '.mfn-menu-tabs-wrapper ul.mfn-menu-tabs-nav li a', function(e){
e.preventDefault();
if($(this).parent('li').hasClass('active')){
return;
}else{
$(this).closest('.mfn-menu-tabs-wrapper').find('.active').removeClass('active');
}
let id=$(this).attr('href');
$(this).parent('li').addClass('active');
$(this).closest('.mfn-menu-tabs-wrapper').find(id).addClass('active');
});
},
toggleSubmenu: function(){
$(document).on('click', '.mfn-sidemenu-menu.mfn-menu-submenu-on.mfn-menu-submenu-toggled li.menu-item-has-children .outer-menu-sub', function(e){
e.preventDefault();
if(!$(this).closest('li').hasClass('current-menu-item')&&!$(this).closest('li').hasClass('current-menu-ancestor')){
$(this).closest('li').addClass('current-menu-ancestor');
}else if($(this).closest('li').hasClass('current-menu-ancestor')){
$(this).closest('li').removeClass('current-menu-ancestor');
}else{
$(this).closest('li').toggleClass('current-menu-item');
}});
},
replaceSubmenu: function(){
$(document).on('click', '.mfn-sidemenu-menu.mfn-menu-submenu-on.mfn-menu-submenu-replace li.menu-item-has-children .outer-menu-sub', function(e){
e.preventDefault();
mfnSideMenu.wrapper=$(this).closest('.mfn-menu-wrapper');
mfnSideMenu.hash=mfnSideMenu.wrapper.attr('data-hash');
mfnSideMenu.submenu=$(this).closest('li').find('ul.sub-menu').first().html();
if(typeof mfnSideMenu.backup[mfnSideMenu.hash]==='undefined'){
mfnSideMenu.backup[mfnSideMenu.hash]=[];
}
let newest={};
newest.label=$(this).closest('li').find('a.mfn-menu-link .menu-label').html();
newest.ul=mfnSideMenu.wrapper.children('ul').html();
mfnSideMenu.backup[mfnSideMenu.hash].push(newest);
if(!mfnSideMenu.wrapper.hasClass('mfn-sidemenu-replaced')) mfnSideMenu.wrapper.addClass('mfn-sidemenu-replaced');
setTimeout(mfnSideMenu.updateMenu, 10);
});
mfnSideMenu.breadcrumbsClick();
},
updateMenu: function(){
if(mfnSideMenu.wrapper.find('.mfn-sidemenu-back').length) mfnSideMenu.wrapper.find('.mfn-sidemenu-breadcrumbs').remove();
mfnSideMenu.wrapper
.find('.mfn-sidemenu-menu').html(mfnSideMenu.submenu);
if(mfnSideMenu.backup[mfnSideMenu.hash].length > 0){
mfnSideMenu.wrapper.prepend('<div class="mfn-sidemenu-breadcrumbs"></div>');
mfnSideMenu.backup[mfnSideMenu.hash].map(function(el, i){
mfnSideMenu.wrapper.find('.mfn-sidemenu-breadcrumbs').append('<span class="mfn-sidemenu-breadcrumbs-separator"><i class="icon-left-open"></i></span><a data-index="'+i+'" class="mfn-sidemenu-back" href="#">'+el.label+'</a>');
});
}},
breadcrumbsClick: function(){
$(document).on('click', '.mfn-sidemenu-back', function(e){
e.preventDefault();
mfnSideMenu.wrapper=$(this).closest('.mfn-menu-wrapper');
mfnSideMenu.hash=mfnSideMenu.wrapper.attr('data-hash');
let index=$(this).attr('data-index');
let choosed=mfnSideMenu.backup[mfnSideMenu.hash][index];
mfnSideMenu.submenu=choosed.ul;
mfnSideMenu.backup[mfnSideMenu.hash]=mfnSideMenu.backup[mfnSideMenu.hash].filter((item,i)=> { return i < index });
setTimeout(mfnSideMenu.updateMenu, 10);
});
}}
document.addEventListener('DOMContentLoaded', ()=> {
const images=Array.from(document.querySelectorAll('img.mfn-lazy'));
if('IntersectionObserver' in window){
const imageObserver=new IntersectionObserver((entries, observer)=> {
entries.forEach(entry=> {
if(entry.isIntersecting){
const image=entry.target;
image.src=image.dataset.src;
imageObserver.unobserve(image);
window.dispatchEvent(new Event('resize'));
}});
});
images.forEach(img=> imageObserver.observe(img));
}});
})(jQuery);
(function(){
let lastZoom=1;
function getZoom(){
return window.outerWidth / window.innerWidth;
}
function checkZoomReset(){
const currentZoom=getZoom();
if(Math.abs(currentZoom - 1) < 0.02&&lastZoom!==1){
window.scrollTo({ left: 0, top: window.scrollY, behavior: 'instant' });
}
lastZoom=currentZoom;
}
window.addEventListener('resize', checkZoomReset);
})();
document.addEventListener("touchstart", function(){}, true);
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=window,c=n(a),d=[],u=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||!1,h=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||!1;if(u)a.cancelAnimationFrame||(h=function(e){});else{var p=0;u=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-p)),i=a.setTimeout(function(){e(t+r)},r);return p=t+r,i},h=function(e){a.clearTimeout(e)}}var m=a.MutationObserver||a.WebKitMutationObserver||!1,f=Date.now||function(){return(new Date).getTime()},g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},v=!1,w=function(){if(v)return v;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in a,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(a.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in a&&9===l.documentMode,i.isie10=i.isie&&"performance"in a&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in a,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in a,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in a,i.hasw3ctouch=(a.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(a.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&a.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==m,e=null,v=i,i},b=function(e,p){function v(){var e=T.doc.css(P.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function b(){var e=T.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}function x(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=I[r]||0)?t?T.win.outerHeight()-T.win.innerHeight():T.win.outerWidth()-T.win.innerWidth():1;return T.isie8&&i&&(i+=1),s?i:0}return i}function S(e,o,t,r){T._bind(e,o,function(r){var i={original:r=r||a.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function z(e,o,t,r){T.scrollrunning||(T.newscrolly=T.getScrollTop(),T.newscrollx=T.getScrollLeft(),D=f());var i=f()-D;if(D=f(),i>350?A=1:A+=(2-A)/10,e=e*A|0,o=o*A|0,e){if(r)if(e<0){if(T.getScrollLeft()>=T.page.maxw)return!0}else if(T.getScrollLeft()<=0)return!0;var s=e>0?1:-1;X!==s&&(T.scrollmom&&T.scrollmom.stop(),T.newscrollx=T.getScrollLeft(),X=s),T.lastdeltax-=e}if(o){if(function(){var e=T.getScrollTop();if(o<0){if(e>=T.page.maxh)return!0}else if(e<=0)return!0}()){if(M.nativeparentscrolling&&t&&!T.ispage&&!T.zoomactive)return!0;var n=T.view.h>>1;T.newscrolly<-n?(T.newscrolly=-n,o=-1):T.newscrolly>T.page.maxh+n?(T.newscrolly=T.page.maxh+n,o=1):o=0}var l=o>0?1:-1;B!==l&&(T.scrollmom&&T.scrollmom.stop(),T.newscrolly=T.getScrollTop(),B=l),T.lastdeltay-=o}(o||e)&&T.synched("relativexy",function(){var e=T.lastdeltay+T.newscrolly;T.lastdeltay=0;var o=T.lastdeltax+T.newscrollx;T.lastdeltax=0,T.rail.drag||T.doScrollPos(o,e)})}function k(e,o,t){var r,i;return!(t||!q)||(0===e.deltaMode?(r=-e.deltaX*(M.mousescrollstep/54)|0,i=-e.deltaY*(M.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*M.mousescrollstep*50/80|0,i=-e.deltaY*M.mousescrollstep*50/80|0),o&&M.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?T.getScrollLeft()>=T.page.maxw:T.getScrollLeft()<=0)&&(i=r,r=0)),T.isrtlmode&&(r=-r),z(r,i,t,!0)?void(t&&(q=!0)):(q=!1,e.stopImmediatePropagation(),e.preventDefault()))}var T=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var E=n("body"),M=this.opt={doc:E,win:!1};if(n.extend(M,g),M.snapbackspeed=80,e)for(var L in M)void 0!==e[L]&&(M[L]=e[L]);if(M.disablemutationobserver&&(m=!1),this.doc=M.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(M.win?M.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==M.win,this.win=M.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=E,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=M.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==M.rtlmode){var C=this.win[0]==a?this.body:this.win,N=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==N||"lr-tb"==N||""===N?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==N||"tb"==N||"tb-rl"==N||"rl-tb"==N,this.isvertical="vertical-rl"==N||"tb"==N||"tb-rl"==N)}else this.isrtlmode=!0===M.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==M.scrollbarid)this.id=M.scrollbarid;else do{this.id="ascrail"+i++}while(l.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=M.overflowx,this.overflowy=M.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=w();var P=n.extend({},this.detected);this.canhwscroll=P.hastransform&&M.hwacceleration,this.ishwscroll=this.canhwscroll&&T.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(P.iswebkit||P.isie||P.isie11):this.hasreversehr=!(P.iswebkit||P.isie&&!P.isie10&&!P.isie11):this.hasreversehr=!1,this.istouchcapable=!1,P.cantouch||!P.hasw3ctouch&&!P.hasmstouch?!P.cantouch||P.isios||P.isandroid||!P.iswebkit&&!P.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,M.enablemouselockapi||(P.hasmousecapture=!1,P.haspointerlock=!1),this.debounced=function(e,o,t){T&&(T.delaylist[e]||!1||(T.delaylist[e]={h:u(function(){T.delaylist[e].fn.call(T),T.delaylist[e]=!1},t)},o.call(T)),T.delaylist[e].fn=o)},this.synched=function(e,o){T.synclist[e]?T.synclist[e]=o:(T.synclist[e]=o,u(function(){T&&(T.synclist[e]&&T.synclist[e].call(T),T.synclist[e]=null)}))},this.unsynched=function(e){T.synclist[e]&&(T.synclist[e]=!1)},this.css=function(e,o){for(var t in o)T.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?T.getScrollTop():T.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?T.getScrollLeft():T.setScrollLeft(e)};var R=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=f(),this.df=o-e};if(R.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(f()-this.ts)/this.spd},getNow:function(){var e=(f()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e>=1?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=f(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},P.hastranslate3d&&P.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[13]:-o[5];if(T.timerscroll&&T.timerscroll.bz)return T.timerscroll.bz.getNow()}return T.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[12]:-o[4];if(T.timerscroll&&T.timerscroll.bh)return T.timerscroll.bh.getNow()}return T.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,a,1),o.niceevent=!0,e.dispatchEvent(o)};var _=this.isrtlmode?1:-1;P.hastranslate3d&&M.enabletranslate3d?(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])}):(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])})}else this.getScrollTop=function(){return T.docscroll.scrollTop()},this.setScrollTop=function(e){T.docscroll.scrollTop(e)},this.getScrollLeft=function(){return T.hasreversehr?T.detected.ismozilla?T.page.maxw-Math.abs(T.docscroll.scrollLeft()):T.page.maxw-T.docscroll.scrollLeft():T.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(T)return T.hasreversehr&&(e=T.detected.ismozilla?-(T.page.maxw-e):T.page.maxw-e),T.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:a.pageYOffset||l.documentElement.scrollTop,left:a.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(T.isfixed){var e=T.win.offset(),o=T.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=T.win.offset();if(!T.viewport)return t;var r=T.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(T.ishwscroll)T.rail.css({height:T.win.innerHeight()-(M.railpadding.top+M.railpadding.bottom)}),T.railh&&T.railh.css({width:T.win.innerWidth()-(M.railpadding.left+M.railpadding.right)});else{var r=T.getOffset();if(o={top:r.top,left:r.left-(M.railpadding.left+M.railpadding.right)},o.top+=x(T.win,"border-top-width",!0),o.left+=T.rail.align?T.win.outerWidth()-x(T.win,"border-right-width")-T.rail.width:x(T.win,"border-left-width"),(t=M.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),T.railslocked||T.rail.css({top:o.top,left:o.left,height:(e?e.h:T.win.innerHeight())-(M.railpadding.top+M.railpadding.bottom)}),T.zoom&&T.zoom.css({top:o.top+1,left:1==T.rail.align?o.left-20:o.left+T.rail.width+4}),T.railh&&!T.railslocked){o={top:r.top,left:r.left},(t=M.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=T.railh.align?o.top+x(T.win,"border-top-width",!0)+T.win.innerHeight()-T.railh.height:o.top+x(T.win,"border-top-width",!0),s=o.left+x(T.win,"border-left-width");T.railh.css({top:i-(M.railpadding.top+M.railpadding.bottom),left:s,width:T.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;T.railslocked||(T.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?T.doScrollLeft:T.doScrollTop,s=t?(e.pageX-T.railh.offset().left-T.cursorwidth/2)*T.scrollratio.x:(e.pageY-T.rail.offset().top-T.cursorheight/2)*T.scrollratio.y,T.unsynched("relativexy"),r(0|s)):(r=t?T.doScrollLeftBy:T.doScrollBy,s=t?T.scroll.x:T.scroll.y,n=t?e.pageX-T.railh.offset().left:e.pageY-T.rail.offset().top,i=t?T.view.w:T.view.h,r(s>=n?i:-i)))},T.newscrolly=T.newscrollx=0,T.hasanimationframe="requestAnimationFrame"in a,T.hascancelanimationframe="cancelAnimationFrame"in a,T.hasborderbox=!1,this.init=function(){if(T.saved.css=[],P.isoperamini)return!0;if(P.isandroid&&!("hidden"in l))return!0;M.emulatetouch=M.emulatetouch||M.touchbehavior,T.hasborderbox=a.getComputedStyle&&"border-box"===a.getComputedStyle(l.body)["box-sizing"];var e={"overflow-y":"hidden"};if((P.isie11||P.isie10)&&(e["-ms-overflow-style"]="none"),T.ishwscroll&&(this.doc.css(P.transitionstyle,P.prefixstyle+"transform 0ms ease-out"),P.transitionend&&T.bind(T.doc,P.transitionend,T.onScrollTransitionEnd,!1)),T.zindex="auto",T.ispage||"auto"!=M.zindex?T.zindex=M.zindex:T.zindex=b()||"auto",!T.ispage&&"auto"!=T.zindex&&T.zindex>s&&(s=T.zindex),T.isie&&0===T.zindex&&"auto"==M.zindex&&(T.zindex="auto"),!T.ispage||!P.isieold){var i=T.docscroll;T.ispage&&(i=T.haswrapper?T.win:T.doc),T.css(i,e),T.ispage&&(P.isie11||P.isie)&&T.css(n("html"),e),!P.isios||T.ispage||T.haswrapper||T.css(E,{"-webkit-overflow-scrolling":"touch"});var d=n(l.createElement("div"));d.css({position:"relative",top:0,float:"right",width:M.cursorwidth,height:0,"background-color":M.cursorcolor,border:M.cursorborder,"background-clip":"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),d.addClass("nicescroll-cursors"),T.cursor=d;var u=n(l.createElement("div"));u.attr("id",T.id),u.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,f=["left","right","top","bottom"];for(var g in f)p=f[g],(h=M.railpadding[p]||0)&&u.css("padding-"+p,h+"px");u.append(d),u.width=Math.max(parseFloat(M.cursorwidth),d.outerWidth()),u.css({width:u.width+"px",zIndex:T.zindex,background:M.background,cursor:"default"}),u.visibility=!0,u.scrollable=!0,u.align="left"==M.railalign?0:1,T.rail=u,T.rail.drag=!1;var v=!1;!M.boxzoom||T.ispage||P.isieold||(v=l.createElement("div"),T.bind(v,"click",T.doZoom),T.bind(v,"mouseenter",function(){T.zoom.css("opacity",M.cursoropacitymax)}),T.bind(v,"mouseleave",function(){T.zoom.css("opacity",M.cursoropacitymin)}),T.zoom=n(v),T.zoom.css({cursor:"pointer",zIndex:T.zindex,backgroundImage:"url("+M.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),M.dblclickzoom&&T.bind(T.win,"dblclick",T.doZoom),P.cantouch&&M.gesturezoom&&(T.ongesturezoom=function(e){return e.scale>1.5&&T.doZoomIn(e),e.scale<.8&&T.doZoomOut(e),T.cancelEvent(e)},T.bind(T.win,"gestureend",T.ongesturezoom))),T.railh=!1;var w;if(M.horizrailenabled&&(T.css(i,{overflowX:"hidden"}),(d=n(l.createElement("div"))).css({position:"absolute",top:0,height:M.cursorwidth,width:0,backgroundColor:M.cursorcolor,border:M.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),P.isieold&&d.css("overflow","hidden"),d.addClass("nicescroll-cursors"),T.cursorh=d,(w=n(l.createElement("div"))).attr("id",T.id+"-hr"),w.addClass("nicescroll-rails nicescroll-rails-hr"),w.height=Math.max(parseFloat(M.cursorwidth),d.outerHeight()),w.css({height:w.height+"px",zIndex:T.zindex,background:M.background}),w.append(d),w.visibility=!0,w.scrollable=!0,w.align="top"==M.railvalign?0:1,T.railh=w,T.railh.drag=!1),T.ispage)u.css({position:"fixed",top:0,height:"100%"}),u.css(u.align?{right:0}:{left:0}),T.body.append(u),T.railh&&(w.css({position:"fixed",left:0,width:"100%"}),w.css(w.align?{bottom:0}:{top:0}),T.body.append(w));else{if(T.ishwscroll){"static"==T.win.css("position")&&T.css(T.win,{position:"relative"});var x="HTML"==T.win[0].nodeName?T.body:T.win;n(x).scrollTop(0).scrollLeft(0),T.zoom&&(T.zoom.css({position:"absolute",top:1,right:0,"margin-right":u.width+4}),x.append(T.zoom)),u.css({position:"absolute",top:0}),u.css(u.align?{right:0}:{left:0}),x.append(u),w&&(w.css({position:"absolute",left:0,bottom:0}),w.css(w.align?{bottom:0}:{top:0}),x.append(w))}else{T.isfixed="fixed"==T.win.css("position");var S=T.isfixed?"fixed":"absolute";T.isfixed||(T.viewport=T.getViewport(T.win[0])),T.viewport&&(T.body=T.viewport,/fixed|absolute/.test(T.viewport.css("position"))||T.css(T.viewport,{position:"relative"})),u.css({position:S}),T.zoom&&T.zoom.css({position:S}),T.updateScrollBar(),T.body.append(u),T.zoom&&T.body.append(T.zoom),T.railh&&(w.css({position:S}),T.body.append(w))}P.isios&&T.css(T.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),M.disableoutline&&(P.isie&&T.win.attr("hideFocus","true"),P.iswebkit&&T.win.css("outline","none"))}if(!1===M.autohidemode?(T.autohidedom=!1,T.rail.css({opacity:M.cursoropacitymax}),T.railh&&T.railh.css({opacity:M.cursoropacitymax})):!0===M.autohidemode||"leave"===M.autohidemode?(T.autohidedom=n().add(T.rail),P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursor)),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh)),T.railh&&P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"scroll"==M.autohidemode?(T.autohidedom=n().add(T.rail),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh))):"cursor"==M.autohidemode?(T.autohidedom=n().add(T.cursor),T.railh&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"hidden"==M.autohidemode&&(T.autohidedom=!1,T.hide(),T.railslocked=!1),P.cantouch||T.istouchcapable||M.emulatetouch||P.hasmstouch){T.scrollmom=new y(T);T.ontouchstart=function(e){if(T.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(T.hasmoving=!1,T.scrollmom.timer&&(T.triggerScrollEnd(),T.scrollmom.stop()),!T.railslocked){var o=T.getTarget(e);if(o&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return T.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),T.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,st:T.getScrollTop(),sl:T.getScrollLeft(),pt:2,dl:!1,tg:o},T.ispage||!M.directionlockdeadzone)T.rail.drag.dl="f";else{var i={w:c.width(),h:c.height()},s=T.getContentSize(),l=s.h-i.h,a=s.w-i.w;T.rail.scrollable&&!T.railh.scrollable?T.rail.drag.ck=l>0&&"v":!T.rail.scrollable&&T.railh.scrollable?T.rail.drag.ck=a>0&&"h":T.rail.drag.ck=!1}if(M.emulatetouch&&T.isiframe&&P.isie){var d=T.win.position();T.rail.drag.x+=d.left,T.rail.drag.y+=d.top}if(T.hasmoving=!1,T.lastmouseup=!1,T.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return P.hasmousecapture&&o.setCapture(),M.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(T.hasmoving)return!1;o._onclick.call(this,e)}),T.cancelEvent(e)):T.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(T.preventclick={tg:o,click:!1})}}},T.ontouchend=function(e){if(!T.rail.drag)return!0;if(2==T.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;T.rail.drag=!1;var o="mouseup"===e.type;if(T.hasmoving&&(T.scrollmom.doMomentum(),T.lastmouseup=!0,T.hideCursor(),P.hasmousecapture&&l.releaseCapture(),o))return T.cancelEvent(e)}else if(1==T.rail.drag.pt)return T.onmouseup(e)};var z=M.emulatetouch&&T.isiframe&&!P.hasmousecapture,k=.3*M.directionlockdeadzone|0;T.ontouchmove=function(e,o){if(!T.rail.drag)return!0;if(e.targetTouches&&M.preventmultitouchscrolling&&e.targetTouches.length>1)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2==T.rail.drag.pt){"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY);var t,r;if(r=t=0,z&&!o){var i=T.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-T.rail.drag.y,a=e.clientX+r,c=a-T.rail.drag.x,d=T.rail.drag.st-n;if(T.ishwscroll&&M.bouncescroll)d<0?d=Math.round(d/2):d>T.page.maxh&&(d=T.page.maxh+Math.round((d-T.page.maxh)/2));else if(d<0?(d=0,s=0):d>T.page.maxh&&(d=T.page.maxh,s=0),0===s&&!T.hasmoving)return T.ispage||(T.rail.drag=!1),!0;var u=T.getScrollLeft();if(T.railh&&T.railh.scrollable&&(u=T.isrtlmode?c-T.rail.drag.sl:T.rail.drag.sl-c,T.ishwscroll&&M.bouncescroll?u<0?u=Math.round(u/2):u>T.page.maxw&&(u=T.page.maxw+Math.round((u-T.page.maxw)/2)):(u<0&&(u=0,a=0),u>T.page.maxw&&(u=T.page.maxw,a=0))),!T.hasmoving){if(T.rail.drag.y===e.clientY&&T.rail.drag.x===e.clientX)return T.cancelEvent(e);var h=Math.abs(n),p=Math.abs(c),m=M.directionlockdeadzone;if(T.rail.drag.ck?"v"==T.rail.drag.ck?p>m&&h<=k?T.rail.drag=!1:h>m&&(T.rail.drag.dl="v"):"h"==T.rail.drag.ck&&(h>m&&p<=k?T.rail.drag=!1:p>m&&(T.rail.drag.dl="h")):h>m&&p>m?T.rail.drag.dl="f":h>m?T.rail.drag.dl=p>k?"f":"v":p>m&&(T.rail.drag.dl=h>k?"f":"h"),!T.rail.drag.dl)return T.cancelEvent(e);T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0}return T.preventclick&&!T.preventclick.click&&(T.preventclick.click=T.preventclick.tg.onclick||!1,T.preventclick.tg.onclick=T.onpreventclick),T.rail.drag.dl&&("v"==T.rail.drag.dl?u=T.rail.drag.sl:"h"==T.rail.drag.dl&&(d=T.rail.drag.st)),T.synched("touchmove",function(){T.rail.drag&&2==T.rail.drag.pt&&(T.prepareTransition&&T.resetTransition(),T.rail.scrollable&&T.setScrollTop(d),T.scrollmom.update(a,s),T.railh&&T.railh.scrollable?(T.setScrollLeft(u),T.showCursor(d,u)):T.showCursor(d),P.isie10&&l.selection.clear())}),T.cancelEvent(e)}return 1==T.rail.drag.pt?T.onmousemove(e):void 0},T.ontouchstartCursor=function(e,o){if(!T.rail.drag||3==T.rail.drag.pt){if(T.locked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:T.scroll.x,sy:T.scroll.y,pt:3,hr:!!o};var t=T.getTarget(e);return!T.ispage&&P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.cancelEvent(e)}},T.ontouchendCursor=function(e){if(T.rail.drag){if(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),3!=T.rail.drag.pt)return;return T.rail.drag=!1,T.cancelEvent(e)}},T.ontouchmoveCursor=function(e){if(T.rail.drag){if(3!=T.rail.drag.pt)return;if(T.cursorfreezed=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.touches[0].clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.touches[0].clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("touchmove",function(){T.rail.drag&&3==T.rail.drag.pt&&(T.showCursor(),T.rail.drag.hr?T.doScrollLeft(Math.round(T.scroll.x*T.scrollratio.x),M.cursordragspeed):T.doScrollTop(Math.round(T.scroll.y*T.scrollratio.y),M.cursordragspeed))}),T.cancelEvent(e)}}}if(T.onmousedown=function(e,o){if(!T.rail.drag||1==T.rail.drag.pt){if(T.railslocked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,pt:1,hr:o||!1};var t=T.getTarget(e);return P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.hasmoving=!1,T.cancelEvent(e)}},T.onmouseup=function(e){if(T.rail.drag)return 1!=T.rail.drag.pt||(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),T.rail.drag=!1,T.cursorfreezed=!1,T.hasmoving&&T.triggerScrollEnd(),T.cancelEvent(e))},T.onmousemove=function(e){if(T.rail.drag){if(1!==T.rail.drag.pt)return;if(P.ischrome&&0===e.which)return T.onmouseup(e);if(T.cursorfreezed=!0,T.hasmoving||T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("mousemove",function(){T.cursorfreezed&&(T.showCursor(),T.rail.drag.hr?T.scrollLeft(Math.round(T.scroll.x*T.scrollratio.x)):T.scrollTop(Math.round(T.scroll.y*T.scrollratio.y)))}),T.cancelEvent(e)}T.checkarea=0},P.cantouch||M.emulatetouch)T.onpreventclick=function(e){if(T.preventclick)return T.preventclick.tg.onclick=T.preventclick.click,T.preventclick=!1,T.cancelEvent(e)},T.onclick=!P.isios&&function(e){return!T.lastmouseup||(T.lastmouseup=!1,T.cancelEvent(e))},M.grabcursorenabled&&P.cursorgrabvalue&&(T.css(T.ispage?T.doc:T.win,{cursor:P.cursorgrabvalue}),T.css(T.rail,{cursor:P.cursorgrabvalue}));else{var L=function(e){if(T.selectiondrag){if(e){var o=T.win.outerHeight(),t=e.pageY-T.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),T.selectiondrag.df=t}if(0!==T.selectiondrag.df){var r=-2*T.selectiondrag.df/6|0;T.doScrollBy(r),T.debounced("doselectionscroll",function(){L()},50)}}};T.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},T.onselectionstart=function(e){T.ispage||(T.selectiondrag=T.win.offset())},T.onselectionend=function(e){T.selectiondrag=!1},T.onselectiondrag=function(e){T.selectiondrag&&T.hasTextSelected()&&T.debounced("selectionscroll",function(){L(e)},250)}}if(P.hasw3ctouch?(T.css(T.ispage?n("html"):T.win,{"touch-action":"none"}),T.css(T.rail,{"touch-action":"none"}),T.css(T.cursor,{"touch-action":"none"}),T.bind(T.win,"pointerdown",T.ontouchstart),T.bind(l,"pointerup",T.ontouchend),T.delegate(l,"pointermove",T.ontouchmove)):P.hasmstouch?(T.css(T.ispage?n("html"):T.win,{"-ms-touch-action":"none"}),T.css(T.rail,{"-ms-touch-action":"none"}),T.css(T.cursor,{"-ms-touch-action":"none"}),T.bind(T.win,"MSPointerDown",T.ontouchstart),T.bind(l,"MSPointerUp",T.ontouchend),T.delegate(l,"MSPointerMove",T.ontouchmove),T.bind(T.cursor,"MSGestureHold",function(e){e.preventDefault()}),T.bind(T.cursor,"contextmenu",function(e){e.preventDefault()})):P.cantouch&&(T.bind(T.win,"touchstart",T.ontouchstart,!1,!0),T.bind(l,"touchend",T.ontouchend,!1,!0),T.bind(l,"touchcancel",T.ontouchend,!1,!0),T.delegate(l,"touchmove",T.ontouchmove,!1,!0)),M.emulatetouch&&(T.bind(T.win,"mousedown",T.ontouchstart,!1,!0),T.bind(l,"mouseup",T.ontouchend,!1,!0),T.bind(l,"mousemove",T.ontouchmove,!1,!0)),(M.cursordragontouch||!P.cantouch&&!M.emulatetouch)&&(T.rail.css({cursor:"default"}),T.railh&&T.railh.css({cursor:"default"}),T.jqbind(T.rail,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.rail,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.rail,"click",function(e){T.doRailClick(e,!1,!1)}),T.bind(T.rail,"dblclick",function(e){T.doRailClick(e,!0,!1)}),T.bind(T.cursor,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursor,"dblclick",function(e){T.cancelEvent(e)})),T.railh&&(T.jqbind(T.railh,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.railh,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.railh,"click",function(e){T.doRailClick(e,!1,!0)}),T.bind(T.railh,"dblclick",function(e){T.doRailClick(e,!0,!0)}),T.bind(T.cursorh,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursorh,"dblclick",function(e){T.cancelEvent(e)})))),M.cursordragontouch&&(this.istouchcapable||P.cantouch)&&(T.bind(T.cursor,"touchstart",T.ontouchstartCursor),T.bind(T.cursor,"touchmove",T.ontouchmoveCursor),T.bind(T.cursor,"touchend",T.ontouchendCursor),T.cursorh&&T.bind(T.cursorh,"touchstart",function(e){T.ontouchstartCursor(e,!0)}),T.cursorh&&T.bind(T.cursorh,"touchmove",T.ontouchmoveCursor),T.cursorh&&T.bind(T.cursorh,"touchend",T.ontouchendCursor)),M.emulatetouch||P.isandroid||P.isios?(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.ontouchend),T.onclick&&T.bind(l,"click",T.onclick),M.cursordragontouch?(T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.cursorh&&T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onmouseup)):(T.bind(T.rail,"mousedown",function(e){e.preventDefault()}),T.railh&&T.bind(T.railh,"mousedown",function(e){e.preventDefault()}))):(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.onmouseup),T.bind(l,"mousemove",T.onmousemove),T.onclick&&T.bind(l,"click",T.onclick),T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.railh&&(T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.bind(T.cursorh,"mouseup",T.onmouseup)),!T.ispage&&M.enablescrollonselection&&(T.bind(T.win[0],"mousedown",T.onselectionstart),T.bind(l,"mouseup",T.onselectionend),T.bind(T.cursor,"mouseup",T.onselectionend),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onselectionend),T.bind(l,"mousemove",T.onselectiondrag)),T.zoom&&(T.jqbind(T.zoom,"mouseenter",function(){T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.zoom,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}))),M.enablemousewheel&&(T.isiframe||T.mousewheel(P.isie&&T.ispage?l:T.win,T.onmousewheel),T.mousewheel(T.rail,T.onmousewheel),T.railh&&T.mousewheel(T.railh,T.onmousewheelhr)),T.ispage||P.cantouch||/HTML|^BODY/.test(T.win[0].nodeName)||(T.win.attr("tabindex")||T.win.attr({tabindex:++r}),T.bind(T.win,"focus",function(e){o=T.getTarget(e).id||T.getTarget(e)||!1,T.hasfocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"blur",function(e){o=!1,T.hasfocus=!1}),T.bind(T.win,"mouseenter",function(e){t=T.getTarget(e).id||T.getTarget(e)||!1,T.hasmousefocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"mouseleave",function(e){t=!1,T.hasmousefocus=!1,T.rail.drag||T.hideCursor()})),T.onkeypress=function(e){if(T.railslocked&&0===T.page.maxh)return!0;e=e||a.event;var r=T.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(T.hasfocus||T.hasmousefocus&&!o||T.ispage&&!o&&!t){var i=e.keyCode;if(T.railslocked&&27!=i)return T.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,c=!1;switch(i){case 38:case 63233:T.doScrollBy(72),c=!0;break;case 40:case 63235:T.doScrollBy(-72),c=!0;break;case 37:case 63232:T.railh&&(s?T.doScrollLeft(0):T.doScrollLeftBy(72),c=!0);break;case 39:case 63234:T.railh&&(s?T.doScrollLeft(T.page.maxw):T.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:T.doScrollBy(T.view.h),c=!0;break;case 34:case 63277:T.doScrollBy(-T.view.h),c=!0;break;case 36:case 63273:T.railh&&s?T.doScrollPos(0,0):T.doScrollTo(0),c=!0;break;case 35:case 63275:T.railh&&s?T.doScrollPos(T.page.maxw,T.page.maxh):T.doScrollTo(T.page.maxh),c=!0;break;case 32:M.spacebarenabled&&(l?T.doScrollBy(T.view.h):T.doScrollBy(-T.view.h),c=!0);break;case 27:T.zoomactive&&(T.doZoom(),c=!0)}if(c)return T.cancelEvent(e)}},M.enablekeyboard&&T.bind(l,P.isopera&&!P.isopera12?"keypress":"keydown",T.onkeypress),T.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(T.wheelprevented=!0)}),T.bind(l,"keyup",function(e){e.ctrlKey||!1||(T.wheelprevented=!1)}),T.bind(a,"blur",function(e){T.wheelprevented=!1}),T.bind(a,"resize",T.onscreenresize),T.bind(a,"orientationchange",T.onscreenresize),T.bind(a,"load",T.lazyResize),P.ischrome&&!T.ispage&&!T.haswrapper){var C=T.win.attr("style"),N=parseFloat(T.win.css("width"))+1;T.win.css("width",N),T.synched("chromefix",function(){T.win.attr("style",C)})}if(T.onAttributeChange=function(e){T.lazyResize(T.isieold?250:30)},M.enableobserver&&(T.isie11||!1===m||(T.observerbody=new m(function(e){if(e.forEach(function(e){if("attributes"==e.type)return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],T.doc[0])?T.hide():T.show()}),T.me.clientWidth!=T.page.width||T.me.clientHeight!=T.page.height)return T.lazyResize(30)}),T.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!T.ispage&&!T.haswrapper)){var R=T.win[0];!1!==m?(T.observer=new m(function(e){e.forEach(T.onAttributeChange)}),T.observer.observe(R,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),T.observerremover=new m(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(T&&e.removedNodes[o]===R)return T.remove()})}),T.observerremover.observe(R.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(T.bind(R,P.isie&&!P.isie9?"propertychange":"DOMAttrModified",T.onAttributeChange),P.isie9&&R.attachEvent("onpropertychange",T.onAttributeChange),T.bind(R,"DOMNodeRemoved",function(e){e.target===R&&T.remove()}))}!T.ispage&&M.boxzoom&&T.bind(a,"resize",T.resizeZoom),T.istextarea&&(T.bind(T.win,"keydown",T.lazyResize),T.bind(T.win,"mouseup",T.lazyResize)),T.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){T.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){T.iframexd=!0,o=!1}if(T.iframexd)return"console"in a&&console.log("NiceScroll error: policy restriced iframe"),!0;if(T.forcescreen=!0,T.isiframe&&(T.iframe={doc:n(o),html:T.doc.contents().find("html")[0],body:T.doc.contents().find("body")[0]},T.getContentSize=function(){return{w:Math.max(T.iframe.html.scrollWidth,T.iframe.body.scrollWidth),h:Math.max(T.iframe.html.scrollHeight,T.iframe.body.scrollHeight)}},T.docscroll=n(T.iframe.body)),!P.isios&&M.iframeautoresize&&!T.isiframe){T.win.scrollTop(0),T.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);T.doc.height(t)}T.lazyResize(30),T.css(n(T.iframe.body),e),P.isios&&T.haswrapper&&T.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?T.bind(this.contentWindow,"scroll",T.onscroll):T.bind(o,"scroll",T.onscroll),M.enablemousewheel&&T.mousewheel(o,T.onmousewheel),M.enablekeyboard&&T.bind(o,P.isopera?"keypress":"keydown",T.onkeypress),P.cantouch?(T.bind(o,"touchstart",T.ontouchstart),T.bind(o,"touchmove",T.ontouchmove)):M.emulatetouch&&(T.bind(o,"mousedown",T.ontouchstart),T.bind(o,"mousemove",function(e){return T.ontouchmove(e,!0)}),M.grabcursorenabled&&P.cursorgrabvalue&&T.css(n(o.body),{cursor:P.cursorgrabvalue})),T.bind(o,"mouseup",T.ontouchend),T.zoom&&(M.dblclickzoom&&T.bind(o,"dblclick",T.doZoom),T.ongesturezoom&&T.bind(o,"gestureend",T.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){_.call(T.doc[0],!1)},500),T.bind(this.doc,"load",_)}},this.showCursor=function(e,o){if(T.cursortimeout&&(clearTimeout(T.cursortimeout),T.cursortimeout=0),T.rail){if(T.autohidedom&&(T.autohidedom.stop().css({opacity:M.cursoropacitymax}),T.cursoractive=!0),T.rail.drag&&1==T.rail.drag.pt||(void 0!==e&&!1!==e&&(T.scroll.y=e/T.scrollratio.y|0),void 0!==o&&(T.scroll.x=o/T.scrollratio.x|0)),T.cursor.css({height:T.cursorheight,top:T.scroll.y}),T.cursorh){var t=T.hasreversehr?T.scrollvaluemaxw-T.scroll.x:T.scroll.x;T.cursorh.css({width:T.cursorwidth,left:!T.rail.align&&T.rail.visibility?t+T.rail.width:t}),T.cursoractive=!0}T.zoom&&T.zoom.stop().css({opacity:M.cursoropacitymax})}},this.hideCursor=function(e){T.cursortimeout||T.rail&&T.autohidedom&&(T.hasmousefocus&&"leave"===M.autohidemode||(T.cursortimeout=setTimeout(function(){T.rail.active&&T.showonmouseevent||(T.autohidedom.stop().animate({opacity:M.cursoropacitymin}),T.zoom&&T.zoom.stop().animate({opacity:M.cursoropacitymin}),T.cursoractive=!1),T.cursortimeout=0},e||M.hidecursordelay)))},this.noticeCursor=function(e,o,t){T.showCursor(o,t),T.rail.active||T.hideCursor(e)},this.getContentSize=T.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:T.haswrapper?function(){return{w:T.doc[0].offsetWidth,h:T.doc[0].offsetHeight}}:function(){return{w:T.docscroll[0].scrollWidth,h:T.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!T||!T.win)return!1;var t=T.page.maxh,r=T.page.maxw,i=T.view.h,s=T.view.w;if(T.view={w:T.ispage?T.win.width():T.win[0].clientWidth,h:T.ispage?T.win.height():T.win[0].clientHeight},T.page=o||T.getContentSize(),T.page.maxh=Math.max(0,T.page.h-T.view.h),T.page.maxw=Math.max(0,T.page.w-T.view.w),T.page.maxh==t&&T.page.maxw==r&&T.view.w==s&&T.view.h==i){if(T.ispage)return T;var n=T.win.offset();if(T.lastposition){var l=T.lastposition;if(l.top==n.top&&l.left==n.left)return T}T.lastposition=n}return 0===T.page.maxh?(T.hideRail(),T.scrollvaluemax=0,T.scroll.y=0,T.scrollratio.y=0,T.cursorheight=0,T.setScrollTop(0),T.rail&&(T.rail.scrollable=!1)):(T.page.maxh-=M.railpadding.top+M.railpadding.bottom,T.rail.scrollable=!0),0===T.page.maxw?(T.hideRailHr(),T.scrollvaluemaxw=0,T.scroll.x=0,T.scrollratio.x=0,T.cursorwidth=0,T.setScrollLeft(0),T.railh&&(T.railh.scrollable=!1)):(T.page.maxw-=M.railpadding.left+M.railpadding.right,T.railh&&(T.railh.scrollable=M.horizrailenabled)),T.railslocked=T.locked||0===T.page.maxh&&0===T.page.maxw,T.railslocked?(T.ispage||T.updateScrollBar(T.view),!1):(T.hidden||(T.rail.visibility||T.showRail(),T.railh&&!T.railh.visibility&&T.showRailHr()),T.istextarea&&T.win.css("resize")&&"none"!=T.win.css("resize")&&(T.view.h-=20),T.cursorheight=Math.min(T.view.h,Math.round(T.view.h*(T.view.h/T.page.h))),T.cursorheight=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorheight),T.cursorwidth=Math.min(T.view.w,Math.round(T.view.w*(T.view.w/T.page.w))),T.cursorwidth=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorwidth),T.scrollvaluemax=T.view.h-T.cursorheight-(M.railpadding.top+M.railpadding.bottom),T.hasborderbox||(T.scrollvaluemax-=T.cursor[0].offsetHeight-T.cursor[0].clientHeight),T.railh&&(T.railh.width=T.page.maxh>0?T.view.w-T.rail.width:T.view.w,T.scrollvaluemaxw=T.railh.width-T.cursorwidth-(M.railpadding.left+M.railpadding.right)),T.ispage||T.updateScrollBar(T.view),T.scrollratio={x:T.page.maxw/T.scrollvaluemaxw,y:T.page.maxh/T.scrollvaluemax},T.getScrollTop()>T.page.maxh?T.doScrollTop(T.page.maxh):(T.scroll.y=T.getScrollTop()/T.scrollratio.y|0,T.scroll.x=T.getScrollLeft()/T.scrollratio.x|0,T.cursoractive&&T.noticeCursor()),T.scroll.y&&0===T.getScrollTop()&&T.doScrollTo(T.scroll.y*T.scrollratio.y|0),T)},this.resize=T.onResize;var O=0;this.onscreenresize=function(e){clearTimeout(O);var o=!T.ispage&&!T.haswrapper;o&&T.hideRails(),O=setTimeout(function(){T&&(o&&T.showRails(),T.resize()),O=0},120)},this.lazyResize=function(e){return clearTimeout(O),e=isNaN(e)?240:e,O=setTimeout(function(){T&&T.resize(),O=0},e),T},this.jqbind=function(e,o,t){T.events.push({e:e,n:o,f:t,q:!0}),n(e).on(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))T._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";S(r,i,o,t||!1),"DOMMouseScroll"==i&&S(r,"MozMousePixelScroll",o,t||!1)}};var Y=!1;if(P.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){Y=!0}});a.addEventListener("test",null,H)}catch(e){}this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},a.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},a.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||a.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||a.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=d[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;r>=0;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},T.bind(e,o,s.f,r,i),d[o]=s),T.ispage?(s.a=[T.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(T.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=d[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===T.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(T._unbind(e,o,s.l.f),d[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;T._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){T.events.push({e:e,n:o,f:t,b:r,q:!1}),Y&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){d[o]?T.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<T.events.length;e++){var o=T.events[e];o.q?o.e.unbind(o.n,o.f):T._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return T.showRail().showRailHr()},this.showRail=function(){return 0===T.page.maxh||!T.ispage&&"none"==T.win.css("display")||(T.rail.visibility=!0,T.rail.css("display","block")),T},this.showRailHr=function(){return T.railh&&(0===T.page.maxw||!T.ispage&&"none"==T.win.css("display")||(T.railh.visibility=!0,T.railh.css("display","block"))),T},this.hideRails=function(){return T.hideRail().hideRailHr()},this.hideRail=function(){return T.rail.visibility=!1,T.rail.css("display","none"),T},this.hideRailHr=function(){return T.railh&&(T.railh.visibility=!1,T.railh.css("display","none")),T},this.show=function(){return T.hidden=!1,T.railslocked=!1,T.showRails()},this.hide=function(){return T.hidden=!0,T.railslocked=!0,T.hideRails()},this.toggle=function(){return T.hidden?T.show():T.hide()},this.remove=function(){T.stop(),T.cursortimeout&&clearTimeout(T.cursortimeout);for(var e in T.delaylist)T.delaylist[e]&&h(T.delaylist[e].h);T.doZoomOut(),T.unbindAll(),P.isie9&&T.win[0].detachEvent("onpropertychange",T.onAttributeChange),!1!==T.observer&&T.observer.disconnect(),!1!==T.observerremover&&T.observerremover.disconnect(),!1!==T.observerbody&&T.observerbody.disconnect(),T.events=null,T.cursor&&T.cursor.remove(),T.cursorh&&T.cursorh.remove(),T.rail&&T.rail.remove(),T.railh&&T.railh.remove(),T.zoom&&T.zoom.remove();for(var o=0;o<T.saved.css.length;o++){var t=T.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}T.saved=!1,T.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===T.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in T)T[i]=null,delete T[i];T=null},this.scrollstart=function(e){return this.onscrollstart=e,T},this.scrollend=function(e){return this.onscrollend=e,T},this.scrollcancel=function(e){return this.onscrollcancel=e,T},this.zoomin=function(e){return this.onzoomin=e,T},this.zoomout=function(e){return this.onzoomout=e,T},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(T.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:T.newscrollx,y:T.newscrolly},speed:i};T.onscrollstart.call(T,s)}},this.triggerScrollEnd=function(){if(T.onscrollend){var e=T.getScrollLeft(),o=T.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};T.onscrollend.call(T,t)}};var B=0,X=0,D=0,A=1,q=!1;if(this.onmousewheel=function(e){if(T.wheelprevented||T.locked)return!1;if(T.railslocked)return T.debounced("checkunlock",T.resize,250),!1;if(T.rail.drag)return T.cancelEvent(e);if("auto"===M.oneaxismousemode&&0!==e.deltaX&&(M.oneaxismousemode=!1),M.oneaxismousemode&&0===e.deltaX&&!T.rail.scrollable)return!T.railh||!T.railh.scrollable||T.onmousewheelhr(e);var o=f(),t=!1;if(M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,T.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(T.checkarea=0),r},this.onmousewheelhr=function(e){if(!T.wheelprevented){if(T.railslocked||!T.railh.scrollable)return!0;if(T.rail.drag)return T.cancelEvent(e);var o=f(),t=!1;return M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,!!T.nativescrollingarea||(T.railslocked?T.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return T.cancelScroll(),T.scrollmon&&T.scrollmon.stop(),T.cursorfreezed=!1,T.scroll.y=Math.round(T.getScrollTop()*(1/T.scrollratio.y)),T.noticeCursor(),T},this.getTransitionSpeed=function(e){return 80+e/72*M.scrollspeed|0},M.smoothscroll)if(T.ishwscroll&&P.hastransition&&M.usetransition&&M.smoothscroll){var j="";this.resetTransition=function(){j="",T.doc.css(P.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:T.getTransitionSpeed(e),r=t+"ms";return j!==r&&(j=r,T.doc.css(P.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&u(o),T.showCursor(T.getScrollTop(),T.getScrollLeft()),T.notifyScrollEvent(T.win[0])};u(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();if(((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll(),M.bouncescroll?(o<0?o=o/2|0:o>T.page.maxh&&(o=T.page.maxh+(o-T.page.maxh)/2|0),e<0?e=e/2|0:e>T.page.maxw&&(e=T.page.maxw+(e-T.page.maxw)/2|0)):(o<0?o=0:o>T.page.maxh&&(o=T.page.maxh),e<0?e=0:e>T.page.maxw&&(e=T.page.maxw)),T.scrollrunning&&e==T.newscrollx&&o==T.newscrolly)return!1;T.newscrolly=o,T.newscrollx=e;var s=T.getScrollTop(),n=T.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=T.prepareTransition(a);T.scrollrunning||(T.scrollrunning=!0,T.triggerScrollStart(n,s,e,o,c),T.cursorupdate.start()),T.scrollendtrapped=!0,P.transitionend||(T.scrollendtrapped&&clearTimeout(T.scrollendtrapped),T.scrollendtrapped=setTimeout(T.onScrollTransitionEnd,c)),T.setScrollTop(T.newscrolly),T.setScrollLeft(T.newscrollx)},this.cancelScroll=function(){if(!T.scrollendtrapped)return!0;var e=T.getScrollTop(),o=T.getScrollLeft();return T.scrollrunning=!1,P.transitionend||clearTimeout(P.transitionend),T.scrollendtrapped=!1,T.resetTransition(),T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.timerscroll&&T.timerscroll.tm&&clearInterval(T.timerscroll.tm),T.timerscroll=!1,T.cursorfreezed=!1,T.cursorupdate.stop(),T.showCursor(e,o),T},this.onScrollTransitionEnd=function(){if(T.scrollendtrapped){var e=T.getScrollTop(),o=T.getScrollLeft();if(e<0?e=0:e>T.page.maxh&&(e=T.page.maxh),o<0?o=0:o>T.page.maxw&&(o=T.page.maxw),e!=T.newscrolly||o!=T.newscrollx)return T.doScrollPos(o,e,M.snapbackspeed);T.scrollrunning&&T.triggerScrollEnd(),T.scrollrunning=!1,T.scrollendtrapped=!1,T.resetTransition(),T.timerscroll=!1,T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.cursorupdate.stop(),T.noticeCursor(!1,e,o),T.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll();var s=!1;if(T.bouncescroll&&T.rail.visibility||(o<0?(o=0,s=!0):o>T.page.maxh&&(o=T.page.maxh,s=!0)),T.bouncescroll&&T.railh.visibility||(e<0?(e=0,s=!0):e>T.page.maxw&&(e=T.page.maxw,s=!0)),T.scrollrunning&&T.newscrolly===o&&T.newscrollx===e)return!0;T.newscrolly=o,T.newscrollx=e,T.dst={},T.dst.x=e-i,T.dst.y=o-r,T.dst.px=i,T.dst.py=r;var n=0|Math.sqrt(T.dst.x*T.dst.x+T.dst.y*T.dst.y),l=T.getTransitionSpeed(n);T.bzscroll={};var a=s?1:.58;T.bzscroll.x=new R(i,T.newscrollx,l,0,0,a,1),T.bzscroll.y=new R(r,T.newscrolly,l,0,0,a,1);f();var c=function(){if(T.scrollrunning){var e=T.bzscroll.y.getPos();T.setScrollLeft(T.bzscroll.x.getNow()),T.setScrollTop(T.bzscroll.y.getNow()),e<=1?T.timer=u(c):(T.scrollrunning=!1,T.timer=0,T.triggerScrollEnd())}};T.scrollrunning||(T.triggerScrollStart(i,r,e,o,l),T.scrollrunning=!0,T.timer=u(c))},this.cancelScroll=function(){return T.timer&&h(T.timer),T.timer=0,T.bzscroll=!1,T.scrollrunning=!1,T};else this.doScrollLeft=function(e,o){var t=T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>T.page.maxw?T.page.maxw:e;r<0&&(r=0);var i=o>T.page.maxh?T.page.maxh:o;i<0&&(i=0),T.synched("scroll",function(){T.setScrollTop(i),T.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){z(0,e)},this.doScrollLeftBy=function(e,o){z(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*T.scrollratio.y):e;t<0?t=0:t>T.page.maxh&&(t=T.page.maxh),T.cursorfreezed=!1,T.doScrollTop(e)},this.checkContentSize=function(){var e=T.getContentSize();e.h==T.page.h&&e.w==T.page.w||T.resize(!1,e)},T.onscroll=function(e){T.rail.drag||T.cursorfreezed||T.synched("scroll",function(){T.scroll.y=Math.round(T.getScrollTop()/T.scrollratio.y),T.railh&&(T.scroll.x=Math.round(T.getScrollLeft()/T.scrollratio.x)),T.noticeCursor()})},T.bind(T.docscroll,"scroll",T.onscroll),this.doZoomIn=function(e){if(!T.zoomactive){T.zoomactive=!0,T.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=T.win[0].style;for(var r in o){var i=o[r];T.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}T.zoomrestore.style.width=T.win.css("width"),T.zoomrestore.style.height=T.win.css("height"),T.zoomrestore.padding={w:T.win.outerWidth()-T.win.width(),h:T.win.outerHeight()-T.win.height()},P.isios4&&(T.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),T.win.css({position:P.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=T.win.css("backgroundColor");return(""===n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&T.win.css("backgroundColor","#fff"),T.rail.css({zIndex:s+101}),T.zoom.css({zIndex:s+102}),T.zoom.css("backgroundPosition","0 -18px"),T.resizeZoom(),T.onzoomin&&T.onzoomin.call(T),T.cancelEvent(e)}},this.doZoomOut=function(e){if(T.zoomactive)return T.zoomactive=!1,T.win.css("margin",""),T.win.css(T.zoomrestore.style),P.isios4&&c.scrollTop(T.zoomrestore.scrollTop),T.rail.css({"z-index":T.zindex}),T.zoom.css({"z-index":T.zindex}),T.zoomrestore=!1,T.zoom.css("backgroundPosition","0 0"),T.onResize(),T.onzoomout&&T.onzoomout.call(T),T.cancelEvent(e)},this.doZoom=function(e){return T.zoomactive?T.doZoomOut(e):T.doZoomIn(e)},this.resizeZoom=function(){if(T.zoomactive){var e=T.getScrollTop();T.win.css({width:c.width()-T.zoomrestore.padding.w+"px",height:c.height()-T.zoomrestore.padding.h+"px"}),T.onResize(),T.setScrollTop(Math.min(T.page.maxh,e))}},this.init(),n.nicescroll.push(this)},y=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=f(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=f();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=f(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var p=o.lastscrollx,m=o.lastscrolly,g=function(){var e=f()-t>600?.04:.02;o.speedx&&(p=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=p,(p<0||p>l)&&(e=.1)),o.speedy&&(m=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=m,(m<0||m>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=p,o.nc.setScrollLeft(p)}if(o.speedy){o.nc.getScrollTop();o.chky=m,o.nc.setScrollTop(m)}o.timer||(o.nc.hideCursor(),o.doSnapy(p,m))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(p,m))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},x=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():x.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):x.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():x.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):x.call(n(this),e)})};var S=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():S.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):S.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():S.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):S.call(n(this),e)})};var z=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(z.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new z(this):this[e]&&n.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new z;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new b(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},a.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new z,n.nicescroll.options=g)});
function info_box_set_auto_height(){jQuery(".aio-icon-box.square_box-icon").each(function(i,t){var o=jQuery(window).width()||"";""!=o&&(768<=o?""!=(o=jQuery(this).attr("data-min-height")||"")&&jQuery(this).css("min-height",o):jQuery(this).css("min-height","initial"))})}jQuery(window).on("load",function(i){info_box_set_auto_height()}),jQuery(document).ready(function(i){info_box_set_auto_height(),jQuery(window).resize(function(i){info_box_set_auto_height()})});
((c,l)=>{function t(){c(".flip-box").each(function(i,t){c(document).width();var f,s,e,n,b,h,d,a,o=l.innerWidth;""!=o&&(768<=o?""!=(f=c(this).attr("data-min-height")||"")?c(this).hasClass("ifb-custom-height")&&(c(this).css("min-height",f),c(this).css("height",f),c(this).find(".ifb-back").find(".ifb-flip-box-section").hasClass("ifb-flip-box-section-vertical-middle")&&(b=c(this).find(".ifb-back").outerHeight(),h=c(this).find(".ifb-back").find(".ifb-flip-box-section").outerHeight(),(b=parseInt(f))<=(h=parseInt(h)))&&c(this).find(".ifb-back").find(".ifb-flip-box-section").addClass("ifb_disable_middle"),c(this).find(".ifb-front").find(".ifb-flip-box-section").hasClass("ifb-flip-box-section-vertical-middle"))&&(d=c(this).find(".ifb-front").outerHeight(),d=parseInt(f),a=c(this).find(".ifb-front").find(".ifb-flip-box-section").outerHeight(),d<=(a=parseInt(a)))&&c(this).find(".ifb-front").find(".ifb-flip-box-section").addClass("ifb_disable_middle"):c(this).hasClass("ifb-jq-height")?(e=c(this).find(".ifb-back").find(".ifb-flip-box-section").outerHeight(),e=parseInt(e),n=c(this).find(".ifb-front").find(".ifb-flip-box-section").outerHeight(),(n=parseInt(n))<=e?c(this).find(".ifb-face").css("height",e):c(this).find(".ifb-face").css("height",n)):c(this).hasClass("ifb-auto-height")&&c(this).find(".ifb-back").find(".ifb-flip-box-section").hasClass("ifb-flip-box-section-vertical-middle")&&(b=c(this).find(".ifb-back").outerHeight(),b=parseInt(b),h=c(this).find(".ifb-back").find(".ifb-flip-box-section").outerHeight(),b<=(h=parseInt(h)))&&c(this).find(".ifb-back").find(".ifb-flip-box-section").addClass("ifb_disable_middle"):(f=c(this).attr("data-min-height")||"",c(this).hasClass("style_9")?(c(this).css("height","initial"),o=c(this).find(".ifb-front-1 .ifb-front").outerHeight(),(s=c(this).find(".ifb-back-1 .ifb-back").outerHeight())<o?c(this).css("height",o):c(this).css("height",s)):c(this).hasClass("ifb-jq-height")?(e=c(this).find(".ifb-back").find(".ifb-flip-box-section").outerHeight(),e=parseInt(e),n=c(this).find(".ifb-front").find(".ifb-flip-box-section").outerHeight(),(n=parseInt(n))<=e?c(this).find(".ifb-face").css("height",e):c(this).find(".ifb-face").css("height",n)):c(this).hasClass("ifb-auto-height")?c(this).find(".ifb-back").find(".ifb-flip-box-section").hasClass("ifb-flip-box-section-vertical-middle")&&(b=c(this).find(".ifb-back").outerHeight(),h=c(this).find(".ifb-back").find(".ifb-flip-box-section").outerHeight(),(b=parseInt(b))<(h=parseInt(h)))&&c(this).find(".ifb-back").find(".ifb-flip-box-section").addClass("ifb_disable_middle"):c(this).hasClass("ifb-custom-height")?""!=f&&(c(this).css("min-height",f),c(this).css("height",f),c(this).find(".ifb-back").find(".ifb-flip-box-section").hasClass("ifb-flip-box-section-vertical-middle")&&(b=c(this).find(".ifb-back").outerHeight(),b=parseInt(b),h=c(this).find(".ifb-back").find(".ifb-flip-box-section").outerHeight(),b<=(h=parseInt(h)))&&c(this).find(".ifb-back").find(".ifb-flip-box-section").addClass("ifb_disable_middle"),c(this).find(".ifb-front").find(".ifb-flip-box-section").hasClass("ifb-flip-box-section-vertical-middle"))&&(d=c(this).find(".ifb-front").outerHeight(),d=parseInt(d),a=c(this).find(".ifb-front").find(".ifb-flip-box-section").outerHeight(),a=parseInt(a),c(this).find(".ifb-front").find(".ifb-flip-box-section").addClass("ifb_disable_middle")):c(this).css("height","initial")))})}c(l).on("load",function(i){t()}),c(document).ready(function(i){t()}),c(l).on("resize",function(i){t()})})(jQuery,window);
let cmplz_cookie_data=[],cmplzCleanCookieInterval;function cmplz_create_element(e,t){e=document.createElement(e);return e.innerHtml=t,e}function cmplz_add_event(e,t,c){document.addEventListener(e,e=>{e.target.closest(t)&&c(e)})}function cmplz_is_hidden(e){return null===e.offsetParent}function cmplz_html_decode(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function cmplz_trap_focus(){var e;cmplz_banner&&complianz.soft_cookiewall&&(cmplz_original_active_element=document.activeElement,document.body.classList.add("cmplz-banner-active"),cmplz_banner.addEventListener("keydown",cmplz_handle_tab_navigation),0<(e=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length)&&e[0].focus()}function cmplz_handle_tab_navigation(e){var t,c;"Tab"===e.key&&0!==(c=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length&&(t=c[0],c=c[c.length-1],e.shiftKey?document.activeElement===t&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),t.focus()))}function cmplz_release_focus_trap(){if(cmplz_banner&&cmplz_banner.removeEventListener("keydown",cmplz_handle_tab_navigation),document.body.classList.remove("cmplz-banner-active"),cmplz_original_active_element&&cmplz_original_active_element.focus)try{cmplz_original_active_element.focus()}catch(e){document.body.focus()}}function cmplzLoadConsentAreaContent(e,l){document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(t=>{let c=t.getAttribute("data-category"),n=t.getAttribute("data-service");var o=t.getAttribute("data-post_id"),a=t.getAttribute("data-block_id");if(e===c||l===n){let e=new XMLHttpRequest;e.open("GET",complianz.url+"consent-area/"+o+"/"+a,!0),e.setRequestHeader("Content-type","application/json"),e.send(),t.classList.remove("cmplz-placeholder"),e.onload=function(){t.innerHTML=JSON.parse(e.response),t.querySelectorAll("script").forEach(e=>{cmplz_run_script(e.innerHTML,c,n,"inline",e)})}}})}document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(e=>{e.addEventListener("click",e=>{let t=e.target;(t=t.classList.contains("cmplz-consent-area")?t:e.target.closest(".cmplz-consent-area.cmplz-placeholder"))&&(cmplz_set_service_consent(e=t.getAttribute("data-service"),!0),cmplzLoadConsentAreaContent(!1,e),cmplz_enable_category(null,e),cmplz_set_banner_status("dismissed"))}),document.addEventListener("cmplz_enable_category",function(e){cmplzLoadConsentAreaContent(e.detail.category,e.detail.service)})}),document.addEventListener("cmplz_manage_consent_container_loaded",function(){var e,t=window.location.href;-1!=t.indexOf("#")&&(e=-1!=t.lastIndexOf("?")?t.lastIndexOf("?"):void 0,t=t.substring(t.indexOf("#")+1,e),e=document.getElementById(t))&&(t=e.getBoundingClientRect().top+window.pageYOffset-200,window.scrollTo({top:t,behavior:"smooth"}))}),complianz.locale=complianz.locale+"&token="+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),(()=>{function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),c}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)})();let cmplz_banner,cmplz_banner_container=document.getElementById("cmplz-cookiebanner-container"),cmplz_manage_consent_button,cmplz_waiting_inline_scripts=[],cmplz_waiting_scripts=[],cmplz_fired_scripts=[],cmplz_placeholder_class_index=0,cmplz_all_scripts_hook_fired=!1,cmplz_consent_stored_once=!1,cmplz_fired_category_events=["functional"],cmplz_fired_service_events=[],cmplz_categories=["functional","preferences","statistics","marketing"];var cmplz_original_active_element=null;window.cmplz_get_cookie=function(t){if("undefined"!=typeof document){t=complianz.prefix+t;var c=document.cookie.split(";");for(let e=0;e<c.length;e++){var n=c[e].trim();if(n.startsWith(t+"="))return n.substring(t.length+1)}}return""},window.cmplz_set_cookie=function(e,t,c){var n,o,a,l;"undefined"!=typeof document&&(c=void 0===c||c,n="https:"===window.location.protocol?";secure":"",(o=new Date).setTime(o.getTime()+24*complianz.cookie_expiry*60*60*1e3),o=";expires="+o.toGMTString(),a=0<(a=cmplz_get_cookie_domain()).length?";domain="+a:"",c=c?complianz.prefix:"",l=cmplz_get_cookie_path(),document.cookie=""+c+e+`=${t};SameSite=Lax${n}${o}${a};path=`+l)},window.cmplz_in_array=function(e,t){return t.includes(e)},window.cmplz_highest_accepted_category=function(){var t=cmplz_accepted_categories(),c=["marketing","statistics","preferences"];for(let e=0;e<c.length;e++)if(cmplz_in_array(c[e],t))return c[e];return"functional"};let cmplz_set_category_as_body_class=()=>{let c=document.body.classList;for(let e=c.length-1;0<=e;e--)c[e].startsWith("cmplz-")&&"cmplz-document"!==c[e]&&c.remove(c[e]);var e=cmplz_accepted_categories(),e=(Object.values(e).forEach(e=>{"string"==typeof e&&c.add("cmplz-"+e)}),cmplz_get_all_service_consents()),e=(Object.entries(e).forEach(([e,t])=>{t&&c.add("cmplz-"+e)}),c.add("cmplz-"+complianz.region,"cmplz-"+complianz.consenttype),new CustomEvent("cmplz_set_category_as_bodyclass"));document.dispatchEvent(e)},cmplz_append_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(e)),t.appendChild(c)},cmplz_load_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=e,t.appendChild(c)};function cmplz_run_script(t,c,n,e,o){var a=document.createElement("script");if("inline"!==e?a.src=t:("string"!=typeof t&&(t=t.innerHTML),a.innerHTML=[t,"cmplzScriptLoaded();"].join("\n")),!cmplz_in_array(t,cmplz_fired_scripts)){cmplzCopyAttributes(o,a);try{"inline"!==e?a.onload=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)}:window.cmplzScriptLoaded=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)},document.head.appendChild(a)}catch(e){throw cmplz_run_after_all_scripts(c,n),"Something went wrong "+e+" while loading "+t}}}function cmplz_maybe_run_waiting_scripts(e,t,c,n){var o=cmplz_get_waiting_script(cmplz_waiting_scripts,e),o=(o&&cmplz_run_script(o,t,c,"src",n),cmplz_get_waiting_script(cmplz_waiting_inline_scripts,e));o&&cmplz_run_script(o,t,c,"inline",n)}let cmplzLazyLoader=()=>{var e=document.querySelectorAll(".cmplz-blocked-content-container");let t=new IntersectionObserver((e,n)=>{e.forEach(e=>{var t,c;e.isIntersecting&&((t=(e=e.target).getAttribute("data-placeholder-image"))&&(c=e.getAttribute("data-placeholder_class_index"),cmplz_append_css(".cmplz-placeholder-"+c+" {background-image: url("+t+") !important;}"),cmplz_set_blocked_content_container_aspect_ratio(e,t,c)),n.unobserve(e))})});e.forEach(e=>{t.observe(e)})};function cmplz_set_blocked_content_container(){document.querySelectorAll(".cmplz-image").forEach(e=>{var t,c,n,o;e.classList.contains("cmplz-processed")||(e.classList.add("cmplz-processed"),t=e.getAttribute("data-service"),c=e.getAttribute("data-category"),(n=e.parentElement).classList.add("cmplz-blocked-content-container"),o=n.getAttribute("data-placeholder_class_index"),"lazy"===e.getAttribute("loading")&&(e.removeAttribute("loading"),e.setAttribute("data-deferlazy",1)),null==o&&(cmplz_placeholder_class_index++,n.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),n.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(n,c,t)))}),document.querySelectorAll(".cmplz-placeholder-element").forEach(t=>{if(!t.classList.contains("cmplz-processed")){t.classList.add("cmplz-processed");var c=t.getAttribute("data-service"),n=t.getAttribute("data-category");let e;null===(e=t.classList.contains("cmplz-iframe")?("lazy"===t.getAttribute("loading")&&(t.removeAttribute("loading"),t.setAttribute("data-deferlazy",1)),t.parentElement):t).getAttribute("data-placeholder_class_index")&&(cmplz_placeholder_class_index++,e.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),e.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(e,n,c),n=t.getAttribute("data-placeholder-image"))&&void 0!==n&&n.length&&e.setAttribute("data-placeholder-image",n)}}),cmplzLazyLoader(),cmplz_has_consent("statistics")&&cmplz_enable_category("statistics"),cmplz_has_consent("marketing")&&cmplz_enable_category("marketing")}function cmplz_insert_placeholder_text(e,n,o){if(!e.querySelector(".cmplz-blocked-content-notice")){let t=complianz.placeholdertext;n=n||"marketing";let c;if(void 0!==t){if(1==complianz.clean_cookies){let e=o?o.replace("-"," "):"";e=e.charAt(0).toUpperCase()+e.slice(1),t=t.replace("{service}",e),(c=cmplz_create_element("div",t)).innerHTML=t,c.classList.add("cmplz-blocked-content-notice");var a=c.querySelector("button"),a=(a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{service}",e)),complianz.page_links[complianz.region]),l=c.querySelector(".cmplz-links a");a&&a.hasOwnProperty("cookie-statement")?(l.setAttribute("href",a["cookie-statement"].url),"{title}"===l.innerText&&(l.innerText=a["cookie-statement"].title)):l&&(l.parentElement.style.display="none")}else{a=cmplz_create_element("button",""),l=complianz.categories.hasOwnProperty(n)?complianz.categories[n]:"marketing";a.innerText=t.replace("{category}",l),a.classList.add("cmplz-blocked-content-notice","cmplz-accept-category","cmplz-accept-"+n),a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{category}",n)),c=a}("VIDEO"!==e.tagName?e:e.parentElement).appendChild(c)}}}function cmplz_set_blocked_content_container_aspect_ratio(t,c,n){var e;null!=t&&((e=new Image).addEventListener("load",function(){var e=this.naturalWidth||1,e=this.naturalHeight*(t.clientWidth/e),e=-1===c.indexOf("placeholder.jpg")?"height:"+e+"px;":"";cmplz_append_css(".cmplz-placeholder-"+n+" {"+e+"}")}),e.src=c)}let cmplzResizeTimer;function cmplz_has_blocked_scripts(){return 0<document.querySelectorAll("script[data-category], script[data-service]").length}function cmplz_enable_category(o,a){1==complianz.tm_categories&&""!==o&&cmplz_run_tm_event(o);var t={},t=(t.category=o,t.categories=cmplz_accepted_categories(),t.region=complianz.region,new CustomEvent("cmplz_before_category",{detail:t}));if(document.dispatchEvent(t),a=void 0!==a?a:"do_not_match","functional"!==(o=""===o?"do_not_match":o)){"marketing"===o&&cmplz_set_integrations_cookies();let e;e="do_not_match"!==a?'.cmplz-blocked-content-notice [data-service="'+a+'"]':1!=complianz.clean_cookies?".cmplz-blocked-content-notice.cmplz-accept-"+o:'.cmplz-blocked-content-notice [data-category="'+o+'"]',document.querySelectorAll(e).forEach(e=>{var t=e.getAttribute("data-service");e.parentNode.classList.contains("cmplz-blocked-content-notice")&&(e=e.parentNode),cmplz_is_service_denied(t)||e.parentNode.removeChild(e)}),document.querySelectorAll('[data-category="'+o+'"], [data-service="'+a+'"]').forEach(t=>{var e=t.getAttribute("data-service");if(!cmplz_is_service_denied(e)&&"functional"!==t.getAttribute("data-category")&&!t.classList.contains("cmplz-activated")){var e=t.tagName;if("LINK"===e){t.classList.add("cmplz-activated");var c=t.getAttribute("data-href");cmplz_load_css(c,o)}else if("IMG"===e){t.classList.add("cmplz-activated");c=t.getAttribute("data-src-cmplz");t.setAttribute("src",c),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),cmplz_remove_placeholder(t)}else if("IFRAME"===e){t.classList.add("cmplz-activated");let e=t.getAttribute("data-src-cmplz");c=t.getAttribute("data-cmplz-target")?t.getAttribute("data-cmplz-target"):"src";"1"===cmplz_get_url_parameter(t.getAttribute(c),"autoplay")&&(e+="&autoplay=1"),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),t.addEventListener("load",()=>{cmplz_remove_placeholder(t)}),t.setAttribute(c,e)}else t.classList.contains("cmplz-placeholder-element")&&(t.classList.add("cmplz-activated"),e=t.getAttribute("data-placeholder_class_index"),t.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+e))}});t=document.querySelectorAll('script[data-category="'+o+'"], script[data-service="'+a+'"]');t.forEach(e=>{var t=e.getAttribute("data-waitfor"),c=e.getAttribute("data-cmplz-src");t&&(c?cmplz_waiting_scripts[t]=c:0<e.innerText.length&&(cmplz_waiting_inline_scripts[t]=e)),e.parentElement&&e.parentElement.removeChild(e)}),t.forEach(e=>{var t,c,n=e.getAttribute("type");!e.classList.contains("cmplz-activated")&&n&&"text/javascript"!==n&&(e.classList.add("cmplz-activated"),(n=e.getAttribute("data-cmplz-src"))?(e.removeAttribute("type"),cmplz_is_waiting_script(cmplz_waiting_scripts,n)||(e.getAttribute("data-post_scribe_id")?(t="#"+e.getAttribute("data-post_scribe_id"),(c=document.querySelector(t))&&(c.innerHtml(""),postscribe(t,"<script src="+n+"><\/script>"))):cmplz_run_script(n,o,a,"src",e))):0<e.innerText.length&&(cmplz_is_waiting_script(cmplz_waiting_inline_scripts,e.innerText)||cmplz_run_script(e.innerText,o,a,"inline",e)))}),cmplz_run_after_all_scripts(o,a)}}function cmplz_remove_placeholder(e){var t,c=e.closest(".cmplz-blocked-content-container");c&&(t=c.getAttribute("data-placeholder_class_index"),c.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+t)),e.classList.remove("cmplz-iframe-styles","cmplz-iframe","video-wrap")}function cmplz_get_waiting_script(e,t){for(var c in e){var n;if(e.hasOwnProperty(c))if(-1!==t.indexOf(c))return n=e[c],delete e[c],n}return!1}function cmplz_array_is_empty(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function cmplz_is_waiting_script(t,c){for(var n in t)if(t.hasOwnProperty(n)){let e=t[n];if("string"!=typeof e&&(e=e.innerText),-1!==c.indexOf(e)||-1!==e.indexOf(c))return!0}return!1}function cmplz_run_after_all_scripts(e,t){var c="do_not_match"!==t&&!cmplz_in_array(t,cmplz_fired_service_events),n="do_not_match"!==e&&!cmplz_in_array(e,cmplz_fired_category_events);(n||c)&&(n&&cmplz_fired_category_events.push(e),c&&cmplz_fired_service_events.push(t),(n={}).category=e,n.service=t,n.categories=cmplz_accepted_categories(),n.services=cmplz_get_all_service_consents(),n.region=complianz.region,c=new CustomEvent("cmplz_enable_category",{detail:n}),document.dispatchEvent(c)),!cmplz_all_scripts_hook_fired&&cmplz_array_is_empty(cmplz_waiting_inline_scripts)&&cmplz_array_is_empty(cmplz_waiting_scripts)&&(n=new CustomEvent("cmplz_run_after_all_scripts",{detail:e,service:t}),document.dispatchEvent(n),cmplz_all_scripts_hook_fired=!0)}window.addEventListener("resize",function(){clearTimeout(cmplzResizeTimer),cmplzResizeTimer=setTimeout(cmplz_set_blocked_content_container,500)},!0),1==complianz.block_ajax_content&&setInterval(function(){cmplz_set_blocked_content_container()},2e3);let cmplz_fired_events=[];function cmplz_run_tm_event(e){-1===cmplz_fired_events.indexOf(e)&&(cmplz_fired_events.push(e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"cmplz_event_"+e}),e=new CustomEvent("cmplz_tag_manager_event",{detail:e}),document.dispatchEvent(e))}function cmplz_fire_before_categories_consent(e){var t={},e=(t.categories=e,t.region=complianz.region,new CustomEvent("cmplz_before_categories_consent",{detail:t}));document.dispatchEvent(e)}function cmplz_check_cookie_policy_id(){var e=cmplz_get_cookie("policy_id");e&&parseInt(complianz.current_policy_id)!==parseInt(e)&&(cmplz_deny_all(),cmplz_set_banner_status("show"),cmplz_clear_cookies("cmplz"))}function cmplz_do_not_track(){var e="doNotTrack"in navigator&&"1"===navigator.doNotTrack,t="globalPrivacyControl"in navigator&&navigator.globalPrivacyControl;return!(!complianz.do_not_track_enabled||!t&&!e)}function cmplz_get_services_on_page(){let c=[];return document.querySelectorAll("[data-service]").forEach(e=>{var t=e.getAttribute("data-service"),e=e.getAttribute("data-category");-1==c.indexOf(t)&&c.push({category:e,service:t})}),c}function cmplz_is_bot(){var e=new RegExp("(googlebot/|Googlebot-Mobile|Google-InspectionTool|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)","i"),t=navigator.userAgent;return e.test(t)}function cmplz_is_speedbot(){var e=navigator.userAgent;return new RegExp("(GTmetrix|pingdom|pingbot|Lighthouse)","i").test(e)}function cmplz_exists_service_consent(){var e,t=cmplz_get_cookie("consented_services");try{for(var c in e=JSON.parse(t))if(e.hasOwnProperty(c)&&1==e[c])return!0}catch(e){}return!1}function cmplz_set_service_consent(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}n[e]=t,cmplz_set_cookie("consented_services",JSON.stringify(n));c={},c.service=e,c.value=t,c.region=complianz.region,cmplz_all_scripts_hook_fired=!1,e=new CustomEvent("cmplz_status_change_service",{detail:c});document.dispatchEvent(e)}function cmplz_clear_all_service_consents(){cmplz_set_cookie("consented_services","")}function cmplz_get_all_service_consents(){var e=cmplz_get_cookie("consented_services");let t;try{t=JSON.parse(e)}catch(e){t={}}return t}function cmplz_get_cookie_path(){return void 0!==complianz.cookie_path&&""!==complianz.cookie_path?complianz.cookie_path:"/"}function cmplz_get_cookie_domain(){return 1==complianz.set_cookies_on_root&&3<complianz.cookie_domain.length&&!complianz.cookie_domain.includes("localhost")?complianz.cookie_domain:""}function cmplz_reload_browser_compatible(){var e;-1<navigator.userAgent.toLowerCase().indexOf("firefox")?((e=new URL(window.location.href)).searchParams.set("cmplz-force-reload",Date.now().toString()),window.location.href=e.toString()):window.location.reload()}window.cmplz_accept_all=function(){for(var e in cmplz_clear_all_service_consents(),cmplz_fire_before_categories_consent(cmplz_categories),cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"allow");cmplz_sync_category_checkboxes()},window.cmplz_deny_all=function(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"deny");let t=!1;"functional"===cmplz_highest_accepted_category()&&!cmplz_exists_service_consent()||(t=!0),cmplz_clear_cookies("cmplz_service")&&(t=!0),cmplz_clear_all_service_consents(),cmplz_integrations_revoke(),cmplz_fire_categories_event(),cmplz_track_status();var c=new CustomEvent("cmplz_revoke",{detail:t});document.dispatchEvent(c),!complianz.tcf_active&&t&&cmplz_reload_browser_compatible()},window.conditionally_show_banner=function(){complianz=cmplz_merge_object(complianz,cmplz_user_data),cmplz_maybe_auto_redirect(),cmplz_set_blocked_content_container(),window.wp_consent_type=complianz.consenttype;var e,t,c,n=new CustomEvent("wp_consent_type_defined"),o=(document.dispatchEvent(n),n=new CustomEvent("cmplz_before_cookiebanner"),document.dispatchEvent(n),1==complianz.forceEnableStats&&"optin"===complianz.consenttype&&cmplz_set_consent("statistics","allow"),cmplz_categories.reverse()),a=[];for(e in o)o.hasOwnProperty(e)&&(t=cmplz_categories[e],cmplz_has_consent(t))&&a.push(t);for(c in cmplz_fire_before_categories_consent(a),a)o.hasOwnProperty(c)&&cmplz_enable_category(a[c]);if(cmplz_exists_service_consent()){cmplz_enable_category("","general");var l,r,i,s=cmplz_get_services_on_page();for(l in s)s.hasOwnProperty(l)&&(r=s[l].service,i=s[l].category,cmplz_has_service_consent(r,i))&&(document.querySelectorAll('.cmplz-accept-service[data-service="'+r+'"]').forEach(e=>{e.checked=!0}),cmplz_enable_category("",r))}cmplz_sync_category_checkboxes(),cmplz_integrations_init(),cmplz_check_cookie_policy_id(),cmplz_set_up_auto_dismiss(),cmplz_load_manage_consent_container(),n=new CustomEvent("cmplz_cookie_banner_data",{detail:complianz}),document.dispatchEvent(n),""===cmplz_get_cookie("saved_categories")&&("optin"!==complianz.consenttype&&"optout"!==complianz.consenttype?cmplz_track_status("no_warning"):cmplz_do_not_track()&&cmplz_track_status("do_not_track")),cmplz_set_category_as_body_class(),cmplz_fire_categories_event(),cmplz_do_not_track()?(console.log("global privacy control or do not track detected: no banner."),cmplz_track_status("do_not_track")):("optin"===complianz.consenttype?(complianz.forceEnableStats&&cmplz_enable_category("statistics"),console.log("opt-in"),show_cookie_banner):"optout"===complianz.consenttype?(console.log("opt-out"),show_cookie_banner):(console.log("other consent type, no cookie warning"),cmplz_accept_all))()},window.show_cookie_banner=function(){let t=complianz.disable_cookiebanner||cmplz_is_speedbot(),e=!1;(document.querySelector("#cmplz-manage-consent-container")||document.querySelector(".cmplz-dropdown-cookiepolicy"))&&(e=!0);var c=document.getElementById("cmplz-cookiebanner-container"),c=(c&&document.body.prepend(c),document.createElement("link"));let n=complianz.page_links[complianz.region];(cmplz_banner=document.querySelector(".cmplz-cookiebanner.banner-"+complianz.user_banner_id+"."+complianz.consenttype))||(t=!0),cmplz_manage_consent_button=document.querySelector("#cmplz-manage-consent .cmplz-manage-consent.manage-consent-"+complianz.user_banner_id);var o=complianz.css_file.replace("{type}",complianz.consenttype).replace("{banner_id}",complianz.user_banner_id),o=(-1!==complianz.css_file.indexOf("cookiebanner/css/defaults/banner")&&console.log("Fallback default css file used. Please re-save banner settings, or check file writing permissions in uploads directory"),c.href=o,c.type="text/css",c.rel="stylesheet",c.onload=function(){var e;t||(cmplz_banner.classList.remove("cmplz-hidden"),cmplz_manage_consent_button.classList.remove("cmplz-hidden"),"show"===cmplz_get_banner_status()&&(cmplz_trap_focus(),e=cmplz_banner.querySelector(".cmplz-close"))&&e.focus())},document.getElementsByTagName("head")[0].appendChild(c),cmplz_banner&&!t&&(cmplz_banner.querySelectorAll(".cmplz-links a:not(.cmplz-external), .cmplz-buttons a:not(.cmplz-external)").forEach(e=>{var t,c=e;for(t in c.classList.add("cmplz-hidden"),n)n.hasOwnProperty(t)&&c.classList.contains(t)&&(c.setAttribute("href",n[t].url+c.getAttribute("data-relative_url")),"{title}"===c.innerText&&(c.innerText=cmplz_html_decode(n[t].title)),c.classList.remove("cmplz-hidden"))}),cmplz_set_banner_status(),e)&&(cmplz_banner.classList.remove("cmplz-show"),cmplz_banner.classList.add("cmplz-dismissed"),cmplz_manage_consent_button.classList.remove("cmplz-dismissed"),cmplz_manage_consent_button.classList.add("cmplz-show")),new CustomEvent("cmplz_cookie_warning_loaded",{detail:complianz.region}));document.dispatchEvent(o)},window.cmplz_get_banner_status=function(){return cmplz_get_cookie("banner-status")},window.cmplz_set_banner_status=function(e){let t=cmplz_get_cookie("banner-status");(e=void 0!==e?e:t)!==t&&cmplz_set_cookie("banner-status",e),0===e.length&&(e="show"),t="show"===e?"dismissed":"show",cmplz_banner&&0<e.length&&(cmplz_banner.classList.remove("cmplz-"+t),cmplz_banner.classList.add("cmplz-"+e),cmplz_manage_consent_button)&&(cmplz_manage_consent_button.classList.add("cmplz-"+t),cmplz_manage_consent_button.classList.remove("cmplz-"+e)),cmplz_banner_container&&complianz.soft_cookiewall&&(cmplz_banner_container.classList.remove("cmplz-"+t),cmplz_banner_container.classList.add("cmplz-"+e,"cmplz-soft-cookiewall"));var c=new CustomEvent("cmplz_banner_status",{detail:e});document.dispatchEvent(c),cmplz_start_clean(),"show"===e?(cmplz_trap_focus(),(c=cmplz_banner.querySelector(".cmplz-close"))&&c.focus()):cmplz_release_focus_trap()},window.cmplz_has_consent=function(e){if(cmplz_is_bot())return!0;if("functional"===e)return!0;let t,c;return t=cmplz_do_not_track()?(c=cmplz_get_cookie(e),"allow"===c):(c=cmplz_get_cookie(e),("optout"===complianz.consenttype||"other"===complianz.consenttype)&&""===c||"allow"===c)},window.cmplz_is_service_denied=function(e){var t=cmplz_get_cookie("consented_services");let c;try{c=JSON.parse(t)}catch(e){c={}}return!!c.hasOwnProperty(e)&&!c[e]},window.cmplz_has_service_consent=function(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}return n.hasOwnProperty(e)?n[e]:cmplz_has_consent(t)},window.cmplz_set_consent=function(e,t){cmplz_set_accepted_cookie_policy_id(),t="functional"===e?"allow":t;var c,n=cmplz_get_cookie(e);let o="allow"===t;document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=o}),n!==t&&(cmplz_set_cookie(e,t),"allow"===t&&cmplz_enable_category(e),cmplz_wp_set_consent(e,t),"statistics"===e&&cmplz_wp_set_consent("statistics-anonymous","allow"),(c=new Object).category=e,c.value=t,c.region=complianz.region,c.categories=cmplz_accepted_categories(),cmplz_all_scripts_hook_fired=!1,c=new CustomEvent("cmplz_status_change",{detail:c}),document.dispatchEvent(c),"marketing"===e)&&"deny"===t&&"allow"===n&&(cmplz_integrations_revoke(),setTimeout(function(){cmplz_reload_browser_compatible()},500))};let cmplz_user_data=[];if("undefined"!=typeof Storage&&sessionStorage.cmplz_user_data&&(cmplz_user_data=JSON.parse(sessionStorage.cmplz_user_data)),1!=complianz.geoip||0!=cmplz_user_data.length&&cmplz_user_data.version===complianz.version&&cmplz_user_data.banner_version===complianz.banner_version)conditionally_show_banner();else{let e=new XMLHttpRequest,t=cmplz_get_url_parameter(window.location.href,"cmplz_user_region");t=t?"&cmplz_user_region="+t:"",e.open("GET",complianz.url+"banner?"+complianz.locale+t,!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_user_data=JSON.parse(e.response),sessionStorage.cmplz_user_data=JSON.stringify(cmplz_user_data),conditionally_show_banner()}}if(1==complianz.store_consent){let e=cmplz_get_cookie("id"),t="",c="";"undefined"!=typeof Storage&&sessionStorage.cmplz_id&&(t=JSON.parse(sessionStorage.cmplz_id)),0==e.length&&0<t.length&&(c=t,cmplz_set_cookie("id",c)),0<e.length&&0==t.length&&(c=e),"undefined"!=typeof Storage&&(sessionStorage.cmplz_id=JSON.stringify(c))}function cmplz_track_status_end(){cmplz_consent_stored_once||cmplz_track_status()}function cmplz_set_up_auto_dismiss(){if("dismissed"!==cmplz_get_banner_status()){if(1==complianz.dismiss_on_scroll){let e=function(){window.pageYOffset>Math.floor(400)&&(window.removeEventListener("scroll",e),this.onWindowScroll=null,"dismissed"!==cmplz_get_banner_status())&&(cmplz_set_banner_status("dismissed"),("optout"===complianz.consenttype?(cmplz_fire_categories_event(),cmplz_track_status):cmplz_deny_all)())};window.addEventListener("scroll",e)}var e=parseInt(complianz.dismiss_timeout);0<e&&window.setTimeout(function(){"dismissed"!==cmplz_get_banner_status()&&(cmplz_set_banner_status("dismissed"),("optout"===complianz.consenttype?(cmplz_fire_categories_event(),cmplz_track_status):cmplz_deny_all)())},Math.floor(e))}}function cmplz_fire_categories_event(){var e=new Object,e=(e.category=cmplz_highest_accepted_category(),e.categories=cmplz_accepted_categories(),e.region=complianz.region,new CustomEvent("cmplz_fire_categories",{detail:e}));document.dispatchEvent(e)}function cmplz_track_status(e){let t=[];e=void 0!==e&&e;var c=new CustomEvent("cmplz_track_status",{detail:e});document.dispatchEvent(c),t=e?[e]:cmplz_accepted_categories(),cmplz_set_category_as_body_class();let n,o;try{n=JSON.parse(cmplz_get_cookie("saved_categories"))}catch(e){n={}}try{o=JSON.parse(cmplz_get_cookie("saved_services"))}catch(e){o={}}var c=cmplz_get_all_service_consents();cmplz_equals(n,t)&&cmplz_equals(o,c)||1!=complianz.store_consent||cmplz_is_bot()||cmplz_is_speedbot()||(cmplz_set_cookie("saved_categories",JSON.stringify(t)),cmplz_set_cookie("saved_services",JSON.stringify(c)),cmplz_consent_stored_once=!0,e={consented_categories:t,consented_services:c,consenttype:window.wp_consent_type},(c=new XMLHttpRequest).open("POST",complianz.url+"track",!0),c.setRequestHeader("Content-type","application/json"),c.send(JSON.stringify(e)))}function cmplz_accepted_categories(){let e=cmplz_categories,t=[];for(var c in e)e.hasOwnProperty(c)&&(c=e[c],cmplz_has_consent(c))&&t.push(c);return e=e.filter(function(e){return cmplz_in_array(e,t)})}function cmplz_sync_category_checkboxes(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],cmplz_has_consent(e)||"functional"===e?document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!0}):document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!1})),document.querySelectorAll(".cmplz-accept-service").forEach(e=>{var t=e.getAttribute("data-service"),c=e.getAttribute("data-category");cmplz_has_service_consent(t,c)?e.checked=!0:cmplz_is_service_denied(t)?e.checked=!1:e.checked=!!cmplz_has_consent(c)})}function cmplz_merge_object(e,t){var c,n,o={};for(c in t)t.hasOwnProperty(c)&&(o[c]=t[c]);for(n in e)t.hasOwnProperty(n)&&void 0!==t[n]||e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function cmplz_clear_cookies(t){if("undefined"==typeof document)return!1;let a=!1,l="https:"===window.location.protocol?";secure":"",r="expires="+(new Date).toGMTString(),i=location.pathname.replace(/^\/|\/$/g,"").split("/");return document.cookie.split("; ").forEach(function(e){let n=e.split(";")[0].split("=")[0];if(-1!==n.indexOf(t)){a=!0;let c=window.location.hostname.split(".");var o=1<c.length;for(i.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain=."+c.join(".")+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain=."+c.join(".")+";path="+e+"/"});0<c.length;){let t="."+c.join(".");c.shift(),o&&1===c.length&&c.shift(),i.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain="+t+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain="+t+";path="+e+"/"})}}}),cmplz_set_accepted_cookie_policy_id(),a}function cmplz_set_accepted_cookie_policy_id(){cmplz_set_cookie("policy_id",complianz.current_policy_id)}function cmplz_integrations_init(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&"1"===t[e][1]&&cmplz_set_cookie(e,t[e][1],!1)}function cmplz_integrations_revoke(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&(cmplz_set_cookie(e,t[e][1],!1),0==t[e][1])&&cmplz_clear_cookies(e)}function cmplz_set_integrations_cookies(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&cmplz_set_cookie(e,t[e][0],!1)}function cmplz_get_url_parameter(e,t){if(e&&void 0!==e&&-1!==e.indexOf("?")){e=e.split("?")[1];if(e){var c=e.split("&");for(let e=0;e<c.length;e++){var n=c[e].split("=");if(n[0]===t)return void 0===n[1]||decodeURIComponent(n[1])}}}return!1}function cmplz_maybe_auto_redirect(){var e=cmplz_get_url_parameter(window.location.href,"cmplz_region_redirect"),t=cmplz_get_url_parameter(window.location.href,"cmplz-region");e&&!t&&(e=window.location.href.split("#")[0]+"&cmplz-region="+complianz.region,t=window.location.hash,window.location.href=e+t)}function cmplz_wp_set_consent(e,t){"function"==typeof wp_set_consent&&wp_set_consent(e,t)}function cmplz_start_clean(){if(1==complianz.clean_cookies)if((cmplz_cookie_data="undefined"!=typeof Storage?JSON.parse(sessionStorage.getItem("cmplz_cookie_data")):cmplz_cookie_data)&&0!==cmplz_cookie_data.length)cmplz_setup_clean_interval();else{let e=new XMLHttpRequest;e.open("GET",complianz.url+"cookie_data",!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_cookie_data=JSON.parse(e.response),sessionStorage.setItem("cmplz_cookie_data",JSON.stringify(cmplz_cookie_data)),cmplz_setup_clean_interval()}}}function cmplz_do_cleanup(){var e;for(e of["preferences","statistics","marketing"])if(!cmplz_has_consent(e)&&cmplz_cookie_data.hasOwnProperty(e)){var t,c,n=cmplz_cookie_data[e];for(t in n)if(!cmplz_has_service_consent(t,e))for(c of n[t])cmplz_clear_cookies(c),cmplz_clear_storage(c)}}function cmplz_setup_clean_interval(){!cmplz_cookie_data||cmplzCleanCookieInterval||(cmplz_do_cleanup(),cmplzCleanCookieInterval=setInterval(cmplz_do_cleanup,1e3))}function cmplz_clear_storage(e){"undefined"!=typeof Storage&&(localStorage.getItem(e)&&localStorage.removeItem(e),sessionStorage.getItem(e))&&sessionStorage.removeItem(e)}function cmplz_load_manage_consent_container(){let c=document.querySelector(".cmplz-manage-consent-container");if(c){let t=new XMLHttpRequest;t.open("GET",complianz.url+"manage_consent_html?"+complianz.locale,!0),t.setRequestHeader("Content-type","application/json"),t.send(),t.onload=function(){var e=JSON.parse(t.response);c.insertAdjacentHTML("beforeend",e),cmplz_sync_category_checkboxes();document.querySelector("#cmplz-manage-consent-container-nojavascript").style.display="none",c.style.display="block";e=new CustomEvent("cmplz_manage_consent_container_loaded");document.dispatchEvent(e)}}}function cmplz_equals(c,n){if("object"!=typeof c||null===c||Array.isArray(c)||"object"!=typeof n||null===n||Array.isArray(n)){if(Array.isArray(c)||(c=Object.keys(c),n=Object.keys(n)),!c||!n)return!1;if(c.length!==n.length)return!1;for(let e=0,t=c.length;e<t;e++)if(c[e]instanceof Array&&n[e]instanceof Array){if(!cmplz_equals(c[e],n[e]))return!1}else if(c[e]!==n[e])return!1}else{var e;for(e of[...new Set([...Object.keys(c),...Object.keys(n)])])if(c[e]!==n[e])return!1}return!0}function cmplzCopyAttributes(e,t){let c=["type","data-service","data-category","async"];Array.from(e.attributes).forEach(e=>{"data-script-type"===e.nodeName&&"module"===e.nodeValue?(t.setAttribute("type","module"),t.removeAttribute("data-script-type")):c.includes(e.nodeName)||t.setAttribute(e.nodeName,e.nodeValue)})}document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&cmplz_track_status_end()}),window.addEventListener("pagehide",cmplz_track_status_end,!1),window.addEventListener("beforeunload",cmplz_track_status_end,!1),document.addEventListener("cmplz_consent_action",function(e){cmplz_set_consent(e.detail.category,"allow"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept",function(e){e.preventDefault(),setTimeout(()=>{cmplz_accept_all(),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()},0)}),cmplz_add_event("click",".cmplz-accept-category, .cmplz-accept-marketing",function(e){e.preventDefault();var e=e.target,t=e.getAttribute("data-service"),e=e.getAttribute("data-category")||"marketing";1==complianz.clean_cookies&&void 0!==t&&t?(cmplz_set_service_consent(t,!0),cmplz_enable_category("","general"),cmplz_enable_category("",t)):cmplz_set_consent(e,"allow"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept-service",function(e){var e=e.target;"INPUT"!==e.tagName&&(void 0!==(e=e.getAttribute("data-service"))&&(cmplz_set_service_consent(e,!0),cmplz_enable_category("","general"),cmplz_enable_category("",e)),cmplz_fire_categories_event(),cmplz_track_status())}),cmplz_add_event("change",".cmplz-accept-service",function(e){var t=e.target,c=t.tagName,n=t.getAttribute("data-service");void 0!==n&&("INPUT"===c?(cmplz_set_banner_status("dismissed"),t.checked?(cmplz_set_service_consent(n,!0),cmplz_enable_category("",n)):(cmplz_set_service_consent(n,!1),setTimeout(function(){cmplz_reload_browser_compatible()},500))):(e.preventDefault(),cmplz_set_service_consent(n,!0),cmplz_enable_category("","general"),cmplz_enable_category("",n),setTimeout(function(){cmplz_reload_browser_compatible()},500))),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-save-preferences",function(e){var t,c,n,o,a,e=e.target,l=(cmplz_banner=e.closest(".cmplz-cookiebanner"),[]);for(t in cmplz_categories)cmplz_categories.hasOwnProperty(t)&&(c=cmplz_categories[t],n=cmplz_banner.querySelector("input.cmplz-"+c))&&n.checked&&l.push(c);for(o in cmplz_fire_before_categories_consent(l),cmplz_categories)cmplz_categories.hasOwnProperty(o)&&(a=cmplz_categories[o],l.includes(a)?cmplz_set_consent(a,"allow"):cmplz_set_consent(a,"deny"));cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-close",function(){cmplz_set_banner_status("dismissed")}),cmplz_add_event("click",".cmplz-view-preferences",function(e){var e=e.target;(cmplz_banner=e.closest(".cmplz-cookiebanner")).querySelector(".cmplz-categories").classList.contains("cmplz-fade-in")?(cmplz_banner.classList.remove("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.remove("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="block",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="none"):(cmplz_banner.classList.add("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.add("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="none",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="block",(e=cmplz_banner.querySelector(".cmplz-categories .cmplz-category"))&&(e=e.querySelector("summary"))&&(e.setAttribute("tabindex","0"),e.focus()))}),cmplz_add_event("change",".cmplz-manage-consent-container .cmplz-category",function(){for(var e in cmplz_categories){var t;cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],t=document.querySelector(".cmplz-manage-consent-container input.cmplz-"+e))&&(t.checked?cmplz_set_consent(e,"allow"):cmplz_set_consent(e,"deny"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())}}),cmplz_add_event("click",".cmplz-deny",function(e){e.preventDefault(),cmplz_set_banner_status("dismissed"),cmplz_deny_all()}),cmplz_add_event("click","button.cmplz-manage-settings",function(e){e.preventDefault();var e=document.querySelector(".cmplz-cookiebanner .cmplz-categories"),t=document.querySelector(".cmplz-save-settings"),c=document.querySelector("button.cmplz-manage-settings");cmplz_is_hidden(e)?(t.style.display="block",c.style.display="none",e.style.display="block"):(t.style.display="none",c.style.display="block",e.style.display="none")}),cmplz_add_event("click","button.cmplz-manage-consent",function(e){e.preventDefault(),cmplz_set_banner_status("show")}),cmplz_add_event("keypress",".cmplz-banner-slider label",function(e){32==(e.keyCode||e.which)&&document.activeElement.click()}),cmplz_add_event("keypress",".cmplz-cookiebanner .cmplz-header .cmplz-close",function(e){13==(e.keyCode||e.which)&&document.activeElement.click()});let cmplz_has_wp_video=document.querySelector(".cmplz-wp-video-shortcode"),cmplz_times_checked=0;void 0!==window.jQuery&&jQuery(document).ready(function(i){if(cmplz_has_wp_video){document.addEventListener("cmplz_enable_category",function(){t()});let e=setInterval(function(){cmplz_times_checked+=1,document.querySelector(".cmplz-wp-video-shortcode")&&cmplz_times_checked<100?t():clearInterval(e)},500)}function t(){if(document.querySelector(".cmplz-wp-video-shortcode")){var e,t,n,o=cmplz_accepted_categories(),a=cmplz_get_all_service_consents(),l=[];for(e in o)if(o.hasOwnProperty(e)){var r=o[e];if("functional"===r)break;l.push('.cmplz-wp-video-shortcode[data-category="'+r+'"]')}for(t in a)a.hasOwnProperty(t)&&l.push('.cmplz-wp-video-shortcode[data-service="'+t+'"]');n=l.join(",");let c=!1;0<n.length&&document.querySelectorAll(n).forEach(e=>{c=!0,e.setAttribute("controls","controls"),e.classList.add("wp-video-shortcode","cmplz-processed"),e.classList.remove("cmplz-wp-video-shortcode"),e.closest(".cmplz-wp-video").classList.remove("cmplz-wp-video");var t=e.closest(".wp-video").querySelector(".cmplz-blocked-content-notice");t&&t.parentElement.removeChild(t),e.classList.remove("cmplz-blocked-content-container")}),c&&(window.wp.mediaelement?window.wp.mediaelement.initialize():(n={videoWidth:"100%",videoHeight:"100%",enableAutosize:!0},i(".wp-video-shortcode").mediaelementplayer(n)))}}function c(e){e=i(e);"function"==typeof e.parent().fitVids&&e.parent().fitVids()}document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)}),document.addEventListener("cmplz_enable_category",function(){document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)})})});
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{playlist:t,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,mute:1,wmode:"transparent"},events:{onReady:function(e){e.target.mute().setLoop(!0)}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t,i,o,n,a=e.innerWidth(),r=e.innerHeight();a/r<16/9?(t=r*(16/9),i=r,o=-Math.round((t-a)/2)+"px",n=-Math.round((i-r)/2)+"px"):(i=(t=a)*(9/16),n=-Math.round((i-r)/2)+"px",o=-Math.round((t-a)/2)+"px"),t+="px",i+="px",e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:o,marginTop:n,width:t,height:i})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);