;var MonsterInsights=function(){var t=[];this.setLastClicked=function(e,n,i){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:[];i=typeof i!=='undefined'?i:!1;t.valuesArray=e;t.fieldsArray=n};this.getLastClicked=function(){return t};function l(){if(monsterinsights_frontend.is_debug_mode==='true'||window.monsterinsights_debug_mode){return!0}
else{return!1}};function e(e,n){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:{};__gaTracker('send',n);t.valuesArray=e;t.fieldsArray=n;t.tracked=!0;i('Tracked: '+e.type);i(t)};function n(e){e=typeof e!=='undefined'?e:[];t.valuesArray=e;t.fieldsArray=[];t.tracked=!1;i('Not Tracked: '+e.exit);i(t)};function i(e){if(l()){console.dir(e)}};function o(e){return e.replace(/^\s+|\s+$/gm,'')};function s(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function f(e){e=e.toString();e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);if(e.length>0&&e.indexOf('.')!==-1){e=e.substring(e.indexOf('.')+1);return e}
else{return''}};function h(){return typeof(__gaTracker)!=='undefined'&&__gaTracker&&__gaTracker.hasOwnProperty('loaded')&&__gaTracker.loaded==!0};function v(e){return e.which==1||e.which==2||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey};function d(){var e=[];if(typeof monsterinsights_frontend.download_extensions=='string'){e=monsterinsights_frontend.download_extensions.split(',')};return e};function u(){var e=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){e=monsterinsights_frontend.inbound_paths.split(',')};return e};function p(e){if(e.which==1){return'event.which=1'}
else if(e.which==2){return'event.which=2'}
else if(e.metaKey){return'metaKey'}
else if(e.ctrlKey){return'ctrlKey'}
else if(e.shiftKey){return'shiftKey'}
else if(e.altKey){return'altKey'}
else{return''}};function m(e){var r=d(),h=u(),t='unknown',c=e.href,g=f(e.href),v=s(),a=e.hostname,i=e.protocol,p=e.pathname;c=c.toString();var n,l,m=e.getAttribute('data-vars-ga-category');if(m){return m};if(c.match(/^javascript\:/i)){t='internal'}
else if(i&&i.length>0&&(o(i)=='tel'||o(i)=='tel:')){t='tel'}
else if(i&&i.length>0&&(o(i)=='mailto'||o(i)=='mailto:')){t='mailto'}
else if(a&&v&&a.length>0&&v.length>0&&!a.endsWith(v)){t='external'}
else if(p&&h.length>0&&p.length>0){for(n=0,l=h.length;n<l;++n){if(h[n].length>0&&p.startsWith(h[n])){t='internal-as-outbound';break}}}
else if(a&&window.monsterinsights_experimental_mode&&a.length>0&&document.domain.length>0&&a!==document.domain){t='cross-hostname'};if(g&&(t==='unknown'||'external'===t)&&r.length>0&&g.length>0){for(n=0,l=r.length;n<l;++n){if(r[n].length>0&&(c.endsWith(r[n])||r[n]==g)){t='download';break}}};if(t==='unknown'){t='internal'};return t};function y(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function c(i){var r=i.srcElement||i.target,t=[],a;t.el=r;t.ga_loaded=h();t.click_type=p(i);if(!h()||!v(i)){t.exit='loaded';n(t);return}
while(r&&(typeof r.tagName=='undefined'||r.tagName.toLowerCase()!='a'||!r.href)){r=r.parentNode};if(r&&r.href&&!r.hasAttribute('xlink:href')){var c=r.href,O=f(r.href),E=d(),D=u(),M=monsterinsights_frontend.home_url,k=monsterinsights_frontend.track_download_as,x='outbound-link-'+monsterinsights_frontend.internal_label,W=s(),o=m(r),A=y(r,i),g=r.getAttribute('data-vars-ga-action'),b=r.getAttribute('data-vars-ga-label');t.el=r;t.el_href=r.href;t.el_protocol=r.protocol;t.el_hostname=r.hostname;t.el_port=r.port;t.el_pathname=r.pathname;t.el_search=r.search;t.el_hash=r.hash;t.el_host=r.host;t.debug_mode=l();t.download_extensions=E;t.inbound_paths=D;t.home_url=M;t.track_download_as=k;t.internal_label=x;t.link=c;t.extension=O;t.type=o;t.target=A;t.title=r.title||r.textContent||r.innerText;if(o!=='internal'&&o!=='javascript'){var T=!1,w=function(){if(T){return};T=!0;window.location.href=c},C=function(){t.exit='external';n(t)},L=function(){t.exit='internal-as-outbound';n(t)},K=function(){t.exit='cross-hostname';n(t)};if(A||o=='mailto'||o=='tel'){if(o=='download'){if(k=='pageview'){a={hitType:'pageview',page:c,};e(t,a)}
else{a={hitType:'event',eventCategory:'download',eventAction:g||c,eventLabel:b||t.title,};e(t,a)}}
else if(o=='tel'){a={hitType:'event',eventCategory:'tel',eventAction:g||c,eventLabel:b||t.title.replace('tel:',''),};e(t,a)}
else if(o=='mailto'){a={hitType:'event',eventCategory:'mailto',eventAction:g||c,eventLabel:b||t.title.replace('mailto:',''),};e(t,a)}
else if(o=='internal-as-outbound'){a={hitType:'event',eventCategory:x,eventAction:g||c,eventLabel:b||t.title,};e(t,a)}
else if(o=='external'){a={hitType:'event',eventCategory:'outbound-link',eventAction:g||c,eventLabel:b||t.title,};e(t,a)}
else if(o=='cross-hostname'){a={hitType:'event',eventCategory:'cross-hostname',eventAction:g||c,eventLabel:b||t.title,};e(t,a)}
else{if(o&&o!='internal'){a={hitType:'event',eventCategory:o,eventAction:g||c,eventLabel:b||t.title,};e(t,a)}
else{t.exit='type';n(t)}}}
else{if(o!='cross-hostname'&&o!='external'&&o!='internal-as-outbound'){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
else{i.returnValue=!1}}};if(o=='download'){if(k=='pageview'){a={hitType:'pageview',page:c,hitCallback:w,};e(t,a)}
else{a={hitType:'event',eventCategory:'download',eventAction:g||c,eventLabel:b||t.title,hitCallback:w,};e(t,a)}}
else if(o=='internal-as-outbound'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
else{i.returnValue=!1}};a={hitType:'event',eventCategory:x,eventAction:g||c,eventLabel:b||t.title,hitCallback:w,};if(navigator.sendBeacon){a.transport='beacon'};e(t,a);setTimeout(w,1000)}}
else if(o=='external'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
else{i.returnValue=!1}};a={hitType:'event',eventCategory:'outbound-link',eventAction:g||c,eventLabel:b||t.title,hitCallback:w,};if(navigator.sendBeacon){a.transport='beacon'};e(t,a);setTimeout(w,1000)}}
else if(o=='cross-hostname'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
else{i.returnValue=!1}};a={hitType:'event',eventCategory:'cross-hostname',eventAction:g||c,eventLabel:b||t.title,hitCallback:w,};if(navigator.sendBeacon){a.transport='beacon'};e(t,a);setTimeout(w,1000)}}
else{if(o&&o!=='internal'){a={hitType:'event',eventCategory:o,eventAction:g||c,eventLabel:b||t.title,hitCallback:w,};e(t,a)}
else{t.exit='type';n(t)}};if(o!='external'&&o!='cross-hostname'&&o!='internal-as-outbound'){setTimeout(w,1000)}
else{if(o=='external'){setTimeout(C,1100)}
else if(o=='cross-hostname'){setTimeout(K,1100)}
else{setTimeout(L,1100)}}}}
else{t.exit='internal';n(t)}}
else{t.exit='notlink';n(t)}};var r=window.location.hash;function g(){if(monsterinsights_frontend.hash_tracking==='true'&&r!=window.location.hash){r=window.location.hash;__gaTracker('set','page',location.pathname+location.search+location.hash);__gaTracker('send','pageview');i('Hash change to: '+location.pathname+location.search+location.hash)}
else{i('Hash change to (untracked): '+location.pathname+location.search+location.hash)}};var a=window;if(a.addEventListener){a.addEventListener('load',function(){document.body.addEventListener('click',c,!1)},!1);window.addEventListener('hashchange',g,!1)}
else{if(a.attachEvent){a.attachEvent('onload',function(){document.body.attachEvent('onclick',c)});window.attachEvent('onhashchange',g)}};if(typeof String.prototype.endsWith!=='function'){String.prototype.endsWith=function(e){return this.indexOf(e,this.length-e.length)!==-1}};if(typeof String.prototype.startsWith!=='function'){String.prototype.startsWith=function(e){return this.indexOf(e)===0}};if(typeof Array.prototype.lastIndexOf!=='function'){Array.prototype.lastIndexOf=function(e){'use strict';if(this===void 0||this===null){throw new TypeError()};var t,n,a=Object(this),i=a.length>>>0;if(i===0){return-1};t=i-1;if(arguments.length>1){t=Number(arguments[1]);if(t!=t){t=0}
else if(t!=0&&t!=(1/0)&&t!=-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}};for(n=t>=0?Math.min(t,i-1):i-Math.abs(t);n>=0;n--){if(n in a&&a[n]===e){return n}};return-1}}},MonsterInsightsObject=new MonsterInsights();
/*! jQuery Migrate v1.4.1 | (c) jQuery Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=[],b.console&&b.console.log&&b.console.log("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("<input/>",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*</,u=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,v=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,w=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(a.support,"boxModel",a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g<e.length;)e[g++].guid=f;return this.click(h)},a.fn.live=function(b,c,e){return d("jQuery.fn.live() is deprecated"),F?F.apply(this,arguments):(a(this.context).on(b,this.selector,c,e),this)},a.fn.die=function(b,c){return d("jQuery.fn.die() is deprecated"),G?G.apply(this,arguments):(a(this.context).off(b,this.selector||"**",c),this)},a.event.trigger=function(a,b,c,e){return c||J.test(a)||d("Global events are undocumented and deprecated"),D.call(this,a,b,c||document,e)},a.each(I.split("|"),function(b,c){a.event.special[c]={setup:function(){var b=this;return b!==document&&(a.event.add(document,c+"."+a.guid,function(){a.event.trigger(c,Array.prototype.slice.call(arguments,1),b,!0)}),a._data(this,c,a.guid++)),!1},teardown:function(){return this!==document&&a.event.remove(document,c+"."+a._data(this,c)),!1}}}),a.event.special.ready={setup:function(){this===document&&d("'ready' event is deprecated")}};var M=a.fn.andSelf||a.fn.addBack,N=a.fn.find;if(a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),M.apply(this,arguments)},a.fn.find=function(a){var b=N.apply(this,arguments);return b.context=this.context,b.selector=this.selector?this.selector+" "+a:a,b},a.Callbacks){var O=a.Deferred,P=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var c=O(),e=c.promise();return c.pipe=e.pipe=function(){var b=arguments;return d("deferred.pipe() is deprecated"),a.Deferred(function(d){a.each(P,function(f,g){var h=a.isFunction(b[f])&&b[f];c[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(d.resolve).fail(d.reject).progress(d.notify):d[g[0]+"With"](this===e?d.promise():this,h?[b]:arguments)})}),b=null}).promise()},c.isResolved=function(){return d("deferred.isResolved is deprecated"),"resolved"===c.state()},c.isRejected=function(){return d("deferred.isRejected is deprecated"),"rejected"===c.state()},b&&b.call(c,c),c}}}(jQuery,window);

!function(t,e,n,o){"use strict";function i(t){var e=n(t.currentTarget),o=t.data?t.data.options:{},i=e.attr("data-esgbox")||"",a=0,s=[];t.isDefaultPrevented()||(t.preventDefault(),i?(s=o.selector?n(o.selector):t.data?t.data.items:[],s=s.length?s.filter('[data-esgbox="'+i+'"]'):n('[data-esgbox="'+i+'"]'),a=s.index(e),a<0&&(a=0)):s=[e],n.esgbox.open(s,o,a))}if(n){if(n.fn.esgbox)return void("console"in t&&console.log("esgbox already initialized"));var a={loop:!1,margin:[44,0],gutter:50,keyboard:!0,arrows:!0,infobar:!0,toolbar:!0,buttons:["slideShow","fullScreen","thumbs","share","close"],idleTime:3,smallBtn:"auto",protect:!1,modal:!1,image:{preload:"auto"},ajax:{settings:{data:{esgbox:!0}}},iframe:{tpl:'<iframe id="esgbox-frame{rnd}" name="esgbox-frame{rnd}" class="esgbox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},defaultType:"image",animationEffect:"zoom",animationDuration:500,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="esgbox-container" role="dialog" tabindex="-1"><div class="esgbox-bg"></div><div class="esgbox-inner"><div class="esgbox-infobar"><span data-esgbox-index></span>&nbsp;/&nbsp;<span data-esgbox-count></span></div><div class="esgbox-toolbar">{{buttons}}</div><div class="esgbox-navigation">{{arrows}}</div><div class="esgbox-stage"></div><div class="esgbox-caption-wrap"><div class="esgbox-caption"></div></div></div></div>',spinnerTpl:'<div class="esgbox-loading"></div>',errorTpl:'<div class="esgbox-error"><p>{{ERROR}}<p></div>',btnTpl:{download:'<a download data-esgbox-download class="esgbox-button esgbox-button--download" title="{{DOWNLOAD}}"><svg viewBox="0 0 40 40"><path d="M20,23 L20,8 L20,23 L13,16 L20,23 L27,16 L20,23 M26,28 L13,28 L27,28 L14,28" /></svg></a>',zoom:'<button data-esgbox-zoom class="esgbox-button esgbox-button--zoom" title="{{ZOOM}}"><svg viewBox="0 0 40 40"><path d="M 18,17 m-8,0 a 8,8 0 1,0 16,0 a 8,8 0 1,0 -16,0 M25,23 L31,29 L25,23" /></svg></button>',close:'<button data-esgbox-close class="esgbox-button esgbox-button--close" title="{{CLOSE}}"><svg viewBox="0 0 40 40"><path d="M10,10 L30,30 M30,10 L10,30" /></svg></button>',smallBtn:'<button data-esgbox-close class="esgbox-close-small" title="{{CLOSE}}"></button>',arrowLeft:'<button data-esgbox-prev class="esgbox-button esgbox-button--arrow_left" title="{{PREV}}"><svg viewBox="0 0 40 40"><path d="M10,20 L30,20 L10,20 L18,28 L10,20 L18,12 L10,20"></path></svg></button>',arrowRight:'<button data-esgbox-next class="esgbox-button esgbox-button--arrow_right" title="{{NEXT}}"><svg viewBox="0 0 40 40"><path d="M30,20 L10,20 L30,20 L22,28 L30,20 L22,12 L30,20"></path></svg></button>'},parentEl:"body",autoFocus:!1,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:4e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".esgbox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{idleTime:!1,margin:0,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Maßstab"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},u=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),d=function(){var t,n=e.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(n.style[t]!==o)return i[t];return"transitionend"}(),f=function(t){return t&&t.length&&t[0].offsetHeight},p=function(t,o,i){var a=this;a.opts=n.extend(!0,{index:i},n.esgbox.defaults,o||{}),n.esgbox.isMobile&&(a.opts=n.extend(!0,{},a.opts,a.opts.mobile)),o&&n.isArray(o.buttons)&&(a.opts.buttons=o.buttons),a.id=a.opts.id||++c,a.group=[],a.currIndex=parseInt(a.opts.index,10)||0,a.prevIndex=null,a.prevPos=null,a.currPos=0,a.firstRun=null,a.createGroup(t),a.group.length&&(a.$lastFocus=n(e.activeElement).blur(),a.slides={},a.init())};n.extend(p.prototype,{init:function(){var i,a,s,c=this,l=c.group[c.currIndex],u=l.opts,d=n.esgbox.scrollbarWidth;c.scrollTop=r.scrollTop(),c.scrollLeft=r.scrollLeft(),n.esgbox.getInstance()||(n("body").addClass("esgbox-active"),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream?"image"!==l.type&&n("body").css("top",n("body").scrollTop()*-1).addClass("esgbox-iosfix"):!n.esgbox.isMobile&&e.body.scrollHeight>t.innerHeight&&(d===o&&(i=n('<div style="width:50px;height:50px;overflow:scroll;" />').appendTo("body"),d=n.esgbox.scrollbarWidth=i[0].offsetWidth-i[0].clientWidth,i.remove()),n("head").append('<style id="esgbox-style-noscroll" type="text/css">.compensate-for-scrollbar { margin-right: '+d+"px; }</style>"),n("body").addClass("compensate-for-scrollbar"))),s="",n.each(u.buttons,function(t,e){s+=u.btnTpl[e]||""}),a=n(c.translate(c,u.baseTpl.replace("{{buttons}}",s).replace("{{arrows}}",u.btnTpl.arrowLeft+u.btnTpl.arrowRight))).attr("id","esgbox-container-"+c.id).addClass("esgbox-is-hidden").addClass(u.baseClass).data("esgbox",c).appendTo(u.parentEl),c.$refs={container:a},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){c.$refs[t]=a.find(".esgbox-"+t)}),c.trigger("onInit"),c.activate(),c.jumpTo(c.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang];return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var i=n[e];return i===o?t:i})},createGroup:function(t){var e=this,i=n.makeArray(t);n.each(i,function(t,i){var a,s,r,c,l,u={},d={};n.isPlainObject(i)?(u=i,d=i.opts||i):"object"===n.type(i)&&n(i).length?(a=n(i),d=a.data(),d=n.extend({},d,d.options||{}),d.$orig=a,u.src=d.src||a.attr("href"),u.type||u.src||(u.type="inline",u.src=i)):u={type:"html",src:i+""},u.opts=n.extend(!0,{},e.opts,d),n.isArray(d.buttons)&&(u.opts.buttons=d.buttons),s=u.type||u.opts.type,c=u.src||"",!s&&c&&(c.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":c.match(/\.(pdf)((\?|#).*)?$/i)?s="pdf":(r=c.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i))?(s="video",u.opts.videoFormat||(u.opts.videoFormat="video/"+("ogv"===r[1]?"ogg":r[1]))):"#"===c.charAt(0)&&(s="inline")),s?u.type=s:e.trigger("objectNeedsType",u),u.index=e.group.length,u.opts.$orig&&!u.opts.$orig.length&&delete u.opts.$orig,!u.opts.$thumb&&u.opts.$orig&&(u.opts.$thumb=u.opts.$orig.find("img:first")),u.opts.$thumb&&!u.opts.$thumb.length&&delete u.opts.$thumb,"function"===n.type(u.opts.caption)&&(u.opts.caption=u.opts.caption.apply(i,[e,u])),"function"===n.type(e.opts.caption)&&(u.opts.caption=e.opts.caption.apply(i,[e,u])),u.opts.caption instanceof n||(u.opts.caption=u.opts.caption===o?"":u.opts.caption+""),"ajax"===s&&(l=c.split(/\s+/,2),l.length>1&&(u.src=l.shift(),u.opts.filter=l.shift())),"auto"==u.opts.smallBtn&&(n.inArray(s,["html","inline","ajax"])>-1?(u.opts.toolbar=!1,u.opts.smallBtn=!0):u.opts.smallBtn=!1),"pdf"===s&&(u.type="iframe",u.opts.iframe.preload=!1),u.opts.modal&&(u.opts=n.extend(!0,u.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),e.group.push(u)})},addEvents:function(){var o=this;o.removeEvents(),o.$refs.container.on("click.essbox-close","[data-esgbox-close]",function(t){t.stopPropagation(),t.preventDefault(),o.close(t)}).on("click.essbox-prev touchend.fb-prev","[data-esgbox-prev]",function(t){t.stopPropagation(),t.preventDefault(),o.previous()}).on("click.essbox-next touchend.fb-next","[data-esgbox-next]",function(t){t.stopPropagation(),t.preventDefault(),o.next()}).on("click.essbox","[data-esgbox-zoom]",function(t){o[o.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?u(function(){o.update()}):(o.$refs.stage.hide(),setTimeout(function(){o.$refs.stage.show(),o.update()},600))}),r.on("focusin.fb",function(t){var i=n.esgbox?n.esgbox.getInstance():null;i.isClosing||!i.current||!i.current.opts.trapFocus||n(t.target).hasClass("esgbox-container")||n(t.target).is(e)||i&&"fixed"!==n(t.target).css("position")&&!i.$refs.container.has(t.target).length&&(t.stopPropagation(),i.focus(),s.scrollTop(o.scrollTop).scrollLeft(o.scrollLeft))}),r.on("keydown.fb",function(t){var e=o.current,i=t.keyCode||t.which;if(e&&e.opts.keyboard&&!n(t.target).is("input")&&!n(t.target).is("textarea"))return 8===i||27===i?(t.preventDefault(),void o.close(t)):37===i||38===i?(t.preventDefault(),void o.previous()):39===i||40===i?(t.preventDefault(),void o.next()):void o.trigger("afterKeydown",t,i)}),o.group[o.currIndex].opts.idleTime&&(o.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){o.idleSecondsCounter=0,o.isIdle&&o.showControls(),o.isIdle=!1}),o.idleInterval=t.setInterval(function(){o.idleSecondsCounter++,o.idleSecondsCounter>=o.group[o.currIndex].opts.idleTime&&!o.isDragging&&(o.isIdle=!0,o.idleSecondsCounter=0,o.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("focusin.fb keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e,i){var a,s,r,c,l,u,d,p=this,h=p.group.length;if(!(p.isDragging||p.isClosing||p.isAnimating&&p.firstRun)){if(t=parseInt(t,10),s=p.current?p.current.opts.loop:p.opts.loop,!s&&(t<0||t>=h))return!1;if(a=p.firstRun=null===p.firstRun,!(h<2&&!a&&p.isDragging)){if(c=p.current,p.prevIndex=p.currIndex,p.prevPos=p.currPos,r=p.createSlide(t),h>1&&((s||r.index>0)&&p.createSlide(t-1),(s||r.index<h-1)&&p.createSlide(t+1)),p.current=r,p.currIndex=r.index,p.currPos=r.pos,p.trigger("beforeShow",a),p.updateControls(),u=n.esgbox.getTranslate(r.$slide),r.isMoved=(0!==u.left||0!==u.top)&&!r.$slide.hasClass("esgbox-animated"),r.forcedDuration=o,n.isNumeric(e)?r.forcedDuration=e:e=r.opts[a?"animationDuration":"transitionDuration"],e=parseInt(e,10),a)return r.opts.animationEffect&&e&&p.$refs.container.css("transition-duration",e+"ms"),p.$refs.container.removeClass("esgbox-is-hidden"),f(p.$refs.container),p.$refs.container.addClass("esgbox-is-open"),r.$slide.addClass("esgbox-slide--current"),p.loadSlide(r),void p.preload("image");n.each(p.slides,function(t,e){n.esgbox.stop(e.$slide)}),r.$slide.removeClass("esgbox-slide--next esgbox-slide--previous").addClass("esgbox-slide--current"),r.isMoved?(l=Math.round(r.$slide.width()),n.each(p.slides,function(t,o){var i=o.pos-r.pos;n.esgbox.animate(o.$slide,{top:0,left:i*l+i*o.opts.gutter},e,function(){o.$slide.removeAttr("style").removeClass("esgbox-slide--next esgbox-slide--previous"),o.pos===p.currPos&&(r.isMoved=!1,p.complete())})})):p.$refs.stage.children().removeAttr("style"),r.isLoaded?p.revealContent(r):p.loadSlide(r),p.preload("image"),c.pos!==r.pos&&(d="esgbox-slide--"+(c.pos>r.pos?"next":"previous"),c.$slide.removeClass("esgbox-slide--complete esgbox-slide--current esgbox-slide--next esgbox-slide--previous"),c.isComplete=!1,e&&(r.isMoved||r.opts.transitionEffect)&&(r.isMoved?c.$slide.addClass(d):(d="esgbox-animated "+d+" esgbox-fx-"+r.opts.transitionEffect,n.esgbox.animate(c.$slide,d,e,function(){c.$slide.removeClass(d).removeAttr("style")}))))}}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('<div class="esgbox-slide"></div>').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,i){var a,s,r,c,l,u=this,d=u.current,f=d.$content,p=parseInt(d.$slide.width(),10),h=parseInt(d.$slide.height(),10),g=d.width,b=d.height;"image"!=d.type||d.hasError||!f||u.isAnimating||(n.esgbox.stop(f),u.isAnimating=!0,t=t===o?.5*p:t,e=e===o?.5*h:e,a=n.esgbox.getTranslate(f),c=g/a.width,l=b/a.height,s=.5*p-.5*g,r=.5*h-.5*b,g>p&&(s=a.left*c-(t*c-t),s>0&&(s=0),s<p-g&&(s=p-g)),b>h&&(r=a.top*l-(e*l-e),r>0&&(r=0),r<h-b&&(r=h-b)),u.updateCursor(g,b),n.esgbox.animate(f,{top:r,left:s,scaleX:c,scaleY:l},i||330,function(){u.isAnimating=!1}),u.SlideShow&&u.SlideShow.isActive&&u.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;"image"!=i.type||i.hasError||!a||o.isAnimating||(n.esgbox.stop(a),o.isAnimating=!0,e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.esgbox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||330,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,a,s,r=this,c=t.$content,l=t.width,u=t.height,d=t.opts.margin;return!(!c||!c.length||!l&&!u)&&("number"===n.type(d)&&(d=[d,d]),2==d.length&&(d=[d[0],d[1],d[0],d[1]]),e=parseInt(r.$refs.stage.width(),10)-(d[1]+d[3]),o=parseInt(r.$refs.stage.height(),10)-(d[0]+d[2]),i=Math.min(1,e/l,o/u),a=Math.floor(i*l),s=Math.floor(i*u),{top:Math.floor(.5*(o-s))+d[0],left:Math.floor(.5*(e-a))+d[3],width:a,height:s})},update:function(){var t=this;n.each(t.slides,function(e,n){t.updateSlide(n)})},updateSlide:function(t,e){var o=this,i=t&&t.$content;i&&(t.width||t.height)&&(o.isAnimating=!1,n.esgbox.stop(i),n.esgbox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&o.updateCursor()),t.$slide.trigger("refresh"),o.trigger("onUpdate",t)},centerSlide:function(t,e){var i,a,s=this;s.current&&(i=Math.round(t.$slide.width()),a=t.pos-s.current.pos,n.esgbox.animate(t.$slide,{top:0,left:a*i+a*t.opts.gutter,opacity:1},e===o?0:e,null,!1))},updateCursor:function(t,e){var n,i=this,a=i.$refs.container.removeClass("esgbox-is-zoomable esgbox-can-zoomIn esgbox-can-drag esgbox-can-zoomOut");i.current&&!i.isClosing&&(i.isZoomable()?(a.addClass("esgbox-is-zoomable"),n=t!==o&&e!==o?t<i.current.width&&e<i.current.height:i.isScaledDown(),n?a.addClass("esgbox-can-zoomIn"):i.current.opts.touch?a.addClass("esgbox-can-drag"):a.addClass("esgbox-can-zoomOut")):i.current.opts.touch&&a.addClass("esgbox-can-drag"))},isZoomable:function(){var t,e=this,o=e.current;if(o&&!e.isClosing)return!!("image"===o.type&&o.isLoaded&&!o.hasError&&("zoom"===o.opts.clickContent||n.isFunction(o.opts.clickContent)&&"zoom"===o.opts.clickContent(o))&&(t=e.getFitPos(o),o.width>t.width||o.height>t.height))},isScaledDown:function(){var t=this,e=t.current,o=e.$content,i=!1;return o&&(i=n.esgbox.getTranslate(o),i=i.width<e.width||i.height<e.height),i},canPan:function(){var t=this,e=t.current,n=e.$content,o=!1;return n&&(o=t.getFitPos(e),o=Math.abs(n.width()-o.width)>1||Math.abs(n.height()-o.height)>1),o},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){switch(t.isLoading=!0,a.trigger("beforeLoad",t),e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass("esgbox-slide--"+(e||"unknown")).addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;case"video":a.setContent(t,'<video controls autoplay><source src="'+t.src+'" type="'+t.opts.videoFormat+"\">Your browser doesn't support HTML5 video</video>");break;default:a.setError(t)}return!0}},setImage:function(e){var o,i,a,s,r=this,c=e.opts.srcset||e.opts.image.srcset;if(c){a=t.devicePixelRatio||1,s=t.innerWidth*a,i=c.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&&(e.value=o,e.postfix=t[t.length-1]))}),e}),i.sort(function(t,e){return t.value-e.value});for(var l=0;l<i.length;l++){var u=i[l];if("w"===u.postfix&&u.value>=s||"x"===u.postfix&&u.value>=a){o=u;break}}!o&&i.length&&(o=i[i.length-1]),o&&(e.src=o.url,e.width&&e.height&&"w"==o.postfix&&(e.height=e.width/e.height*o.value,e.width=o.value))}e.$content=n('<div class="esgbox-image-wrap"></div>').addClass("esgbox-is-hidden").appendTo(e.$slide),e.opts.preload!==!1&&e.opts.width&&e.opts.height&&(e.opts.thumb||e.opts.$thumb)?(e.width=e.opts.width,e.height=e.opts.height,e.$ghost=n("<img />").one("error",function(){n(this).remove(),e.$ghost=null,r.setBigImage(e)}).one("load",function(){r.afterLoad(e),r.setBigImage(e)}).addClass("esgbox-image").appendTo(e.$content).attr("src",e.opts.thumb||e.opts.$thumb.attr("src"))):r.setBigImage(e)},setBigImage:function(t){var e=this,o=n("<img />");t.$image=o.one("error",function(){e.setError(t)}).one("load",function(){clearTimeout(t.timouts),t.timouts=null,e.isClosing||(t.width=t.opts.width||this.naturalWidth,t.height=t.opts.height||this.naturalHeight,t.opts.image.srcset&&o.attr("sizes","100vw").attr("srcset",t.opts.image.srcset),e.hideLoading(t),t.$ghost?t.timouts=setTimeout(function(){t.timouts=null,t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))):e.afterLoad(t))}).addClass("esgbox-image").attr("src",t.src).appendTo(t.$content),(o[0].complete||"complete"==o[0].readyState)&&o[0].naturalWidth&&o[0].naturalHeight?o.trigger("load"):o[0].error?o.trigger("error"):t.timouts=setTimeout(function(){o[0].complete||t.hasError||e.showLoading(t)},100)},setIframe:function(t){var e,i=this,a=t.opts.iframe,s=t.$slide;t.$content=n('<div class="esgbox-content'+(a.preload?" esgbox-is-hidden":"")+'"></div>').css(a.css).appendTo(s),e=n(a.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(a.attr).appendTo(t.$content),a.preload?(i.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),i.afterLoad(t)}),s.on("refresh.fb",function(){var n,i,s,r=t.$content,c=a.css.width,l=a.css.height;if(1===e[0].isReady){try{i=e.contents(),s=i.find("body")}catch(t){}s&&s.length&&(c===o&&(n=e[0].contentWindow.document.documentElement.scrollWidth,c=Math.ceil(s.outerWidth(!0)+(r.width()-n)),c+=r.outerWidth()-r.innerWidth()),l===o&&(l=Math.ceil(s.outerHeight(!0)),l+=r.outerHeight()-r.innerHeight()),c&&r.width(c),l&&r.height(l)),r.removeClass("esgbox-is-hidden")}})):this.afterLoad(t),e.attr("src",t.src),t.opts.smallBtn===!0&&t.$content.prepend(i.translate(t,t.opts.btnTpl.smallBtn)),s.one("onReset",function(){try{n(this).find("iframe").hide().attr("src","//about:blank")}catch(t){}n(this).empty(),t.isLoaded=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$slide.empty(),l(e)&&e.parent().length?(e.parent(".esgbox-slide--inline").trigger("onReset"),t.$placeholder=n("<div></div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("<div>").append(n.trim(e)).contents(),3===e[0].nodeType&&(e=n("<div>").html(e))),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1)}),t.$content=n(e).appendTo(t.$slide),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.removeClass("esgbox-slide--"+t.type),this.setContent(t,this.translate(t,t.opts.errorTpl))},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.opts.spinnerTpl).appendTo(t.$slide))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),t.opts.smallBtn&&!t.$smallBtn&&(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content.filter("div,form").first())),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="esgbox-spaceball"></div>').appendTo(t.$content)),e.revealContent(t))},revealContent:function(t){var e,i,a,s,r,c=this,l=t.$slide,u=!1;return e=t.opts[c.firstRun?"animationEffect":"transitionEffect"],a=t.opts[c.firstRun?"animationDuration":"transitionDuration"],a=parseInt(t.forcedDuration===o?a:t.forcedDuration,10),!t.isMoved&&t.pos===c.currPos&&a||(e=!1),"zoom"!==e||t.pos===c.currPos&&a&&"image"===t.type&&!t.hasError&&(u=c.getThumbPos(t))||(e="fade"),"zoom"===e?(r=c.getFitPos(t),r.scaleX=r.width/u.width,r.scaleY=r.height/u.height,delete r.width,delete r.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-u.width/u.height)>.1),s&&(u.opacity=.1,r.opacity=1),n.esgbox.setTranslate(t.$content.removeClass("esgbox-is-hidden"),u),f(t.$content),void n.esgbox.animate(t.$content,r,a,function(){c.complete()})):(c.updateSlide(t),e?(n.esgbox.stop(l),i="esgbox-animated esgbox-slide--"+(t.pos>=c.prevPos?"next":"previous")+" esgbox-fx-"+e,l.removeAttr("style").removeClass("esgbox-slide--current esgbox-slide--next esgbox-slide--previous").addClass(i),t.$content.removeClass("esgbox-is-hidden"),f(l),void n.esgbox.animate(l,"esgbox-slide--current",a,function(e){l.removeClass(i).removeAttr("style"),t.pos===c.currPos&&c.complete()},!0)):(f(l),t.$content.removeClass("esgbox-is-hidden"),void(t.pos===c.currPos&&c.complete())))},getThumbPos:function(o){var i,a=this,s=!1,r=function(e){for(var o,i=e[0],a=i.getBoundingClientRect(),s=[];null!==i.parentElement;)"hidden"!==n(i.parentElement).css("overflow")&&"auto"!==n(i.parentElement).css("overflow")||s.push(i.parentElement.getBoundingClientRect()),i=i.parentElement;return o=s.every(function(t){var e=Math.min(a.right,t.right)-Math.max(a.left,t.left),n=Math.min(a.bottom,t.bottom)-Math.max(a.top,t.top);return e>0&&n>0}),o&&a.bottom>0&&a.right>0&&a.left<n(t).width()&&a.top<n(t).height()},c=o.opts.$thumb,l=c?c.offset():0;return l&&c[0].ownerDocument===e&&r(c)&&(i=a.$refs.stage.offset(),s={top:l.top-i.top+parseFloat(c.css("border-top-width")||0),left:l.left-i.left+parseFloat(c.css("border-left-width")||0),width:c.width(),height:c.height(),scaleX:1,scaleY:1}),s},complete:function(){var t=this,o=t.current,i={};o.isMoved||!o.isLoaded||o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),t.preload("inline"),f(o.$slide),o.$slide.addClass("esgbox-slide--complete"),n.each(t.slides,function(e,o){o.pos>=t.currPos-1&&o.pos<=t.currPos+1?i[o.pos]=o:o&&(n.esgbox.stop(o.$slide),o.$slide.off().remove())}),t.slides=i,t.updateCursor(),t.trigger("afterShow"),o.$slide.find("video,audio").first().trigger("play_disabled"),(n(e.activeElement).is("[disabled]")||o.opts.autoFocus&&"image"!=o.type&&"iframe"!==o.type)&&t.focus())},preload:function(t){var e=this,n=e.slides[e.currPos+1],o=e.slides[e.currPos-1];n&&n.type===t&&e.loadSlide(n),o&&o.type===t&&e.loadSlide(o)},focus:function(){var t,e=this.current;this.isClosing||(e&&e.isComplete&&(t=e.$slide.find("input[autofocus]:enabled:visible:first"),t.length||(t=e.$slide.find("button,:input,[tabindex],a").filter(":enabled:visible:first"))),t=t&&t.length?t:this.$refs.container,t.focus())},activate:function(){var t=this;n(".esgbox-container").each(function(){var e=n(this).data("esgbox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l=this,p=l.current,h=function(){l.cleanUp(t)};return!l.isClosing&&(l.isClosing=!0,l.trigger("beforeClose",t)===!1?(l.isClosing=!1,u(function(){l.update()}),!1):(l.removeEvents(),p.timouts&&clearTimeout(p.timouts),a=p.$content,o=p.opts.animationEffect,i=n.isNumeric(e)?e:o?p.opts.animationDuration:0,p.$slide.off(d).removeClass("esgbox-slide--complete esgbox-slide--next esgbox-slide--previous esgbox-animated"),p.$slide.siblings().trigger("onReset").remove(),i&&l.$refs.container.removeClass("esgbox-is-open").addClass("esgbox-is-closing"),l.hideLoading(p),l.hideControls(),l.updateCursor(),"zoom"!==o||t!==!0&&a&&i&&"image"===p.type&&!p.hasError&&(c=l.getThumbPos(p))||(o="fade"),"zoom"===o?(n.esgbox.stop(a),r=n.esgbox.getTranslate(a),r.width=r.width*r.scaleX,r.height=r.height*r.scaleY,s=p.opts.zoomOpacity,"auto"==s&&(s=Math.abs(p.width/p.height-c.width/c.height)>.1),s&&(c.opacity=0),r.scaleX=r.width/c.width,r.scaleY=r.height/c.height,r.width=c.width,r.height=c.height,n.esgbox.setTranslate(p.$content,r),f(p.$content),n.esgbox.animate(p.$content,c,i,h),!0):(o&&i?t===!0?setTimeout(h,i):n.esgbox.animate(p.$slide.removeClass("esgbox-slide--current"),"esgbox-animated esgbox-slide--previous esgbox-fx-"+o,i,h):h(),!0)))},cleanUp:function(t){var o,i,a=this,r=n("body");a.current.$slide.trigger("onReset"),a.$refs.container.empty().remove(),a.trigger("afterClose",t),a.$lastFocus&&a.current.opts.backFocus&&a.$lastFocus.focus(),a.current=null,o=n.esgbox.getInstance(),o?o.activate():(s.scrollTop(a.scrollTop).scrollLeft(a.scrollLeft),r.removeClass("esgbox-active compensate-for-scrollbar"),r.hasClass("esgbox-iosfix")&&(i=parseInt(e.body.style.top,10),r.removeClass("esgbox-iosfix").css("top","").scrollTop(i*-1)),n("#esgbox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;return s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),o===!1?o:void("afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i))},updateControls:function(t){var e=this,n=e.current,o=n.index,i=n.opts.caption,a=e.$refs.container,s=e.$refs.caption;n.$slide.trigger("refresh"),e.$caption=i&&i.length?s.html(i):null,e.isHiddenControls||e.isIdle||e.showControls(),a.find("[data-esgbox-count]").html(e.group.length),a.find("[data-esgbox-index]").html(o+1),a.find("[data-esgbox-prev]").prop("disabled",!n.opts.loop&&o<=0),a.find("[data-esgbox-next]").prop("disabled",!n.opts.loop&&o>=e.group.length-1),"image"===n.type?a.find("[data-esgbox-download]").attr("href",n.opts.image.src||n.src).show():a.find("[data-esgbox-download],[data-esgbox-zoom]").hide()},hideControls:function(){this.isHiddenControls=!0,this.$refs.container.removeClass("")},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.isHiddenControls=!1,t.idleSecondsCounter=0,n.addClass("esgbox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("esgbox-show-infobar",!!(e.infobar&&t.group.length>1)).addClass("esgbox-show-nav",!!(e.arrows&&t.group.length>1)).addClass("esgbox-is-modal",!!e.modal),t.$caption?n.addClass("esgbox-show-caption "):n.removeClass("esgbox-show-caption")},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.esgbox={version:"3.2.10",defaults:a,getInstance:function(t){var e=n('.esgbox-container:not(".esgbox-is-closing"):last').data("esgbox"),o=Array.prototype.slice.call(arguments,1);return e instanceof p&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new p(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close())},destroy:function(){this.close(!0),r.off("click.essbox-start")},isMobile:e.createTouch!==o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;if(!t||!t.length)return!1;if(e=t.eq(0).css("transform"),e&&e.indexOf("matrix")!==-1?(e=e.split("(")[1],e=e.split(")")[0],e=e.split(",")):e=[],e.length)e=e.length>10?[e[13],e[12],e[0],e[5]]:[e[5],e[4],e[0],e[3]],e=e.map(parseFloat);else{e=[0,0,1,1];var n=/\.*translate\((.*)px,(.*)px\)/i,o=n.exec(t.eq(0).attr("style"));o&&(e[0]=parseFloat(o[2]),e[1]=parseFloat(o[1]))}return{top:e[0],left:e[1],scaleX:e[2],scaleY:e[3],opacity:parseFloat(t.css("opacity")),width:t.width(),height:t.height()}},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),t.on(d,function(i){(!i||!i.originalEvent||t.is(i.originalEvent.target)&&"z-index"!=i.originalEvent.propertyName)&&(n.esgbox.stop(t),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(t.css("transition-duration",""),e.width=Math.round(t.width()*e.scaleX),e.height=Math.round(t.height()*e.scaleY),e.scaleX=1,e.scaleY=1,n.esgbox.setTranslate(t,e)),s===!1&&t.removeAttr("style")):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(i))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?n.esgbox.setTranslate(t,e):t.addClass(e),e.scaleX&&t.hasClass("esgbox-image-wrap")&&t.parent().addClass("esgbox-is-scaling"),t.data("timer",setTimeout(function(){t.trigger("transitionend")},i+16))},stop:function(t){clearTimeout(t.data("timer")),t.off("transitionend").css("transition-duration",""),t.hasClass("esgbox-image-wrap")&&t.parent().removeClass("esgbox-is-scaling")}},n.fn.esgbox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.essbox-start",e).on("click.essbox-start",e,{options:t},i):this.off("click.essbox-start").on("click.essbox-start",{items:this,options:t},i),this},r.on("click.essbox-start","[data-esgbox]",i)}}(window,document,window.jQuery||jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"
},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:"iframe",url:"//www.metacafe.com/embed/$1/?ap=1"},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"iframe",url:"//www.dailymotion.com/embed/video/$1"},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:"iframe",url:"//vine.co/v/$1/embed/simple"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12])+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,u,d,f,p=a.src||"",h=!1;s=t.extend(!0,{},n,a.opts.media),t.each(s,function(n,o){if(c=p.match(o.matcher)){if(h=o.type,d={},o.paramPlace&&c[o.paramPlace]){u=c[o.paramPlace],"?"==u[0]&&(u=u.substring(1)),u=u.split("&");for(var i=0;i<u.length;++i){var s=u[i].split("=",2);2==s.length&&(d[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[n],d),p="function"===t.type(o.url)?o.url.call(this,c,l,a):e(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):e(o.thumb,c),"vimeo"===n&&(p=p.replace("&%23","#")),!1}}),h?(a.src=p,a.type=h,a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}}),a.contentProvider=f,a.opts.slideClass+=" esgbox-slide--"+("gmap_place"==f||"gmap_search"==f?"map":"video"))):p&&(a.type=a.opts.defaultType)})}(window.jQuery||jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-esgbox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("esgbox-stage")||t.is("body"))break}return e},u=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};u.prototype.destroy=function(){this.$container.off(".fb.touch")},u.prototype.ontouchstart=function(o){var i=this,c=n(o.target),u=i.instance,d=u.current,f=d.$content,p="touchstart"==o.type;if(p&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!d||i.instance.isAnimating||i.instance.isClosing)return o.stopPropagation(),void o.preventDefault();if(i.realPoints=i.startPoints=a(o),i.startPoints){if(o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=f,i.opts=d.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.sliderStartPos=i.sliderLastPos||{top:0,left:0},i.contentStartPos=n.esgbox.getTranslate(i.$content),i.contentLastPos=null,i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(d.$slide[0].clientWidth),i.canvasHeight=Math.round(d.$slide[0].clientHeight),n(e).off(".fb.touch").on(p?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(p?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.esgbox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),!i.opts&&!u.canPan()||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is("img")&&o.preventDefault());n.esgbox.isMobile&&(l(c)||l(c.parent()))||o.preventDefault(),1===i.startPoints.length&&("image"===d.type&&(i.contentStartPos.width>i.canvasWidth+1||i.contentStartPos.height>i.canvasHeight+1)?(n.esgbox.stop(i.$content),i.$content.css("transition-duration",""),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("esgbox-controls--isGrabbing")),2!==i.startPoints.length||u.isAnimating||d.hasError||"image"!==d.type||!d.isLoaded&&!d.$ghost||(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.esgbox.stop(i.$content),i.$content.css("transition-duration",""),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))}}},u.prototype.onscroll=function(t){self.isScrolling=!0},u.prototype.ontouchmove=function(t){var e=this,o=n(t.target);return e.isScrolling||!o.is(e.$stage)&&!e.$stage.find(o).length?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.instance.canPan())&&e.newPoints&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},u.prototype.onSwipe=function(e){var a,s=this,r=s.isSwiping,c=s.sliderStartPos.left||0;if(r!==!0)"x"==r&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?c+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?c-=Math.pow(-s.distanceX,.8):c+=s.distanceX),s.sliderLastPos={top:"x"==r?0:s.sliderStartPos.top+s.distanceY,left:c},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.esgbox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("esgbox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,s.instance.group.length<2&&s.opts.vertical?s.isSwiping="y":s.instance.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),s.canTap=!1,"y"===s.isSwiping&&n.esgbox.isMobile&&(l(s.$target)||l(s.$target.parent())))return void(s.isScrolling=!0);s.instance.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(s.instance.slides,function(t,e){n.esgbox.stop(e.$slide),e.$slide.css("transition-duration",""),e.inTransition=!1,e.pos===s.instance.current.pos&&(s.sliderStartPos.left=n.esgbox.getTranslate(e.$slide).left)}),s.instance.SlideShow&&s.instance.SlideShow.isActive&&s.instance.SlideShow.stop()}},u.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.esgbox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&(i(t.requestId),t.requestId=null),void(t.requestId=o(function(){n.esgbox.setTranslate(t.$content,t.contentLastPos)})))},u.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,u=s.distanceY,d=s.contentStartPos,f=d.left,p=d.top,h=d.width,g=d.height;return i=h>r?f+l:f,a=p+u,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),h>r&&(l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0)),g>c&&(u>0&&a>e&&(a=e-1+Math.pow(-e+p+u,.8)||0),u<0&&a<o&&(a=o+1-Math.pow(o-p-u,.8)||0)),{top:a,left:i,scaleX:d.scaleX,scaleY:d.scaleY}},u.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},u.prototype.onZoom=function(){var e=this,a=e.contentStartPos.width,r=e.contentStartPos.height,c=e.contentStartPos.left,l=e.contentStartPos.top,u=s(e.newPoints[0],e.newPoints[1]),d=u/e.startDistanceBetweenFingers,f=Math.floor(a*d),p=Math.floor(r*d),h=(a-f)*e.percentageOfImageAtPinchPointX,g=(r-p)*e.percentageOfImageAtPinchPointY,b=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),m=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=b-e.centerPointStartX,v=m-e.centerPointStartY,x=c+(h+y),w=l+(g+v),$={top:w,left:x,scaleX:e.contentStartPos.scaleX*d,scaleY:e.contentStartPos.scaleY*d};e.canTap=!1,e.newWidth=f,e.newHeight=p,e.contentLastPos=$,e.requestId&&(i(e.requestId),e.requestId=null),e.requestId=o(function(){n.esgbox.setTranslate(e.$content,e.contentLastPos)})},u.prototype.ontouchend=function(t){var o=this,s=Math.max((new Date).getTime()-o.startTime,1),r=o.isSwiping,c=o.isPanning,l=o.isZooming,u=o.isScrolling;return o.endPoints=a(t),o.$container.removeClass("esgbox-controls--isGrabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap?o.onTap(t):(o.speed=366,o.velocityX=o.distanceX/s*.5,o.velocityY=o.distanceY/s*.5,o.speedX=Math.max(.5*o.speed,Math.min(1.5*o.speed,1/Math.abs(o.velocityX)*o.speed)),void(c?o.endPanning():l?o.endZooming():o.endSwiping(r,u)))},u.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length;o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.esgbox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},150),i=o.instance.close(!0,300)):"x"==t&&o.distanceX>50&&a>1?i=o.instance.previous(o.speedX):"x"==t&&o.distanceX<-50&&a>1&&(i=o.instance.next(o.speedX)),i!==!1||"x"!=t&&"y"!=t||(e||a<2?o.instance.centerSlide(o.instance.current,150):o.instance.jumpTo(o.instance.current.index)),o.$container.removeClass("esgbox-is-sliding")},u.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.opts.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.esgbox.animate(i.$content,o,330))},u.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.esgbox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.esgbox.setTranslate(a.content,n.esgbox.getTranslate(a.$content)),n.esgbox.animate(a.$content,o,150)))},u.prototype.onTap=function(t){var e,o=this,i=n(t.target),s=o.instance,r=s.current,c=t&&a(t)||o.startPoints,l=c[0]?c[0].x-o.$stage.offset().left:0,u=c[0]?c[0].y-o.$stage.offset().top:0,d=function(e){var i=r.opts[e];if(n.isFunction(i)&&(i=i.apply(s,[r,t])),i)switch(i){case"close":s.close(o.startEvent);break;case"toggleControls":s.toggleControls(!0);break;case"next":s.next();break;case"nextOrClose":s.group.length>1?s.next():s.close(o.startEvent);break;case"zoom":"image"==r.type&&(r.isLoaded||r.$ghost)&&(s.canPan()?s.scaleToFit():s.isScaledDown()?s.scaleToActual(l,u):s.group.length<2&&s.close(o.startEvent))}};if((!t.originalEvent||2!=t.originalEvent.button)&&(i.is("img")||!(l>i[0].clientWidth+i.offset().left))){if(i.is(".esgbox-bg,.esgbox-inner,.esgbox-outer,.esgbox-container"))e="Outside";else if(i.is(".esgbox-slide"))e="Slide";else{if(!s.current.$content||!s.current.$content.find(i).addBack().filter(i).length)return;e="Content"}if(o.tapped){if(clearTimeout(o.tapped),o.tapped=null,Math.abs(l-o.tapX)>50||Math.abs(u-o.tapY)>50)return this;d("dblclick"+e)}else o.tapX=l,o.tapY=u,r.opts["dblclick"+e]&&r.opts["dblclick"+e]!==r.opts["click"+e]?o.tapped=setTimeout(function(){o.tapped=null,d("click"+e)},500):d("click"+e);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new u(e))})}(window,document,window.jQuery||jQuery),function(t,e){"use strict";e.extend(!0,e.esgbox.defaults,{btnTpl:{slideShow:'<button data-esgbox-play class="esgbox-button esgbox-button--play" title="{{PLAY_START}}"><svg viewBox="0 0 40 40"><path d="M13,12 L27,20 L13,27 Z" /><path d="M15,10 v19 M23,10 v19" /></svg></button>'},slideShow:{autoStart:!1,speed:3e3}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-esgbox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(t){var e=this;e.instance&&e.instance.current&&(t===!0||e.instance.current.opts.loop||e.instance.currIndex<e.instance.group.length-1)?e.timer=setTimeout(function(){e.isActive&&e.instance.jumpTo((e.instance.currIndex+1)%e.instance.group.length)},e.instance.current.opts.slideShow.speed):(e.stop(),e.instance.idleSecondsCounter=0,e.instance.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null},start:function(){var t=this,e=t.instance.current;e&&(t.isActive=!0,t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_STOP).removeClass("esgbox-button--play").addClass("esgbox-button--pause"),t.set(!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_START).removeClass("esgbox-button--pause").addClass("esgbox-button--play"),t.isActive=!1},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.esgbox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,window.jQuery||jQuery),function(t,e){"use strict";var n=function(){var e,n,o,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a={};for(n=0;n<i.length;n++)if(e=i[n],e&&e[1]in t){for(o=0;o<e.length;o++)a[i[0][o]]=e[o];return a}return!1}();if(!n)return void(e&&e.esgbox&&(e.esgbox.defaults.btnTpl.fullScreen=!1));var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.esgbox.defaults,{btnTpl:{fullScreen:'<button data-esgbox-fullscreen class="esgbox-button esgbox-button--fullscreen" title="{{FULL_SCREEN}}"><svg viewBox="0 0 40 40"><path d="M9,12 h22 v16 h-22 v-16 v16 h22 v-16 Z" /></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on({"onInit.fb":function(t,e){var n;e&&e.group[e.currIndex].opts.fullScreen?(n=e.$refs.container,n.on("click.essbox-fullscreen","[data-esgbox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle(n[0])}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(n[0]),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-esgbox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle(e.$refs.container[0]))},"beforeClose.fb":function(t){t&&t.FullScreen&&o.exit()}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.esgbox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("esgbox-is-fullscreen",t))})}(document,window.jQuery||jQuery),function(t,e){"use strict";e.esgbox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-esgbox-thumbs class="esgbox-button esgbox-button--thumbs" title="{{THUMBS}}"><svg viewBox="0 0 120 120"><path d="M30,30 h14 v14 h-14 Z M50,30 h14 v14 h-14 Z M70,30 h14 v14 h-14 Z M30,50 h14 v14 h-14 Z M50,50 h14 v14 h-14 Z M70,50 h14 v14 h-14 Z M30,70 h14 v14 h-14 Z M50,70 h14 v14 h-14 Z M70,70 h14 v14 h-14 Z" /></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".esgbox-container",axis:"y"}},e.esgbox.defaults);var n=function(t){this.init(t)};e.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this;e.instance=t,t.Thumbs=e;var n=t.group[0],o=t.group[1];e.opts=t.group[t.currIndex].opts.thumbs,e.$button=t.$refs.toolbar.find("[data-esgbox-thumbs]"),e.opts&&n&&o&&("image"==n.type||n.opts.thumb||n.opts.$thumb)&&("image"==o.type||o.opts.thumb||o.opts.$thumb)?(e.$button.show().on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,n,o=this,i=o.instance,a=o.opts.parentEl;o.$grid=e('<div class="esgbox-thumbs esgbox-thumbs-'+o.opts.axis+'"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),t="<ul>",e.each(i.group,function(e,o){n=o.opts.thumb||(o.opts.$thumb?o.opts.$thumb.attr("src"):null),n||"image"!==o.type||(n=o.src),n&&n.length&&(t+='<li data-index="'+e+'"  tabindex="0" class="esgbox-thumbs-loading"><img data-src="'+n+'" /></li>')}),t+="</ul>",o.$list=e(t).appendTo(o.$grid).on("click","li",function(){i.jumpTo(e(this).data("index"))}),o.$list.find("img").hide().one("load",function(){var t,n,o,i,a=e(this).parent().removeClass("esgbox-thumbs-loading"),s=a.outerWidth(),r=a.outerHeight();t=this.naturalWidth||this.width,n=this.naturalHeight||this.height,o=t/s,i=n/r,o>=1&&i>=1&&(o>i?(t/=i,n=r):(t=s,n/=o)),e(this).css({width:Math.floor(t),height:Math.floor(n),"margin-top":n>r?Math.floor(.3*r-.3*n):Math.floor(.5*r-.5*n),"margin-left":Math.floor(.5*s-.5*t)}).show()}).each(function(){this.src=e(this).data("src")}),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"))+i.group.length*o.$list.children().eq(0).outerWidth(!0)+"px")},focus:function(t){var e,n,o=this,i=o.$list;o.instance.current&&(e=i.children().removeClass("esgbox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("esgbox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.left<i.parent().scrollLeft()||n.left>i.parent().scrollLeft()+(i.parent().width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){this.instance.$refs.container.toggleClass("esgbox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus(0)):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e),o.isActive&&o.opts.autoStart===!0&&o.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,window.jQuery),function(t,e){"use strict";function n(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.esgbox.defaults,{btnTpl:{share:'<button data-esgbox-share class="esgbox-button esgbox-button--share" title="{{SHARE}}"><svg viewBox="0 0 40 40"><path d="M6,30 C8,18 19,16 23,16 L23,16 L23,10 L33,20 L23,29 L23,24 C19,24 8,27 6,30 Z"></svg></button>'},share:{tpl:'<div class="esgbox-share"><h1>{{SHARE}}</h1><p class="esgbox-share__links"><a class="esgbox-share__button esgbox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="esgbox-share__button esgbox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a><a class="esgbox-share__button esgbox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a></p><p><input class="esgbox-share__input" type="text" value="{{url_raw}}" /></p></div>'}}),e(t).on("click","[data-esgbox-share]",function(){var t,o,i=e.esgbox.getInstance();i&&(t=i.current.opts.hash===!1?i.current.src:window.location,o=i.current.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===i.current.type?encodeURIComponent(i.current.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.esgbox.open({src:i.translate(i,o),type:"html",opts:{animationEffect:"fade",animationDuration:250,afterLoad:function(t,e){e.$content.find(".esgbox-share__links a").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})}}}))})}(document,window.jQuery||jQuery),function(t,e,n){"use strict";function o(){var t=e.location.hash.substr(1),n=t.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return o<1&&(o=1),{hash:t,index:o,gallery:i}}function i(t){var e;""!==t.gallery&&(e=n("[data-esgbox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1),e.length||(e=n("#"+n.escapeSelector(t.gallery))),e.length&&(s=!1,e.trigger("click")))}function a(t){var e;return!!t&&(e=t.current?t.current.opts:t.opts,e.hash||(e.$orig?e.$orig.data("esgbox"):""))}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)});var s=!0,r=null,c=null;n(function(){n.esgbox.defaults.hash!==!1&&(n(t).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i){var l;i&&i.opts.hash!==!1&&(l=a(o),l&&""!==l&&(e.location.hash.indexOf(l)<0&&(o.opts.origHash=e.location.hash),r=l+(o.group.length>1?"-"+(i.index+1):""),"replaceState"in e.history?(c&&clearTimeout(c),c=setTimeout(function(){e.history[s?"pushState":"replaceState"]({},t.title,e.location.pathname+e.location.search+"#"+r),c=null,s=!1},300)):e.location.hash=r))},"beforeClose.fb":function(o,i,s){var l,u;c&&clearTimeout(c),s.opts.hash!==!1&&(l=a(i),u=i&&i.opts.origHash?i.opts.origHash:"",l&&""!==l&&("replaceState"in history?e.history.replaceState({},t.title,e.location.pathname+e.location.search+u):(e.location.hash=u,n(e).scrollTop(i.scrollTop).scrollLeft(i.scrollLeft))),r=null)}}),n(e).on("hashchange.fb",function(){var t=o();n.esgbox.getInstance()?!r||r===t.gallery+"-"+t.index||1===t.index&&r==t.gallery||(r=null,n.esgbox.close()):""!==t.gallery&&i(t)}),setTimeout(function(){i(o())},50))})}(document,window,window.jQuery||jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<1||o.opts.wheel===!1||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("esgbox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,window.jQuery||jQuery);

/*
* @fileOverview TouchSwipe - jQuery Plugin
* @version 1.6.9
*
* @author Matt Bryson http://www.github.com/mattbryson
* @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
* @see http://labs.skinkers.com/touchSwipe/
* @see http://plugins.jquery.com/project/touchSwipe
*
* Copyright (c) 2010 Matt Bryson
* Dual licensed under the MIT or GPL Version 2 licenses.
*
*/
(function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var y="1.6.9",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipetp=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipetp")}}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}return G};f.fn.swipetp.version=y;f.fn.swipetp.defaults=n;f.fn.swipetp.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipetp.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipetp.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipetp.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipetp.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,aw){var aA=(a||d||!aw.fallbackToMouseEvents),K=aA?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",az=aA?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=aA?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=aA?null:"mouseleave",aE=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ah=0,aQ=null,ac=0,a2=0,a0=0,H=1,ar=0,aK=0,N=null;var aS=f(a5);var aa="start";var X=0;var aR=null;var U=0,a3=0,a6=0,ae=0,O=0;var aX=null,ag=null;try{aS.bind(K,aO);aS.bind(aE,ba)}catch(al){f.error("events not supported "+K+","+aE+" on jQuery.swipetp")}this.enable=function(){aS.bind(K,aO);aS.bind(aE,ba);return aS};this.disable=function(){aL();return aS};this.destroy=function(){aL();aS.data(C,null);aS=null};this.option=function(bd,bc){if(aw[bd]!==undefined){if(bc===undefined){return aw[bd]}else{aw[bd]=bc}}else{f.error("Option "+bd+" does not exist on jQuery.swipetp.options")}return null};function aO(be){if(aC()){return}if(f(be.target).closest(aw.excludedElements,aS).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{be.preventDefault()}ah=0;aQ=null;aK=null;ac=0;a2=0;a0=0;H=1;ar=0;aR=ak();N=ab();S();if(!bg||(X===aw.fingers||aw.fingers===i)||aY()){aj(0,bc);U=au();if(X==2){aj(1,bg[1]);a2=a0=av(aR[0].start,aR[1].start)}if(aw.swipeStatus||aw.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(aw.hold){ag=setTimeout(f.proxy(function(){aS.trigger("hold",[bf.target]);if(aw.hold){bd=aw.hold.call(aS,bf,bf.target)}},this),aw.longTapThreshold)}ap(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||an()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aI(bd);a3=au();if(bj){X=bj.length}if(aw.hold){clearTimeout(ag)}aa=k;if(X==2){if(a2==0){aj(1,bj[1]);a2=a0=av(aR[0].start,aR[1].start)}else{aI(bj[1]);a0=av(aR[0].end,aR[1].end);aK=at(aR[0].end,aR[1].end)}H=a8(a2,a0);ar=Math.abs(a2-a0)}if((X===aw.fingers||aw.fingers===i)||!bj||aY()){aQ=aM(bg.start,bg.end);am(bf,aQ);ah=aT(bg.start,bg.end);ac=aN();aJ(aQ,ah);if(aw.swipeStatus||aw.pinchStatus){be=P(bi,aa)}if(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave){var bc=true;if(aw.triggerOnTouchLeave){var bh=aZ(this);bc=F(bg.end,bh)}if(!aw.triggerOnTouchEnd&&bc){aa=aD(k)}else{if(aw.triggerOnTouchLeave&&!bc){aa=aD(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length){G();return true}}if(an()){X=ae}a3=au();ac=aN();if(bb()||!ao()){aa=q;P(bd,aa)}else{if(aw.triggerOnTouchEnd||(aw.triggerOnTouchEnd==false&&aa===k)){bc.preventDefault();aa=h;P(bd,aa)}else{if(!aw.triggerOnTouchEnd&&a7()){aa=h;aG(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}ap(false);return null}function ba(){X=0;a3=0;U=0;a2=0;a0=0;H=1;S();ap(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(aw.triggerOnTouchLeave){aa=aD(h);P(bd,aa)}}function aL(){aS.unbind(K,aO);aS.unbind(aE,ba);aS.unbind(az,a4);aS.unbind(V,M);if(T){aS.unbind(T,L)}ap(false)}function aD(bg){var bf=bg;var be=aB();var bd=ao();var bc=bb();if(!be||bc){bf=q}else{if(bd&&bg==k&&(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave)){bf=h}else{if(!bd&&bg==h&&aw.triggerOnTouchLeave){bf=q}}}return bf}function P(be,bc){var bd,bf=be.touches;if((J()||W())||(Q()||aY())){if(J()||W()){bd=aG(be,bc,l)}if((Q()||aY())&&bd!==false){bd=aG(be,bc,t)}}else{if(aH()&&bd!==false){bd=aG(be,bc,j)}else{if(aq()&&bd!==false){bd=aG(be,bc,b)}else{if(ai()&&bd!==false){bd=aG(be,bc,B)}}}}if(bc===q){ba(be)}if(bc===h){if(bf){if(!bf.length){ba(be)}}else{ba(be)}}return bd}function aG(bf,bc,be){var bd;if(be==l){aS.trigger("swipeStatus",[bc,aQ||null,ah||0,ac||0,X,aR]);if(aw.swipeStatus){bd=aw.swipeStatus.call(aS,bf,bc,aQ||null,ah||0,ac||0,X,aR);if(bd===false){return false}}if(bc==h&&aW()){aS.trigger("swipe",[aQ,ah,ac,X,aR]);if(aw.swipe){bd=aw.swipe.call(aS,bf,aQ,ah,ac,X,aR);if(bd===false){return false}}switch(aQ){case p:aS.trigger("swipeLeft",[aQ,ah,ac,X,aR]);if(aw.swipeLeft){bd=aw.swipeLeft.call(aS,bf,aQ,ah,ac,X,aR)}break;case o:aS.trigger("swipeRight",[aQ,ah,ac,X,aR]);if(aw.swipeRight){bd=aw.swipeRight.call(aS,bf,aQ,ah,ac,X,aR)}break;case e:aS.trigger("swipeUp",[aQ,ah,ac,X,aR]);if(aw.swipeUp){bd=aw.swipeUp.call(aS,bf,aQ,ah,ac,X,aR)}break;case x:aS.trigger("swipeDown",[aQ,ah,ac,X,aR]);if(aw.swipeDown){bd=aw.swipeDown.call(aS,bf,aQ,ah,ac,X,aR)}break}}}if(be==t){aS.trigger("pinchStatus",[bc,aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchStatus){bd=aw.pinchStatus.call(aS,bf,bc,aK||null,ar||0,ac||0,X,H,aR);if(bd===false){return false}}if(bc==h&&a9()){switch(aK){case c:aS.trigger("pinchIn",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchIn){bd=aw.pinchIn.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break;case A:aS.trigger("pinchOut",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchOut){bd=aw.pinchOut.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break}}}if(be==B){if(bc===q||bc===h){clearTimeout(aX);clearTimeout(ag);if(Z()&&!I()){O=au();aX=setTimeout(f.proxy(function(){O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}},this),aw.doubleTapThreshold)}else{O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}}}}else{if(be==j){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("doubletap",[bf.target]);if(aw.doubleTap){bd=aw.doubleTap.call(aS,bf,bf.target)}}}else{if(be==b){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("longtap",[bf.target]);if(aw.longTap){bd=aw.longTap.call(aS,bf,bf.target)}}}}}return bd}function ao(){var bc=true;if(aw.threshold!==null){bc=ah>=aw.threshold}return bc}function bb(){var bc=false;if(aw.cancelThreshold!==null&&aQ!==null){bc=(aU(aQ)-ah)>=aw.cancelThreshold}return bc}function af(){if(aw.pinchThreshold!==null){return ar>=aw.pinchThreshold}return true}function aB(){var bc;if(aw.maxTimeThreshold){if(ac>=aw.maxTimeThreshold){bc=false}else{bc=true}}else{bc=true}return bc}function am(bc,bd){if(aw.preventDefaultEvents===false){return}if(aw.allowPageScroll===m){bc.preventDefault()}else{var be=aw.allowPageScroll===s;switch(bd){case p:if((aw.swipeLeft&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case o:if((aw.swipeRight&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case e:if((aw.swipeUp&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break;case x:if((aw.swipeDown&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break}}}function a9(){var bd=aP();var bc=Y();var be=af();return bd&&bc&&be}function aY(){return !!(aw.pinchStatus||aw.pinchIn||aw.pinchOut)}function Q(){return !!(a9()&&aY())}function aW(){var bf=aB();var bh=ao();var be=aP();var bc=Y();var bd=bb();var bg=!bd&&bc&&be&&bh&&bf;return bg}function W(){return !!(aw.swipe||aw.swipeStatus||aw.swipeLeft||aw.swipeRight||aw.swipeUp||aw.swipeDown)}function J(){return !!(aW()&&W())}function aP(){return((X===aw.fingers||aw.fingers===i)||!a)}function Y(){return aR[0].end.x!==0}function a7(){return !!(aw.tap)}function Z(){return !!(aw.doubleTap)}function aV(){return !!(aw.longTap)}function R(){if(O==null){return false}var bc=au();return(Z()&&((bc-O)<=aw.doubleTapThreshold))}function I(){return R()}function ay(){return((X===1||!a)&&(isNaN(ah)||ah<aw.threshold))}function a1(){return((ac>aw.longTapThreshold)&&(ah<r))}function ai(){return !!(ay()&&a7())}function aH(){return !!(R()&&Z())}function aq(){return !!(a1()&&aV())}function G(){a6=au();ae=event.touches.length+1}function S(){a6=0;ae=0}function an(){var bc=false;if(a6){var bd=au()-a6;if(bd<=aw.fingerReleaseThreshold){bc=true}}return bc}function aC(){return !!(aS.data(C+"_intouch")===true)}function ap(bc){if(bc===true){aS.bind(az,a4);aS.bind(V,M);if(T){aS.bind(T,L)}}else{aS.unbind(az,a4,false);aS.unbind(V,M,false);if(T){aS.unbind(T,L,false)}}aS.data(C+"_intouch",bc===true)}function aj(bd,bc){var be=bc.identifier!==undefined?bc.identifier:0;aR[bd].identifier=be;aR[bd].start.x=aR[bd].end.x=bc.pageX||bc.clientX;aR[bd].start.y=aR[bd].end.y=bc.pageY||bc.clientY;return aR[bd]}function aI(bc){var be=bc.identifier!==undefined?bc.identifier:0;var bd=ad(be);bd.end.x=bc.pageX||bc.clientX;bd.end.y=bc.pageY||bc.clientY;return bd}function ad(bd){for(var bc=0;bc<aR.length;bc++){if(aR[bc].identifier==bd){return aR[bc]}}}function ak(){var bc=[];for(var bd=0;bd<=5;bd++){bc.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0})}return bc}function aJ(bc,bd){bd=Math.max(bd,aU(bc));N[bc].distance=bd}function aU(bc){if(N[bc]){return N[bc].distance}return undefined}function ab(){var bc={};bc[p]=ax(p);bc[o]=ax(o);bc[e]=ax(e);bc[x]=ax(x);return bc}function ax(bc){return{direction:bc,distance:0}}function aN(){return a3-U}function av(bf,be){var bd=Math.abs(bf.x-be.x);var bc=Math.abs(bf.y-be.y);return Math.round(Math.sqrt(bd*bd+bc*bc))}function a8(bc,bd){var be=(bd/bc)*1;return be.toFixed(2)}function at(){if(H<1){return A}else{return c}}function aT(bd,bc){return Math.round(Math.sqrt(Math.pow(bc.x-bd.x,2)+Math.pow(bc.y-bd.y,2)))}function aF(bf,bd){var bc=bf.x-bd.x;var bh=bd.y-bf.y;var be=Math.atan2(bh,bc);var bg=Math.round(be*180/Math.PI);if(bg<0){bg=360-Math.abs(bg)}return bg}function aM(bd,bc){var be=aF(bd,bc);if((be<=45)&&(be>=0)){return p}else{if((be<=360)&&(be>=315)){return p}else{if((be>=135)&&(be<=225)){return o}else{if((be>45)&&(be<135)){return x}else{return e}}}}}function au(){var bc=new Date();return bc.getTime()}function aZ(bc){bc=f(bc);var be=bc.offset();var bd={left:be.left,right:be.left+bc.outerWidth(),top:be.top,bottom:be.top+bc.outerHeight()};return bd}function F(bc,bd){return(bc.x>bd.left&&bc.x<bd.right&&bc.y>bd.top&&bc.y<bd.bottom)}}}));
if(typeof(console) === 'undefined') {
    var console = {};
    console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = console.groupCollapsed = function() {};
}
if (window.tplogs==true)
	try {
		console.groupCollapsed("ThemePunch GreenSocks Logs");
	} catch(e) { }
var oldgs = window.GreenSockGlobals;
	oldgs_queue = window._gsQueue;
var punchgs = window.GreenSockGlobals = {};
if (window.tplogs==true)
	try {
		console.info("Build GreenSock SandBox for ThemePunch Plugins");
		console.info("GreenSock TweenLite Engine Initalised by ThemePunch Plugin");
	} catch(e) {}
/* TWEEN LITE */
/*!
 * VERSION: 1.18.5
 * DATE: 2016-05-24
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
 * This work is subject to the terms at http://greensock.com/standard-license or for
 * Club GreenSock members, the software agreement that was issued with your membership.
 * 
 * @author: Jack Doyle, jack@greensock.com
 */
!function(a,b){"use strict";var c={},d=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!d.TweenLite){var e,f,g,h,i,j=function(a){var b,c=a.split("."),e=d;for(b=0;b<c.length;b++)e[c[b]]=e=e[c[b]]||{};return e},k=j("com.greensock"),l=1e-10,m=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},n=function(){},o=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),p={},q=function(e,f,g,h){this.sc=p[e]?p[e].sc:[],p[e]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(k){for(var l,m,n,o,r,s=f.length,t=s;--s>-1;)(l=p[f[s]]||new q(f[s],[])).gsClass?(i[s]=l.gsClass,t--):k&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+e).split("."),n=m.pop(),o=j(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(d[n]=o,r="undefined"!=typeof module&&module.exports,!r&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+e.split(".").pop(),[],function(){return o});else if(r)if(e===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s<this.sc.length;s++)this.sc[s].check()}},this.check(!0)},r=a._gsDefine=function(a,b,c,d){return new q(a,b,c,d)},s=k._class=function(a,b,c){return b=b||function(){},r(a,[],function(){return b},c),b};r.globals=d;var t=[0,0,1,1],u=[],v=s("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?t.concat(b):t},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,l=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?s("easing."+f,null,!0):k.easing[f]||{},g=l.length;--g>-1;)h=l[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(g=v.prototype,g._calcEnd=!1,g.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},e=["Linear","Quad","Cubic","Quart","Quint,Strong"],f=e.length;--f>-1;)g=e[f]+",Power"+f,x(new v(null,null,1,f),g,"easeOut",!0),x(new v(null,null,2,f),g,"easeIn"+(0===f?",easeNone":"")),x(new v(null,null,3,f),g,"easeInOut");w.linear=k.easing.Linear.easeIn,w.swing=k.easing.Quad.easeInOut;var y=s("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});g=y.prototype,g.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,j=this._listeners[a],k=0;for(this!==h||i||h.wake(),null==j&&(this._listeners[a]=j=[]),g=j.length;--g>-1;)f=j[g],f.c===b&&f.s===c?j.splice(g,1):0===k&&f.pr<e&&(k=g+1);j.splice(k,0,{c:b,s:c,up:d,pr:e})},g.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},g.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(e=["ms","moz","webkit","o"],f=e.length;--f>-1&&!z;)z=a[e[f]+"RequestAnimationFrame"],A=a[e[f]+"CancelAnimationFrame"]||a[e[f]+"CancelRequestAnimationFrame"];s("Ticker",function(a,b){var c,d,e,f,g,j=this,k=B(),m=b!==!1&&z?"auto":!1,o=500,p=33,q="tick",r=function(a){var b,h,i=B()-C;i>o&&(k+=i-p),C+=i,j.time=(C-k)/1e3,b=j.time-g,(!c||b>0||a===!0)&&(j.frame++,g+=b+(b>=f?.004:f-b),h=!0),a!==!0&&(e=d(r)),h&&j.dispatchEvent(q)};y.call(j),j.time=j.frame=0,j.tick=function(){r(!0)},j.lagSmoothing=function(a,b){o=a||1/l,p=Math.min(b,o,0)},j.sleep=function(){null!=e&&(m&&A?A(e):clearTimeout(e),d=n,e=null,j===h&&(i=!1))},j.wake=function(a){null!==e?j.sleep():a?k+=-C+(C=B()):j.frame>10&&(C=B()-o+5),d=0===c?n:m&&z?z:function(a){return setTimeout(a,1e3*(g-j.time)+1|0)},j===h&&(i=!0),r(2)},j.fps=function(a){return arguments.length?(c=a,f=1/(c||60),g=this.time+f,void j.wake()):c},j.useRAF=function(a){return arguments.length?(j.sleep(),m=a,void j.fps(c)):m},j.fps(a),setTimeout(function(){"auto"===m&&j.frame<5&&"hidden"!==document.visibilityState&&j.useRAF(!1)},1500)}),g=k.Ticker.prototype=new k.events.EventDispatcher,g.constructor=k.Ticker;var D=s("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,W){i||h.wake();var c=this.vars.useFrames?V:W;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});h=D.ticker=new k.Ticker,g=D.prototype,g._dirty=g._gc=g._initted=g._paused=!1,g._totalTime=g._time=0,g._rawPrevTime=-1,g._next=g._last=g._onUpdate=g._timeline=g.timeline=null,g._paused=!1;var E=function(){i&&B()-C>2e3&&h.wake(),setTimeout(E,2e3)};E(),g.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},g.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},g.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},g.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},g.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},g.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},g.render=function(a,b,c){},g.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},g.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime())>=c&&a<c+this.totalDuration()/this._timeScale},g._enabled=function(a,b){return i||h.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},g._kill=function(a,b){return this._enabled(!1,!1)},g.kill=function(a,b){return this._kill(a,b),this},g._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},g._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},g._callback=function(a){var b=this.vars;b[a].apply(b[a+"Scope"]||b.callbackScope||this,b[a+"Params"]||u)},g.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=o(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},g.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},g.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},g.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},g.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},g.totalTime=function(a,b,c){if(i||h.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Y(),this.render(a,b,!1),J.length&&Y())}return this},g.progress=g.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},g.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},g.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},g.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||l,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},g.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},g.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(i||a||h.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=s("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});g=F.prototype=new D,g.constructor=F,g.kill()._gc=!1,g._first=g._last=g._recent=null,g._sortChildren=!1,g.add=g.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},g._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},g.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},g.rawTime=function(){return i||h.wake(),this._totalTime};var G=s("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?U[G.defaultOverwrite]:"number"==typeof i?i>>0:U[i],(h||b instanceof Array||b.push&&o(b))&&"number"!=typeof b[0])for(this._targets=g=m(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(m(f))):(this._siblings[e]=Z(f,this,!1),1===i&&this._siblings[e].length>1&&_(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Z(b,this,!1),1===i&&this._siblings.length>1&&_(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-l,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)T[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!Q[c]||Q[c]&&Q[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};g=G.prototype=new D,g.constructor=G,g.kill()._gc=!1,g.ratio=0,g._firstPT=g._targets=g._overwrittenProps=g._startAt=null,g._notifyPluginsOfEnabled=g._lazy=!1,G.version="1.18.5",G.defaultEase=g._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=h,G.autoSleep=120,G.lagSmoothing=function(a,b){h.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?a?this.join(""):this.start:c.c*a+c.s,c.r?b=Math.round(b):d>b&&b>-d&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},N=function(a,b,c,d){var e,f,g,h,i,j,k,l=[a,b],m=0,n="",o=0;for(l.start=a,c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,r:o&&4>o}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h){var i,j,k="get"===c?a[b]:c,l=typeof a[b],m="string"==typeof d&&"="===d.charAt(1),n={t:a,p:b,s:k,f:"function"===l,pg:0,n:e||b,r:f,pr:0,c:m?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-k||0};return"number"!==l&&("function"===l&&"get"===c&&(j=b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),n.s=k=g?a[j](g):a[j]()),"string"==typeof k&&(g||isNaN(k))?(n.fp=g,i=N(k,d,h||G.defaultStringFilter,n),n={t:i,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0}):m||(n.s=parseFloat(k),n.c=parseFloat(d)-n.s||0)),n.c?((n._next=this._firstPT)&&(n._next._prev=n),this._firstPT=n,n):void 0},P=G._internals={isArray:o,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=h.time,V._startTime=h.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((h.time-W._startTime)*W._timeScale,!1,!1),V.render((h.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),h.frame>=X){X=h.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1===h._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||h.sleep()}}},h.addEventListener("tick",D._updateRoot);var Z=function(a,b,c){var d,e,f=a._gsTweenID;if(R[f||(a._gsTweenID=f="t"+S++)]||(R[f]={target:a,tweens:[]}),b&&(d=R[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return R[f].tweens},$=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},_=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+l,m=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||aa(b,0,o),0===aa(h,j,o)&&(m[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(m[n++]=h)));for(f=n;--f>-1;)if(h=m[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!$(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},aa=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*l>f-b?l:(f+=a.totalDuration()/a._timeScale/e)>b+l?0:f-b-l};g._init=function(){var a,b,c,d,e,f=this.vars,g=this._overwrittenProps,h=this._duration,i=!!f.immediateRender,j=f.ease;if(f.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in f.startAt)e[d]=f.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=i&&f.lazy!==!1,e.startAt=e.delay=null,this._startAt=G.to(this.target,0,e),i)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(f.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(i=!1),c={};for(d in f)T[d]&&"autoCSS"!==d||(c[d]=f[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=i&&f.lazy!==!1,c.immediateRender=i,this._startAt=G.to(this.target,0,c),i){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=j=j?j instanceof v?j:"function"==typeof j?new v(j,f.easeParams):w[j]||G.defaultEase:G.defaultEase,f.easeParams instanceof Array&&j.config&&(this._ease=j.config.apply(j,f.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length;--a>-1;)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],g?g[a]:null)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,g);if(b&&G._onPluginEvent("_onInitAllProps",this),g&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),f.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=f.onUpdate,this._initted=!0},g._initProps=function(b,c,d,e){var f,g,h,i,j,k;if(null==b)return!1;K[b._gsTweenID]&&Y(),this.vars.css||b.style&&b!==a&&b.nodeType&&Q.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(f in this.vars)if(k=this.vars[f],T[f])k&&(k instanceof Array||k.push&&o(k))&&-1!==k.join("").indexOf("{self}")&&(this.vars[f]=k=this._swapSelfInParams(k,this));else if(Q[f]&&(i=new Q[f])._onInitTween(b,this.vars[f],this)){for(this._firstPT=j={_next:this._firstPT,t:i,p:"setRatio",s:0,c:1,f:1,n:f,pg:1,pr:i._priority},g=i._overwriteProps.length;--g>-1;)c[i._overwriteProps[g]]=this._firstPT;(i._priority||i._onInitAllProps)&&(h=!0),(i._onDisable||i._onEnable)&&(this._notifyPluginsOfEnabled=!0),j._next&&(j._next._prev=j)}else c[f]=O.call(this,b,f,"get",k,f,0,null,this.vars.stringFilter);return e&&this._kill(e,b)?this._initProps(b,c,d,e):this._overwrite>1&&this._firstPT&&d.length>1&&_(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),h)},g.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===l&&"isPause"!==this.data)&&j!==a&&(c=!0,j>l&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:l);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==l||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:l)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,m=this._easeType,n=this._easePower;(1===m||3===m&&k>=.5)&&(k=1-k),3===m&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===m?this.ratio=1-k:2===m?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===l&&g!==l&&(this._rawPrevTime=0))}},g._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((o(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!$(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},g.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-l,this.render(Math.min(0,-this._delay))),this},g._enabled=function(a,b){if(i||h.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Z(d[c],this,!0);else this._siblings=Z(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((o(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Z(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ba=s("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ba.prototype},!0);if(g=ba.prototype,ba.version="1.18.0",ba.API=2,g._firstPT=null,g._addTween=O,g.setRatio=M,g._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},g._roundProps=function(a,b){for(var c=this._firstPT;c;)(a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")])&&(c.r=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ba.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ba.API&&(Q[(new a[b])._propName]=a[b]);return!0},r.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},g=s("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ba.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ba(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ba.activate([g]),g},e=a._gsQueue){for(f=0;f<e.length;f++)e[f]();for(g in p)p[g].func||a.console.log("GSAP encountered missing dependency: com.greensock."+g)}i=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite");
/* TIME LINE LITE */
/*!
 * VERSION: 1.18.5
 * DATE: 2016-05-24
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
 * This work is subject to the terms at http://greensock.com/standard-license or for
 * Club GreenSock members, the software agreement that was issued with your membership.
 * 
 * @author: Jack Doyle, jack@greensock.com
 */
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e.call(b[c],c):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.18.5",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g=new d(a),h=g._timeline;for(null==b&&(b=!0),h._remove(g,!0),g._startTime=0,g._rawPrevTime=g._time=g._totalTime=h._time,e=h._first;e;)f=e._next,b&&e instanceof c&&e.target===e.vars.onComplete||g.add(e,e._startTime-e._delay),e=f;return h.add(g,0),g},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>d._startTime+d._totalDuration/d._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(f=e.length;--f>-1;)e[f]instanceof a&&e[f].timeline===this&&this.remove(e[f]);if("string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-this.duration():0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=this.duration());else{if(f=b.indexOf("="),-1===f)return null==this._labels[b]?d?this._labels[b]=this.duration()+c:c:this._labels[b]+c;c=parseInt(b.charAt(f-1)+"1",10)*Number(b.substr(f+1)),b=f>1?this._parseTimeOrLabel(b.substr(0,f-1),0,d):this.duration()}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._startTime,q=this._timeScale,r=this._paused;if(a>=n-1e-7)this._totalTime=this._time=n,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=n+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==o||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=o)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==o&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==o&&a>0&&(this._active=!0),0===o&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=o)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||n>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused?this.add(e,e._startTime-e._delay):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define(["./TweenLite"],b):"undefined"!=typeof module&&module.exports&&(require("./TweenLite.js"),module.exports=b())}("TimelineLite");
/* EASING PLUGIN */
/*!
 * VERSION: 1.15.4
 * DATE: 2016-05-24
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
 * This work is subject to the terms at http://greensock.com/standard-license or for
 * Club GreenSock members, the software agreement that was issued with your membership.
 * 
 * @author: Jack Doyle, jack@greensock.com
 **/
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(){"use strict";var a=function(){return _gsScope.GreenSockGlobals||_gsScope};"function"==typeof define&&define.amd?define(["../TweenLite"],a):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=a())}();
/* CSS PLUGIN */
/*!
 * VERSION: 1.18.5
 * DATE: 2016-05-24
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
 * This work is subject to the terms at http://greensock.com/standard-license or for
 * Club GreenSock members, the software agreement that was issued with your membership.
 * 
 * @author: Jack Doyle, jack@greensock.com
 */
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.18.5",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q=/(?:\-|\.|\b)(\d|\.|e\-)+/g,r=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,s=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,t=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,u=/(?:\d|\-|\+|=|#|\.)*/g,v=/opacity *= *([^)]*)/i,w=/opacity:([^;]*)/i,x=/alpha\(opacity *=.+?\)/i,y=/^(rgb|hsl)/,z=/([A-Z])/g,A=/-([a-z])/gi,B=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,C=function(a,b){return b.toUpperCase()},D=/(?:Left|Right|Width)/i,E=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,F=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,G=/,(?=[^\)]*(?:\(|$))/gi,H=/[\s,\(]/i,I=Math.PI/180,J=180/Math.PI,K={},L=document,M=function(a){return L.createElementNS?L.createElementNS("http://www.w3.org/1999/xhtml",a):L.createElement(a)},N=M("div"),O=M("img"),P=g._internals={_specialProps:i},Q=navigator.userAgent,R=function(){var a=Q.indexOf("Android"),b=M("a");return m=-1!==Q.indexOf("Safari")&&-1===Q.indexOf("Chrome")&&(-1===a||Number(Q.substr(a+8,1))>3),o=m&&Number(Q.substr(Q.indexOf("Version/")+8,1))<6,n=-1!==Q.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Q)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Q))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),S=function(a){return v.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},T=function(a){window.console&&console.log(a)},U="",V="",W=function(a,b){b=b||N;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(V=3===d?"ms":c[d],U="-"+V.toLowerCase()+"-",V+a):null},X=L.defaultView?L.defaultView.getComputedStyle:function(){},Y=g.getStyle=function(a,b,c,d,e){var f;return R||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||X(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(z,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):S(a)},Z=P.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=D.test(c),l=a,m=N.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+Y(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||L.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(N),h=parseFloat(N[k?"offsetWidth":"offsetHeight"]),l.removeChild(N),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=Z(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},$=P.calculateOffset=function(a,b,c){if("absolute"!==Y(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=Y(a,"margin"+d,c);return a["offset"+d]-(Z(a,b,parseFloat(e),e.replace(u,""))||0)},_=function(a,b){var c,d,e,f={};if(b=b||X(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Aa===e)&&(f[e.replace(A,C)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||za===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(A,C)]=b[c]);return R||(f.opacity=S(a)),d=Na(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Ca&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},aa=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(t,"")?f:0:$(a,g),void 0!==j[g]&&(h=new pa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ba={width:["Left","Right"],height:["Top","Bottom"]},ca=["marginLeft","marginRight","marginTop","marginBottom"],da=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||X(a))[b]||0;if(a.getBBox&&Ka(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ba[b],f=e.length;for(c=c||X(a,null);--f>-1;)d-=parseFloat(Y(a,"padding"+e[f],c,!0))||0,d-=parseFloat(Y(a,"border"+e[f]+"Width",c,!0))||0;return d},ea=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ea(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(t,"")),b.oy=parseFloat(f.replace(t,"")),b.v=a),b||a},fa=function(a,b){return"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ga=function(a,b){return null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ha=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:J)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},ia={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ja=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},ka=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),ia[a])c=ia[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(q),b){if(-1!==a.indexOf("="))return a.match(r)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(a[3])),c[0]=ja(g+1/3,d,e),c[1]=ja(g,d,e),c[2]=ja(g-1/3,d,e);else c=a.match(q)||ia.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=ia.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},la=function(a,b){var c,d,e,f=a.match(ma)||[],g=0,h=f.length?"":a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=ka(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},ma="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in ia)ma+="|"+j+"\\b";ma=new RegExp(ma+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+a[1];ma.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=la(a[0],b),a[1]=la(a[1],b)),ma.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var na=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(ma)||[""])[0]:"",g=a.split(f).join("").match(s)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(q,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&G.test(a)){for(o=a.replace(G,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(ma)||[f])[0],m=a.split(b).join("").match(s)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&G.test(a)){for(f=a.replace(G,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(s)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},oa=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},pa=(P._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),qa=(P._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=K;for(c._transform=null,K=b,d=k=c.parse(a,b,d,e),K=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new pa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new pa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},P.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof qa||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ra=function(a,b,c,d,e,f){var g=new qa(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},sa=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"",h=new qa(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&ma.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,s,t,u,v,w,x,y,z,A,B=c.split(", ").join(",").split(" "),C=d.split(", ").join(",").split(" "),D=B.length,E=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(B=B.join(" ").replace(G,", ").split(" "),C=C.join(" ").replace(G,", ").split(" "),D=B.length),D!==C.length&&(B=(f||"").split(" "),D=B.length),h.plugin=j,h.setRatio=l,ma.lastIndex=0,m=0;D>m;m++)if(p=B[m],s=C[m],v=parseFloat(p),v||0===v)h.appendXtra("",v,fa(s,v),s.replace(r,""),E&&-1!==s.indexOf("px"),!0);else if(e&&ma.test(p))z=s.indexOf(")")+1,z=")"+(z?s.substr(z):""),A=-1!==s.indexOf("hsl")&&R,p=ka(p,A),s=ka(s,A),w=p.length+s.length>6,w&&!R&&0===s[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(C[m]).join("transparent")):(R||(w=!1),A?h.appendXtra(w?"hsla(":"hsl(",p[0],fa(s[0],p[0]),",",!1,!0).appendXtra("",p[1],fa(s[1],p[1]),"%,",!1).appendXtra("",p[2],fa(s[2],p[2]),w?"%,":"%"+z,!1):h.appendXtra(w?"rgba(":"rgb(",p[0],s[0]-p[0],",",!0,!0).appendXtra("",p[1],s[1]-p[1],",",!0).appendXtra("",p[2],s[2]-p[2],w?",":z,!0),w&&(p=p.length<4?1:p[3],h.appendXtra("",p,(s.length<4?1:s[3])-p,z,!1))),ma.lastIndex=0;else if(t=p.match(q)){if(u=s.match(r),!u||u.length!==t.length)return h;for(o=0,n=0;n<t.length;n++)y=t[n],x=p.indexOf(y,o),h.appendXtra(p.substr(o,x-o),Number(y),fa(u[n],y),"",E&&"px"===p.substr(x+y.length,2),0===n),o=x+y.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+s:s;if(-1!==d.indexOf("=")&&h.data){for(z=h.xs0+h.data.s,m=1;m<h.l;m++)z+=h["xs"+m]+h.data["xn"+m];h.e=z+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},ta=9;for(j=qa.prototype,j.l=j.pr=0;--ta>0;)j["xn"+ta]=0,j["xs"+ta]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new qa(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var ua=function(a,b){b=b||{},this.p=b.prefix?W(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||na(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},va=P._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new ua(f[d],b)},wa=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";va(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(T("Error: "+b+" js file not loaded."),f)}})}};j=ua.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(G.test(c)||G.test(b)?(h=b.replace(G,"|").split("|"),i=c.replace(G,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return sa(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(Y(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){va(a,{parser:function(a,d,e,f,g,h,i){var j=new qa(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=m||n;var xa,ya="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),za=W("transform"),Aa=U+"transform",Ba=W("transformOrigin"),Ca=null!==W("perspective"),Da=P.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Ca?g.defaultForce3D||"auto":!1},Ea=window.SVGElement,Fa=function(a,b,c){var d,e=L.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ga=L.documentElement,Ha=function(){var a,b,c,d=p||/Android/i.test(Q)&&!window.chrome;return L.createElementNS&&!d&&(a=Fa("svg",Ga),b=Fa("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ba]="50% 50%",b.style[za]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Ca),Ga.removeChild(a)),d}(),Ia=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Ma(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),b=ea(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==La&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ja=function(a){try{return a.getBBox()}catch(a){}},Ka=function(a){return!!(Ea&&a.getBBox&&a.getCTM&&Ja(a)&&(!a.parentNode||a.parentNode.getBBox&&a.parentNode.getCTM))},La=[1,0,0,1,0,0],Ma=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Da,j=1e5,k=a.style;if(za?d=Y(a,Aa,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(E),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,c&&za&&((h="none"===X(a).display)||!a.parentNode)&&(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ga.appendChild(a)),d=Y(a,Aa,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Ra(k,"display"),g&&Ga.removeChild(a)),(i.svg||a.getBBox&&Ka(a))&&(c&&-1!==(k[za]+"").indexOf("matrix")&&(d=k[za],c=0),e=a.getAttribute("transform"),c&&e&&(-1!==e.indexOf("matrix")?(d=e,c=0):-1!==e.indexOf("translate")&&(d="matrix(1,0,0,1,"+e.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",c=0))),c)return La;for(e=(d||"").match(q)||[],ta=e.length;--ta>-1;)f=Number(e[ta]),e[ta]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Na=P.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Da:new Da,n=m.scaleX<0,o=2e-5,p=1e5,q=Ca?parseFloat(Y(a,Ba,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getBBox||!Ka(a)),m.svg&&(Ia(a,Y(a,Ba,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),xa=g.useSVGTransformAttr||Ha),f=Ma(a),f!==La){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],K=f[13],L=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(L=-m.zOrigin,I=F*L-f[12],K=G*L-f[13],L=H*L+m.zOrigin-f[14]),m.rotationX=N*J,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*J,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*J,N&&(v=Math.cos(-N),w=Math.sin(-N),x=x*v+B*w,t=y*v+C*w,C=y*-w+C*v,D=z*-w+D*v,y=t),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),m.scaleX=(Math.sqrt(x*x+y*y)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+G*G)*p+.5|0)/p,m.scaleZ=(Math.sqrt(D*D+H*H)*p+.5|0)/p,m.rotationX||m.rotationY?m.skewX=0:(m.skewX=B||C?Math.atan2(B,C)*J+m.rotation:m.skewX||0,Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180))),m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=K,m.z=L,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Ca||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*J:m.rotation||0,l=R||S?Math.atan2(R,S)*J+k:m.skewX||0,Math.abs(l)>90&&Math.abs(l)<270&&(n?(i*=-1,l+=0>=k?180:-180,k+=0>=k?180:-180):(j*=-1,l+=0>=l?180:-180)),m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Ca&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(xa&&a.style[za]?b.delayedCall(.001,function(){Ra(a.style,za)}):!xa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Oa=function(a){var b,c,d=this.data,e=-d.rotation*I,f=e+d.skewX*I,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,w=d.x+q*d.xPercent/100,x=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,w+=n-(n*h+o*i),x+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+w)+", Dy="+(o-(n*j+o*k)+x)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(F,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||v.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+w),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+x),ta=0;4>ta;ta++)z=ca[ta],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):Z(this.t,z,parseFloat(y),y.replace(u,""))||0,A=c!==d[z]?2>ta?-d.ieOffsetX:-d.ieOffsetY:2>ta?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===ta||2===ta?1:B)))+"px"}}},Pa=P.set3DTransformRatio=P.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,J=z.y,K=z.z,L=z.svg,M=z.perspective,N=z.force3D;if(((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!K&&!M&&!D&&!C&&1===G||xa&&L||!Ca)return void(B||z.skewX||L?(B*=I,x=z.skewX*I,y=1e5,b=Math.cos(B)*E,e=Math.sin(B)*E,c=Math.sin(B-x)*-F,f=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(s=Math.tan(x),s=Math.sqrt(1+s*s),c*=s,f*=s,z.skewY&&(b*=s,e*=s)),L&&(H+=z.xOrigin-(z.xOrigin*b+z.yOrigin*c)+z.xOffset,J+=z.yOrigin-(z.xOrigin*e+z.yOrigin*f)+z.yOffset,xa&&(z.xPercent||z.yPercent)&&(p=this.t.getBBox(),H+=.01*z.xPercent*p.width,J+=.01*z.yPercent*p.height),p=1e-6,p>H&&H>-p&&(H=0),p>J&&J>-p&&(J=0)),u=(b*y|0)/y+","+(e*y|0)/y+","+(c*y|0)/y+","+(f*y|0)/y+","+H+","+J+")",L&&xa?this.t.setAttribute("transform","matrix("+u):A[za]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[za]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+J+")");if(n&&(p=1e-4,p>E&&E>-p&&(E=G=2e-5),p>F&&F>-p&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||z.skewX)B*=I,q=b=Math.cos(B),r=e=Math.sin(B),z.skewX&&(B-=z.skewX*I,q=Math.cos(B),r=Math.sin(B),"simple"===z.skewType&&(s=Math.tan(z.skewX*I),s=Math.sqrt(1+s*s),q*=s,r*=s,z.skewY&&(b*=s,e*=s))),c=-r,f=q;else{if(!(D||C||1!==G||M||L))return void(A[za]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+J+"px,"+K+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));b=f=1,c=e=0}j=1,d=g=h=i=k=l=0,m=M?-1/M:0,o=z.zOrigin,p=1e-6,v=",",w="0",B=D*I,B&&(q=Math.cos(B),r=Math.sin(B),h=-r,k=m*-r,d=b*r,g=e*r,j=q,m*=q,b*=q,e*=q),B=C*I,B&&(q=Math.cos(B),r=Math.sin(B),s=c*q+d*r,t=f*q+g*r,i=j*r,l=m*r,d=c*-r+d*q,g=f*-r+g*q,j*=q,m*=q,c=s,f=t),1!==G&&(d*=G,g*=G,j*=G,m*=G),1!==F&&(c*=F,f*=F,i*=F,l*=F),1!==E&&(b*=E,e*=E,h*=E,k*=E),(o||L)&&(o&&(H+=d*-o,J+=g*-o,K+=j*-o+o),L&&(H+=z.xOrigin-(z.xOrigin*b+z.yOrigin*c)+z.xOffset,J+=z.yOrigin-(z.xOrigin*e+z.yOrigin*f)+z.yOffset),p>H&&H>-p&&(H=w),p>J&&J>-p&&(J=w),p>K&&K>-p&&(K=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(p>b&&b>-p?w:b)+v+(p>e&&e>-p?w:e)+v+(p>h&&h>-p?w:h),u+=v+(p>k&&k>-p?w:k)+v+(p>c&&c>-p?w:c)+v+(p>f&&f>-p?w:f),C||D||1!==G?(u+=v+(p>i&&i>-p?w:i)+v+(p>l&&l>-p?w:l)+v+(p>d&&d>-p?w:d),u+=v+(p>g&&g>-p?w:g)+v+(p>j&&j>-p?w:j)+v+(p>m&&m>-p?w:m)+v):u+=",0,0,0,0,1,0,",u+=H+v+J+v+K+v+(M?1+-K/M:1)+")",A[za]=u};j=Da.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,va("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k,l,m,n,o,p,q,r,s=a._gsTransform,t=a.style,u=1e-6,v=ya.length,w=i,x={},y="transformOrigin",z=Na(a,e,!0,i.parseTransform);if(d._transform=z,"string"==typeof w.transform&&za)k=N.style,k[za]=w.transform,k.display="block",k.position="absolute",L.body.appendChild(N),j=Na(N,null,!1),z.svg&&(p=z.xOrigin,q=z.yOrigin,j.x-=z.xOffset,j.y-=z.yOffset,(w.transformOrigin||w.svgOrigin)&&(l={},Ia(a,ea(w.transformOrigin),l,w.svgOrigin,w.smoothOrigin,!0),p=l.xOrigin,q=l.yOrigin,j.x-=l.xOffset-z.xOffset,j.y-=l.yOffset-z.yOffset),(p||q)&&(r=Ma(N,!0),j.x-=p-(p*r[0]+q*r[2]),j.y-=q-(p*r[1]+q*r[3]))),L.body.removeChild(N),j.perspective||(j.perspective=z.perspective),null!=w.xPercent&&(j.xPercent=ga(w.xPercent,z.xPercent)),null!=w.yPercent&&(j.yPercent=ga(w.yPercent,z.yPercent));else if("object"==typeof w){if(j={scaleX:ga(null!=w.scaleX?w.scaleX:w.scale,z.scaleX),scaleY:ga(null!=w.scaleY?w.scaleY:w.scale,z.scaleY),scaleZ:ga(w.scaleZ,z.scaleZ),x:ga(w.x,z.x),y:ga(w.y,z.y),z:ga(w.z,z.z),xPercent:ga(w.xPercent,z.xPercent),yPercent:ga(w.yPercent,z.yPercent),perspective:ga(w.transformPerspective,z.perspective)},o=w.directionalRotation,null!=o)if("object"==typeof o)for(k in o)w[k]=o[k];else w.rotation=o;"string"==typeof w.x&&-1!==w.x.indexOf("%")&&(j.x=0,j.xPercent=ga(w.x,z.xPercent)),"string"==typeof w.y&&-1!==w.y.indexOf("%")&&(j.y=0,j.yPercent=ga(w.y,z.yPercent)),j.rotation=ha("rotation"in w?w.rotation:"shortRotation"in w?w.shortRotation+"_short":"rotationZ"in w?w.rotationZ:z.rotation-z.skewY,z.rotation-z.skewY,"rotation",x),Ca&&(j.rotationX=ha("rotationX"in w?w.rotationX:"shortRotationX"in w?w.shortRotationX+"_short":z.rotationX||0,z.rotationX,"rotationX",x),j.rotationY=ha("rotationY"in w?w.rotationY:"shortRotationY"in w?w.shortRotationY+"_short":z.rotationY||0,z.rotationY,"rotationY",x)),j.skewX=ha(w.skewX,z.skewX-z.skewY),(j.skewY=ha(w.skewY,z.skewY))&&(j.skewX+=j.skewY,j.rotation+=j.skewY)}for(Ca&&null!=w.force3D&&(z.force3D=w.force3D,n=!0),z.skewType=w.skewType||z.skewType||g.defaultSkewType,m=z.force3D||z.z||z.rotationX||z.rotationY||j.z||j.rotationX||j.rotationY||j.perspective,m||null==w.scale||(j.scaleZ=1);--v>-1;)c=ya[v],l=j[c]-z[c],(l>u||-u>l||null!=w[c]||null!=K[c])&&(n=!0,f=new qa(z,c,z[c],l,f),c in x&&(f.e=x[c]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return l=w.transformOrigin,z.svg&&(l||w.svgOrigin)&&(p=z.xOffset,q=z.yOffset,Ia(a,ea(l),j,w.svgOrigin,w.smoothOrigin),f=ra(z,"xOrigin",(s?z:j).xOrigin,j.xOrigin,f,y),f=ra(z,"yOrigin",(s?z:j).yOrigin,j.yOrigin,f,y),(p!==z.xOffset||q!==z.yOffset)&&(f=ra(z,"xOffset",s?p:z.xOffset,z.xOffset,f,y),f=ra(z,"yOffset",s?q:z.yOffset,z.yOffset,f,y)),l=xa?null:"0px 0px"),(l||Ca&&m&&z.zOrigin)&&(za?(n=!0,c=Ba,l=(l||Y(a,c,e,!1,"50% 50%"))+"",f=new qa(t,c,0,0,f,-1,y),f.b=t[c],f.plugin=h,Ca?(k=z.zOrigin,l=l.split(" "),z.zOrigin=(l.length>2&&(0===k||"0px"!==l[2])?parseFloat(l[2]):k)||0,f.xs0=f.e=l[0]+" "+(l[1]||"50%")+" 0px",f=new qa(z,"zOrigin",0,0,f,-1,f.n),f.b=k,f.xs0=f.e=z.zOrigin):f.xs0=f.e=l):ea(l+"",z)),n&&(d._transformType=z.svg&&xa||!m&&3!==this._transformType?2:3),f},prefix:!0}),va("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),va("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=W(y[j])),m=l=Y(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=Z(a,"borderLeft",o,t),w=Z(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=Z(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=sa(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:na("0px 0px 0px 0px",!1,!0)}),va("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return sa(a.style,c,this.format(Y(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:na("0px 0px",!1,!0)}),va("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||X(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=Y(a,"backgroundImage").replace(B,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),O.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-O.width:a.offsetHeight-O.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ea}),va("backgroundSize",{defaultValue:"0 0",formatter:ea}),va("perspective",{defaultValue:"0px",prefix:!0}),va("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),va("transformStyle",{prefix:!0}),va("backfaceVisibility",{prefix:!0}),va("userSelect",{prefix:!0}),va("margin",{parser:oa("marginTop,marginRight,marginBottom,marginLeft")}),va("padding",{parser:oa("paddingTop,paddingRight,paddingBottom,paddingLeft")}),va("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(Y(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),va("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),va("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),va("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=Y(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(u,"");return"px"!==j&&(h=parseFloat(h)/Z(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+Y(a,"borderTopStyle",e,!1,"solid")+" "+Y(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(ma)||["#000"])[0]}}),va("borderWidth",{parser:oa("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),va("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new qa(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Qa=function(a){var b,c=this.t,d=c.filter||Y(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!Y(this.data,"filter")):(c.filter=d.replace(x,""),
b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(v,"opacity="+e))};va("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(Y(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===Y(a,"visibility",e)&&0!==b&&(h=0),R?f=new qa(i,"opacity",h,b-h,f):(f=new qa(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Qa),j&&(f=new qa(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Ra=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(z,"-$1").toLowerCase())):a.removeAttribute(b))},Sa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Ra(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};va("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new qa(a,d,0,0,g,2),g.setRatio=Sa,g.pr=-11,c=!0,g.b=o,k=_(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=aa(a,k,_(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Ta=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ba:i[c].p),Ra(g,c);e&&(Ra(g,za),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(va("clearProps",{parser:function(a,b,d,e,f){return f=new qa(a,d,0,0,f,2),f.setRatio=Ta,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),ta=j.length;ta--;)wa(j[ta]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h){if(!a.nodeType)return!1;this._target=a,this._tween=h,this._vars=b,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=X(a,""),f=this._overwriteProps;var j,n,p,q,r,s,t,u,v,x=a.style;if(l&&""===x.zIndex&&(j=Y(a,"zIndex",e),("auto"===j||""===j)&&this._addLazySet(x,"zIndex",0)),"string"==typeof b&&(q=x.cssText,j=_(a,e),x.cssText=q+";"+b,j=aa(a,j,_(a)).difs,!R&&w.test(b)&&(j.opacity=parseFloat(RegExp.$1)),b=j,x.cssText=q),b.className?this._firstPT=n=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=n=this.parse(a,b,null),this._transformType){for(v=3===this._transformType,za?m&&(l=!0,""===x.zIndex&&(t=Y(a,"zIndex",e),("auto"===t||""===t)&&this._addLazySet(x,"zIndex",0)),o&&this._addLazySet(x,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(v?"visible":"hidden"))):x.zoom=1,p=n;p&&p._next;)p=p._next;u=new qa(a,"transform",0,0,null,2),this._linkCSSP(u,null,p),u.setRatio=za?Pa:Oa,u.data=this._transform||Na(a,e,!0),u.tween=h,u.pr=-1,f.pop()}if(c){for(;n;){for(s=n._next,p=q;p&&p.pr>n.pr;)p=p._next;(n._prev=p?p._prev:r)?n._prev._next=n:q=n,(n._next=p)?p._prev=n:r=n,n=s}this._firstPT=q}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,q,r,s=a.style;for(g in b)n=b[g],h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=Y(a,g,e)+"",q="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||q&&y.test(n)?(q||(n=ka(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=sa(s,g,m,n,!0,"transparent",c,0,f)):q&&H.test(n)?c=sa(s,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=da(a,g,e),o="px"):"left"===g||"top"===g?(j=$(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),r=q&&"="===n.charAt(1),r?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(u,"")):(l=parseFloat(n),p=q?n.replace(u,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(r?l+j:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&j&&(j=Z(a,g,j,o),"%"===p?(j/=Z(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=Z(a,g,1,p):"px"!==p&&(l=Z(a,g,l,p),p="px"),r&&(l||0===l)&&(n=l+j+p)),r&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==s[g]&&(n||n+""!="NaN"&&null!=n)?(c=new qa(s,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):T("invalid "+g+" tween value: "+b[g]):(c=new qa(s,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=Math.round(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Na(this._target,e,!0),this._transformType=this._transform.svg&&xa||!a&&3!==this._transformType?2:3};var Ua=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new qa(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ua,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}return b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),a.prototype._kill.call(this,f)};var Va=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Va(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(_(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Va(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Va(a,k,m),i.render(c,!0,!0),Va(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=aa(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define(["../TweenLite"],b):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=b())}("CSSPlugin");
/* SPLIT TEXT UTIL */
/*!
 * VERSION: 0.3.5
 * DATE: 2016-05-24
 * UPDATES AND DOCS AT: http://greensock.com
 *
 * @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
 * SplitText is a Club GreenSock membership benefit; You must have a valid membership to use
 * this code without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
 * This work is subject to the software agreement that was issued with your membership.
 * 
 * @author: Jack Doyle, jack@greensock.com
 */
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;!function(a){"use strict";var b=a.GreenSockGlobals||a,c=function(a){var c,d=a.split("."),e=b;for(c=0;c<d.length;c++)e[d[c]]=e=e[d[c]]||{};return e},d=c("com.greensock.utils"),e=function(a){var b=a.nodeType,c="";if(1===b||9===b||11===b){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===b||4===b)return a.nodeValue;return c},f=document,g=f.defaultView?f.defaultView.getComputedStyle:function(){},h=/([A-Z])/g,i=function(a,b,c,d){var e;return(c=c||g(a,null))?(a=c.getPropertyValue(b.replace(h,"-$1").toLowerCase()),e=a||c.length?a:c[b]):a.currentStyle&&(c=a.currentStyle,e=c[b]),d?e:parseInt(e,10)||0},j=function(a){return a.length&&a[0]&&(a[0].nodeType&&a[0].style&&!a.nodeType||a[0].length&&a[0][0])?!0:!1},k=function(a){var b,c,d,e=[],f=a.length;for(b=0;f>b;b++)if(c=a[b],j(c))for(d=c.length,d=0;d<c.length;d++)e.push(c[d]);else e.push(c);return e},l=/(?:\r|\n|\s\s|\t\t)/g,m=")eefec303079ad17405c",n=/(?:<br>|<br\/>|<br \/>)/gi,o=f.all&&!f.addEventListener,p="<div style='position:relative;display:inline-block;"+(o?"*display:inline;*zoom:1;'":"'"),q=function(a){a=a||"";var b=-1!==a.indexOf("++"),c=1;return b&&(a=a.split("++").join("")),function(){return p+(a?" class='"+a+(b?c++:"")+"'>":">")}},r=d.SplitText=b.SplitText=function(a,b){if("string"==typeof a&&(a=r.selector(a)),!a)throw"cannot split a null element.";this.elements=j(a)?k(a):[a],this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=b||{},this.split(b)},s=function(a,b,c){var d=a.nodeType;if(1===d||9===d||11===d)for(a=a.firstChild;a;a=a.nextSibling)s(a,b,c);else(3===d||4===d)&&(a.nodeValue=a.nodeValue.split(b).join(c))},t=function(a,b){for(var c=b.length;--c>-1;)a.push(b[c])},u=function(a,b,c,d,h){n.test(a.innerHTML)&&(a.innerHTML=a.innerHTML.replace(n,m));var j,k,o,p,r,u,v,w,x,y,z,A,B,C,D=e(a),E=b.type||b.split||"chars,words,lines",F=-1!==E.indexOf("lines")?[]:null,G=-1!==E.indexOf("words"),H=-1!==E.indexOf("chars"),I="absolute"===b.position||b.absolute===!0,J=I?"&#173; ":" ",K=-999,L=g(a),M=i(a,"paddingLeft",L),N=i(a,"borderBottomWidth",L)+i(a,"borderTopWidth",L),O=i(a,"borderLeftWidth",L)+i(a,"borderRightWidth",L),P=i(a,"paddingTop",L)+i(a,"paddingBottom",L),Q=i(a,"paddingLeft",L)+i(a,"paddingRight",L),R=i(a,"textAlign",L,!0),S=a.clientHeight,T=a.clientWidth,U="</div>",V=q(b.wordsClass),W=q(b.charsClass),X=-1!==(b.linesClass||"").indexOf("++"),Y=b.linesClass,Z=-1!==D.indexOf("<"),$=!0,_=[],aa=[],ba=[];for(!b.reduceWhiteSpace!=!1&&(D=D.replace(l,"")),X&&(Y=Y.split("++").join("")),Z&&(D=D.split("<").join("{{LT}}")),j=D.length,p=V(),r=0;j>r;r++)if(v=D.charAt(r),")"===v&&D.substr(r,20)===m)p+=($?U:"")+"<BR/>",$=!1,r!==j-20&&D.substr(r+20,20)!==m&&(p+=" "+V(),$=!0),r+=19;else if(" "===v&&" "!==D.charAt(r-1)&&r!==j-1&&D.substr(r-20,20)!==m){for(p+=$?U:"",$=!1;" "===D.charAt(r+1);)p+=J,r++;(")"!==D.charAt(r+1)||D.substr(r+1,20)!==m)&&(p+=J+V(),$=!0)}else"{"===v&&"{{LT}}"===D.substr(r,6)?(p+=H?W()+"{{LT}}</div>":"{{LT}}",r+=5):p+=H&&" "!==v?W()+v+"</div>":v;for(a.innerHTML=p+($?U:""),Z&&s(a,"{{LT}}","<"),u=a.getElementsByTagName("*"),j=u.length,w=[],r=0;j>r;r++)w[r]=u[r];if(F||I)for(r=0;j>r;r++)x=w[r],o=x.parentNode===a,(o||I||H&&!G)&&(y=x.offsetTop,F&&o&&y!==K&&"BR"!==x.nodeName&&(k=[],F.push(k),K=y),I&&(x._x=x.offsetLeft,x._y=y,x._w=x.offsetWidth,x._h=x.offsetHeight),F&&(G!==o&&H||(k.push(x),x._x-=M),o&&r&&(w[r-1]._wordEnd=!0),"BR"===x.nodeName&&x.nextSibling&&"BR"===x.nextSibling.nodeName&&F.push([])));for(r=0;j>r;r++)x=w[r],o=x.parentNode===a,"BR"!==x.nodeName?(I&&(A=x.style,G||o||(x._x+=x.parentNode._x,x._y+=x.parentNode._y),A.left=x._x+"px",A.top=x._y+"px",A.position="absolute",A.display="block",A.width=x._w+1+"px",A.height=x._h+"px"),G?o&&""!==x.innerHTML?aa.push(x):H&&_.push(x):o?(a.removeChild(x),w.splice(r--,1),j--):!o&&H&&(y=!F&&!I&&x.nextSibling,a.appendChild(x),y||a.appendChild(f.createTextNode(" ")),_.push(x))):F||I?(a.removeChild(x),w.splice(r--,1),j--):G||a.appendChild(x);if(F){for(I&&(z=f.createElement("div"),a.appendChild(z),B=z.offsetWidth+"px",y=z.offsetParent===a?0:a.offsetLeft,a.removeChild(z)),A=a.style.cssText,a.style.cssText="display:none;";a.firstChild;)a.removeChild(a.firstChild);for(C=!I||!G&&!H,r=0;r<F.length;r++){for(k=F[r],z=f.createElement("div"),z.style.cssText="display:block;text-align:"+R+";position:"+(I?"absolute;":"relative;"),Y&&(z.className=Y+(X?r+1:"")),ba.push(z),j=k.length,u=0;j>u;u++)"BR"!==k[u].nodeName&&(x=k[u],z.appendChild(x),C&&(x._wordEnd||G)&&z.appendChild(f.createTextNode(" ")),I&&(0===u&&(z.style.top=x._y+"px",z.style.left=M+y+"px"),x.style.top="0px",y&&(x.style.left=x._x-y+"px")));0===j&&(z.innerHTML="&nbsp;"),G||H||(z.innerHTML=e(z).split(String.fromCharCode(160)).join(" ")),I&&(z.style.width=B,z.style.height=x._h+"px"),a.appendChild(z)}a.style.cssText=A}I&&(S>a.clientHeight&&(a.style.height=S-P+"px",a.clientHeight<S&&(a.style.height=S+N+"px")),T>a.clientWidth&&(a.style.width=T-Q+"px",a.clientWidth<T&&(a.style.width=T+O+"px"))),t(c,_),t(d,aa),t(h,ba)},v=r.prototype;v.split=function(a){this.isSplit&&this.revert(),this.vars=a||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var b=this.elements.length;--b>-1;)this._originals[b]=this.elements[b].innerHTML,u(this.elements[b],this.vars,this.chars,this.words,this.lines);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},v.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var a=this._originals.length;--a>-1;)this.elements[a].innerHTML=this._originals[a];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},r.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(r.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)},r.version="0.3.5"}(_gsScope),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports&&(module.exports=b())}("SplitText");
try{
	window.GreenSockGlobals = null;
	window._gsQueue = null;
	window._gsDefine = null;
	delete(window.GreenSockGlobals);
	delete(window._gsQueue);
	delete(window._gsDefine);	
   } catch(e) {}
try{
	window.GreenSockGlobals = oldgs;
	window._gsQueue = oldgs_queue;
	} catch(e) {}
if (window.tplogs==true)
	try {
		console.groupEnd();
	} catch(e) {}
(function(e,t){
		e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};e.expr[":"].uncached=function(t){var n=document.createElement("img");n.src=t.src;return e(t).is('img[src!=""]')&&!n.complete};e.fn.waitForImages=function(t,n,r){if(e.isPlainObject(arguments[0])){n=t.each;r=t.waitForAll;t=t.finished}t=t||e.noop;n=n||e.noop;r=!!r;if(!e.isFunction(t)||!e.isFunction(n)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var i=e(this),s=[];if(r){var o=e.waitForImages.hasImageProperties||[],u=/url\((['"]?)(.*?)\1\)/g;i.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){s.push({src:t.attr("src"),element:t[0]})}e.each(o,function(e,n){var r=t.css(n);if(!r){return true}var i;while(i=u.exec(r)){s.push({src:i[2],element:t[0]})}})})}else{i.find("img:uncached").each(function(){s.push({src:this.src,element:this})})}var f=s.length,l=0;if(f==0){t.call(i[0])}e.each(s,function(r,s){var o=new Image;e(o).bind("load error",function(e){l++;n.call(s.element,l,f,e.type=="load");if(l==f){t.call(i[0]);return false}});o.src=s.src})})};		
})(jQuery);

!function(jQuery,undefined){"use strict";var version={core:"5.4.8","revolution.extensions.actions.min.js":"2.1.0","revolution.extensions.carousel.min.js":"1.2.1","revolution.extensions.kenburn.min.js":"1.3.1","revolution.extensions.layeranimation.min.js":"3.6.5","revolution.extensions.navigation.min.js":"1.3.5","revolution.extensions.parallax.min.js":"2.2.3","revolution.extensions.slideanims.min.js":"1.8","revolution.extensions.video.min.js":"2.2.2"};jQuery.fn.extend({revolution:function(i){var e={delay:9e3,responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,autoHeight:"off",sliderType:"standard",sliderLayout:"auto",fullScreenAutoWidth:"off",fullScreenAlignForce:"off",fullScreenOffsetContainer:"",fullScreenOffset:"0",hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,disableProgressBar:"off",stopAtSlide:-1,stopAfterLoops:-1,shadow:0,dottedOverlay:"none",startDelay:0,lazyType:"smart",spinner:"spinner0",shuffle:"off",viewPort:{enable:!1,outof:"wait",visible_area:"60%",presize:!1},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:"off",simplifyAll:"on",nextSlideOnWindowFocus:"off",disableFocusListener:!0,ignoreHeightChanges:"off",ignoreHeightChangesSize:0,allowHTML5AutoPlayOnAndroid:!0},parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",speed:400,bgparallax:"off",opacity:"on",disable_onmobile:"off",ddd_shadow:"on",ddd_bgfreeze:"off",ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,ddd_path:"mouse"},scrolleffect:{fade:"off",blur:"off",scale:"off",grayscale:"off",maxblur:10,on_layers:"off",on_slidebg:"off",on_static_layers:"off",on_parallax_layers:"off",on_parallax_static_layers:"off",direction:"both",multiplicator:1.35,multiplicator_layers:.5,tilt:30,disable_on_mobile:"on"},carousel:{easing:punchgs.Power3.easeInOut,speed:800,showLayersAllTime:"off",horizontal_align:"center",vertical_align:"center",infinity:"on",space:0,maxVisibleItems:3,stretch:"off",fadeout:"on",maxRotation:0,minScale:0,vary_fade:"off",vary_rotation:"on",vary_scale:"off",border_radius:"0px",padding_top:0,padding_bottom:0},navigation:{keyboardNavigation:"off",keyboard_direction:"horizontal",mouseScrollNavigation:"off",onHoverStop:"on",touch:{touchenabled:"off",touchOnDesktop:"off",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,swipe_direction:"horizontal"},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,tmp:"",rtl:!1,left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0,container:"slider"},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0,container:"slider"}},bullets:{container:"slider",rtl:!1,style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"left",v_align:"center",space:0,h_offset:20,v_offset:0,tmp:'<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>'},thumbnails:{container:"slider",rtl:!1,style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'<span class="tp-thumb-image"></span><span class="tp-thumb-title"></span>',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"left",v_align:"center",h_offset:20,v_offset:0},tabs:{container:"slider",rtl:!1,style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'<span class="tp-tab-image"></span>',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"left",v_align:"center",h_offset:20,v_offset:0}},extensions:"extensions/",extensions_suffix:".min.js",debugMode:!1};return i=jQuery.extend(!0,{},e,i),this.each(function(){var e=jQuery(this);i.minHeight=i.minHeight!=undefined?parseInt(i.minHeight,0):i.minHeight,i.scrolleffect.on="on"===i.scrolleffect.fade||"on"===i.scrolleffect.scale||"on"===i.scrolleffect.blur||"on"===i.scrolleffect.grayscale,"hero"==i.sliderType&&e.find(">ul>li").each(function(e){0<e&&jQuery(this).remove()}),i.jsFileLocation=i.jsFileLocation||getScriptLocation("themepunch.revolution.min.js"),i.jsFileLocation=i.jsFileLocation+i.extensions,i.scriptsneeded=getNeededScripts(i,e),i.curWinRange=0,i.rtl=!0,i.navigation!=undefined&&i.navigation.touch!=undefined&&(i.navigation.touch.swipe_min_touches=5<i.navigation.touch.swipe_min_touches?1:i.navigation.touch.swipe_min_touches),jQuery(this).on("scriptsloaded",function(){if(i.modulesfailing)return e.html('<div style="margin:auto;line-height:40px;font-size:14px;color:#fff;padding:15px;background:#e74c3c;margin:20px 0px;">!! Error at loading Slider Revolution 5.0 Extrensions.'+i.errorm+"</div>").show(),!1;_R.migration!=undefined&&(i=_R.migration(e,i)),punchgs.force3D=!0,"on"!==i.simplifyAll&&punchgs.TweenLite.lagSmoothing(1e3,16),prepareOptions(e,i),initSlider(e,i)}),e[0].opt=i,waitForScripts(e,i)})},getRSVersion:function(e){if(!0===e)return jQuery("body").data("tp_rs_version");var i=jQuery("body").data("tp_rs_version"),t="";for(var a in t+="---------------------------------------------------------\n",t+="    Currently Loaded Slider Revolution & SR Modules :\n",t+="---------------------------------------------------------\n",i)t+=i[a].alias+": "+i[a].ver+"\n";return t+="---------------------------------------------------------\n"},revremoveslide:function(r){return this.each(function(){var e=jQuery(this),i=e[0].opt;if(!(r<0||r>i.slideamount)&&e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&i&&0<i.li.length&&(0<r||r<=i.li.length)){var t=jQuery(i.li[r]),a=t.data("index"),n=!1;i.slideamount=i.slideamount-1,i.realslideamount=i.realslideamount-1,removeNavWithLiref(".tp-bullet",a,i),removeNavWithLiref(".tp-tab",a,i),removeNavWithLiref(".tp-thumb",a,i),t.hasClass("active-revslide")&&(n=!0),t.remove(),i.li=removeArray(i.li,r),i.carousel&&i.carousel.slides&&(i.carousel.slides=removeArray(i.carousel.slides,r)),i.thumbs=removeArray(i.thumbs,r),_R.updateNavIndexes&&_R.updateNavIndexes(i),n&&e.revnext(),punchgs.TweenLite.set(i.li,{minWidth:"99%"}),punchgs.TweenLite.set(i.li,{minWidth:"100%"})}})},revaddcallback:function(e){return this.each(function(){this.opt&&(this.opt.callBackArray===undefined&&(this.opt.callBackArray=new Array),this.opt.callBackArray.push(e))})},revgetparallaxproc:function(){return jQuery(this)[0].opt.scrollproc},revdebugmode:function(){return this.each(function(){var e=jQuery(this);e[0].opt.debugMode=!0,containerResized(e,e[0].opt)})},revscroll:function(i){return this.each(function(){var e=jQuery(this);jQuery("body,html").animate({scrollTop:e.offset().top+e.height()-i+"px"},{duration:400})})},revredraw:function(e){return this.each(function(){var e=jQuery(this);containerResized(e,e[0].opt)})},revkill:function(e){var i=this,t=jQuery(this);if(punchgs.TweenLite.killDelayedCallsTo(_R.showHideNavElements),t!=undefined&&0<t.length&&0<jQuery("body").find("#"+t.attr("id")).length){t.data("conthover",1),t.data("conthover-changed",1),t.trigger("revolution.slide.onpause");var a=t.parent().find(".tp-bannertimer"),n=t[0].opt;n.tonpause=!0,t.trigger("stoptimer");var r="resize.revslider-"+t.attr("id");jQuery(window).unbind(r),punchgs.TweenLite.killTweensOf(t.find("*"),!1),punchgs.TweenLite.killTweensOf(t,!1),t.unbind("hover, mouseover, mouseenter,mouseleave, resize");r="resize.revslider-"+t.attr("id");jQuery(window).off(r),t.find("*").each(function(){var e=jQuery(this);e.unbind("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),e.off("on, hover, mouseenter,mouseleave,mouseover, resize"),e.data("mySplitText",null),e.data("ctl",null),e.data("tween")!=undefined&&e.data("tween").kill(),e.data("kenburn")!=undefined&&e.data("kenburn").kill(),e.data("timeline_out")!=undefined&&e.data("timeline_out").kill(),e.data("timeline")!=undefined&&e.data("timeline").kill(),e.remove(),e.empty(),e=null}),punchgs.TweenLite.killTweensOf(t.find("*"),!1),punchgs.TweenLite.killTweensOf(t,!1),a.remove();try{t.closest(".forcefullwidth_wrapper_tp_banner").remove()}catch(e){}try{t.closest(".rev_slider_wrapper").remove()}catch(e){}try{t.remove()}catch(e){}return t.empty(),t.html(),n=t=null,delete i.c,delete i.opt,delete i.container,!0}return!1},revpause:function(){return this.each(function(){var e=jQuery(this);e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&(e.data("conthover",1),e.data("conthover-changed",1),e.trigger("revolution.slide.onpause"),e[0].opt.tonpause=!0,e.trigger("stoptimer"))})},revresume:function(){return this.each(function(){var e=jQuery(this);e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&(e.data("conthover",0),e.data("conthover-changed",1),e.trigger("revolution.slide.onresume"),e[0].opt.tonpause=!1,e.trigger("starttimer"))})},revstart:function(){var e=jQuery(this);if(e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&e[0].opt!==undefined)return e[0].opt.sliderisrunning?(console.log("Slider Is Running Already"),!1):((e[0].opt.c=e)[0].opt.ul=e.find(">ul"),runSlider(e,e[0].opt),!0)},revnext:function(){return this.each(function(){var e=jQuery(this);e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&_R.callingNewSlide(e,1)})},revprev:function(){return this.each(function(){var e=jQuery(this);e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&_R.callingNewSlide(e,-1)})},revmaxslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revcurrentslide:function(){var e=jQuery(this);if(e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length)return parseInt(e[0].opt.act,0)+1},revlastslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revshowslide:function(i){return this.each(function(){var e=jQuery(this);e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&_R.callingNewSlide(e,"to"+(i-1))})},revcallslidewithid:function(i){return this.each(function(){var e=jQuery(this);e!=undefined&&0<e.length&&0<jQuery("body").find("#"+e.attr("id")).length&&_R.callingNewSlide(e,i)})}});var _R=jQuery.fn.revolution;jQuery.extend(!0,_R,{getversion:function(){return version},compare_version:function(e){var i=jQuery("body").data("tp_rs_version");return(i=i===undefined?new Object:i).Core===undefined&&(i.Core=new Object,i.Core.alias="Slider Revolution Core",i.Core.name="jquery.themepunch.revolution.min.js",i.Core.ver=_R.getversion().core),"stop"!=e.check&&(_R.getversion().core<e.min_core?(e.check===undefined&&(console.log("%cSlider Revolution Warning (Core:"+_R.getversion().core+")","color:#c0392b;font-weight:bold;"),console.log("%c     Core is older than expected ("+e.min_core+") from "+e.alias,"color:#333"),console.log("%c     Please update Slider Revolution to the latest version.","color:#333"),console.log("%c     It might be required to purge and clear Server/Client side Caches.","color:#333")),e.check="stop"):_R.getversion()[e.name]!=undefined&&e.version<_R.getversion()[e.name]&&(e.check===undefined&&(console.log("%cSlider Revolution Warning (Core:"+_R.getversion().core+")","color:#c0392b;font-weight:bold;"),console.log("%c     "+e.alias+" ("+e.version+") is older than requiered ("+_R.getversion()[e.name]+")","color:#333"),console.log("%c     Please update Slider Revolution to the latest version.","color:#333"),console.log("%c     It might be required to purge and clear Server/Client side Caches.","color:#333")),e.check="stop")),i[e.alias]===undefined&&(i[e.alias]=new Object,i[e.alias].alias=e.alias,i[e.alias].ver=e.version,i[e.alias].name=e.name),jQuery("body").data("tp_rs_version",i),e},currentSlideIndex:function(e){var i=e.c.find(".active-revslide").index();return i=-1==i?0:i},simp:function(e,i,t){var a=Math.abs(e)-Math.floor(Math.abs(e/i))*i;return t?a:e<0?-1*a:a},iOSVersion:function(){var e=!1;return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)?navigator.userAgent.match(/OS 4_\d like Mac OS X/i)&&(e=!0):e=!1,e},isIE:function(e,i){var t=jQuery('<div style="display:none;"/>').appendTo(jQuery("body"));t.html("\x3c!--[if "+(i||"")+" IE "+(e||"")+"]><a>&nbsp;</a><![endif]--\x3e");var a=t.find("a").length;return t.remove(),a},is_mobile:function(){var e=["android","webos","iphone","ipad","blackberry","Android","webos",,"iPod","iPhone","iPad","Blackberry","BlackBerry"],i=!1;for(var t in e)1<navigator.userAgent.split(e[t]).length&&(i=!0);return i},is_android:function(){var e=["android","Android"],i=!1;for(var t in e)1<navigator.userAgent.split(e[t]).length&&(i=!0);return i},callBackHandling:function(e,t,a){try{e.callBackArray&&jQuery.each(e.callBackArray,function(e,i){i&&i.inmodule&&i.inmodule===t&&i.atposition&&i.atposition===a&&i.callback&&i.callback.call()})}catch(e){console.log("Call Back Failed")}},get_browser:function(){var e,i=navigator.appName,t=navigator.userAgent,a=t.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return a&&null!=(e=t.match(/version\/([\.\d]+)/i))&&(a[2]=e[1]),(a=a?[a[1],a[2]]:[i,navigator.appVersion,"-?"])[0]},get_browser_version:function(){var e,i=navigator.appName,t=navigator.userAgent,a=t.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return a&&null!=(e=t.match(/version\/([\.\d]+)/i))&&(a[2]=e[1]),(a=a?[a[1],a[2]]:[i,navigator.appVersion,"-?"])[1]},isSafari11:function(){var e=jQuery.trim(_R.get_browser().toLowerCase());return-1===jQuery.trim(navigator.userAgent.toLowerCase()).search("edge")&&"msie"!==e&&e.match(/safari|chrome/)},getHorizontalOffset:function(e,i){var t=gWiderOut(e,".outer-left"),a=gWiderOut(e,".outer-right");switch(i){case"left":return t;case"right":return a;case"both":return t+a}},callingNewSlide:function(e,i){var t=0<e.find(".next-revslide").length?e.find(".next-revslide").index():0<e.find(".processing-revslide").length?e.find(".processing-revslide").index():e.find(".active-revslide").index(),a=0,n=e[0].opt;e.find(".next-revslide").removeClass("next-revslide"),e.find(".active-revslide").hasClass("tp-invisible-slide")&&(t=n.last_shown_slide),i&&jQuery.isNumeric(i)||i.match(/to/g)?(a=1===i||-1===i?(a=t+i)<0?n.slideamount-1:a>=n.slideamount?0:a:(i=jQuery.isNumeric(i)?i:parseInt(i.split("to")[1],0))<0?0:i>n.slideamount-1?n.slideamount-1:i,e.find(".tp-revslider-slidesli:eq("+a+")").addClass("next-revslide")):i&&e.find(".tp-revslider-slidesli").each(function(){var e=jQuery(this);e.data("index")===i&&e.addClass("next-revslide")}),a=e.find(".next-revslide").index(),e.trigger("revolution.nextslide.waiting"),t===a&&t===n.last_shown_slide||a!==t&&-1!=a?swapSlide(e):e.find(".next-revslide").removeClass("next-revslide")},slotSize:function(e,i){i.slotw=Math.ceil(i.width/i.slots),"fullscreen"==i.sliderLayout?i.sloth=Math.ceil(jQuery(window).height()/i.slots):i.sloth=Math.ceil(i.height/i.slots),"on"==i.autoHeight&&e!==undefined&&""!==e&&(i.sloth=Math.ceil(e.height()/i.slots))},setSize:function(e){var i=(e.top_outer||0)+(e.bottom_outer||0),t=parseInt(e.carousel.padding_top||0,0),a=parseInt(e.carousel.padding_bottom||0,0),n=e.gridheight[e.curWinRange],r=0,o=-1===e.nextSlide||e.nextSlide===undefined?0:e.nextSlide;if(e.paddings=e.paddings===undefined?{top:parseInt(e.c.parent().css("paddingTop"),0)||0,bottom:parseInt(e.c.parent().css("paddingBottom"),0)||0}:e.paddings,e.rowzones&&0<e.rowzones.length)for(var s=0;s<e.rowzones[o].length;s++)r+=e.rowzones[o][s][0].offsetHeight;if(n=(n=n<e.minHeight?e.minHeight:n)<r?r:n,"fullwidth"==e.sliderLayout&&"off"==e.autoHeight&&punchgs.TweenLite.set(e.c,{maxHeight:n+"px"}),e.c.css({marginTop:t,marginBottom:a}),e.width=e.ul.width(),e.height=e.ul.height(),setScale(e),e.height=Math.round(e.gridheight[e.curWinRange]*(e.width/e.gridwidth[e.curWinRange])),e.height>e.gridheight[e.curWinRange]&&"on"!=e.autoHeight&&(e.height=e.gridheight[e.curWinRange]),"fullscreen"==e.sliderLayout||e.infullscreenmode){e.height=e.bw*e.gridheight[e.curWinRange];e.c.parent().width();var l=jQuery(window).height();if(e.fullScreenOffsetContainer!=undefined){try{var d=e.fullScreenOffsetContainer.split(",");d&&jQuery.each(d,function(e,i){l=0<jQuery(i).length?l-jQuery(i).outerHeight(!0):l})}catch(e){}try{1<e.fullScreenOffset.split("%").length&&e.fullScreenOffset!=undefined&&0<e.fullScreenOffset.length?l-=jQuery(window).height()*parseInt(e.fullScreenOffset,0)/100:e.fullScreenOffset!=undefined&&0<e.fullScreenOffset.length&&(l-=parseInt(e.fullScreenOffset,0))}catch(e){}}l=l<e.minHeight?e.minHeight:l,l-=i,e.c.parent().height(l),e.c.closest(".rev_slider_wrapper").height(l),e.c.css({height:"100%"}),e.height=l,e.minHeight!=undefined&&e.height<e.minHeight&&(e.height=e.minHeight),e.height=parseInt(r,0)>parseInt(e.height,0)?r:e.height}else e.minHeight!=undefined&&e.height<e.minHeight&&(e.height=e.minHeight),e.height=parseInt(r,0)>parseInt(e.height,0)?r:e.height,e.c.height(e.height);var c={height:t+a+i+e.height+e.paddings.top+e.paddings.bottom};e.c.closest(".forcefullwidth_wrapper_tp_banner").find(".tp-fullwidth-forcer").css(c),e.c.closest(".rev_slider_wrapper").css(c),setScale(e)},enterInViewPort:function(t){t.waitForCountDown&&(countDown(t.c,t),t.waitForCountDown=!1),t.waitForFirstSlide&&(swapSlide(t.c),t.waitForFirstSlide=!1,setTimeout(function(){t.c.removeClass("tp-waitforfirststart")},500)),"playing"!=t.sliderlaststatus&&t.sliderlaststatus!=undefined||t.c.trigger("starttimer"),t.lastplayedvideos!=undefined&&0<t.lastplayedvideos.length&&jQuery.each(t.lastplayedvideos,function(e,i){_R.playVideo(i,t)})},leaveViewPort:function(t){t.sliderlaststatus=t.sliderstatus,t.c.trigger("stoptimer"),t.playingvideos!=undefined&&0<t.playingvideos.length&&(t.lastplayedvideos=jQuery.extend(!0,[],t.playingvideos),t.playingvideos&&jQuery.each(t.playingvideos,function(e,i){t.leaveViewPortBasedStop=!0,_R.stopVideo&&_R.stopVideo(i,t)}))},unToggleState:function(e){e!=undefined&&0<e.length&&jQuery.each(e,function(e,i){i.removeClass("rs-toggle-content-active")})},toggleState:function(e){e!=undefined&&0<e.length&&jQuery.each(e,function(e,i){i.addClass("rs-toggle-content-active")})},swaptoggleState:function(e){e!=undefined&&0<e.length&&jQuery.each(e,function(e,i){jQuery(i).hasClass("rs-toggle-content-active")?jQuery(i).removeClass("rs-toggle-content-active"):jQuery(i).addClass("rs-toggle-content-active")})},lastToggleState:function(e){var t=0;return e!=undefined&&0<e.length&&jQuery.each(e,function(e,i){t=i.hasClass("rs-toggle-content-active")}),t}});var _ISM=_R.is_mobile(),_ANDROID=_R.is_android(),checkIDS=function(e,i){if(e.anyid=e.anyid===undefined?[]:e.anyid,-1!=jQuery.inArray(i.attr("id"),e.anyid)){var t=i.attr("id")+"_"+Math.round(9999*Math.random());i.attr("id",t)}e.anyid.push(i.attr("id"))},removeArray=function(e,t){var a=[];return jQuery.each(e,function(e,i){e!=t&&a.push(i)}),a},removeNavWithLiref=function(e,i,t){t.c.find(e).each(function(){var e=jQuery(this);e.data("liref")===i&&e.remove()})},lAjax=function(i,t){return!jQuery("body").data(i)&&(t.filesystem?(t.errorm===undefined&&(t.errorm="<br>Local Filesystem Detected !<br>Put this to your header:"),console.warn("Local Filesystem detected !"),t.errorm=t.errorm+'<br>&lt;script type="text/javascript" src="'+t.jsFileLocation+i+t.extensions_suffix+'"&gt;&lt;/script&gt;',console.warn(t.jsFileLocation+i+t.extensions_suffix+" could not be loaded !"),console.warn("Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document."),console.log(" "),!(t.modulesfailing=!0)):(jQuery.ajax({url:t.jsFileLocation+i+t.extensions_suffix+"?version="+version.core,dataType:"script",cache:!0,error:function(e){console.warn("Slider Revolution 5.0 Error !"),console.error("Failure at Loading:"+i+t.extensions_suffix+" on Path:"+t.jsFileLocation),console.info(e)}}),void jQuery("body").data(i,!0)))},getNeededScripts=function(t,e){var i=new Object,a=t.navigation;return i.kenburns=!1,i.parallax=!1,i.carousel=!1,i.navigation=!1,i.videos=!1,i.actions=!1,i.layeranim=!1,i.migration=!1,e.data("version")&&e.data("version").toString().match(/5./gi)?(e.find("img").each(function(){"on"==jQuery(this).data("kenburns")&&(i.kenburns=!0)}),("carousel"==t.sliderType||"on"==a.keyboardNavigation||"on"==a.mouseScrollNavigation||"on"==a.touch.touchenabled||a.arrows.enable||a.bullets.enable||a.thumbnails.enable||a.tabs.enable)&&(i.navigation=!0),e.find(".tp-caption, .tp-static-layer, .rs-background-video-layer").each(function(){var e=jQuery(this);(e.data("ytid")!=undefined||0<e.find("iframe").length&&0<e.find("iframe").attr("src").toLowerCase().indexOf("youtube"))&&(i.videos=!0),(e.data("vimeoid")!=undefined||0<e.find("iframe").length&&0<e.find("iframe").attr("src").toLowerCase().indexOf("vimeo"))&&(i.videos=!0),e.data("actions")!==undefined&&(i.actions=!0),i.layeranim=!0}),e.find("li").each(function(){jQuery(this).data("link")&&jQuery(this).data("link")!=undefined&&(i.layeranim=!0,i.actions=!0)}),!i.videos&&(0<e.find(".rs-background-video-layer").length||0<e.find(".tp-videolayer").length||0<e.find(".tp-audiolayer").length||0<e.find("iframe").length||0<e.find("video").length)&&(i.videos=!0),"carousel"==t.sliderType&&(i.carousel=!0),("off"!==t.parallax.type||t.viewPort.enable||"true"==t.viewPort.enable||"true"===t.scrolleffect.on||t.scrolleffect.on)&&(i.parallax=!0)):(i.kenburns=!0,i.parallax=!0,i.carousel=!1,i.navigation=!0,i.videos=!0,i.actions=!0,i.layeranim=!0,i.migration=!0),"hero"==t.sliderType&&(i.carousel=!1,i.navigation=!1),window.location.href.match(/file:/gi)&&(i.filesystem=!0,t.filesystem=!0),i.videos&&void 0===_R.isVideoPlaying&&lAjax("revolution.extension.video",t),i.carousel&&void 0===_R.prepareCarousel&&lAjax("revolution.extension.carousel",t),i.carousel||void 0!==_R.animateSlide||lAjax("revolution.extension.slideanims",t),i.actions&&void 0===_R.checkActions&&lAjax("revolution.extension.actions",t),i.layeranim&&void 0===_R.handleStaticLayers&&lAjax("revolution.extension.layeranimation",t),i.kenburns&&void 0===_R.stopKenBurn&&lAjax("revolution.extension.kenburn",t),i.navigation&&void 0===_R.createNavigation&&lAjax("revolution.extension.navigation",t),i.migration&&void 0===_R.migration&&lAjax("revolution.extension.migration",t),i.parallax&&void 0===_R.checkForParallax&&lAjax("revolution.extension.parallax",t),t.addons!=undefined&&0<t.addons.length&&jQuery.each(t.addons,function(e,i){"object"==typeof i&&i.fileprefix!=undefined&&lAjax(i.fileprefix,t)}),i},waitForScripts=function(e,i){var t=!0,a=i.scriptsneeded;i.addons!=undefined&&0<i.addons.length&&jQuery.each(i.addons,function(e,i){"object"==typeof i&&i.init!=undefined&&_R[i.init]===undefined&&(t=!1)}),a.filesystem||"undefined"!=typeof punchgs&&t&&(!a.kenburns||a.kenburns&&void 0!==_R.stopKenBurn)&&(!a.navigation||a.navigation&&void 0!==_R.createNavigation)&&(!a.carousel||a.carousel&&void 0!==_R.prepareCarousel)&&(!a.videos||a.videos&&void 0!==_R.resetVideo)&&(!a.actions||a.actions&&void 0!==_R.checkActions)&&(!a.layeranim||a.layeranim&&void 0!==_R.handleStaticLayers)&&(!a.migration||a.migration&&void 0!==_R.migration)&&(!a.parallax||a.parallax&&void 0!==_R.checkForParallax)&&(a.carousel||!a.carousel&&void 0!==_R.animateSlide)?e.trigger("scriptsloaded"):setTimeout(function(){waitForScripts(e,i)},50)},getScriptLocation=function(e){var i=new RegExp("themepunch.revolution.min.js","gi"),t="";return jQuery("script").each(function(){var e=jQuery(this).attr("src");e&&e.match(i)&&(t=e)}),t=(t=(t=t.replace("jquery.themepunch.revolution.min.js","")).replace("jquery.themepunch.revolution.js","")).split("?")[0]},setCurWinRange=function(e,i){var t=9999,a=0,n=0,r=0,o=jQuery(window).width(),s=i&&9999==e.responsiveLevels?e.visibilityLevels:e.responsiveLevels;s&&s.length&&jQuery.each(s,function(e,i){o<i&&(0==a||i<a)&&(r=e,a=t=i),i<o&&a<i&&(a=i,n=e)}),a<t&&(r=n),i?e.forcedWinRange=r:e.curWinRange=r},prepareOptions=function(e,i){i.carousel.maxVisibleItems=i.carousel.maxVisibleItems<1?999:i.carousel.maxVisibleItems,i.carousel.vertical_align="top"===i.carousel.vertical_align?"0%":"bottom"===i.carousel.vertical_align?"100%":"50%"},gWiderOut=function(e,i){var t=0;return e.find(i).each(function(){var e=jQuery(this);!e.hasClass("tp-forcenotvisible")&&t<e.outerWidth()&&(t=e.outerWidth())}),t},initSlider=function(container,opt){if(container==undefined)return!1;container.data("aimg")!=undefined&&("enabled"==container.data("aie8")&&_R.isIE(8)||"enabled"==container.data("amobile")&&_ISM)&&container.html('<img class="tp-slider-alternative-image" src="'+container.data("aimg")+'">'),container.find(">ul").addClass("tp-revslider-mainul"),opt.c=container,opt.ul=container.find(".tp-revslider-mainul"),opt.ul.find(">li").each(function(e){var i=jQuery(this);"on"==i.data("hideslideonmobile")&&_ISM&&i.remove(),(i.data("invisible")||!0===i.data("invisible"))&&(i.addClass("tp-invisible-slide"),i.appendTo(opt.ul))}),opt.addons!=undefined&&0<opt.addons.length&&jQuery.each(opt.addons,function(i,obj){"object"==typeof obj&&obj.init!=undefined&&_R[obj.init](eval(obj.params))}),opt.cid=container.attr("id"),opt.ul.css({visibility:"visible"}),opt.slideamount=opt.ul.find(">li").not(".tp-invisible-slide").length,opt.realslideamount=opt.ul.find(">li").length,opt.slayers=container.find(".tp-static-layers"),opt.slayers.data("index","staticlayers"),1!=opt.waitForInit&&(container[0].opt=opt,runSlider(container,opt))},onFullScreenChange=function(){jQuery("body").data("rs-fullScreenMode",!jQuery("body").data("rs-fullScreenMode")),jQuery("body").data("rs-fullScreenMode")&&setTimeout(function(){jQuery(window).trigger("resize")},200)},runSlider=function(t,x){if(x.sliderisrunning=!0,x.ul.find(">li").each(function(e){jQuery(this).data("originalindex",e)}),x.allli=x.ul.find(">li"),jQuery.each(x.allli,function(e,i){(i=jQuery(i)).data("origindex",i.index())}),x.li=x.ul.find(">li").not(".tp-invisible-slide"),"on"==x.shuffle){var e=new Object,i=x.ul.find(">li:first-child");e.fstransition=i.data("fstransition"),e.fsmasterspeed=i.data("fsmasterspeed"),e.fsslotamount=i.data("fsslotamount");for(var a=0;a<x.slideamount;a++){var n=Math.round(Math.random()*x.slideamount);x.ul.find(">li:eq("+n+")").prependTo(x.ul)}var r=x.ul.find(">li:first-child");r.data("fstransition",e.fstransition),r.data("fsmasterspeed",e.fsmasterspeed),r.data("fsslotamount",e.fsslotamount),x.allli=x.ul.find(">li"),x.li=x.ul.find(">li").not(".tp-invisible-slide")}if(x.inli=x.ul.find(">li.tp-invisible-slide"),x.thumbs=new Array,x.slots=4,x.act=-1,x.firststart=1,x.loadqueue=new Array,x.syncload=0,x.conw=t.width(),x.conh=t.height(),1<x.responsiveLevels.length?x.responsiveLevels[0]=9999:x.responsiveLevels=9999,jQuery.each(x.allli,function(e,i){var t=(i=jQuery(i)).find(".rev-slidebg")||i.find("img").first(),a=0;i.addClass("tp-revslider-slidesli"),i.data("index")===undefined&&i.data("index","rs-"+Math.round(999999*Math.random()));var n=new Object;n.params=new Array,n.id=i.data("index"),n.src=i.data("thumb")!==undefined?i.data("thumb"):t.data("lazyload")!==undefined?t.data("lazyload"):t.attr("src"),i.data("title")!==undefined&&n.params.push({from:RegExp("\\{\\{title\\}\\}","g"),to:i.data("title")}),i.data("description")!==undefined&&n.params.push({from:RegExp("\\{\\{description\\}\\}","g"),to:i.data("description")});for(a=1;a<=10;a++)i.data("param"+a)!==undefined&&n.params.push({from:RegExp("\\{\\{param"+a+"\\}\\}","g"),to:i.data("param"+a)});if(x.thumbs.push(n),i.data("link")!=undefined){var r=i.data("link"),o=i.data("target")||"_self",s="back"===i.data("slideindex")?0:60,l=i.data("linktoslide"),d=l;l!=undefined&&"next"!=l&&"prev"!=l&&x.allli.each(function(){var e=jQuery(this);e.data("origindex")+1==d&&(l=e.data("index"))}),"slide"!=r&&(l="no");var c='<div class="tp-caption slidelink" style="cursor:pointer;width:100%;height:100%;z-index:'+s+';" data-x="center" data-y="center" data-basealign="slide" ',u=' data-frames=\'[{"delay":0,"speed":100,"frame":"0","from":"opacity:0;","to":"o:1;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;","ease":"Power3.easeInOut"}]\'';c="no"==l?c+u+" >":c+"data-actions='"+("scroll_under"===l?'[{"event":"click","action":"scrollbelow","offset":"100px","delay":"0"}]':"prev"===l?'[{"event":"click","action":"jumptoslide","slide":"prev","delay":"0.2"}]':"next"===l?'[{"event":"click","action":"jumptoslide","slide":"next","delay":"0.2"}]':'[{"event":"click","action":"jumptoslide","slide":"'+l+'","delay":"0.2"}]')+"'"+u+" >",c+='<a style="width:100%;height:100%;display:block"',c="slide"!=r?c+' target="'+o+'" href="'+r+'"':c,c+='><span style="width:100%;height:100%;display:block"></span></a></div>',i.append(c)}}),x.rle=x.responsiveLevels.length||1,x.gridwidth=cArray(x.gridwidth,x.rle),x.gridheight=cArray(x.gridheight,x.rle),"on"==x.simplifyAll&&(_R.isIE(8)||_R.iOSVersion())&&(t.find(".tp-caption").each(function(){var e=jQuery(this);e.removeClass("customin customout").addClass("fadein fadeout"),e.data("splitin",""),e.data("speed",400)}),x.allli.each(function(){var e=jQuery(this);e.data("transition","fade"),e.data("masterspeed",500),e.data("slotamount",1),(e.find(".rev-slidebg")||e.find(">img").first()).data("kenburns","off")})),x.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),x.autoHeight="fullscreen"==x.sliderLayout?"on":x.autoHeight,"fullwidth"==x.sliderLayout&&"off"==x.autoHeight&&t.css({maxHeight:x.gridheight[x.curWinRange]+"px"}),"auto"!=x.sliderLayout&&0==t.closest(".forcefullwidth_wrapper_tp_banner").length&&("fullscreen"!==x.sliderLayout||"on"!=x.fullScreenAutoWidth)){var o=t.parent(),s=o.css("marginBottom"),l=o.css("marginTop"),d=t.attr("id")+"_forcefullwidth";s=s===undefined?0:s,l=l===undefined?0:l,o.wrap('<div class="forcefullwidth_wrapper_tp_banner" id="'+d+'" style="position:relative;width:100%;height:auto;margin-top:'+l+";margin-bottom:"+s+'"></div>'),t.closest(".forcefullwidth_wrapper_tp_banner").append('<div class="tp-fullwidth-forcer" style="width:100%;height:'+t.height()+'px"></div>'),t.parent().css({marginTop:"0px",marginBottom:"0px"}),t.parent().css({position:"absolute"})}if(x.shadow!==undefined&&0<x.shadow&&(t.parent().addClass("tp-shadow"+x.shadow),t.parent().append('<div class="tp-shadowcover"></div>'),t.parent().find(".tp-shadowcover").css({backgroundColor:t.parent().css("backgroundColor"),backgroundImage:t.parent().css("backgroundImage")})),setCurWinRange(x),setCurWinRange(x,!0),!t.hasClass("revslider-initialised")){t.addClass("revslider-initialised"),t.addClass("tp-simpleresponsive"),t.attr("id")==undefined&&t.attr("id","revslider-"+Math.round(1e3*Math.random()+5)),checkIDS(x,t),x.firefox13=!1,x.ie=!jQuery.support.opacity,x.ie9=9==document.documentMode,x.origcd=x.delay;var c=jQuery.fn.jquery.split("."),u=parseFloat(c[0]),p=parseFloat(c[1]);parseFloat(c[2]||"0");1==u&&p<7&&t.html('<div style="text-align:center; padding:40px 0px; font-size:20px; color:#992222;"> The Current Version of jQuery:'+c+" <br>Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin</div>"),1<u&&(x.ie=!1);var j=new Object;j.addedyt=0,j.addedvim=0,j.addedvid=0,x.scrolleffect.on&&(x.scrolleffect.layers=new Array),t.find(".tp-caption, .rs-background-video-layer").each(function(e){var n=jQuery(this),i=n.data(),t=i.autoplayonlyfirsttime,a=i.autoplay,r=(i.videomp4!==undefined||i.videowebm!==undefined||i.videoogv,n.hasClass("tp-audiolayer")),o=i.videoloop,s=!0,l=!1;i.startclasses=n.attr("class"),i.isparallaxlayer=0<=i.startclasses.indexOf("rs-parallax"),n.hasClass("tp-static-layer")&&_R.handleStaticLayers&&(_R.handleStaticLayers(n,x),x.scrolleffect.on&&("on"===x.scrolleffect.on_parallax_static_layers&&i.isparallaxlayer||"on"===x.scrolleffect.on_static_layers&&!i.isparallaxlayer)&&(l=!0),s=!1);var d=n.data("noposteronmobile")||n.data("noPosterOnMobile")||n.data("posteronmobile")||n.data("posterOnMobile")||n.data("posterOnMObile");n.data("noposteronmobile",d);var c=0;if(n.find("iframe").each(function(){punchgs.TweenLite.set(jQuery(this),{autoAlpha:0}),c++}),0<c&&n.data("iframes",!0),n.hasClass("tp-caption")){var u=n.hasClass("slidelink")?"width:100% !important;height:100% !important;":"",p=n.data(),f="",h=p.type,g="row"===h||"column"===h?"relative":"absolute",v="";"row"===h?(n.addClass("rev_row").removeClass("tp-resizeme"),v="rev_row_wrap"):"column"===h?(f=p.verticalalign===undefined?" vertical-align:bottom;":" vertical-align:"+p.verticalalign+";",v="rev_column",n.addClass("rev_column_inner").removeClass("tp-resizeme"),n.data("width","auto"),punchgs.TweenLite.set(n,{width:"auto"})):"group"===h&&n.removeClass("tp-resizeme");var m="",y="";"row"!==h&&"group"!==h&&"column"!==h?(m="display:"+n.css("display")+";",0<n.closest(".rev_column").length?(n.addClass("rev_layer_in_column"),s=!1):0<n.closest(".rev_group").length&&(n.addClass("rev_layer_in_group"),s=!1)):"column"===h&&(s=!1),p.wrapper_class!==undefined&&(v=v+" "+p.wrapper_class),p.wrapper_id!==undefined&&(y='id="'+p.wrapper_id+'"');var w="";n.hasClass("tp-no-events")&&(w=";pointer-events:none"),n.wrap("<div "+y+' class="tp-parallax-wrap '+v+'" style="'+f+" "+u+"position:"+g+";"+m+";visibility:hidden"+w+'"><div class="tp-loop-wrap" style="'+u+"position:"+g+";"+m+';"><div class="tp-mask-wrap" style="'+u+"position:"+g+";"+m+';" ></div></div></div>'),s&&x.scrolleffect.on&&("on"===x.scrolleffect.on_parallax_layers&&i.isparallaxlayer||"on"===x.scrolleffect.on_layers&&!i.isparallaxlayer)&&x.scrolleffect.layers.push(n.parent()),l&&x.scrolleffect.layers.push(n.parent()),"column"===h&&(n.append('<div class="rev_column_bg rev_column_bg_man_sized" style="visibility:hidden"></div>'),n.closest(".tp-parallax-wrap").append('<div class="rev_column_bg rev_column_bg_auto_sized"></div>'));var b=n.closest(".tp-loop-wrap");jQuery.each(["pendulum","rotate","slideloop","pulse","wave"],function(e,i){var t=n.find(".rs-"+i),a=t.data()||"";""!=a&&(b.data(a),b.addClass("rs-"+i),t.children(0).unwrap(),n.data("loopanimation","on"))}),n.attr("id")===undefined&&n.attr("id","layer-"+Math.round(999999999*Math.random())),checkIDS(x,n),punchgs.TweenLite.set(n,{visibility:"hidden"})}var _=n.data("actions");_!==undefined&&_R.checkActions(n,x,_),checkHoverDependencies(n,x),_R.checkVideoApis&&(j=_R.checkVideoApis(n,x,j)),r||1!=t&&"true"!=t&&"1sttime"!=a||"loopandnoslidestop"==o||n.closest("li.tp-revslider-slidesli").addClass("rs-pause-timer-once"),r||1!=a&&"true"!=a&&"on"!=a&&"no1sttime"!=a||"loopandnoslidestop"==o||n.closest("li.tp-revslider-slidesli").addClass("rs-pause-timer-always")}),t[0].addEventListener("mouseenter",function(){t.trigger("tp-mouseenter"),x.overcontainer=!0},{passive:!0}),t[0].addEventListener("mouseover",function(){t.trigger("tp-mouseover"),x.overcontainer=!0},{passive:!0}),t[0].addEventListener("mouseleave",function(){t.trigger("tp-mouseleft"),x.overcontainer=!1},{passive:!0}),t.find(".tp-caption video").each(function(e){var i=jQuery(this);i.removeClass("video-js vjs-default-skin"),i.attr("preload",""),i.css({display:"none"})}),"standard"!==x.sliderType&&(x.lazyType="all"),loadImages(t.find(".tp-static-layers"),x,0,!0),waitForCurrentImages(t.find(".tp-static-layers"),x,function(){t.find(".tp-static-layers img").each(function(){var e=jQuery(this),i=e.data("lazyload")!=undefined?e.data("lazyload"):e.attr("src"),t=getLoadObj(x,i);e.attr("src",t.src)})}),x.rowzones=[],x.allli.each(function(e){var i=jQuery(this);x.rowzones[e]=[],i.find(".rev_row_zone").each(function(){x.rowzones[e].push(jQuery(this))}),"all"!=x.lazyType&&("smart"!=x.lazyType||0!=e&&1!=e&&e!=x.slideamount&&e!=x.slideamount-1)||(loadImages(i,x,e),waitForCurrentImages(i,x,function(){}))});var f=getUrlVars("#")[0];if(f.length<9&&1<f.split("slide").length){var h=parseInt(f.split("slide")[1],0);h<1&&(h=1),h>x.slideamount&&(h=x.slideamount),x.startWithSlide=h-1}t.append('<div class="tp-loader '+x.spinner+'"><div class="dot1"></div><div class="dot2"></div><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>'),x.loader=t.find(".tp-loader"),0===t.find(".tp-bannertimer").length&&t.append('<div class="tp-bannertimer" style="visibility:hidden"></div>'),t.find(".tp-bannertimer").css({width:"0%"}),x.ul.css({display:"block"}),prepareSlides(t,x),("off"!==x.parallax.type||x.scrolleffect.on)&&_R.checkForParallax&&_R.checkForParallax(t,x),_R.setSize(x),"hero"!==x.sliderType&&_R.createNavigation&&_R.createNavigation(t,x),_R.resizeThumbsTabs&&_R.resizeThumbsTabs&&_R.resizeThumbsTabs(x),contWidthManager(x);var g=x.viewPort;x.inviewport=!1,g!=undefined&&g.enable&&(jQuery.isNumeric(g.visible_area)||-1!==g.visible_area.indexOf("%")&&(g.visible_area=parseInt(g.visible_area)/100),_R.scrollTicker&&_R.scrollTicker(x,t)),"carousel"===x.sliderType&&_R.prepareCarousel&&(punchgs.TweenLite.set(x.ul,{opacity:0}),_R.prepareCarousel(x,new punchgs.TimelineLite,undefined,0),x.onlyPreparedSlide=!0),setTimeout(function(){if(!g.enable||g.enable&&x.inviewport||g.enable&&!x.inviewport&&"wait"==!g.outof)swapSlide(t);else if(x.c.addClass("tp-waitforfirststart"),x.waitForFirstSlide=!0,g.presize){var e=jQuery(x.li[0]);loadImages(e,x,0,!0),waitForCurrentImages(e.find(".tp-layers"),x,function(){_R.animateTheCaptions({slide:e,opt:x,preset:!0})})}_R.manageNavigation&&_R.manageNavigation(x),1<x.slideamount&&(!g.enable||g.enable&&x.inviewport?countDown(t,x):x.waitForCountDown=!0),setTimeout(function(){t.trigger("revolution.slide.onloaded")},100)},x.startDelay),x.startDelay=0,jQuery("body").data("rs-fullScreenMode",!1),window.addEventListener("fullscreenchange",onFullScreenChange,{passive:!0}),window.addEventListener("mozfullscreenchange",onFullScreenChange,{passive:!0}),window.addEventListener("webkitfullscreenchange",onFullScreenChange,{passive:!0});var v="resize.revslider-"+t.attr("id");jQuery(window).on(v,function(){if(t==undefined)return!1;0!=jQuery("body").find(t)&&contWidthManager(x);var e=!1;if("fullscreen"==x.sliderLayout){var i=jQuery(window).height();"mobile"==x.fallbacks.ignoreHeightChanges&&_ISM||"always"==x.fallbacks.ignoreHeightChanges?(x.fallbacks.ignoreHeightChangesSize=x.fallbacks.ignoreHeightChangesSize==undefined?0:x.fallbacks.ignoreHeightChangesSize,e=i!=x.lastwindowheight&&Math.abs(i-x.lastwindowheight)>x.fallbacks.ignoreHeightChangesSize):e=i!=x.lastwindowheight}(t.outerWidth(!0)!=x.width||t.is(":hidden")||e)&&(x.lastwindowheight=jQuery(window).height(),containerResized(t,x))}),hideSliderUnder(t,x),contWidthManager(x),x.fallbacks.disableFocusListener||"true"==x.fallbacks.disableFocusListener||!0===x.fallbacks.disableFocusListener||(t.addClass("rev_redraw_on_blurfocus"),tabBlurringCheck())}},cArray=function(e,i){if(!jQuery.isArray(e)){var t=e;(e=new Array).push(t)}if(e.length<i){t=e[e.length-1];for(var a=0;a<i-e.length+2;a++)e.push(t)}return e},checkHoverDependencies=function(e,n){var i=e.data();("sliderenter"===i.start||i.frames!==undefined&&i.frames[0]!=undefined&&"sliderenter"===i.frames[0].delay)&&(n.layersonhover===undefined&&(n.c.on("tp-mouseenter",function(){n.layersonhover&&jQuery.each(n.layersonhover,function(e,i){var t=i.data("closestli")||i.closest(".tp-revslider-slidesli"),a=i.data("staticli")||i.closest(".tp-static-layers");i.data("closestli")===undefined&&(i.data("closestli",t),i.data("staticli",a)),(0<t.length&&t.hasClass("active-revslide")||t.hasClass("processing-revslide")||0<a.length)&&(i.data("animdirection","in"),_R.playAnimationFrame&&_R.playAnimationFrame({caption:i,opt:n,frame:"frame_0",triggerdirection:"in",triggerframein:"frame_0",triggerframeout:"frame_999"}),i.data("triggerstate","on"))})}),n.c.on("tp-mouseleft",function(){n.layersonhover&&jQuery.each(n.layersonhover,function(e,i){i.data("animdirection","out"),i.data("triggered",!0),i.data("triggerstate","off"),_R.stopVideo&&_R.stopVideo(i,n),_R.playAnimationFrame&&_R.playAnimationFrame({caption:i,opt:n,frame:"frame_999",triggerdirection:"out",triggerframein:"frame_0",triggerframeout:"frame_999"})})}),n.layersonhover=new Array),n.layersonhover.push(e))},contWidthManager=function(e){var i=_R.getHorizontalOffset(e.c,"left");if("auto"==e.sliderLayout||"fullscreen"===e.sliderLayout&&"on"==e.fullScreenAutoWidth)"fullscreen"==e.sliderLayout&&"on"==e.fullScreenAutoWidth?punchgs.TweenLite.set(e.ul,{left:0,width:e.c.width()}):punchgs.TweenLite.set(e.ul,{left:i,width:e.c.width()-_R.getHorizontalOffset(e.c,"both")});else{var t=Math.ceil(e.c.closest(".forcefullwidth_wrapper_tp_banner").offset().left-i);punchgs.TweenLite.set(e.c.parent(),{left:0-t+"px",width:jQuery(window).width()-_R.getHorizontalOffset(e.c,"both")})}e.slayers&&"fullwidth"!=e.sliderLayout&&"fullscreen"!=e.sliderLayout&&punchgs.TweenLite.set(e.slayers,{left:i})},cv=function(e,i){return e===undefined?i:e},hideSliderUnder=function(e,i,t){var a=e.parent();jQuery(window).width()<i.hideSliderAtLimit?(e.trigger("stoptimer"),"none"!=a.css("display")&&a.data("olddisplay",a.css("display")),a.css({display:"none"})):e.is(":hidden")&&t&&(a.data("olddisplay")!=undefined&&"undefined"!=a.data("olddisplay")&&"none"!=a.data("olddisplay")?a.css({display:a.data("olddisplay")}):a.css({display:"block"}),e.trigger("restarttimer"),setTimeout(function(){containerResized(e,i)},150)),_R.hideUnHideNav&&_R.hideUnHideNav(i)},containerResized=function(e,i){if(e.trigger("revolution.slide.beforeredraw"),1==i.infullscreenmode&&(i.minHeight=jQuery(window).height()),setCurWinRange(i),setCurWinRange(i,!0),!_R.resizeThumbsTabs||!0===_R.resizeThumbsTabs(i)){if(hideSliderUnder(e,i,!0),contWidthManager(i),"carousel"==i.sliderType&&_R.prepareCarousel(i,!0),e===undefined)return!1;_R.setSize(i),i.conw=i.c.width(),i.conh=i.infullscreenmode?i.minHeight:i.c.height();var t=e.find(".active-revslide .slotholder"),a=e.find(".processing-revslide .slotholder");removeSlots(e,i,e,2),"standard"===i.sliderType&&(punchgs.TweenLite.set(a.find(".defaultimg"),{opacity:0}),t.find(".defaultimg").css({opacity:1})),"carousel"===i.sliderType&&i.lastconw!=i.conw&&(clearTimeout(i.pcartimer),i.pcartimer=setTimeout(function(){_R.prepareCarousel(i,!0),"carousel"==i.sliderType&&"on"===i.carousel.showLayersAllTime&&jQuery.each(i.li,function(e){_R.animateTheCaptions({slide:jQuery(i.li[e]),opt:i,recall:!0})})},100),i.lastconw=i.conw),_R.manageNavigation&&_R.manageNavigation(i),_R.animateTheCaptions&&0<e.find(".active-revslide").length&&_R.animateTheCaptions({slide:e.find(".active-revslide"),opt:i,recall:!0}),"on"==a.data("kenburns")&&_R.startKenBurn(a,i,a.data("kbtl")!==undefined?a.data("kbtl").progress():0),"on"==t.data("kenburns")&&_R.startKenBurn(t,i,t.data("kbtl")!==undefined?t.data("kbtl").progress():0),_R.animateTheCaptions&&0<e.find(".processing-revslide").length&&_R.animateTheCaptions({slide:e.find(".processing-revslide"),opt:i,recall:!0}),_R.manageNavigation&&_R.manageNavigation(i)}e.trigger("revolution.slide.afterdraw")},setScale=function(e){e.bw=e.width/e.gridwidth[e.curWinRange],e.bh=e.height/e.gridheight[e.curWinRange],e.bh>e.bw?e.bh=e.bw:e.bw=e.bh,(1<e.bh||1<e.bw)&&(e.bw=1,e.bh=1)},prepareSlides=function(e,u){if(e.find(".tp-caption").each(function(){var e=jQuery(this);e.data("transition")!==undefined&&e.addClass(e.data("transition"))}),u.ul.css({overflow:"hidden",width:"100%",height:"100%",maxHeight:e.parent().css("maxHeight")}),"on"==u.autoHeight&&(u.ul.css({overflow:"hidden",width:"100%",height:"100%",maxHeight:"none"}),e.css({maxHeight:"none"}),e.parent().css({maxHeight:"none"})),u.allli.each(function(e){var i=jQuery(this),t=i.data("originalindex");(u.startWithSlide!=undefined&&t==u.startWithSlide||u.startWithSlide===undefined&&0==e)&&i.addClass("next-revslide"),i.css({width:"100%",height:"100%",overflow:"hidden"})}),"carousel"===u.sliderType){u.ul.css({overflow:"visible"}).wrap('<div class="tp-carousel-wrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden;"></div>');var i='<div style="clear:both;display:block;width:100%;height:1px;position:relative;margin-bottom:-1px"></div>';u.c.parent().prepend(i),u.c.parent().append(i),_R.prepareCarousel(u)}e.parent().css({overflow:"visible"}),u.allli.find(">img").each(function(e){var i=jQuery(this),t=i.closest("li"),a=t.find(".rs-background-video-layer");a.addClass("defaultvid").css({zIndex:30}),i.addClass("defaultimg"),"on"==u.fallbacks.panZoomDisableOnMobile&&_ISM&&(i.data("kenburns","off"),i.data("bgfit","cover"));var n=t.data("mediafilter");n="none"===n||n===undefined?"":n,i.wrap('<div class="slotholder" style="position:absolute; top:0px; left:0px; z-index:0;width:100%;height:100%;"></div>'),a.appendTo(t.find(".slotholder"));var r=i.data();i.closest(".slotholder").data(r),0<a.length&&r.bgparallax!=undefined&&(a.data("bgparallax",r.bgparallax),a.data("showcoveronpause","on")),"none"!=u.dottedOverlay&&u.dottedOverlay!=undefined&&i.closest(".slotholder").append('<div class="tp-dottedoverlay '+u.dottedOverlay+'"></div>');var o=i.attr("src");r.src=o,r.bgfit=r.bgfit||"cover",r.bgrepeat=r.bgrepeat||"no-repeat",r.bgposition=r.bgposition||"center center";i.closest(".slotholder");var s=i.data("bgcolor"),l="";l=s!==undefined&&0<=s.indexOf("gradient")?'"background:'+s+';width:100%;height:100%;"':'"background-color:'+s+";background-repeat:"+r.bgrepeat+";background-image:url("+o+");background-size:"+r.bgfit+";background-position:"+r.bgposition+';width:100%;height:100%;"',i.data("mediafilter",n),n="on"===i.data("kenburns")?"":n;var d=jQuery('<div class="tp-bgimg defaultimg '+n+'" data-bgcolor="'+s+'" style='+l+"></div>");i.parent().append(d);var c=document.createComment("Runtime Modification - Img tag is Still Available for SEO Goals in Source - "+i.get(0).outerHTML);i.replaceWith(c),d.data(r),d.attr("src",o),"standard"!==u.sliderType&&"undefined"!==u.sliderType||d.css({opacity:0})}),u.scrolleffect.on&&"on"===u.scrolleffect.on_slidebg&&(u.allslotholder=new Array,u.allli.find(".slotholder").each(function(){jQuery(this).wrap('<div style="display:block;position:absolute;top:0px;left:0px;width:100%;height:100%" class="slotholder_fadeoutwrap"></div>')}),u.allslotholder=u.c.find(".slotholder_fadeoutwrap"))},removeSlots=function(e,i,t,a){i.removePrepare=i.removePrepare+a,t.find(".slot, .slot-circle-wrapper").each(function(){jQuery(this).remove()}),i.transition=0,i.removePrepare=0},cutParams=function(e){var i=e;return e!=undefined&&0<e.length&&(i=e.split("?")[0]),i},relativeRedir=function(e){return location.pathname.replace(/(.*)\/[^/]*/,"$1/"+e)},abstorel=function(e,i){var t=e.split("/"),a=i.split("/");t.pop();for(var n=0;n<a.length;n++)"."!=a[n]&&(".."==a[n]?t.pop():t.push(a[n]));return t.join("/")},imgLoaded=function(l,e,d){e.syncload--,e.loadqueue&&jQuery.each(e.loadqueue,function(e,i){var t=i.src.replace(/\.\.\/\.\.\//gi,""),a=self.location.href,n=document.location.origin,r=a.substring(0,a.length-1)+"/"+t,o=n+"/"+t,s=abstorel(self.location.href,i.src);a=a.substring(0,a.length-1)+t,(cutParams(n+=t)===cutParams(decodeURIComponent(l.src))||cutParams(a)===cutParams(decodeURIComponent(l.src))||cutParams(s)===cutParams(decodeURIComponent(l.src))||cutParams(o)===cutParams(decodeURIComponent(l.src))||cutParams(r)===cutParams(decodeURIComponent(l.src))||cutParams(i.src)===cutParams(decodeURIComponent(l.src))||cutParams(i.src).replace(/^.*\/\/[^\/]+/,"")===cutParams(decodeURIComponent(l.src)).replace(/^.*\/\/[^\/]+/,"")||"file://"===window.location.origin&&cutParams(l.src).match(new RegExp(t)))&&(i.progress=d,i.width=l.width,i.height=l.height)}),progressImageLoad(e)},progressImageLoad=function(a){3!=a.syncload&&a.loadqueue&&jQuery.each(a.loadqueue,function(e,i){if(i.progress.match(/prepared/g)&&a.syncload<=3){if(a.syncload++,"img"==i.type){var t=new Image;t.onload=function(){imgLoaded(this,a,"loaded"),i.error=!1},t.onerror=function(){imgLoaded(this,a,"failed"),i.error=!0},t.src=i.src}else jQuery.get(i.src,function(e){i.innerHTML=(new XMLSerializer).serializeToString(e.documentElement),i.progress="loaded",a.syncload--,progressImageLoad(a)}).fail(function(){i.progress="failed",a.syncload--,progressImageLoad(a)});i.progress="inload"}})},addToLoadQueue=function(t,e,i,a,n){var r=!1;if(e.loadqueue&&jQuery.each(e.loadqueue,function(e,i){i.src===t&&(r=!0)}),!r){var o=new Object;o.src=t,o.starttoload=jQuery.now(),o.type=a||"img",o.prio=i,o.progress="prepared",o.static=n,e.loadqueue.push(o)}},loadImages=function(e,a,n,r){e.find("img,.defaultimg, .tp-svg-layer").each(function(){var e=jQuery(this),i=e.data("lazyload")!==undefined&&"undefined"!==e.data("lazyload")?e.data("lazyload"):e.data("svg_src")!=undefined?e.data("svg_src"):e.attr("src"),t=e.data("svg_src")!=undefined?"svg":"img";e.data("start-to-load",jQuery.now()),addToLoadQueue(i,a,n,t,r)}),progressImageLoad(a)},getLoadObj=function(e,t){var a=new Object;return e.loadqueue&&jQuery.each(e.loadqueue,function(e,i){i.src==t&&(a=i)}),a},waitForCurrentImages=function(o,s,e){var l=!1;o.find("img,.defaultimg, .tp-svg-layer").each(function(){var e=jQuery(this),i=e.data("lazyload")!=undefined?e.data("lazyload"):e.data("svg_src")!=undefined?e.data("svg_src"):e.attr("src"),t=getLoadObj(s,i);if(e.data("loaded")===undefined&&t!==undefined&&t.progress&&t.progress.match(/loaded/g)){if(e.attr("src",t.src),"img"==t.type)if(e.hasClass("defaultimg"))_R.isIE(8)?defimg.attr("src",t.src):-1==t.src.indexOf("images/transparent.png")&&-1==t.src.indexOf("assets/transparent.png")||e.data("bgcolor")===undefined?e.css({backgroundImage:'url("'+t.src+'")'}):e.data("bgcolor")!==undefined&&e.css({background:e.data("bgcolor")}),o.data("owidth",t.width),o.data("oheight",t.height),o.find(".slotholder").data("owidth",t.width),o.find(".slotholder").data("oheight",t.height);else{var a=e.data("ww"),n=e.data("hh");e.data("owidth",t.width),e.data("oheight",t.height),a=a==undefined||"auto"==a||""==a?t.width:a,n=n==undefined||"auto"==n||""==n?t.height:n,!jQuery.isNumeric(a)&&0<a.indexOf("%")&&(n=a),e.data("ww",a),e.data("hh",n)}else"svg"==t.type&&"loaded"==t.progress&&(e.append('<div class="tp-svg-innercontainer"></div>'),e.find(".tp-svg-innercontainer").append(t.innerHTML));e.data("loaded",!0)}if(t&&t.progress&&t.progress.match(/inprogress|inload|prepared/g)&&(!t.error&&jQuery.now()-e.data("start-to-load")<5e3?l=!0:(t.progress="failed",t.reported_img||(t.reported_img=!0,console.warn(i+"  Could not be loaded !")))),1==s.youtubeapineeded&&(!window.YT||YT.Player==undefined)&&(l=!0,5e3<jQuery.now()-s.youtubestarttime&&1!=s.youtubewarning)){s.youtubewarning=!0;var r="YouTube Api Could not be loaded !";"https:"===location.protocol&&(r+=" Please Check and Renew SSL Certificate !"),console.error(r),s.c.append('<div style="position:absolute;top:50%;width:100%;color:#e74c3c;  font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+r+"</strong></div>")}if(1==s.vimeoapineeded&&!window.Vimeo&&(l=!0,5e3<jQuery.now()-s.vimeostarttime&&1!=s.vimeowarning)){s.vimeowarning=!0;r="Vimeo Api Could not be loaded !";"https:"===location.protocol&&(r+=" Please Check and Renew SSL Certificate !"),console.error(r),s.c.append('<div style="position:absolute;top:50%;width:100%;color:#e74c3c;  font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+r+"</strong></div>")}}),!_ISM&&s.audioqueue&&0<s.audioqueue.length&&jQuery.each(s.audioqueue,function(e,i){i.status&&"prepared"===i.status&&jQuery.now()-i.start<i.waittime&&(l=!0)}),jQuery.each(s.loadqueue,function(e,i){!0!==i.static||"loaded"==i.progress&&"failed"!==i.progress||("failed"==i.progress?i.reported||(i.reported=!0,console.warn("Static Image "+i.src+"  Could not be loaded in time. Error Exists:"+i.error)):!i.error&&jQuery.now()-i.starttoload<5e3?l=!0:i.reported||(i.reported=!0,console.warn("Static Image "+i.src+"  Could not be loaded within 5s! Error Exists:"+i.error)))}),l?punchgs.TweenLite.delayedCall(.18,waitForCurrentImages,[o,s,e]):punchgs.TweenLite.delayedCall(.18,e)},swapSlide=function(e){var i=e[0].opt;if(clearTimeout(i.waitWithSwapSlide),0<e.find(".processing-revslide").length)return i.waitWithSwapSlide=setTimeout(function(){swapSlide(e)},150),!1;var t=e.find(".active-revslide"),a=e.find(".next-revslide"),n=a.find(".defaultimg");if("carousel"!==i.sliderType||i.carousel.fadein||(punchgs.TweenLite.to(i.ul,1,{opacity:1}),i.carousel.fadein=!0),a.index()===t.index()&&!0!==i.onlyPreparedSlide)return a.removeClass("next-revslide"),!1;!0===i.onlyPreparedSlide&&(i.onlyPreparedSlide=!1,jQuery(i.li[0]).addClass("processing-revslide")),a.removeClass("next-revslide").addClass("processing-revslide"),-1===a.index()&&"carousel"===i.sliderType&&(a=jQuery(i.li[0])),a.data("slide_on_focus_amount",a.data("slide_on_focus_amount")+1||1),"on"==i.stopLoop&&a.index()==i.lastslidetoshow-1&&(e.find(".tp-bannertimer").css({visibility:"hidden"}),e.trigger("revolution.slide.onstop"),i.noloopanymore=1),a.index()===i.slideamount-1&&(i.looptogo=i.looptogo-1,i.looptogo<=0&&(i.stopLoop="on")),i.tonpause=!0,e.trigger("stoptimer"),i.cd=0,"off"===i.spinner&&(i.loader!==undefined?i.loader.css({display:"none"}):i.loadertimer=setTimeout(function(){i.loader!==undefined&&i.loader.css({display:"block"})},50)),loadImages(a,i,1),_R.preLoadAudio&&_R.preLoadAudio(a,i,1),waitForCurrentImages(a,i,function(){a.find(".rs-background-video-layer").each(function(){var e=jQuery(this);e.hasClass("HasListener")||(e.data("bgvideo",1),_R.manageVideoLayer&&_R.manageVideoLayer(e,i)),0==e.find(".rs-fullvideo-cover").length&&e.append('<div class="rs-fullvideo-cover"></div>')}),swapSlideProgress(n,e)})},swapSlideProgress=function(e,i){var t=i.find(".active-revslide"),a=i.find(".processing-revslide"),n=t.find(".slotholder"),r=a.find(".slotholder"),o=i[0].opt;o.tonpause=!1,o.cd=0,clearTimeout(o.loadertimer),o.loader!==undefined&&o.loader.css({display:"none"}),_R.setSize(o),_R.slotSize(e,o),_R.manageNavigation&&_R.manageNavigation(o);var s={};s.nextslide=a,s.currentslide=t,i.trigger("revolution.slide.onbeforeswap",s),o.transition=1,o.videoplaying=!1,a.data("delay")!=undefined?(o.cd=0,o.delay=a.data("delay")):o.delay=o.origcd,"true"==a.data("ssop")||!0===a.data("ssop")?o.ssop=!0:o.ssop=!1,i.trigger("nulltimer");var l=t.index(),d=a.index();o.sdir=d<l?1:0,"arrow"==o.sc_indicator&&(0==l&&d==o.slideamount-1&&(o.sdir=1),l==o.slideamount-1&&0==d&&(o.sdir=0)),o.lsdir=o.lsdir===undefined?o.sdir:o.lsdir,o.dirc=o.lsdir!=o.sdir,o.lsdir=o.sdir,t.index()!=a.index()&&1!=o.firststart&&_R.removeTheCaptions&&_R.removeTheCaptions(t,o),a.hasClass("rs-pause-timer-once")||a.hasClass("rs-pause-timer-always")?o.videoplaying=!0:i.trigger("restarttimer"),a.removeClass("rs-pause-timer-once");var c;if(o.currentSlide=t.index(),o.nextSlide=a.index(),"carousel"==o.sliderType)c=new punchgs.TimelineLite,_R.prepareCarousel(o,c),letItFree(i,r,n,a,t,c),o.transition=0,o.firststart=0;else{(c=new punchgs.TimelineLite({onComplete:function(){letItFree(i,r,n,a,t,c)}})).add(punchgs.TweenLite.set(r.find(".defaultimg"),{opacity:0})),c.pause(),_R.animateTheCaptions&&_R.animateTheCaptions({slide:a,opt:o,preset:!0}),1==o.firststart&&(punchgs.TweenLite.set(t,{autoAlpha:0}),o.firststart=0),punchgs.TweenLite.set(t,{zIndex:18}),punchgs.TweenLite.set(a,{autoAlpha:0,zIndex:20}),"prepared"==a.data("differentissplayed")&&(a.data("differentissplayed","done"),a.data("transition",a.data("savedtransition")),a.data("slotamount",a.data("savedslotamount")),a.data("masterspeed",a.data("savedmasterspeed"))),a.data("fstransition")!=undefined&&"done"!=a.data("differentissplayed")&&(a.data("savedtransition",a.data("transition")),a.data("savedslotamount",a.data("slotamount")),a.data("savedmasterspeed",a.data("masterspeed")),a.data("transition",a.data("fstransition")),a.data("slotamount",a.data("fsslotamount")),a.data("masterspeed",a.data("fsmasterspeed")),a.data("differentissplayed","prepared")),a.data("transition")==undefined&&a.data("transition","random"),0;var u=a.data("transition")!==undefined?a.data("transition").split(","):"fade",p=a.data("nexttransid")==undefined?-1:a.data("nexttransid");"on"==a.data("randomtransition")?p=Math.round(Math.random()*u.length):p+=1,p==u.length&&(p=0),a.data("nexttransid",p);var f=u[p];o.ie&&("boxfade"==f&&(f="boxslide"),"slotfade-vertical"==f&&(f="slotzoom-vertical"),"slotfade-horizontal"==f&&(f="slotzoom-horizontal")),_R.isIE(8)&&(f=11),c=_R.animateSlide(0,f,i,a,t,r,n,c),"on"==r.data("kenburns")&&(_R.startKenBurn(r,o),c.add(punchgs.TweenLite.set(r,{autoAlpha:0}))),c.pause()}_R.scrollHandling&&(_R.scrollHandling(o,!0,0),c.eventCallback("onUpdate",function(){_R.scrollHandling(o,!0,0)})),"off"!=o.parallax.type&&o.parallax.firstgo==undefined&&_R.scrollHandling&&(o.parallax.firstgo=!0,o.lastscrolltop=-999,_R.scrollHandling(o,!0,0),setTimeout(function(){o.lastscrolltop=-999,_R.scrollHandling(o,!0,0)},210),setTimeout(function(){o.lastscrolltop=-999,_R.scrollHandling(o,!0,0)},420)),_R.animateTheCaptions?"carousel"===o.sliderType&&"on"===o.carousel.showLayersAllTime?(jQuery.each(o.li,function(e){o.carousel.allLayersStarted?_R.animateTheCaptions({slide:jQuery(o.li[e]),opt:o,recall:!0}):o.li[e]===a?_R.animateTheCaptions({slide:jQuery(o.li[e]),maintimeline:c,opt:o,startslideanimat:0}):_R.animateTheCaptions({slide:jQuery(o.li[e]),opt:o,startslideanimat:0})}),o.carousel.allLayersStarted=!0):_R.animateTheCaptions({slide:a,opt:o,maintimeline:c,startslideanimat:0}):c!=undefined&&setTimeout(function(){c.resume()},30),punchgs.TweenLite.to(a,.001,{autoAlpha:1})},letItFree=function(e,i,t,a,n,r){var o=e[0].opt;"carousel"===o.sliderType||(o.removePrepare=0,punchgs.TweenLite.to(i.find(".defaultimg"),.001,{zIndex:20,autoAlpha:1,onComplete:function(){removeSlots(e,o,a,1)}}),a.index()!=n.index()&&punchgs.TweenLite.to(n,.2,{zIndex:18,autoAlpha:0,onComplete:function(){removeSlots(e,o,n,1)}})),e.find(".active-revslide").removeClass("active-revslide"),e.find(".processing-revslide").removeClass("processing-revslide").addClass("active-revslide"),o.act=a.index(),o.c.attr("data-slideactive",e.find(".active-revslide").data("index")),"scroll"!=o.parallax.type&&"scroll+mouse"!=o.parallax.type&&"mouse+scroll"!=o.parallax.type||(o.lastscrolltop=-999,_R.scrollHandling(o)),r.clear(),t.data("kbtl")!=undefined&&(t.data("kbtl").reverse(),t.data("kbtl").timeScale(25)),"on"==i.data("kenburns")&&(i.data("kbtl")!=undefined?(i.data("kbtl").timeScale(1),i.data("kbtl").play()):_R.startKenBurn(i,o)),a.find(".rs-background-video-layer").each(function(e){if(_ISM&&!o.fallbacks.allowHTML5AutoPlayOnAndroid)return!1;var i=jQuery(this);_R.resetVideo(i,o,!1,!0),punchgs.TweenLite.fromTo(i,1,{autoAlpha:0},{autoAlpha:1,ease:punchgs.Power3.easeInOut,delay:.2,onComplete:function(){_R.animcompleted&&_R.animcompleted(i,o)}})}),n.find(".rs-background-video-layer").each(function(e){if(_ISM)return!1;var i=jQuery(this);_R.stopVideo&&(_R.resetVideo(i,o),_R.stopVideo(i,o)),punchgs.TweenLite.to(i,1,{autoAlpha:0,ease:punchgs.Power3.easeInOut,delay:.2})});var s={};if(s.slideIndex=a.index()+1,s.slideLIIndex=a.index(),s.slide=a,s.currentslide=a,s.prevslide=n,o.last_shown_slide=n.index(),e.trigger("revolution.slide.onchange",s),e.trigger("revolution.slide.onafterswap",s),o.startWithSlide!==undefined&&"done"!==o.startWithSlide&&"carousel"===o.sliderType){for(var l=o.startWithSlide,d=0;d<=o.li.length-1;d++){jQuery(o.li[d]).data("originalindex")===o.startWithSlide&&(l=d)}0!==l&&_R.callingNewSlide(o.c,l),o.startWithSlide="done"}o.duringslidechange=!1;var c=n.data("slide_on_focus_amount"),u=n.data("hideafterloop");0!=u&&u<=c&&o.c.revremoveslide(n.index());var p=-1===o.nextSlide||o.nextSlide===undefined?0:o.nextSlide;o.rowzones!=undefined&&(p=p>o.rowzones.length?o.rowzones.length:p),o.rowzones!=undefined&&0<o.rowzones.length&&o.rowzones[p]!=undefined&&0<=p&&p<=o.rowzones.length&&0<o.rowzones[p].length&&_R.setSize(o)},removeAllListeners=function(e,i){e.children().each(function(){try{jQuery(this).die("click")}catch(e){}try{jQuery(this).die("mouseenter")}catch(e){}try{jQuery(this).die("mouseleave")}catch(e){}try{jQuery(this).unbind("hover")}catch(e){}});try{e.die("click","mouseenter","mouseleave")}catch(e){}clearInterval(i.cdint),e=null},countDown=function(e,i){i.cd=0,i.loop=0,i.stopAfterLoops!=undefined&&-1<i.stopAfterLoops?i.looptogo=i.stopAfterLoops:i.looptogo=9999999,i.stopAtSlide!=undefined&&-1<i.stopAtSlide?i.lastslidetoshow=i.stopAtSlide:i.lastslidetoshow=999,i.stopLoop="off",0==i.looptogo&&(i.stopLoop="on");var t=e.find(".tp-bannertimer");e.on("stoptimer",function(){var e=jQuery(this).find(".tp-bannertimer");e[0].tween.pause(),"on"==i.disableProgressBar&&e.css({visibility:"hidden"}),i.sliderstatus="paused",_R.unToggleState(i.slidertoggledby)}),e.on("starttimer",function(){i.forcepause_viatoggle||(1!=i.conthover&&1!=i.videoplaying&&i.width>i.hideSliderAtLimit&&1!=i.tonpause&&1!=i.overnav&&1!=i.ssop&&(1===i.noloopanymore||i.viewPort.enable&&!i.inviewport||(t.css({visibility:"visible"}),t[0].tween.resume(),i.sliderstatus="playing")),"on"==i.disableProgressBar&&t.css({visibility:"hidden"}),_R.toggleState(i.slidertoggledby))}),e.on("restarttimer",function(){if(!i.forcepause_viatoggle){var e=jQuery(this).find(".tp-bannertimer");if(i.mouseoncontainer&&"on"==i.navigation.onHoverStop&&!_ISM)return!1;1===i.noloopanymore||i.viewPort.enable&&!i.inviewport||1==i.ssop||(e.css({visibility:"visible"}),e[0].tween.kill(),e[0].tween=punchgs.TweenLite.fromTo(e,i.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:a,delay:1}),i.sliderstatus="playing"),"on"==i.disableProgressBar&&e.css({visibility:"hidden"}),_R.toggleState(i.slidertoggledby)}}),e.on("nulltimer",function(){t[0].tween.kill(),t[0].tween=punchgs.TweenLite.fromTo(t,i.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:a,delay:1}),t[0].tween.pause(0),"on"==i.disableProgressBar&&t.css({visibility:"hidden"}),i.sliderstatus="paused"});var a=function(){0==jQuery("body").find(e).length&&(removeAllListeners(e,i),clearInterval(i.cdint)),e.trigger("revolution.slide.slideatend"),1==e.data("conthover-changed")&&(i.conthover=e.data("conthover"),e.data("conthover-changed",0)),_R.callingNewSlide(e,1)};t[0].tween=punchgs.TweenLite.fromTo(t,i.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:a,delay:1}),1<i.slideamount&&(0!=i.stopAfterLoops||1!=i.stopAtSlide)?e.trigger("starttimer"):(i.noloopanymore=1,e.trigger("nulltimer")),e.on("tp-mouseenter",function(){i.mouseoncontainer=!0,"on"!=i.navigation.onHoverStop||_ISM||(e.trigger("stoptimer"),e.trigger("revolution.slide.onpause"))}),e.on("tp-mouseleft",function(){i.mouseoncontainer=!1,1!=e.data("conthover")&&"on"==i.navigation.onHoverStop&&(1==i.viewPort.enable&&i.inviewport||0==i.viewPort.enable)&&(e.trigger("revolution.slide.onresume"),e.trigger("starttimer"))})},vis=function(){var i,t,e={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(i in e)if(i in document){t=e[i];break}return function(e){return e&&document.addEventListener(t,e,{pasive:!0}),!document[i]}}(),restartOnFocus=function(){jQuery(".rev_redraw_on_blurfocus").each(function(){var e=jQuery(this)[0].opt;if(e==undefined||e.c==undefined||0===e.c.length)return!1;1!=e.windowfocused&&(e.windowfocused=!0,punchgs.TweenLite.delayedCall(.3,function(){"on"==e.fallbacks.nextSlideOnWindowFocus&&e.c.revnext(),e.c.revredraw(),"playing"==e.lastsliderstatus&&e.c.revresume()}))})},lastStatBlur=function(){jQuery(".rev_redraw_on_blurfocus").each(function(){var e=jQuery(this)[0].opt;e.windowfocused=!1,e.lastsliderstatus=e.sliderstatus,e.c.revpause();var i=e.c.find(".active-revslide .slotholder"),t=e.c.find(".processing-revslide .slotholder");"on"==t.data("kenburns")&&_R.stopKenBurn(t,e),"on"==i.data("kenburns")&&_R.stopKenBurn(i,e)})},tabBlurringCheck=function(){var e=document.documentMode===undefined,i=window.chrome;1!==jQuery("body").data("revslider_focus_blur_listener")&&(jQuery("body").data("revslider_focus_blur_listener",1),e&&!i?jQuery(window).on("focusin",function(){restartOnFocus()}).on("focusout",function(){lastStatBlur()}):window.addEventListener?(window.addEventListener("focus",function(e){restartOnFocus()},{capture:!1,passive:!0}),window.addEventListener("blur",function(e){lastStatBlur()},{capture:!1,passive:!0})):(window.attachEvent("focus",function(e){restartOnFocus()}),window.attachEvent("blur",function(e){lastStatBlur()})))},getUrlVars=function(e){for(var i,t=[],a=window.location.href.slice(window.location.href.indexOf(e)+1).split("_"),n=0;n<a.length;n++)a[n]=a[n].replace("%3D","="),i=a[n].split("="),t.push(i[0]),t[i[0]]=i[1];return t}}(jQuery);
!function($){"use strict";var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON="object"==typeof JSON&&JSON.stringify?JSON.stringify:function(a){if(null===a)return"null";var b,c,d,e,f=$.type(a);if("undefined"!==f){if("number"===f||"boolean"===f)return String(a);if("string"===f)return $.quoteString(a);if("function"==typeof a.toJSON)return $.toJSON(a.toJSON());if("date"===f){var g=a.getUTCMonth()+1,h=a.getUTCDate(),i=a.getUTCFullYear(),j=a.getUTCHours(),k=a.getUTCMinutes(),l=a.getUTCSeconds(),m=a.getUTCMilliseconds();return g<10&&(g="0"+g),h<10&&(h="0"+h),j<10&&(j="0"+j),k<10&&(k="0"+k),l<10&&(l="0"+l),m<100&&(m="0"+m),m<10&&(m="0"+m),'"'+i+"-"+g+"-"+h+"T"+j+":"+k+":"+l+"."+m+'Z"'}if(b=[],$.isArray(a)){for(c=0;c<a.length;c++)b.push($.toJSON(a[c])||"null");return"["+b.join(",")+"]"}if("object"==typeof a){for(c in a)if(hasOwn.call(a,c)){if("number"===(f=typeof c))d='"'+c+'"';else{if("string"!==f)continue;d=$.quoteString(c)}f=typeof a[c],"function"!==f&&"undefined"!==f&&(e=$.toJSON(a[c]),b.push(d+":"+e))}return"{"+b.join(",")+"}"}}},$.evalJSON="object"==typeof JSON&&JSON.parse?JSON.parse:function(str){return eval("("+str+")")},$.secureEvalJSON="object"==typeof JSON&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered))return eval("("+str+")");throw new SyntaxError("Error parsing JSON, source is not valid.")},$.quoteString=function(a){return a.match(escape)?'"'+a.replace(escape,function(a){var b=meta[a];return"string"==typeof b?b:(b=a.charCodeAt(),"\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16))})+'"':'"'+a+'"'}}(jQuery);
function gformBindFormatPricingFields(){jQuery(".ginput_amount, .ginput_donation_amount").bind("change",function(){gformFormatPricingField(this)}),jQuery(".ginput_amount, .ginput_donation_amount").each(function(){gformFormatPricingField(this)})}function Currency(a){this.currency=a,this.toNumber=function(a){return this.isNumeric(a)?parseFloat(a):gformCleanNumber(a,this.currency.symbol_right,this.currency.symbol_left,this.currency.decimal_separator)},this.toMoney=function(a,b){if(b=b||!1,b||(a=gformCleanNumber(a,this.currency.symbol_right,this.currency.symbol_left,this.currency.decimal_separator)),!1===a)return"";a+="",negative="","-"==a[0]&&(a=parseFloat(a.substr(1)),negative="-"),money=this.numberFormat(a,this.currency.decimals,this.currency.decimal_separator,this.currency.thousand_separator),"0.00"==money&&(negative="");var c=this.currency.symbol_left?this.currency.symbol_left+this.currency.symbol_padding:"",d=this.currency.symbol_right?this.currency.symbol_padding+this.currency.symbol_right:"";return money=negative+this.htmlDecode(c)+money+this.htmlDecode(d),money},this.numberFormat=function(a,b,c,d,e){var e=void 0===e;a=(a+"").replace(",","").replace(" ","");var f=isFinite(+a)?+a:0,g=isFinite(+b)?Math.abs(b):0,h=void 0===d?",":d,i=void 0===c?".":c,j="",k=function(a,b){var c=Math.pow(10,b);return""+Math.round(a*c)/c};return"0"==b?(f+=1e-10,j=(""+Math.round(f)).split(".")):-1==b?j=(""+f).split("."):(f+=1e-10,j=k(f,g).split(".")),j[0].length>3&&(j[0]=j[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,h)),e&&(j[1]||"").length<g&&(j[1]=j[1]||"",j[1]+=new Array(g-j[1].length+1).join("0")),j.join(i)},this.isNumeric=function(a){return gformIsNumber(a)},this.htmlDecode=function(a){var b,c,d=a,e=d.match(/&#[0-9]{1,5};/g);if(null!=e)for(var f=0;f<e.length;f++)c=e[f],b=c.substring(2,c.length-1),d=b>=-32768&&b<=65535?d.replace(c,String.fromCharCode(b)):d.replace(c,"");return d}}function gformCleanNumber(a,b,c,d){var e="",f="",g="",h=!1;a+=" ",a=a.replace(/&.*?;/g,""),a=a.replace(b,""),a=a.replace(c,"");for(var i=0;i<a.length;i++)g=a.substr(i,1),parseInt(g)>=0&&parseInt(g)<=9||g==d?e+=g:"-"==g&&(h=!0);for(var i=0;i<e.length;i++)g=e.substr(i,1),g>="0"&&g<="9"?f+=g:g==d&&(f+=".");return h&&(f="-"+f),!!gformIsNumber(f)&&parseFloat(f)}function gformGetDecimalSeparator(a){var b;switch(a){case"currency":b=new Currency(gf_global.gf_currency_config).currency.decimal_separator;break;case"decimal_comma":b=",";break;default:b="."}return b}function gformIsNumber(a){return!isNaN(parseFloat(a))&&isFinite(a)}function gformIsNumeric(a,b){switch(b){case"decimal_dot":var c=new RegExp("^(-?[0-9]{1,3}(?:,?[0-9]{3})*(?:.[0-9]+)?)$");return c.test(a);case"decimal_comma":var c=new RegExp("^(-?[0-9]{1,3}(?:.?[0-9]{3})*(?:,[0-9]+)?)$");return c.test(a)}return!1}function gformDeleteUploadedFile(a,b,c){var d=jQuery("#field_"+a+"_"+b),e=jQuery(c).parent().index();d.find(".ginput_preview").eq(e).remove(),d.find('input[type="file"],.validation_message,#extensions_message_'+a+"_"+b).removeClass("gform_hidden"),d.find(".ginput_post_image_file").show(),d.find('input[type="text"]').val("");var f=jQuery("#gform_uploaded_files_"+a).val();if(f){var g=jQuery.secureEvalJSON(f);if(g){var h="input_"+b,i=d.find("#gform_multifile_upload_"+a+"_"+b);if(i.length>0){g[h].splice(e,1);var j=i.data("settings"),k=j.gf_vars.max_files;jQuery("#"+j.gf_vars.message_id).html(""),g[h].length<k&&gfMultiFileUploader.toggleDisabled(j,!1)}else g[h]=null;jQuery("#gform_uploaded_files_"+a).val(jQuery.toJSON(g))}}}function gformIsHidden(a){return"none"==a.parents(".gfield").not(".gfield_hidden_product").css("display")}function gformCalculateTotalPrice(a){if(_gformPriceFields[a]){var b=0;_anyProductSelected=!1;for(var c=0;c<_gformPriceFields[a].length;c++)b+=gformCalculateProductPrice(a,_gformPriceFields[a][c]);if(_anyProductSelected){b+=gformGetShippingPrice(a)}window.gform_product_total&&(b=window.gform_product_total(a,b)),b=gform.applyFilters("gform_product_total",b,a);var d=jQuery(".ginput_total_"+a);if(d.length>0){var e=d.next().val(),f=gformFormatMoney(b,!0);e!=b&&d.next().val(b).change(),f!=d.first().text()&&d.html(f)}}}function gformGetShippingPrice(a){var b=jQuery(".gfield_shipping_"+a+' input[type="hidden"], .gfield_shipping_'+a+" select, .gfield_shipping_"+a+" input:checked"),c=0;return 1!=b.length||gformIsHidden(b)||(c=b.attr("type")&&"hidden"==b.attr("type").toLowerCase()?b.val():gformGetPrice(b.val())),gformToNumber(c)}function gformGetFieldId(a){var b=jQuery(a).attr("id"),c=b.split("_");return c.length<=0?0:c[c.length-1]}function gformCalculateProductPrice(a,b){var c="_"+a+"_"+b;jQuery(".gfield_option"+c+", .gfield_shipping_"+a).find("select").each(function(){var b=jQuery(this),c=gformGetPrice(b.val()),d=b.attr("id").split("_")[2];b.children("option").each(function(){var b=jQuery(this),e=gformGetOptionLabel(b,b.val(),c,a,d);b.html(e)}),b.trigger("chosen:updated")}),jQuery(".gfield_option"+c).find(".gfield_checkbox").find("input:checkbox").each(function(){var b=jQuery(this),c=b.attr("id"),d=c.split("_")[2],e=c.replace("choice_","#label_"),f=jQuery(e),g=gformGetOptionLabel(f,b.val(),0,a,d);f.html(g)}),jQuery(".gfield_option"+c+", .gfield_shipping_"+a).find(".gfield_radio").each(function(){var b=0,c=jQuery(this),d=c.attr("id"),e=d.split("_")[2],f=c.find("input:radio:checked").val();f&&(b=gformGetPrice(f)),c.find("input:radio").each(function(){var c=jQuery(this),d=c.attr("id").replace("choice_","#label_"),f=jQuery(d);if(f){var g=gformGetOptionLabel(f,c.val(),b,a,e);f.html(g)}})});var d=gformGetBasePrice(a,b),e=gformGetProductQuantity(a,b);return e>0&&(jQuery(".gfield_option"+c).find("input:checked, select").each(function(){gformIsHidden(jQuery(this))||(d+=gformGetPrice(jQuery(this).val()))}),_anyProductSelected=!0),d*=e,d=Math.round(100*d)/100}function gformGetProductQuantity(a,b){if(!gformIsProductSelected(a,b))return 0;var c,d,e=jQuery("#ginput_quantity_"+a+"_"+b);if(gformIsHidden(e))return 0;if(e.length>0)c=e.val();else if(e=jQuery(".gfield_quantity_"+a+"_"+b+" :input"),c=1,e.length>0){c=e.val();var f=e.attr("id"),g=gf_get_input_id_by_html_id(f);d=gf_get_field_number_format(g,a,"value")}return d||(d="currency"),c=gformCleanNumber(c,"","",gformGetDecimalSeparator(d)),c||(c=0),c}function gformIsProductSelected(a,b){var c="_"+a+"_"+b,d=jQuery("#ginput_base_price"+c+", .gfield_donation"+c+' input[type="text"], .gfield_product'+c+" .ginput_amount");return!(!d.val()||gformIsHidden(d))||(d=jQuery(".gfield_product"+c+" select, .gfield_product"+c+" input:checked, .gfield_donation"+c+" select, .gfield_donation"+c+" input:checked"),!(!d.val()||gformIsHidden(d)))}function gformGetBasePrice(a,b){var c="_"+a+"_"+b,d=0,e=jQuery("#ginput_base_price"+c+", .gfield_donation"+c+' input[type="text"], .gfield_product'+c+" .ginput_amount");if(e.length>0)d=e.val(),gformIsHidden(e)&&(d=0);else{e=jQuery(".gfield_product"+c+" select, .gfield_product"+c+" input:checked, .gfield_donation"+c+" select, .gfield_donation"+c+" input:checked");var f=e.val();f&&(f=f.split("|"),d=f.length>1?f[1]:0),gformIsHidden(e)&&(d=0)}return d=new Currency(gf_global.gf_currency_config).toNumber(d),!1===d?0:d}function gformFormatMoney(a,b){return gf_global.gf_currency_config?new Currency(gf_global.gf_currency_config).toMoney(a,b):a}function gformFormatPricingField(a){if(gf_global.gf_currency_config){var b=new Currency(gf_global.gf_currency_config),c=b.toMoney(jQuery(a).val());jQuery(a).val(c)}}function gformToNumber(a){return new Currency(gf_global.gf_currency_config).toNumber(a)}function gformGetPriceDifference(a,b){var c=parseFloat(b)-parseFloat(a);return price=gformFormatMoney(c,!0),c>0&&(price="+"+price),price}function gformGetOptionLabel(a,b,c,d,e){a=jQuery(a);var f=gformGetPrice(b),g=a.attr("price"),h=a.html().replace(/<span(.*)<\/span>/i,"").replace(g,""),i=gformGetPriceDifference(c,f);i=0==gformToNumber(i)?"":" "+i,a.attr("price",i);var j="option"==a[0].tagName.toLowerCase()?" "+i:"<span class='ginput_price'>"+i+"</span>",k=h+j;return window.gform_format_option_label&&(k=gform_format_option_label(k,h,j,c,f,d,e)),k}function gformGetProductIds(a,b){for(var c=jQuery(b).hasClass(a)?jQuery(b).attr("class").split(" "):jQuery(b).parents("."+a).attr("class").split(" "),d=0;d<c.length;d++)if(c[d].substr(0,a.length)==a&&c[d]!=a)return{formId:c[d].split("_")[2],productFieldId:c[d].split("_")[3]};return{formId:0,fieldId:0}}function gformGetPrice(a){var b=a.split("|"),c=new Currency(gf_global.gf_currency_config);return b.length>1&&!1!==c.toNumber(b[1])?c.toNumber(b[1]):0}function gformRegisterPriceField(a){_gformPriceFields[a.formId]||(_gformPriceFields[a.formId]=new Array);for(var b=0;b<_gformPriceFields[a.formId].length;b++)if(_gformPriceFields[a.formId][b]==a.productFieldId)return;_gformPriceFields[a.formId].push(a.productFieldId)}function gformInitPriceFields(){jQuery(".gfield_price").each(function(){gformRegisterPriceField(gformGetProductIds("gfield_price",this)),jQuery(this).on("change",'input[type="text"], input[type="number"], select',function(){var a=gformGetProductIds("gfield_price",this);0==a.formId&&(a=gformGetProductIds("gfield_shipping",this)),jQuery(document).trigger("gform_price_change",[a,this]),gformCalculateTotalPrice(a.formId)}),jQuery(this).on("click",'input[type="radio"], input[type="checkbox"]',function(){var a=gformGetProductIds("gfield_price",this);0==a.formId&&(a=gformGetProductIds("gfield_shipping",this)),jQuery(document).trigger("gform_price_change",[a,this]),gformCalculateTotalPrice(a.formId)})});for(formId in _gformPriceFields)_gformPriceFields.hasOwnProperty(formId)&&gformCalculateTotalPrice(formId)}function gformShowPasswordStrength(a){var b=jQuery("#"+a).val(),c=jQuery("#"+a+"_2").val(),d=gformPasswordStrength(b,c),e=window.gf_text["password_"+d];jQuery("#"+a+"_strength").val(d),jQuery("#"+a+"_strength_indicator").removeClass("blank mismatch short good bad strong").addClass(d).html(e)}function gformPasswordStrength(a,b){var c,d,e=0;return a.length<=0?"blank":a!=b&&b.length>0?"mismatch":a.length<4?"short":(a.match(/[0-9]/)&&(e+=10),a.match(/[a-z]/)&&(e+=26),a.match(/[A-Z]/)&&(e+=26),a.match(/[^a-zA-Z0-9]/)&&(e+=31),c=Math.log(Math.pow(e,a.length)),d=c/Math.LN2,d<40?"bad":d<56?"good":"strong")}function gformToggleCheckboxes(a){var b=jQuery(a).parent(),c=b.find("label");$checkboxes=b.parent().find("li:not( .gchoice_select_all )"),$checkboxes.each(function(){jQuery('input[type="checkbox"]',this).prop("checked",a.checked).trigger("change"),"function"==typeof jQuery('input[type="checkbox"]',this)[0].onclick&&jQuery('input[type="checkbox"]',this)[0].onclick()}),a.checked?c.html(c.data("label-deselect")):c.html(c.data("label-select"))}function gformAddListItem(a,b){var c=jQuery(a);if(!c.hasClass("gfield_icon_disabled")){var d=c.parents(".gfield_list_group"),e=d.clone(),f=d.parents(".gfield_list_container"),g=e.find(":input:last").attr("tabindex");e.find("input, select, textarea").attr("tabindex",g).not(":checkbox, :radio").val(""),e.find(":checkbox, :radio").prop("checked",!1),e=gform.applyFilters("gform_list_item_pre_add",e,d),d.after(e),gformToggleIcons(f,b),gformAdjustClasses(f),gform.doAction("gform_list_post_item_add",e,f)}}function gformDeleteListItem(a,b){var c=jQuery(a),d=c.parents(".gfield_list_group"),e=d.parents(".gfield_list_container");d.remove(),gformToggleIcons(e,b),gformAdjustClasses(e),gform.doAction("gform_list_post_item_delete",e)}function gformAdjustClasses(a){a.find(".gfield_list_group").each(function(a){var b=jQuery(this),c=(a+1)%2==0?"gfield_list_row_even":"gfield_list_row_odd";b.removeClass("gfield_list_row_odd gfield_list_row_even").addClass(c)})}function gformToggleIcons(a,b){var c=a.find(".gfield_list_group").length,d=a.find(".add_list_item");a.find(".delete_list_item").css("visibility",1==c?"hidden":"visible"),b>0&&c>=b?(d.data("title",a.find(".add_list_item").attr("title")),d.addClass("gfield_icon_disabled").attr("title","")):b>0&&(d.removeClass("gfield_icon_disabled"),d.data("title")&&d.attr("title",d.data("title")))}function gformMatchCard(a){var b=gformFindCardType(jQuery("#"+a).val()),c=jQuery("#"+a).parents(".gfield").find(".gform_card_icon_container");b?(jQuery(c).find(".gform_card_icon").removeClass("gform_card_icon_selected").addClass("gform_card_icon_inactive"),jQuery(c).find(".gform_card_icon_"+b).removeClass("gform_card_icon_inactive").addClass("gform_card_icon_selected")):jQuery(c).find(".gform_card_icon").removeClass("gform_card_icon_selected gform_card_icon_inactive")}function gformFindCardType(a){if(a.length<4)return!1;var b=window.gf_cc_rules,c=new Array;for(type in b)if(b.hasOwnProperty(type))for(i in b[type])if(b[type].hasOwnProperty(i)&&0===b[type][i].indexOf(a.substring(0,b[type][i].length))){c[c.length]=type;break}return 1==c.length&&c[0].toLowerCase()}function gformToggleCreditCard(){jQuery("#gform_payment_method_creditcard").is(":checked")?jQuery(".gform_card_fields_container").slideDown():jQuery(".gform_card_fields_container").slideUp()}function gformInitChosenFields(a,b){return jQuery(a).each(function(){var a=jQuery(this);if("rtl"==jQuery("html").attr("dir")&&a.addClass("chosen-rtl chzn-rtl"),a.is(":visible")&&0==a.siblings(".chosen-container").length){var c=gform.applyFilters("gform_chosen_options",{no_results_text:b},a);a.chosen(c)}})}function gformInitCurrencyFormatFields(a){jQuery(a).each(function(){jQuery(this).val(gformFormatMoney(jQuery(this).val()))}).change(function(a){jQuery(this).val(gformFormatMoney(jQuery(this).val()))})}function gformFormatNumber(a,b,c,d){if(void 0===c)if(window.gf_global){var e=new Currency(gf_global.gf_currency_config);c=e.currency.decimal_separator}else c=".";if(void 0===d)if(window.gf_global){var e=new Currency(gf_global.gf_currency_config);d=e.currency.thousand_separator}else d=",";var e=new Currency;return e.numberFormat(a,b,c,d,!1)}function gformToNumber(a){return new Currency(gf_global.gf_currency_config).toNumber(a)}function getMatchGroups(a,b){for(var c=new Array;b.test(a);){var d=c.length;c[d]=b.exec(a),a=a.replace(""+c[d][0],"")}return c}function gf_get_field_number_format(a,b,c){var d=rgars(window,"gf_global/number_formats/{0}/{1}".format(b,a)),e=!1;return""===d?e:e=void 0===c?!1!==d.price?d.price:d.value:d[c]}function renderRecaptcha(){jQuery(".ginput_recaptcha").each(function(){var a=jQuery(this),b={sitekey:a.data("sitekey"),theme:a.data("theme"),tabindex:a.data("tabindex")};if(a.is(":empty")){a.data("stoken")&&(b.stoken=a.data("stoken"));var c=gform.applyFilters("gform_recaptcha_callback",!1,a);c&&(b.callback=c),grecaptcha.render(this.id,b),b.tabindex&&a.find("iframe").attr("tabindex",b.tabindex),gform.doAction("gform_post_recaptcha_render",a)}})}function gformValidateFileSize(a,b){var c;if(c=jQuery(a).closest("div").siblings(".validation_message").length>0?jQuery(a).closest("div").siblings(".validation_message"):jQuery(a).siblings(".validation_message"),window.FileReader&&window.File&&window.FileList&&window.Blob){var d=a.files[0];if(d&&d.size>b){c.text(d.name+" - "+gform_gravityforms.strings.file_exceeds_limit);var e=jQuery(a);e.replaceWith(e.val("").clone(!0))}else c.text("")}}function gformInitSpinner(a,b){jQuery("#gform_"+a).submit(function(){gformAddSpinner(a,b)})}function gformAddSpinner(a,b){if(void 0!==b&&b||(b=gform.applyFilters("gform_spinner_url",gf_global.spinnerUrl,a)),0==jQuery("#gform_ajax_spinner_"+a).length){gform.applyFilters("gform_spinner_target_elem",jQuery("#gform_submit_button_"+a+", #gform_wrapper_"+a+" .gform_next_button, #gform_send_resume_link_button_"+a),a).after('<img id="gform_ajax_spinner_'+a+'"  class="gform_ajax_spinner" src="'+b+'" alt="" />')}}function gf_raw_input_change(a,b){clearTimeout(__gf_keyup_timeout);var c=jQuery(b),d=c.attr("id"),e=gf_get_input_id_by_html_id(d),f=gf_get_form_id_by_html_id(d);if(e){var g=c.is(":checkbox")||c.is(":radio")||c.is("select"),h=!g||c.is("textarea");("keyup"!=a.type||h)&&("change"!=a.type||g||h)&&("keyup"==a.type?__gf_keyup_timeout=setTimeout(function(){gf_input_change(this,f,e)},300):gf_input_change(this,f,e))}}function gf_get_input_id_by_html_id(a){var b=gf_get_ids_by_html_id(a),c=b[2];return b[3]&&(c+="."+b[3]),c}function gf_get_form_id_by_html_id(a){return gf_get_ids_by_html_id(a)[1]}function gf_get_ids_by_html_id(a){return!!a&&a.split("_")}function gf_input_change(a,b,c){gform.doAction("gform_input_change",a,b,c)}function gformExtractFieldId(a){var b=parseInt(a.toString().split(".")[0]);return b||a}function gformExtractInputIndex(a){var b=parseInt(a.toString().split(".")[1]);return b||!1}function rgars(a,b){for(var c=b.split("/"),d=a,e=0;e<c.length;e++)d=rgar(d,c[e]);return d}function rgar(a,b){return void 0!==a[b]?a[b]:""}void 0===jQuery.fn.prop&&(jQuery.fn.prop=jQuery.fn.attr),jQuery(document).ready(function(){jQuery(document).bind("gform_post_render",gformBindFormatPricingFields)});var _gformPriceFields=new Array,_anyProductSelected,GFCalc=function(formId,formulaFields){this.formId=formId,this.formulaFields=formulaFields,this.patt=/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/i,this.exprPatt=/^[0-9 -\/*\(\)]+$/i,this.isCalculating={},this.init=function(a,b){var c=this;jQuery(document).bind("gform_post_conditional_logic",function(){c.runCalcs(a,b)});for(var d=0;d<b.length;d++){var e=jQuery.extend({},b[d]);this.runCalc(e,a),this.bindCalcEvents(e,a)}},this.runCalc=function(formulaField,formId){var calcObj=this,field=jQuery("#field_"+formId+"_"+formulaField.field_id),formulaInput=field.hasClass("gfield_price")?jQuery("#ginput_base_price_"+formId+"_"+formulaField.field_id):jQuery("#input_"+formId+"_"+formulaField.field_id),previous_val=formulaInput.val(),formula=gform.applyFilters("gform_calculation_formula",formulaField.formula,formulaField,formId,calcObj),expr=calcObj.replaceFieldTags(formId,formula,formulaField).replace(/(\r\n|\n|\r)/gm,""),result="";if(calcObj.exprPatt.test(expr))try{result=eval(expr)}catch(a){}isFinite(result)||(result=0),window.gform_calculation_result&&(result=window.gform_calculation_result(result,formulaField,formId,calcObj),window.console&&console.log('"gform_calculation_result" function is deprecated since version 1.8! Use "gform_calculation_result" JS hook instead.')),result=gform.applyFilters("gform_calculation_result",result,formulaField,formId,calcObj);var formattedResult=gform.applyFilters("gform_calculation_format_result",!1,result,formulaField,formId,calcObj),numberFormat=gf_get_field_number_format(formulaField.field_id,formId);if(!1!==formattedResult)result=formattedResult;else if(field.hasClass("gfield_price")||"currency"==numberFormat)result=gformFormatMoney(result||0,!0);else{var decimalSeparator=".",thousandSeparator=",";"decimal_comma"==numberFormat&&(decimalSeparator=",",thousandSeparator="."),result=gformFormatNumber(result,gformIsNumber(formulaField.rounding)?formulaField.rounding:-1,decimalSeparator,thousandSeparator)}result!=previous_val&&(field.hasClass("gfield_price")?(jQuery("#input_"+formId+"_"+formulaField.field_id).text(result),formulaInput.val(result).trigger("change"),gformCalculateTotalPrice(formId)):formulaInput.val(result).trigger("change"))},this.runCalcs=function(a,b){for(var c=0;c<b.length;c++){var d=jQuery.extend({},b[c]);this.runCalc(d,a)}},this.bindCalcEvents=function(a,b){var c=this,d=a.field_id,e=getMatchGroups(a.formula,this.patt);c.isCalculating[d]=!1;for(var f in e)if(e.hasOwnProperty(f)){var g=e[f][1],h=parseInt(g),i=jQuery("#field_"+b+"_"+h).find('input[name="input_'+g+'"], select[name="input_'+g+'"]');"checkbox"==i.prop("type")||"radio"==i.prop("type")?jQuery(i).click(function(){c.bindCalcEvent(g,a,b,0)}):i.is("select")||"hidden"==i.prop("type")?jQuery(i).change(function(){c.bindCalcEvent(g,a,b,0)}):jQuery(i).keydown(function(){c.bindCalcEvent(g,a,b)}).change(function(){c.bindCalcEvent(g,a,b,0)}),gform.doAction("gform_post_calculation_events",e[f],a,b,c)}},this.bindCalcEvent=function(a,b,c,d){var e=this,f=b.field_id;d=void 0==d?345:d,e.isCalculating[f][a]&&clearTimeout(e.isCalculating[f][a]),e.isCalculating[f][a]=window.setTimeout(function(){e.runCalc(b,c)},d)},this.replaceFieldTags=function(a,b,c){var d=getMatchGroups(b,this.patt);for(i in d)if(d.hasOwnProperty(i)){var e=d[i][1],f=parseInt(e),g=(d[i][3],0),h=jQuery("#field_"+a+"_"+f).find('input[name="input_'+e+'"], select[name="input_'+e+'"]');(h.length>1||"checkbox"==h.prop("type"))&&(h=h.filter(":checked"));var j=!window.gf_check_field_rule||"show"==gf_check_field_rule(a,f,!0,"");if(h.length>0&&j){var k=h.val();k=k.split("|"),g=k.length>1?k[1]:h.val()}var l=gf_get_field_number_format(f,a);l||(l=gf_get_field_number_format(c.field_id,a));var m=gformGetDecimalSeparator(l);g=gform.applyFilters("gform_merge_tag_value_pre_calculation",g,d[i],j,c,a),g=gformCleanNumber(g,"","",m),g||(g=0),b=b.replace(d[i][0],g)}return b},this.init(formId,formulaFields)},gform={hooks:{action:{},filter:{}},addAction:function(a,b,c,d){gform.addHook("action",a,b,c,d)},addFilter:function(a,b,c,d){gform.addHook("filter",a,b,c,d)},doAction:function(a){gform.doHook("action",a,arguments)},applyFilters:function(a){return gform.doHook("filter",a,arguments)},removeAction:function(a,b){gform.removeHook("action",a,b)},removeFilter:function(a,b,c){gform.removeHook("filter",a,b,c)},addHook:function(a,b,c,d,e){void 0==gform.hooks[a][b]&&(gform.hooks[a][b]=[]);var f=gform.hooks[a][b];void 0==e&&(e=b+"_"+f.length),void 0==d&&(d=10),gform.hooks[a][b].push({tag:e,callable:c,priority:d})},doHook:function(a,b,c){if(c=Array.prototype.slice.call(c,1),void 0!=gform.hooks[a][b]){var d,e=gform.hooks[a][b];e.sort(function(a,b){return a.priority-b.priority});for(var f=0;f<e.length;f++)d=e[f].callable,"function"!=typeof d&&(d=window[d]),"action"==a?d.apply(null,c):c[0]=d.apply(null,c)}if("filter"==a)return c[0]},removeHook:function(a,b,c,d){if(void 0!=gform.hooks[a][b])for(var e=gform.hooks[a][b],f=e.length-1;f>=0;f--)void 0!=d&&d!=e[f].tag||void 0!=c&&c!=e[f].priority||e.splice(f,1)}};!function(a,b){function c(c){function h(a,c){b("#"+a).prepend("<li>"+e(c)+"</li>")}function i(){var a,c="#gform_uploaded_files_"+r,d=b(c);return a=d.val(),a=void 0===a||""===a?{}:b.parseJSON(a)}function j(a){var b=i(),c=n(a);return void 0===b[c]&&(b[c]=[]),b[c]}function k(a){return j(a).length}function l(a,b){var c=j(a);c.unshift(b),m(a,c)}function m(a,c){var d=i(),e=b("#gform_uploaded_files_"+r);d[n(a)]=c,e.val(b.toJSON(d))}function n(a){return"input_"+a}function o(a){a.preventDefault()}var p=b(c).data("settings"),q=new plupload.Uploader(p);r=q.settings.multipart_params.form_id,a.uploaders[p.container]=q;var r,s;q.bind("Init",function(c,d){c.features.dragdrop||b(".gform_drop_instructions").hide();var e=c.settings.multipart_params.field_id,f=parseInt(c.settings.gf_vars.max_files),g=k(e);f>0&&g>=f&&a.toggleDisabled(c.settings,!0)}),a.toggleDisabled=function(a,c){b("string"==typeof a.browse_button?"#"+a.browse_button:a.browse_button).prop("disabled",c)},q.init(),q.bind("BeforeUpload",function(a,b){a.settings.multipart_params.original_filename=b.name}),q.bind("FilesAdded",function(c,g){var i,j=parseInt(c.settings.gf_vars.max_files),l=c.settings.multipart_params.field_id,m=k(l),n=c.settings.gf_vars.disallowed_extensions;if(j>0&&m>=j)return void b.each(g,function(a,b){c.removeFile(b)});b.each(g,function(a,d){if(i=d.name.split(".").pop(),b.inArray(i,n)>-1)return h(c.settings.gf_vars.message_id,d.name+" - "+f.illegal_extension),void c.removeFile(d);if(d.status==plupload.FAILED||j>0&&m>=j)return void c.removeFile(d);var g=void 0!==d.size?plupload.formatSize(d.size):f.in_progress,k='<div id="'+d.id+'" class="ginput_preview">'+e(d.name)+" ("+g+') <b></b> <a href="javascript:void(0)" title="'+f.cancel_upload+"\" onclick='$this=jQuery(this); var uploader = gfMultiFileUploader.uploaders."+c.settings.container.id+';uploader.stop();uploader.removeFile(uploader.getFile("'+d.id+'"));$this.after("'+f.cancelled+"\"); uploader.start();$this.remove();' onkeypress='$this=jQuery(this); var uploader = gfMultiFileUploader.uploaders."+c.settings.container.id+';uploader.stop();uploader.removeFile(uploader.getFile("'+d.id+'"));$this.after("'+f.cancelled+"\"); uploader.start();$this.remove();'>"+f.cancel+"</a></div>";b("#"+c.settings.filelist).prepend(k),m++}),c.refresh();var o="form#gform_"+r,p="input:hidden[name='gform_unique_id']",q=o+" "+p,t=b(q);0==t.length&&(t=b(p)),s=t.val(),""===s&&(s=d(),t.val(s)),j>0&&m>=j&&(a.toggleDisabled(c.settings,!0),h(c.settings.gf_vars.message_id,f.max_reached)),c.settings.multipart_params.gform_unique_id=s,c.start()}),q.bind("UploadProgress",function(a,c){var d=c.percent+"%";b("#"+c.id+" b").html(d)}),q.bind("Error",function(a,c){if(c.code===plupload.FILE_EXTENSION_ERROR){var d=void 0!==a.settings.filters.mime_types?a.settings.filters.mime_types[0].extensions:a.settings.filters[0].extensions;h(a.settings.gf_vars.message_id,c.file.name+" - "+f.invalid_file_extension+" "+d)}else if(c.code===plupload.FILE_SIZE_ERROR)h(a.settings.gf_vars.message_id,c.file.name+" - "+f.file_exceeds_limit);else{var e="Error: "+c.code+", Message: "+c.message+(c.file?", File: "+c.file.name:"");h(a.settings.gf_vars.message_id,e)}b("#"+c.file.id).html(""),a.refresh()}),q.bind("ChunkUploaded",function(a,c,d){var e=b.secureEvalJSON(d.response);"error"==e.status&&(a.removeFile(c),h(a.settings.gf_vars.message_id,c.name+" - "+e.error.message),b("#"+c.id).html(""))}),q.bind("FileUploaded",function(a,c,d){if(a.getFile(c.id)){var i=b.secureEvalJSON(d.response);if("error"==i.status)return h(a.settings.gf_vars.message_id,c.name+" - "+i.error.message),void b("#"+c.id).html("");var j="<strong>"+e(c.name)+"</strong>",k=a.settings.multipart_params.form_id,m=a.settings.multipart_params.field_id;j="<img class='gform_delete' src='"+g+"/delete.png' onclick='gformDeleteUploadedFile("+k+","+m+", this);' onkeypress='gformDeleteUploadedFile("+k+","+m+", this);' alt='"+f.delete_file+"' title='"+f.delete_file+"' /> "+j,j=gform.applyFilters("gform_file_upload_markup",j,c,a,f,g),b("#"+c.id).html(j),100==c.percent&&(i.status&&"ok"==i.status?l(m,i.data):h(a.settings.gf_vars.message_id,f.unknown_error+": "+c.name))}}),b("#"+p.drop_element).on({dragenter:o,dragover:o})}function d(){return"xxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:3&b|8).toString(16)})}function e(a){return b("<div/>").text(a).html()}a.uploaders={};var f="undefined"!=typeof gform_gravityforms?gform_gravityforms.strings:{},g="undefined"!=typeof gform_gravityforms?gform_gravityforms.vars.images_url:"";b(document).bind("gform_post_render",function(d,e){b("form#gform_"+e+" .gform_fileupload_multifile").each(function(){c(this)});var g=b("form#gform_"+e);g.length>0&&g.submit(function(){var c=!1;if(b.each(a.uploaders,function(a,b){if(b.total.queued>0)return c=!0,!1}),c)return alert(f.currently_uploading),window["gf_submitting_"+e]=!1,b("#gform_ajax_spinner_"+e).remove(),!1})}),b(document).bind("gform_post_conditional_logic",function(c,d,e,f){f||b.each(a.uploaders,function(a,b){b.refresh()})}),b(document).ready(function(){"undefined"!=typeof adminpage&&"toplevel_page_gf_edit_forms"===adminpage||"undefined"==typeof plupload?b(".gform_button_select_files").prop("disabled",!0):"undefined"!=typeof adminpage&&adminpage.indexOf("_page_gf_entries")>-1&&b(".gform_fileupload_multifile").each(function(){c(this)})}),a.setup=function(a){c(a)}}(window.gfMultiFileUploader=window.gfMultiFileUploader||{},jQuery);var __gf_keyup_timeout;jQuery(document).on("change keyup",".gfield_trigger_change input, .gfield_trigger_change select, .gfield_trigger_change textarea",function(a){gf_raw_input_change(a,this)}),jQuery(document).on("submit.gravityforms",".gform_wrapper form",function(a){var b,c=jQuery(this).closest(".gform_wrapper"),d=c.attr("id").split("_")[2],e=c.find(".gform_page").length>0,f=c.find('input[name^="gform_source_page_number_"]').val(),g=c.find('input[name^="gform_target_page_number_"]').val();if(e){var h=c.find(".gform_page:visible");b=h.find(".gform_page_footer .gform_next_button"),0===b.length&&(b=h.find(".gform_page_footer .gform_button"))}else b=c.find(".gform_footer .gform_button");var i="0"===g,j=!i&&g>f;"1"===jQuery("#gform_save_"+d).val()||b.is(":visible")||!i&&!j||(window["gf_submitting_"+d]=!1,c.find(".gform_ajax_spinner").remove(),a.preventDefault())}),window.rgars,window.rgar,String.prototype.format=function(){var a=arguments;return this.replace(/{(\d+)}/g,function(b,c){return void 0!==a[c]?a[c]:b})};
function gf_apply_rules(a,b,c){var d=0;jQuery(document).trigger("gform_pre_conditional_logic",[a,b,c]);for(var e=0;e<b.length;e++)gf_apply_field_rule(a,b[e],c,function(){++d==b.length&&(jQuery(document).trigger("gform_post_conditional_logic",[a,b,c]),window.gformCalculateTotalPrice&&window.gformCalculateTotalPrice(a))})}function gf_check_field_rule(a,b,c,d){if(!window.gf_form_conditional_logic||!window.gf_form_conditional_logic[a]||!window.gf_form_conditional_logic[a].logic[b])return"show";var e=window.gf_form_conditional_logic[a].logic[b],f=gf_get_field_action(a,e.section);return"hide"!=f&&(f=gf_get_field_action(a,e.field)),f}function gf_apply_field_rule(a,b,c,d){var e=gf_check_field_rule(a,b,c,d);gf_do_field_action(a,e,b,c,d);var f=window.gf_form_conditional_logic[a].logic[b];f.nextButton&&(e=gf_get_field_action(a,f.nextButton),gf_do_next_button_action(a,e,b,c))}function gf_get_field_action(a,b){if(!b)return"show";for(var c=0,d=0;d<b.rules.length;d++){gf_is_match(a,b.rules[d])&&c++}return"all"==b.logicType&&c==b.rules.length||"any"==b.logicType&&c>0?b.actionType:"show"==b.actionType?"hide":"show"}function gf_is_match(a,b){var c,d=jQuery,e=b.fieldId,f=gformExtractFieldId(e),g=gformExtractInputIndex(e),h=!1!==g;c=d(h?"#input_{0}_{1}_{2}".format(a,f,g):'input[id="input_{0}_{1}"], input[id^="input_{0}_{1}_"], input[id^="choice_{0}_{1}_"], select#input_{0}_{1}, textarea#input_{0}_{1}'.format(a,b.fieldId));var i=-1!==d.inArray(c.attr("type"),["checkbox","radio"]),j=i?gf_is_match_checkable(c,b,a,f):gf_is_match_default(c.eq(0),b,a,f);return gform.applyFilters("gform_is_value_match",j,a,b)}function gf_is_match_checkable(a,b,c,d){var e=!1;return a.each(function(){var a=jQuery(this),f=gf_get_value(a.val()),g=-1!==jQuery.inArray(b.operator,["<",">"]),h=-1!==jQuery.inArray(b.operator,["contains","starts_with","ends_with"]);if(f==b.value||g||h)return a.is(":checked")?"gf_other_choice"==f&&(f=$("#input_{0}_{1}_other".format(c,d)).val()):f="",gf_matches_operation(f,b.value,b.operator)?(e=!0,!1):void 0}),e}function gf_is_match_default(a,b,c,d){for(var e=a.val(),f=e instanceof Array?e:[e],g=0,h=0;h<f.length;h++){var i=!f[h]||f[h].indexOf("|")>=0,j=gf_get_value(f[h]),k=gf_get_field_number_format(b.fieldId,c,"value");k&&!i&&(j=gf_format_number(j,k));gf_matches_operation(j,b.value,b.operator)&&g++}return"isnot"==b.operator?g==f.length:g>0}function gf_format_number(a,b){return decimalSeparator=".","currency"==b?decimalSeparator=gformGetDecimalSeparator("currency"):"decimal_comma"==b?decimalSeparator=",":"decimal_dot"==b&&(decimalSeparator="."),a=gformCleanNumber(a,"","",decimalSeparator),a||(a=0),number=a.toString(),number}function gf_try_convert_float(a){var b="decimal_dot";if(gformIsNumeric(a,b)){var c="decimal_comma"==b?",":".";return gformCleanNumber(a,"","",c)}return a}function gf_matches_operation(a,b,c){switch(a=a?a.toLowerCase():"",b=b?b.toLowerCase():"",c){case"is":return a==b;case"isnot":return a!=b;case">":return a=gf_try_convert_float(a),b=gf_try_convert_float(b),!(!gformIsNumber(a)||!gformIsNumber(b))&&a>b;case"<":return a=gf_try_convert_float(a),b=gf_try_convert_float(b),!(!gformIsNumber(a)||!gformIsNumber(b))&&a<b;case"contains":return a.indexOf(b)>=0;case"starts_with":return 0==a.indexOf(b);case"ends_with":var d=a.length-b.length;if(d<0)return!1;return b==a.substring(d)}return!1}function gf_get_value(a){return a?(a=a.split("|"),a[0]):""}function gf_do_field_action(a,b,c,d,e){for(var f=window.gf_form_conditional_logic[a],g=f.dependents[c],h=0;h<g.length;h++){var i=0==c?"#gform_submit_button_"+a:"#field_"+a+"_"+g[h],j=f.defaults[g[h]];do_callback=h+1==g.length?e:null,gf_do_action(b,i,f.animation,j,d,do_callback,a),gform.doAction("gform_post_conditional_logic_field_action",a,b,i,j,d)}}function gf_do_next_button_action(a,b,c,d){gf_do_action(b,"#gform_next_button_"+a+"_"+c,window.gf_form_conditional_logic[a].animation,null,d,null,a)}function gf_do_action(a,b,c,d,e,f,g){var h=jQuery(b);if(h.data("gf-disabled-assessed")||(h.find(":input:hidden:disabled").addClass("gf-default-disabled"),h.data("gf-disabled-assessed",!0)),"show"==a)if(h.find("select").each(function(){$select=jQuery(this),$select.attr("tabindex",$select.data("tabindex"))}),c&&!e)h.length>0?(h.find(":input:hidden:not(.gf-default-disabled)").prop("disabled",!1),h.slideDown(f)):f&&f();else{var i=h.data("gf_display");""!=i&&"none"!=i||(i="list-item"),h.find(":input:hidden:not(.gf-default-disabled)").prop("disabled",!1),h.css("display",i),f&&f()}else{var j=h.children().first();if(j.length>0){gform.applyFilters("gform_reset_pre_conditional_logic_field_action",!0,g,b,d,e)&&!gformIsHidden(j)&&gf_reset_to_default(b,d)}h.find("select").each(function(){$select=jQuery(this),$select.data("tabindex",$select.attr("tabindex")).removeAttr("tabindex")}),h.data("gf_display")||h.data("gf_display",h.css("display")),c&&!e?h.length>0&&h.is(":visible")?h.slideUp(f):f&&f():(h.hide(),h.find(":input:hidden:not(.gf-default-disabled)").prop("disabled",!0),f&&f())}}function gf_reset_to_default(a,b){var c=jQuery(a).find(".gfield_date_month input, .gfield_date_day input, .gfield_date_year input, .gfield_date_dropdown_month select, .gfield_date_dropdown_day select, .gfield_date_dropdown_year select");if(c.length>0)return void c.each(function(){var a=jQuery(this);if(b){var c="d";a.parents().hasClass("gfield_date_month")||a.parents().hasClass("gfield_date_dropdown_month")?c="m":(a.parents().hasClass("gfield_date_year")||a.parents().hasClass("gfield_date_dropdown_year"))&&(c="y"),val=b[c]}else val="";"SELECT"==a.prop("tagName")&&""!=val&&(val=parseInt(val)),a.val()!=val?a.val(val).trigger("change"):a.val(val)});var d=jQuery(a).find('select, input[type="text"]:not([id*="_shim"]), input[type="number"], textarea'),e=0;d.each(function(){var a="",c=jQuery(this);if("gf_other_choice"==c.prev("input").attr("value"))a=c.attr("value");else if(jQuery.isArray(b))a=b[e];else if(jQuery.isPlainObject(b)){if(!(a=b[c.attr("name")])){var d=c.attr("id").split("_").slice(2).join(".");a=b[d]}}else b&&(a=b);c.is("select:not([multiple])")&&!a&&(a=c.find("option").not(":disabled").eq(0).val()),c.val()!=a?(c.val(a).trigger("change"),c.is("select")&&c.next().hasClass("chosen-container")&&c.trigger("chosen:updated")):c.val(a),e++}),jQuery(a).find('input[type="radio"], input[type="checkbox"]:not(".copy_values_activated")').each(function(){var a=!!jQuery(this).is(":checked"),c=!!b&&jQuery.inArray(jQuery(this).attr("id"),b)>-1;a!=c&&("checkbox"==jQuery(this).attr("type")?jQuery(this).trigger("click"):(jQuery(this).prop("checked",c),jQuery(this).trigger("click").prop("checked",c)))})}var __gf_timeout_handle;gform.addAction("gform_input_change",function(a,b,c){if(window.gf_form_conditional_logic){var d=rgars(gf_form_conditional_logic,[b,"fields",gformExtractFieldId(c)].join("/"));d&&gf_apply_rules(b,d)}},10);
var MXI_DEBUG=!1;!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){for(var d=0;d<c.length;d++){for(var e=a,f=c[d],h=f.split(/[.\/]/),i=0;i<h.length-1;++i)e[h[i]]===b&&(e[h[i]]={}),e=e[h[i]];e[h[h.length-1]]=g[f]}}var g={};d("moxie/core/utils/Basic",[],function(){var a=function(a){var b;return a===b?"undefined":null===a?"null":a.nodeType?"node":{}.toString.call(a).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},b=function(d){var e;return c(arguments,function(f,h){h>0&&c(f,function(c,f){c!==e&&(a(d[f])===a(c)&&~g(a(c),["array","object"])?b(d[f],c):d[f]=c)})}),d},c=function(b,c){var d,e,f;if(b)if("number"===a(b.length)){for(f=0,d=b.length;f<d;f++)if(c(b[f],f)===!1)return}else if("object"===a(b))for(e in b)if(b.hasOwnProperty(e)&&c(b[e],e)===!1)return},d=function(b){var c;if(!b||"object"!==a(b))return!0;for(c in b)return!1;return!0},e=function(b,c){function d(e){"function"===a(b[e])&&b[e](function(a){++e<f&&!a?d(e):c(a)})}var e=0,f=b.length;"function"!==a(c)&&(c=function(){}),b&&b.length||c(),d(e)},f=function(a,b){var d=0,e=a.length,f=new Array(e);c(a,function(a,c){a(function(a){if(a)return b(a);var g=[].slice.call(arguments);g.shift(),f[c]=g,d++,d===e&&(f.unshift(null),b.apply(this,f))})})},g=function(a,b){if(b){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c}return-1},h=function(b,c){var d=[];"array"!==a(b)&&(b=[b]),"array"!==a(c)&&(c=[c]);for(var e in b)g(b[e],c)===-1&&d.push(b[e]);return!!d.length&&d},i=function(a,b){var d=[];return c(a,function(a){g(a,b)!==-1&&d.push(a)}),d.length?d:null},j=function(a){var b,c=[];for(b=0;b<a.length;b++)c[b]=a[b];return c},k=function(){var a=0;return function(b){var c,d=(new Date).getTime().toString(32);for(c=0;c<5;c++)d+=Math.floor(65535*Math.random()).toString(32);return(b||"o_")+d+(a++).toString(32)}}(),l=function(a){return a?String.prototype.trim?String.prototype.trim.call(a):a.toString().replace(/^\s*/,"").replace(/\s*$/,""):a},m=function(a){if("string"!=typeof a)return a;var b,c={t:1099511627776,g:1073741824,m:1048576,k:1024};return a=/^([0-9\.]+)([tmgk]?)$/.exec(a.toLowerCase().replace(/[^0-9\.tmkg]/g,"")),b=a[2],a=+a[1],c.hasOwnProperty(b)&&(a*=c[b]),Math.floor(a)},n=function(b){var c=[].slice.call(arguments,1);return b.replace(/%[a-z]/g,function(){var b=c.shift();return"undefined"!==a(b)?b:""})};return{guid:k,typeOf:a,extend:b,each:c,isEmptyObj:d,inSeries:e,inParallel:f,inArray:g,arrayDiff:h,arrayIntersect:i,toArray:j,trim:l,sprintf:n,parseSizeStr:m}}),d("moxie/core/utils/Env",["moxie/core/utils/Basic"],function(a){function b(a,b,c){var d=0,e=0,f=0,g={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},h=function(a){return a=(""+a).replace(/[_\-+]/g,"."),a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),a.length?a.split("."):[-8]},i=function(a){return a?isNaN(a)?g[a]||-7:parseInt(a,10):0};for(a=h(a),b=h(b),e=Math.max(a.length,b.length),d=0;d<e;d++)if(a[d]!=b[d]){if(a[d]=i(a[d]),b[d]=i(b[d]),a[d]<b[d]){f=-1;break}if(a[d]>b[d]){f=1;break}}if(!c)return f;switch(c){case">":case"gt":return f>0;case">=":case"ge":return f>=0;case"<=":case"le":return f<=0;case"==":case"=":case"eq":return 0===f;case"<>":case"!=":case"ne":return 0!==f;case"":case"<":case"lt":return f<0;default:return null}}var c=function(a){var b="",c="?",d="function",e="undefined",f="object",g="name",h="version",i={has:function(a,b){return b.toLowerCase().indexOf(a.toLowerCase())!==-1},lowerize:function(a){return a.toLowerCase()}},j={rgx:function(){for(var b,c,g,h,i,j,k,l=0,m=arguments;l<m.length;l+=2){var n=m[l],o=m[l+1];if(typeof b===e){b={};for(h in o)i=o[h],typeof i===f?b[i[0]]=a:b[i]=a}for(c=g=0;c<n.length;c++)if(j=n[c].exec(this.getUA())){for(h=0;h<o.length;h++)k=j[++g],i=o[h],typeof i===f&&i.length>0?2==i.length?typeof i[1]==d?b[i[0]]=i[1].call(this,k):b[i[0]]=i[1]:3==i.length?typeof i[1]!==d||i[1].exec&&i[1].test?b[i[0]]=k?k.replace(i[1],i[2]):a:b[i[0]]=k?i[1].call(this,k,i[2]):a:4==i.length&&(b[i[0]]=k?i[3].call(this,k.replace(i[1],i[2])):a):b[i]=k?k:a;break}if(j)break}return b},str:function(b,d){for(var e in d)if(typeof d[e]===f&&d[e].length>0){for(var g=0;g<d[e].length;g++)if(i.has(d[e][g],b))return e===c?a:e}else if(i.has(d[e],b))return e===c?a:e;return b}},k={browser:{oldsafari:{major:{1:["/8","/1","/3"],2:"/4","?":"/"},version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",RT:"ARM"}}}},l={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[g,h],[/\s(opr)\/([\w\.]+)/i],[[g,"Opera"],h],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i],[g,h],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[g,"IE"],h],[/(edge)\/((\d+)?[\w\.]+)/i],[g,h],[/(yabrowser)\/([\w\.]+)/i],[[g,"Yandex"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[g,/_/g," "],h],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i],[g,h],[/(dolfin)\/([\w\.]+)/i],[[g,"Dolphin"],h],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[g,"Chrome"],h],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[h,[g,"MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],[h,[g,"Android Browser"]],[/FBAV\/([\w\.]+);/i],[h,[g,"Facebook"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[h,[g,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[h,g],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[g,[h,j.str,k.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[g,h],[/(navigator|netscape)\/([\w\.-]+)/i],[[g,"Netscape"],h],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[g,h]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[h,[g,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[g,h],[/rv\:([\w\.]+).*(gecko)/i],[h,g]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[g,h],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[g,[h,j.str,k.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[g,"Windows"],[h,j.str,k.os.windows.version]],[/\((bb)(10);/i],[[g,"BlackBerry"],h],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[g,h],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[g,"Symbian"],h],[/\((series40);/i],[g],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[g,"Firefox OS"],h],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[g,h],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[g,"Chromium OS"],h],[/(sunos)\s?([\w\.]+\d)*/i],[[g,"Solaris"],h],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[g,h],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[g,"iOS"],[h,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[g,"Mac OS"],[h,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[g,h]]},m=function(a){var c=a||(window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:b);this.getBrowser=function(){return j.rgx.apply(this,l.browser)},this.getEngine=function(){return j.rgx.apply(this,l.engine)},this.getOS=function(){return j.rgx.apply(this,l.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS()}},this.getUA=function(){return c},this.setUA=function(a){return c=a,this},this.setUA(c)};return m}(),d=function(){var b={define_property:function(){return!1}(),create_canvas:function(){var a=document.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))}(),return_response_type:function(b){try{if(a.inArray(b,["","text","document"])!==-1)return!0;if(window.XMLHttpRequest){var c=new XMLHttpRequest;if(c.open("get","/"),"responseType"in c)return c.responseType=b,c.responseType===b}}catch(d){}return!1},use_data_uri:function(){var a=new Image;return a.onload=function(){b.use_data_uri=1===a.width&&1===a.height},setTimeout(function(){a.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1}(),use_data_uri_over32kb:function(){return b.use_data_uri&&("IE"!==f.browser||f.version>=9)},use_data_uri_of:function(a){return b.use_data_uri&&a<33e3||b.use_data_uri_over32kb()},use_fileinput:function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/))return!1;var a=document.createElement("input");return a.setAttribute("type","file"),!a.disabled}};return function(c){var d=[].slice.call(arguments);return d.shift(),"function"===a.typeOf(b[c])?b[c].apply(this,d):!!b[c]}}(),e=(new c).getResult(),f={can:d,uaParser:c,browser:e.browser.name,version:e.browser.version,os:e.os.name,osVersion:e.os.version,verComp:b,global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return f.OS=f.os,MXI_DEBUG&&(f.debug={runtime:!0,events:!1},f.log=function(){function b(a){d.appendChild(document.createTextNode(a+"\n"))}var c=arguments[0];if("string"===a.typeOf(c)&&(c=a.sprintf.apply(this,arguments)),window&&window.console&&window.console.log)window.console.log(c);else if(document){var d=document.getElementById("moxie-console");d||(d=document.createElement("pre"),d.id="moxie-console",document.body.appendChild(d)),a.inArray(a.typeOf(c),["object","array"])!==-1?b(c):d.appendChild(document.createTextNode(c+"\n"))}}),f}),d("moxie/core/I18n",["moxie/core/utils/Basic"],function(a){var b={};return{addI18n:function(c){return a.extend(b,c)},translate:function(a){return b[a]||a},_:function(a){return this.translate(a)},sprintf:function(b){var c=[].slice.call(arguments,1);return b.replace(/%[a-z]/g,function(){var b=c.shift();return"undefined"!==a.typeOf(b)?b:""})}}}),d("moxie/core/utils/Mime",["moxie/core/utils/Basic","moxie/core/I18n"],function(a,b){var c="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",d={mimes:{},extensions:{},addMimeType:function(a){var b,c,d,e=a.split(/,/);for(b=0;b<e.length;b+=2){for(d=e[b+1].split(/ /),c=0;c<d.length;c++)this.mimes[d[c]]=e[b];this.extensions[e[b]]=d}},extList2mimes:function(b,c){var d,e,f,g,h=this,i=[];for(e=0;e<b.length;e++)for(d=b[e].extensions.split(/\s*,\s*/),f=0;f<d.length;f++){if("*"===d[f])return[];if(g=h.mimes[d[f]],g&&a.inArray(g,i)===-1&&i.push(g),c&&/^\w+$/.test(d[f]))i.push("."+d[f]);else if(!g)return[]}return i},mimes2exts:function(b){var c=this,d=[];return a.each(b,function(b){if("*"===b)return d=[],!1;var e=b.match(/^(\w+)\/(\*|\w+)$/);e&&("*"===e[2]?a.each(c.extensions,function(a,b){new RegExp("^"+e[1]+"/").test(b)&&[].push.apply(d,c.extensions[b])}):c.extensions[b]&&[].push.apply(d,c.extensions[b]))}),d},mimes2extList:function(c){var d=[],e=[];return"string"===a.typeOf(c)&&(c=a.trim(c).split(/\s*,\s*/)),e=this.mimes2exts(c),d.push({title:b.translate("Files"),extensions:e.length?e.join(","):"*"}),d.mimes=c,d},getFileExtension:function(a){var b=a&&a.match(/\.([^.]+)$/);return b?b[1].toLowerCase():""},getFileMime:function(a){return this.mimes[this.getFileExtension(a)]||""}};return d.addMimeType(c),d}),d("moxie/core/utils/Dom",["moxie/core/utils/Env"],function(a){var b=function(a){return"string"!=typeof a?a:document.getElementById(a)},c=function(a,b){if(!a.className)return!1;var c=new RegExp("(^|\\s+)"+b+"(\\s+|$)");return c.test(a.className)},d=function(a,b){c(a,b)||(a.className=a.className?a.className.replace(/\s+$/,"")+" "+b:b)},e=function(a,b){if(a.className){var c=new RegExp("(^|\\s+)"+b+"(\\s+|$)");a.className=a.className.replace(c,function(a,b,c){return" "===b&&" "===c?" ":""})}},f=function(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null)[b]:void 0},g=function(b,c){function d(a){var b,c,d=0,e=0;return a&&(c=a.getBoundingClientRect(),b="CSS1Compat"===j.compatMode?j.documentElement:j.body,d=c.left+b.scrollLeft,e=c.top+b.scrollTop),{x:d,y:e}}var e,f,g,h=0,i=0,j=document;if(b=b,c=c||j.body,b&&b.getBoundingClientRect&&"IE"===a.browser&&(!j.documentMode||j.documentMode<8))return f=d(b),g=d(c),{x:f.x-g.x,y:f.y-g.y};for(e=b;e&&e!=c&&e.nodeType;)h+=e.offsetLeft||0,i+=e.offsetTop||0,e=e.offsetParent;for(e=b.parentNode;e&&e!=c&&e.nodeType;)h-=e.scrollLeft||0,i-=e.scrollTop||0,e=e.parentNode;return{x:h,y:i}},h=function(a){return{w:a.offsetWidth||a.clientWidth,h:a.offsetHeight||a.clientHeight}};return{get:b,hasClass:c,addClass:d,removeClass:e,getStyle:f,getPos:g,getSize:h}}),d("moxie/core/Exceptions",["moxie/core/utils/Basic"],function(a){function b(a,b){var c;for(c in a)if(a[c]===b)return c;return null}return{RuntimeError:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": RuntimeError "+this.code}var d={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return a.extend(c,d),c.prototype=Error.prototype,c}(),OperationNotAllowedException:function(){function b(a){this.code=a,this.name="OperationNotAllowedException"}return a.extend(b,{NOT_ALLOWED_ERR:1}),b.prototype=Error.prototype,b}(),ImageError:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": ImageError "+this.code}var d={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2,INVALID_META_ERR:3};return a.extend(c,d),c.prototype=Error.prototype,c}(),FileException:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": FileException "+this.code}var d={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return a.extend(c,d),c.prototype=Error.prototype,c}(),DOMException:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+": DOMException "+this.code}var d={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return a.extend(c,d),c.prototype=Error.prototype,c}(),EventException:function(){function b(a){this.code=a,this.name="EventException"}return a.extend(b,{UNSPECIFIED_EVENT_TYPE_ERR:0}),b.prototype=Error.prototype,b}()}}),d("moxie/core/EventTarget",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic"],function(a,b,c){function d(){var d={};c.extend(this,{uid:null,init:function(){this.uid||(this.uid=c.guid("uid_"))},addEventListener:function(a,b,e,f){var g,h=this;return this.hasOwnProperty("uid")||(this.uid=c.guid("uid_")),a=c.trim(a),/\s/.test(a)?void c.each(a.split(/\s+/),function(a){h.addEventListener(a,b,e,f)}):(a=a.toLowerCase(),e=parseInt(e,10)||0,g=d[this.uid]&&d[this.uid][a]||[],g.push({fn:b,priority:e,scope:f||this}),d[this.uid]||(d[this.uid]={}),void(d[this.uid][a]=g))},hasEventListener:function(a){var b=a?d[this.uid]&&d[this.uid][a]:d[this.uid];return!!b&&b},removeEventListener:function(a,b){a=a.toLowerCase();var e,f=d[this.uid]&&d[this.uid][a];if(f){if(b){for(e=f.length-1;e>=0;e--)if(f[e].fn===b){f.splice(e,1);break}}else f=[];f.length||(delete d[this.uid][a],c.isEmptyObj(d[this.uid])&&delete d[this.uid])}},removeAllEventListeners:function(){d[this.uid]&&delete d[this.uid]},dispatchEvent:function(e){var f,g,h,i,j,k={},l=!0;if("string"!==c.typeOf(e)){if(i=e,"string"!==c.typeOf(i.type))throw new b.EventException(b.EventException.UNSPECIFIED_EVENT_TYPE_ERR);e=i.type,i.total!==j&&i.loaded!==j&&(k.total=i.total,k.loaded=i.loaded),k.async=i.async||!1}if(e.indexOf("::")!==-1?!function(a){f=a[0],e=a[1]}(e.split("::")):f=this.uid,e=e.toLowerCase(),g=d[f]&&d[f][e]){g.sort(function(a,b){return b.priority-a.priority}),h=[].slice.call(arguments),h.shift(),k.type=e,h.unshift(k),MXI_DEBUG&&a.debug.events&&a.log("Event '%s' fired on %u",k.type,f);var m=[];c.each(g,function(a){h[0].target=a.scope,k.async?m.push(function(b){setTimeout(function(){b(a.fn.apply(a.scope,h)===!1)},1)}):m.push(function(b){b(a.fn.apply(a.scope,h)===!1)})}),m.length&&c.inSeries(m,function(a){l=!a})}return l},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},handleEventProps:function(a){var b=this;this.bind(a.join(" "),function(a){var b="on"+a.type.toLowerCase();"function"===c.typeOf(this[b])&&this[b].apply(this,arguments)}),c.each(a,function(a){a="on"+a.toLowerCase(a),"undefined"===c.typeOf(b[a])&&(b[a]=null)})}})}return d.instance=new d,d}),d("moxie/runtime/Runtime",["moxie/core/utils/Env","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/EventTarget"],function(a,b,c,d){function e(d,f,h,i,j){var k,l=this,m=b.guid(f+"_"),n=j||"browser";d=d||{},g[m]=this,h=b.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},h),d.preferred_caps&&(n=e.getMode(i,d.preferred_caps,n)),MXI_DEBUG&&a.debug.runtime&&a.log("\tdefault mode: %s",n),k=function(){var a={};return{exec:function(b,c,d,e){if(k[c]&&(a[b]||(a[b]={context:this,instance:new k[c]}),a[b].instance[d]))return a[b].instance[d].apply(this,e)},removeInstance:function(b){delete a[b]},removeAllInstances:function(){var c=this;b.each(a,function(a,d){"function"===b.typeOf(a.instance.destroy)&&a.instance.destroy.call(a.context),c.removeInstance(d)})}}}(),b.extend(this,{initialized:!1,uid:m,type:f,mode:e.getMode(i,d.required_caps,n),shimid:m+"_container",clients:0,options:d,can:function(a,c){var d=arguments[2]||h;if("string"===b.typeOf(a)&&"undefined"===b.typeOf(c)&&(a=e.parseCaps(a)),"object"===b.typeOf(a)){for(var f in a)if(!this.can(f,a[f],d))return!1;return!0}return"function"===b.typeOf(d[a])?d[a].call(this,c):c===d[a]},getShimContainer:function(){var a,d=c.get(this.shimid);return d||(a=this.options.container?c.get(this.options.container):document.body,d=document.createElement("div"),d.id=this.shimid,d.className="moxie-shim moxie-shim-"+this.type,b.extend(d.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),a.appendChild(d),a=null),d},getShim:function(){return k},shimExec:function(a,b){var c=[].slice.call(arguments,2);return l.getShim().exec.call(this,this.uid,a,b,c)},exec:function(a,b){var c=[].slice.call(arguments,2);return l[a]&&l[a][b]?l[a][b].apply(this,c):l.shimExec.apply(this,arguments)},destroy:function(){if(l){var a=c.get(this.shimid);a&&a.parentNode.removeChild(a),k&&k.removeAllInstances(),this.unbindAll(),delete g[this.uid],this.uid=null,m=l=k=a=null}}}),this.mode&&d.required_caps&&!this.can(d.required_caps)&&(this.mode=!1)}var f={},g={};return e.order="html5,html4",e.getRuntime=function(a){return!!g[a]&&g[a]},e.addConstructor=function(a,b){b.prototype=d.instance,f[a]=b},e.getConstructor=function(a){return f[a]||null},e.getInfo=function(a){var b=e.getRuntime(a);return b?{uid:b.uid,type:b.type,mode:b.mode,can:function(){return b.can.apply(b,arguments)}}:null},e.parseCaps=function(a){var c={};return"string"!==b.typeOf(a)?a||{}:(b.each(a.split(","),function(a){c[a]=!0}),c)},e.can=function(a,b){var c,d,f=e.getConstructor(a);return!!f&&(c=new f({required_caps:b}),d=c.mode,c.destroy(),!!d)},e.thatCan=function(a,b){var c=(b||e.order).split(/\s*,\s*/);for(var d in c)if(e.can(c[d],a))return c[d];return null},e.getMode=function(c,d,e){var f=null;if("undefined"===b.typeOf(e)&&(e="browser"),d&&!b.isEmptyObj(c)){if(b.each(d,function(d,e){if(c.hasOwnProperty(e)){var g=c[e](d);if("string"==typeof g&&(g=[g]),f){if(!(f=b.arrayIntersect(f,g)))return MXI_DEBUG&&a.debug.runtime&&a.log("\t\t%c: %v (conflicting mode requested: %s)",e,d,g),f=!1}else f=g}MXI_DEBUG&&a.debug.runtime&&a.log("\t\t%c: %v (compatible modes: %s)",e,d,f)}),f)return b.inArray(e,f)!==-1?e:f[0];if(f===!1)return!1}return e},e.capTrue=function(){return!0},e.capFalse=function(){return!1},e.capTest=function(a){return function(){return!!a}},e}),d("moxie/runtime/RuntimeClient",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/Runtime"],function(a,b,c,d){return function(){var e;c.extend(this,{connectRuntime:function(f){function g(c){var h,j;return c.length?(h=c.shift().toLowerCase(),(j=d.getConstructor(h))?(MXI_DEBUG&&a.debug.runtime&&(a.log("Trying runtime: %s",h),a.log(f)),e=new j(f),e.bind("Init",function(){e.initialized=!0,MXI_DEBUG&&a.debug.runtime&&a.log("Runtime '%s' initialized",e.type),setTimeout(function(){e.clients++,i.trigger("RuntimeInit",e)},1)}),e.bind("Error",function(){MXI_DEBUG&&a.debug.runtime&&a.log("Runtime '%s' failed to initialize",e.type),e.destroy(),g(c)}),MXI_DEBUG&&a.debug.runtime&&a.log("\tselected mode: %s",e.mode),e.mode?void e.init():void e.trigger("Error")):void g(c)):(i.trigger("RuntimeError",new b.RuntimeError(b.RuntimeError.NOT_INIT_ERR)),void(e=null))}var h,i=this;if("string"===c.typeOf(f)?h=f:"string"===c.typeOf(f.ruid)&&(h=f.ruid),h){if(e=d.getRuntime(h))return e.clients++,e;throw new b.RuntimeError(b.RuntimeError.NOT_INIT_ERR)}g((f.runtime_order||d.order).split(/\s*,\s*/))},disconnectRuntime:function(){e&&--e.clients<=0&&e.destroy(),e=null},getRuntime:function(){return e&&e.uid?e:e=null},exec:function(){return e?e.exec.apply(this,arguments):null}})}}),d("moxie/file/FileInput",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/I18n","moxie/runtime/Runtime","moxie/runtime/RuntimeClient"],function(a,b,c,d,e,f,g,h,i){function j(f){MXI_DEBUG&&b.log("Instantiating FileInput...");var j,l,m,n=this;if(a.inArray(a.typeOf(f),["string","node"])!==-1&&(f={browse_button:f}),l=d.get(f.browse_button),!l)throw new e.DOMException(e.DOMException.NOT_FOUND_ERR);m={accept:[{title:g.translate("All Files"),extensions:"*"}],name:"file",multiple:!1,required_caps:!1,container:l.parentNode||document.body},f=a.extend({},m,f),"string"==typeof f.required_caps&&(f.required_caps=h.parseCaps(f.required_caps)),"string"==typeof f.accept&&(f.accept=c.mimes2extList(f.accept)),j=d.get(f.container),j||(j=document.body),"static"===d.getStyle(j,"position")&&(j.style.position="relative"),j=l=null,i.call(n),a.extend(n,{uid:a.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){n.bind("RuntimeInit",function(b,c){n.ruid=c.uid,n.shimid=c.shimid,n.bind("Ready",function(){n.trigger("Refresh")},999),n.bind("Refresh",function(){var b,e,g,h;g=d.get(f.browse_button),h=d.get(c.shimid),g&&(b=d.getPos(g,d.get(f.container)),e=d.getSize(g),h&&a.extend(h.style,{top:b.y+"px",left:b.x+"px",width:e.w+"px",height:e.h+"px"})),h=g=null}),c.exec.call(n,"FileInput","init",f)}),n.connectRuntime(a.extend({},f,{required_caps:{select_file:!0}}))},disable:function(b){var c=this.getRuntime();c&&c.exec.call(this,"FileInput","disable","undefined"===a.typeOf(b)||b)},refresh:function(){n.trigger("Refresh")},destroy:function(){var b=this.getRuntime();b&&(b.exec.call(this,"FileInput","destroy"),this.disconnectRuntime()),"array"===a.typeOf(this.files)&&a.each(this.files,function(a){a.destroy()}),this.files=null,this.unbindAll()}}),this.handleEventProps(k)}var k=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];return j.prototype=f.instance,j}),d("moxie/core/utils/Encode",[],function(){var a=function(a){return unescape(encodeURIComponent(a))},b=function(a){return decodeURIComponent(escape(a))},c=function(a,c){if("function"==typeof window.atob)return c?b(window.atob(a)):window.atob(a);var d,e,f,g,h,i,j,k,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,n=0,o="",p=[];if(!a)return a;a+="";do g=l.indexOf(a.charAt(m++)),h=l.indexOf(a.charAt(m++)),i=l.indexOf(a.charAt(m++)),j=l.indexOf(a.charAt(m++)),k=g<<18|h<<12|i<<6|j,d=k>>16&255,e=k>>8&255,f=255&k,64==i?p[n++]=String.fromCharCode(d):64==j?p[n++]=String.fromCharCode(d,e):p[n++]=String.fromCharCode(d,e,f);while(m<a.length);return o=p.join(""),c?b(o):o},d=function(b,c){if(c&&(b=a(b)),"function"==typeof window.btoa)return window.btoa(b);var d,e,f,g,h,i,j,k,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,n=0,o="",p=[];if(!b)return b;do d=b.charCodeAt(m++),e=b.charCodeAt(m++),f=b.charCodeAt(m++),k=d<<16|e<<8|f,g=k>>18&63,h=k>>12&63,i=k>>6&63,j=63&k,p[n++]=l.charAt(g)+l.charAt(h)+l.charAt(i)+l.charAt(j);while(m<b.length);o=p.join("");var q=b.length%3;return(q?o.slice(0,q-3):o)+"===".slice(q||3)};return{utf8_encode:a,utf8_decode:b,atob:c,btoa:d}}),d("moxie/file/Blob",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient"],function(a,b,c){function d(f,g){function h(b,c,f){var g,h=e[this.uid];return"string"===a.typeOf(h)&&h.length?(g=new d(null,{type:f,size:c-b}),g.detach(h.substr(b,g.size)),g):null}c.call(this),f&&this.connectRuntime(f),g?"string"===a.typeOf(g)&&(g={data:g}):g={},a.extend(this,{uid:g.uid||a.guid("uid_"),ruid:f,size:g.size||0,type:g.type||"",slice:function(a,b,c){return this.isDetached()?h.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),a,b,c)},getSource:function(){return e[this.uid]?e[this.uid]:null},detach:function(a){if(this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy"),this.disconnectRuntime(),this.ruid=null),a=a||"","data:"==a.substr(0,5)){var c=a.indexOf(";base64,");this.type=a.substring(5,c),a=b.atob(a.substring(c+8))}this.size=a.length,e[this.uid]=a},isDetached:function(){return!this.ruid&&"string"===a.typeOf(e[this.uid])},destroy:function(){this.detach(),delete e[this.uid]}}),g.data?this.detach(g.data):e[this.uid]=g}var e={};return d}),d("moxie/file/File",["moxie/core/utils/Basic","moxie/core/utils/Mime","moxie/file/Blob"],function(a,b,c){function d(d,e){e||(e={}),c.apply(this,arguments),this.type||(this.type=b.getFileMime(e.name));var f;if(e.name)f=e.name.replace(/\\/g,"/"),f=f.substr(f.lastIndexOf("/")+1);else if(this.type){var g=this.type.split("/")[0];f=a.guid((""!==g?g:"file")+"_"),b.extensions[this.type]&&(f+="."+b.extensions[this.type][0])}a.extend(this,{name:f||a.guid("file_"),relativePath:"",lastModifiedDate:e.lastModifiedDate||(new Date).toLocaleString()})}return d.prototype=c.prototype,d}),d("moxie/file/FileDrop",["moxie/core/I18n","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/core/utils/Env","moxie/file/File","moxie/runtime/RuntimeClient","moxie/core/EventTarget","moxie/core/utils/Mime"],function(a,b,c,d,e,f,g,h,i){function j(c){MXI_DEBUG&&e.log("Instantiating FileDrop...");var f,h=this;"string"==typeof c&&(c={drop_zone:c}),f={accept:[{title:a.translate("All Files"),extensions:"*"}],required_caps:{drag_and_drop:!0}},c="object"==typeof c?d.extend({},f,c):f,c.container=b.get(c.drop_zone)||document.body,"static"===b.getStyle(c.container,"position")&&(c.container.style.position="relative"),"string"==typeof c.accept&&(c.accept=i.mimes2extList(c.accept)),g.call(h),d.extend(h,{uid:d.guid("uid_"),ruid:null,files:null,init:function(){h.bind("RuntimeInit",function(a,b){h.ruid=b.uid,b.exec.call(h,"FileDrop","init",c),h.dispatchEvent("ready")}),h.connectRuntime(c)},destroy:function(){var a=this.getRuntime();a&&(a.exec.call(this,"FileDrop","destroy"),this.disconnectRuntime()),this.files=null,this.unbindAll()}}),this.handleEventProps(k)}var k=["ready","dragenter","dragleave","drop","error"];return j.prototype=h.instance,j}),d("moxie/file/FileReader",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/core/Exceptions","moxie/core/EventTarget","moxie/file/Blob","moxie/runtime/RuntimeClient"],function(a,b,c,d,e,f){function g(){function d(a,d){if(this.trigger("loadstart"),this.readyState===g.LOADING)return this.trigger("error",new c.DOMException(c.DOMException.INVALID_STATE_ERR)),void this.trigger("loadend");if(!(d instanceof e))return this.trigger("error",new c.DOMException(c.DOMException.NOT_FOUND_ERR)),void this.trigger("loadend");if(this.result=null,this.readyState=g.LOADING,d.isDetached()){var f=d.getSource();switch(a){case"readAsText":case"readAsBinaryString":this.result=f;break;case"readAsDataURL":this.result="data:"+d.type+";base64,"+b.btoa(f)}this.readyState=g.DONE,this.trigger("load"),this.trigger("loadend")}else this.connectRuntime(d.ruid),this.exec("FileReader","read",a,d);
}f.call(this),a.extend(this,{uid:a.guid("uid_"),readyState:g.EMPTY,result:null,error:null,readAsBinaryString:function(a){d.call(this,"readAsBinaryString",a)},readAsDataURL:function(a){d.call(this,"readAsDataURL",a)},readAsText:function(a){d.call(this,"readAsText",a)},abort:function(){this.result=null,a.inArray(this.readyState,[g.EMPTY,g.DONE])===-1&&(this.readyState===g.LOADING&&(this.readyState=g.DONE),this.exec("FileReader","abort"),this.trigger("abort"),this.trigger("loadend"))},destroy:function(){this.abort(),this.exec("FileReader","destroy"),this.disconnectRuntime(),this.unbindAll()}}),this.handleEventProps(h),this.bind("Error",function(a,b){this.readyState=g.DONE,this.error=b},999),this.bind("Load",function(a){this.readyState=g.DONE},999)}var h=["loadstart","progress","load","abort","error","loadend"];return g.EMPTY=0,g.LOADING=1,g.DONE=2,g.prototype=d.instance,g}),d("moxie/core/utils/Url",[],function(){var a=function(b,c){for(var d=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],e=d.length,f={http:80,https:443},g={},h=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,i=h.exec(b||"");e--;)i[e]&&(g[d[e]]=i[e]);if(!g.scheme){c&&"string"!=typeof c||(c=a(c||document.location.href)),g.scheme=c.scheme,g.host=c.host,g.port=c.port;var j="";/^[^\/]/.test(g.path)&&(j=c.path,j=/\/[^\/]*\.[^\/]*$/.test(j)?j.replace(/\/[^\/]+$/,"/"):j.replace(/\/?$/,"/")),g.path=j+(g.path||"")}return g.port||(g.port=f[g.scheme]||80),g.port=parseInt(g.port,10),g.path||(g.path="/"),delete g.source,g},b=function(b){var c={http:80,https:443},d="object"==typeof b?b:a(b);return d.scheme+"://"+d.host+(d.port!==c[d.scheme]?":"+d.port:"")+d.path+(d.query?d.query:"")},c=function(b){function c(a){return[a.scheme,a.host,a.port].join("/")}return"string"==typeof b&&(b=a(b)),c(a())===c(b)};return{parseUrl:a,resolveUrl:b,hasSameOrigin:c}}),d("moxie/runtime/RuntimeTarget",["moxie/core/utils/Basic","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(a,b,c){function d(){this.uid=a.guid("uid_"),b.call(this),this.destroy=function(){this.disconnectRuntime(),this.unbindAll()}}return d.prototype=c.instance,d}),d("moxie/file/FileReaderSync",["moxie/core/utils/Basic","moxie/runtime/RuntimeClient","moxie/core/utils/Encode"],function(a,b,c){return function(){function d(a,b){if(!b.isDetached()){var d=this.connectRuntime(b.ruid).exec.call(this,"FileReaderSync","read",a,b);return this.disconnectRuntime(),d}var e=b.getSource();switch(a){case"readAsBinaryString":return e;case"readAsDataURL":return"data:"+b.type+";base64,"+c.btoa(e);case"readAsText":for(var f="",g=0,h=e.length;g<h;g++)f+=String.fromCharCode(e[g]);return f}}b.call(this),a.extend(this,{uid:a.guid("uid_"),readAsBinaryString:function(a){return d.call(this,"readAsBinaryString",a)},readAsDataURL:function(a){return d.call(this,"readAsDataURL",a)},readAsText:function(a){return d.call(this,"readAsText",a)}})}}),d("moxie/xhr/FormData",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/file/Blob"],function(a,b,c){function d(){var a,d=[];b.extend(this,{append:function(e,f){var g=this,h=b.typeOf(f);f instanceof c?a={name:e,value:f}:"array"===h?(e+="[]",b.each(f,function(a){g.append(e,a)})):"object"===h?b.each(f,function(a,b){g.append(e+"["+b+"]",a)}):"null"===h||"undefined"===h||"number"===h&&isNaN(f)?g.append(e,"false"):d.push({name:e,value:f.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return a&&a.value||null},getBlobName:function(){return a&&a.name||null},each:function(c){b.each(d,function(a){c(a.value,a.name)}),a&&c(a.value,a.name)},destroy:function(){a=null,d=[]}})}return d}),d("moxie/xhr/XMLHttpRequest",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/utils/Encode","moxie/core/utils/Url","moxie/runtime/Runtime","moxie/runtime/RuntimeTarget","moxie/file/Blob","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/core/utils/Env","moxie/core/utils/Mime"],function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){this.uid=a.guid("uid_")}function n(){function c(a,b){if(A.hasOwnProperty(a))return 1===arguments.length?k.can("define_property")?A[a]:z[a]:void(k.can("define_property")?A[a]=b:z[a]=b)}function i(b){function d(){x&&(x.destroy(),x=null),h.dispatchEvent("loadend"),h=null}function e(e){x.bind("LoadStart",function(a){c("readyState",n.LOADING),h.dispatchEvent("readystatechange"),h.dispatchEvent(a),H&&h.upload.dispatchEvent(a)}),x.bind("Progress",function(a){c("readyState")!==n.LOADING&&(c("readyState",n.LOADING),h.dispatchEvent("readystatechange")),h.dispatchEvent(a)}),x.bind("UploadProgress",function(a){H&&h.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:a.total,loaded:a.loaded})}),x.bind("Load",function(b){c("readyState",n.DONE),c("status",Number(e.exec.call(x,"XMLHttpRequest","getStatus")||0)),c("statusText",o[c("status")]||""),c("response",e.exec.call(x,"XMLHttpRequest","getResponse",c("responseType"))),~a.inArray(c("responseType"),["text",""])?c("responseText",c("response")):"document"===c("responseType")&&c("responseXML",c("response")),O=e.exec.call(x,"XMLHttpRequest","getAllResponseHeaders"),h.dispatchEvent("readystatechange"),c("status")>0?(H&&h.upload.dispatchEvent(b),h.dispatchEvent(b)):(J=!0,h.dispatchEvent("error")),d()}),x.bind("Abort",function(a){h.dispatchEvent(a),d()}),x.bind("Error",function(a){J=!0,c("readyState",n.DONE),h.dispatchEvent("readystatechange"),I=!0,h.dispatchEvent(a),d()}),e.exec.call(x,"XMLHttpRequest","send",{url:r,method:s,async:B,user:t,password:u,headers:C,mimeType:E,encoding:D,responseType:h.responseType,withCredentials:h.withCredentials,options:N},b)}var h=this;v=(new Date).getTime(),x=new g,"string"==typeof N.required_caps&&(N.required_caps=f.parseCaps(N.required_caps)),N.required_caps=a.extend({},N.required_caps,{return_response_type:h.responseType}),b instanceof j&&(N.required_caps.send_multipart=!0),a.isEmptyObj(C)||(N.required_caps.send_custom_headers=!0),K||(N.required_caps.do_cors=!0),N.ruid?e(x.connectRuntime(N)):(x.bind("RuntimeInit",function(a,b){e(b)}),x.bind("RuntimeError",function(a,b){h.dispatchEvent("RuntimeError",b)}),x.connectRuntime(N))}function q(){c("responseText",""),c("responseXML",null),c("response",null),c("status",0),c("statusText",""),v=w=null}var r,s,t,u,v,w,x,y,z=this,A={timeout:0,readyState:n.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},B=!0,C={},D=null,E=null,F=!1,G=!1,H=!1,I=!1,J=!1,K=!1,L=null,M=null,N={},O="";a.extend(this,A,{uid:a.guid("uid_"),upload:new m,open:function(f,g,h,i,j){var k;if(!f||!g)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(f)||d.utf8_encode(f)!==f)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(~a.inArray(f.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(s=f.toUpperCase()),~a.inArray(s,["CONNECT","TRACE","TRACK"]))throw new b.DOMException(b.DOMException.SECURITY_ERR);if(g=d.utf8_encode(g),k=e.parseUrl(g),K=e.hasSameOrigin(k),r=e.resolveUrl(g),(i||j)&&!K)throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);if(t=i||k.user,u=j||k.pass,B=h||!0,B===!1&&(c("timeout")||c("withCredentials")||""!==c("responseType")))throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);F=!B,G=!1,C={},q.call(this),c("readyState",n.OPENED),this.dispatchEvent("readystatechange")},setRequestHeader:function(e,f){var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(c("readyState")!==n.OPENED||G)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(e)||d.utf8_encode(e)!==e)throw new b.DOMException(b.DOMException.SYNTAX_ERR);return e=a.trim(e).toLowerCase(),!~a.inArray(e,g)&&!/^(proxy\-|sec\-)/.test(e)&&(C[e]?C[e]+=", "+f:C[e]=f,!0)},getAllResponseHeaders:function(){return O||""},getResponseHeader:function(b){return b=b.toLowerCase(),J||~a.inArray(b,["set-cookie","set-cookie2"])?null:O&&""!==O&&(y||(y={},a.each(O.split(/\r\n/),function(b){var c=b.split(/:\s+/);2===c.length&&(c[0]=a.trim(c[0]),y[c[0].toLowerCase()]={header:c[0],value:a.trim(c[1])})})),y.hasOwnProperty(b))?y[b].header+": "+y[b].value:null},overrideMimeType:function(d){var e,f;if(~a.inArray(c("readyState"),[n.LOADING,n.DONE]))throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(d=a.trim(d.toLowerCase()),/;/.test(d)&&(e=d.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(d=e[1],e[2]&&(f=e[2])),!l.mimes[d])throw new b.DOMException(b.DOMException.SYNTAX_ERR);L=d,M=f},send:function(c,e){if(N="string"===a.typeOf(e)?{ruid:e}:e?e:{},this.readyState!==n.OPENED||G)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(c instanceof h)N.ruid=c.ruid,E=c.type||"application/octet-stream";else if(c instanceof j){if(c.hasBlob()){var f=c.getBlob();N.ruid=f.ruid,E=f.type||"application/octet-stream"}}else"string"==typeof c&&(D="UTF-8",E="text/plain;charset=UTF-8",c=d.utf8_encode(c));this.withCredentials||(this.withCredentials=N.required_caps&&N.required_caps.send_browser_cookies&&!K),H=!F&&this.upload.hasEventListener(),J=!1,I=!c,F||(G=!0),i.call(this,c)},abort:function(){if(J=!0,F=!1,~a.inArray(c("readyState"),[n.UNSENT,n.OPENED,n.DONE]))c("readyState",n.UNSENT);else{if(c("readyState",n.DONE),G=!1,!x)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);x.getRuntime().exec.call(x,"XMLHttpRequest","abort",I),I=!0}},destroy:function(){x&&("function"===a.typeOf(x.destroy)&&x.destroy(),x=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}}),this.handleEventProps(p.concat(["readystatechange"])),this.upload.handleEventProps(p)}var o={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};m.prototype=c.instance;var p=["loadstart","progress","abort","error","load","timeout","loadend"];return n.UNSENT=0,n.OPENED=1,n.HEADERS_RECEIVED=2,n.LOADING=3,n.DONE=4,n.prototype=c.instance,n}),d("moxie/runtime/Transporter",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(a,b,c,d){function e(){function d(){k=l=0,j=this.result=null}function f(b,c){var d=this;i=c,d.bind("TransportingProgress",function(b){l=b.loaded,l<k&&a.inArray(d.state,[e.IDLE,e.DONE])===-1&&g.call(d)},999),d.bind("TransportingComplete",function(){l=k,d.state=e.DONE,j=null,d.result=i.exec.call(d,"Transporter","getAsBlob",b||"")},999),d.state=e.BUSY,d.trigger("TransportingStarted"),g.call(d)}function g(){var a,c=this,d=k-l;m>d&&(m=d),a=b.btoa(j.substr(l,m)),i.exec.call(c,"Transporter","receive",a,k)}var h,i,j,k,l,m;c.call(this),a.extend(this,{uid:a.guid("uid_"),state:e.IDLE,result:null,transport:function(b,c,e){var g=this;if(e=a.extend({chunk_size:204798},e),(h=e.chunk_size%3)&&(e.chunk_size+=3-h),m=e.chunk_size,d.call(this),j=b,k=b.length,"string"===a.typeOf(e)||e.ruid)f.call(g,c,this.connectRuntime(e));else{var i=function(a,b){g.unbind("RuntimeInit",i),f.call(g,c,b)};this.bind("RuntimeInit",i),this.connectRuntime(e)}},abort:function(){var a=this;a.state=e.IDLE,i&&(i.exec.call(a,"Transporter","clear"),a.trigger("TransportingAborted")),d.call(a)},destroy:function(){this.unbindAll(),i=null,this.disconnectRuntime(),d.call(this)}})}return e.IDLE=0,e.BUSY=1,e.DONE=2,e.prototype=d.instance,e}),d("moxie/image/Image",["moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/file/FileReaderSync","moxie/xhr/XMLHttpRequest","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/runtime/Transporter","moxie/core/utils/Env","moxie/core/EventTarget","moxie/file/Blob","moxie/file/File","moxie/core/utils/Encode"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){function d(a){a||(a=this.exec("Image","getInfo")),this.size=a.size,this.width=a.width,this.height=a.height,this.type=a.type,this.meta=a.meta,""===this.name&&(this.name=a.name)}function j(b){var d=a.typeOf(b);try{if(b instanceof n){if(!b.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);p.apply(this,arguments)}else if(b instanceof k){if(!~a.inArray(b.type,["image/jpeg","image/png"]))throw new c.ImageError(c.ImageError.WRONG_FORMAT);q.apply(this,arguments)}else if(a.inArray(d,["blob","file"])!==-1)j.call(this,new l(null,b),arguments[1]);else if("string"===d)"data:"===b.substr(0,5)?j.call(this,new k(null,{data:b}),arguments[1]):r.apply(this,arguments);else{if("node"!==d||"img"!==b.nodeName.toLowerCase())throw new c.DOMException(c.DOMException.TYPE_MISMATCH_ERR);j.call(this,b.src,arguments[1])}}catch(e){this.trigger("error",e.code)}}function p(b,c){var d=this.connectRuntime(b.ruid);this.ruid=d.uid,d.exec.call(this,"Image","loadFromImage",b,"undefined"===a.typeOf(c)||c)}function q(b,c){function d(a){e.ruid=a.uid,a.exec.call(e,"Image","loadFromBlob",b)}var e=this;e.name=b.name||"",b.isDetached()?(this.bind("RuntimeInit",function(a,b){d(b)}),c&&"string"==typeof c.required_caps&&(c.required_caps=f.parseCaps(c.required_caps)),this.connectRuntime(a.extend({required_caps:{access_image_binary:!0,resize_image:!0}},c))):d(this.connectRuntime(b.ruid))}function r(a,b){var c,d=this;c=new e,c.open("get",a),c.responseType="blob",c.onprogress=function(a){d.trigger(a)},c.onload=function(){q.call(d,c.response,!0)},c.onerror=function(a){d.trigger(a)},c.onloadend=function(){c.destroy()},c.bind("RuntimeError",function(a,b){d.trigger("RuntimeError",b)}),c.send(null,b)}g.call(this),a.extend(this,{uid:a.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){j.apply(this,arguments)},downsize:function(b){var d={width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,crop:!1,preserveHeaders:!0,resample:!1};b="object"==typeof b?a.extend(d,b):a.extend(d,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]});try{if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);if(this.width>n.MAX_RESIZE_WIDTH||this.height>n.MAX_RESIZE_HEIGHT)throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR);this.exec("Image","downsize",b.width,b.height,b.crop,b.preserveHeaders)}catch(e){this.trigger("error",e.code)}},crop:function(a,b,c){this.downsize(a,b,!0,c)},getAsCanvas:function(){if(!i.can("create_canvas"))throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR);var a=this.connectRuntime(this.ruid);return a.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(a,b){if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);return this.exec("Image","getAsBlob",a||"image/jpeg",b||90)},getAsDataURL:function(a,b){if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);return this.exec("Image","getAsDataURL",a||"image/jpeg",b||90)},getAsBinaryString:function(a,b){var c=this.getAsDataURL(a,b);return m.atob(c.substring(c.indexOf("base64,")+7))},embed:function(d,e){function f(b,e){var f=this;if(i.can("create_canvas")){var k=f.getAsCanvas();if(k)return d.appendChild(k),k=null,f.destroy(),void j.trigger("embedded")}var l=f.getAsDataURL(b,e);if(!l)throw new c.ImageError(c.ImageError.WRONG_FORMAT);if(i.can("use_data_uri_of",l.length))d.innerHTML='<img src="'+l+'" width="'+f.width+'" height="'+f.height+'" />',f.destroy(),j.trigger("embedded");else{var n=new h;n.bind("TransportingComplete",function(){g=j.connectRuntime(this.result.ruid),j.bind("Embedded",function(){a.extend(g.getShimContainer().style,{top:"0px",left:"0px",width:f.width+"px",height:f.height+"px"}),g=null},999),g.exec.call(j,"ImageView","display",this.result.uid,width,height),f.destroy()}),n.transport(m.atob(l.substring(l.indexOf("base64,")+7)),b,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:d})}}var g,j=this;e=a.extend({width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90},e||{});try{if(!(d=b.get(d)))throw new c.DOMException(c.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);this.width>n.MAX_RESIZE_WIDTH||this.height>n.MAX_RESIZE_HEIGHT;var k=new n;return k.bind("Resize",function(){f.call(this,e.type,e.quality)}),k.bind("Load",function(){k.downsize(e)}),this.meta.thumb&&this.meta.thumb.width>=e.width&&this.meta.thumb.height>=e.height?k.load(this.meta.thumb.data):k.clone(this,!1),k}catch(l){this.trigger("error",l.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}}),this.handleEventProps(o),this.bind("Load Resize",function(){d.call(this)},999)}var o=["progress","load","error","resize","embedded"];return n.MAX_RESIZE_WIDTH=8192,n.MAX_RESIZE_HEIGHT=8192,n.prototype=j.instance,n}),d("moxie/runtime/html5/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(a,b,c,d){function e(b){var e=this,h=c.capTest,i=c.capTrue,j=a.extend({access_binary:h(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return e.can("access_binary")&&!!g.Image},display_media:h(d.can("create_canvas")||d.can("use_data_uri_over32kb")),do_cors:h(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:h(function(){var a=document.createElement("div");return("draggable"in a||"ondragstart"in a&&"ondrop"in a)&&("IE"!==d.browser||d.verComp(d.version,9,">"))}()),filter_by_extension:h(function(){return"Chrome"===d.browser&&d.verComp(d.version,28,">=")||"IE"===d.browser&&d.verComp(d.version,10,">=")||"Safari"===d.browser&&d.verComp(d.version,7,">=")}()),return_response_headers:i,return_response_type:function(a){return!("json"!==a||!window.JSON)||d.can("return_response_type",a)},return_status_code:i,report_upload_progress:h(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return e.can("access_binary")&&d.can("create_canvas")},select_file:function(){return d.can("use_fileinput")&&window.File},select_folder:function(){return e.can("select_file")&&"Chrome"===d.browser&&d.verComp(d.version,21,">=")},select_multiple:function(){return e.can("select_file")&&!("Safari"===d.browser&&"Windows"===d.os)&&!("iOS"===d.os&&d.verComp(d.osVersion,"7.0.0",">")&&d.verComp(d.osVersion,"8.0.0","<"))},send_binary_string:h(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:h(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||e.can("send_binary_string")},slice_blob:h(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return e.can("slice_blob")&&e.can("send_multipart")},summon_file_dialog:function(){return e.can("select_file")&&("Firefox"===d.browser&&d.verComp(d.version,4,">=")||"Opera"===d.browser&&d.verComp(d.version,12,">=")||"IE"===d.browser&&d.verComp(d.version,10,">=")||!!~a.inArray(d.browser,["Chrome","Safari"]))},upload_filesize:i},arguments[2]);c.call(this,b,arguments[1]||f,j),a.extend(this,{init:function(){this.trigger("Init")},destroy:function(a){return function(){a.call(e),a=e=null}}(this.destroy)}),a.extend(this.getShim(),g)}var f="html5",g={};return c.addConstructor(f,e),g}),d("moxie/core/utils/Events",["moxie/core/utils/Basic"],function(a){function b(){this.returnValue=!1}function c(){this.cancelBubble=!0}var d={},e="moxie_"+a.guid(),f=function(f,g,h,i){var j,k;g=g.toLowerCase(),f.addEventListener?(j=h,f.addEventListener(g,j,!1)):f.attachEvent&&(j=function(){var a=window.event;a.target||(a.target=a.srcElement),a.preventDefault=b,a.stopPropagation=c,h(a)},f.attachEvent("on"+g,j)),f[e]||(f[e]=a.guid()),d.hasOwnProperty(f[e])||(d[f[e]]={}),k=d[f[e]],k.hasOwnProperty(g)||(k[g]=[]),k[g].push({func:j,orig:h,key:i})},g=function(b,c,f){var g,h;if(c=c.toLowerCase(),b[e]&&d[b[e]]&&d[b[e]][c]){g=d[b[e]][c];for(var i=g.length-1;i>=0&&(g[i].orig!==f&&g[i].key!==f||(b.removeEventListener?b.removeEventListener(c,g[i].func,!1):b.detachEvent&&b.detachEvent("on"+c,g[i].func),g[i].orig=null,g[i].func=null,g.splice(i,1),f===h));i--);if(g.length||delete d[b[e]][c],a.isEmptyObj(d[b[e]])){delete d[b[e]];try{delete b[e]}catch(j){b[e]=h}}}},h=function(b,c){b&&b[e]&&a.each(d[b[e]],function(a,d){g(b,d,c)})};return{addEvent:f,removeEvent:g,removeAllEvents:h}}),d("moxie/runtime/html5/file/FileInput",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(a,b,c,d,e,f,g){function h(){var a;c.extend(this,{init:function(h){var i,j,k,l,m,n,o=this,p=o.getRuntime();a=h,k=a.accept.mimes||f.extList2mimes(a.accept,p.can("filter_by_extension")),j=p.getShimContainer(),j.innerHTML='<input id="'+p.uid+'" type="file" style="font-size:999px;opacity:0;"'+(a.multiple&&p.can("select_multiple")?"multiple":"")+(a.directory&&p.can("select_folder")?"webkitdirectory directory":"")+(k?' accept="'+k.join(",")+'"':"")+" />",i=d.get(p.uid),c.extend(i.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),l=d.get(a.browse_button),p.can("summon_file_dialog")&&("static"===d.getStyle(l,"position")&&(l.style.position="relative"),m=parseInt(d.getStyle(l,"z-index"),10)||1,l.style.zIndex=m,j.style.zIndex=m-1,e.addEvent(l,"click",function(a){var b=d.get(p.uid);b&&!b.disabled&&b.click(),a.preventDefault()},o.uid)),n=p.can("summon_file_dialog")?l:j,e.addEvent(n,"mouseover",function(){o.trigger("mouseenter")},o.uid),e.addEvent(n,"mouseout",function(){o.trigger("mouseleave")},o.uid),e.addEvent(n,"mousedown",function(){o.trigger("mousedown")},o.uid),e.addEvent(d.get(a.container),"mouseup",function(){o.trigger("mouseup")},o.uid),i.onchange=function q(d){if(o.files=[],c.each(this.files,function(c){var d="";return!(!a.directory||"."!=c.name)||(c.webkitRelativePath&&(d="/"+c.webkitRelativePath.replace(/^\//,"")),c=new b(p.uid,c),c.relativePath=d,void o.files.push(c))}),"IE"!==g.browser&&"IEMobile"!==g.browser)this.value="";else{var e=this.cloneNode(!0);this.parentNode.replaceChild(e,this),e.onchange=q}o.files.length&&o.trigger("change")},o.trigger({type:"ready",async:!0}),j=null},disable:function(a){var b,c=this.getRuntime();(b=d.get(c.uid))&&(b.disabled=!!a)},destroy:function(){var b=this.getRuntime(),c=b.getShim(),f=b.getShimContainer();e.removeAllEvents(f,this.uid),e.removeAllEvents(a&&d.get(a.container),this.uid),e.removeAllEvents(a&&d.get(a.browse_button),this.uid),f&&(f.innerHTML=""),c.removeInstance(this.uid),a=f=c=null}})}return a.FileInput=h}),d("moxie/runtime/html5/file/Blob",["moxie/runtime/html5/Runtime","moxie/file/Blob"],function(a,b){function c(){function a(a,b,c){var d;if(!window.File.prototype.slice)return(d=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?d.call(a,b,c):null;try{return a.slice(),a.slice(b,c)}catch(e){return a.slice(b,c-b)}}this.slice=function(){return new b(this.getRuntime().uid,a.apply(this,arguments))}}return a.Blob=c}),d("moxie/runtime/html5/file/FileDrop",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime"],function(a,b,c,d,e,f){function g(){function a(a){if(!a.dataTransfer||!a.dataTransfer.types)return!1;var b=c.toArray(a.dataTransfer.types||[]);return c.inArray("Files",b)!==-1||c.inArray("public.file-url",b)!==-1||c.inArray("application/x-moz-file",b)!==-1}function g(a,c){if(i(a)){var d=new b(o,a);d.relativePath=c||"",p.push(d)}}function h(a){for(var b=[],d=0;d<a.length;d++)[].push.apply(b,a[d].extensions.split(/\s*,\s*/));return c.inArray("*",b)===-1?b:[]}function i(a){if(!q.length)return!0;var b=f.getFileExtension(a.name);return!b||c.inArray(b,q)!==-1}function j(a,b){var d=[];c.each(a,function(a){var b=a.webkitGetAsEntry();b&&(b.isFile?g(a.getAsFile(),b.fullPath):d.push(b))}),d.length?k(d,b):b()}function k(a,b){var d=[];c.each(a,function(a){d.push(function(b){l(a,b)})}),c.inSeries(d,function(){b()})}function l(a,b){a.isFile?a.file(function(c){g(c,a.fullPath),b()},function(){b()}):a.isDirectory?m(a,b):b()}function m(a,b){function c(a){e.readEntries(function(b){b.length?([].push.apply(d,b),c(a)):a()},a)}var d=[],e=a.createReader();c(function(){k(d,b)})}var n,o,p=[],q=[];c.extend(this,{init:function(b){var d,f=this;n=b,o=f.ruid,q=h(n.accept),d=n.container,e.addEvent(d,"dragover",function(b){a(b)&&(b.preventDefault(),b.dataTransfer.dropEffect="copy")},f.uid),e.addEvent(d,"drop",function(b){a(b)&&(b.preventDefault(),p=[],b.dataTransfer.items&&b.dataTransfer.items[0].webkitGetAsEntry?j(b.dataTransfer.items,function(){f.files=p,f.trigger("drop")}):(c.each(b.dataTransfer.files,function(a){g(a)}),f.files=p,f.trigger("drop")))},f.uid),e.addEvent(d,"dragenter",function(a){f.trigger("dragenter")},f.uid),e.addEvent(d,"dragleave",function(a){f.trigger("dragleave")},f.uid)},destroy:function(){e.removeAllEvents(n&&d.get(n.container),this.uid),o=p=q=n=null}})}return a.FileDrop=g}),d("moxie/runtime/html5/file/FileReader",["moxie/runtime/html5/Runtime","moxie/core/utils/Encode","moxie/core/utils/Basic"],function(a,b,c){function d(){function a(a){return b.atob(a.substring(a.indexOf("base64,")+7))}var d,e=!1;c.extend(this,{read:function(b,f){var g=this;g.result="",d=new window.FileReader,d.addEventListener("progress",function(a){g.trigger(a)}),d.addEventListener("load",function(b){g.result=e?a(d.result):d.result,g.trigger(b)}),d.addEventListener("error",function(a){g.trigger(a,d.error)}),d.addEventListener("loadend",function(a){d=null,g.trigger(a)}),"function"===c.typeOf(d[b])?(e=!1,d[b](f.getSource())):"readAsBinaryString"===b&&(e=!0,d.readAsDataURL(f.getSource()))},abort:function(){d&&d.abort()},destroy:function(){d=null}})}return a.FileReader=d}),d("moxie/runtime/html5/xhr/XMLHttpRequest",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/utils/Mime","moxie/core/utils/Url","moxie/file/File","moxie/file/Blob","moxie/xhr/FormData","moxie/core/Exceptions","moxie/core/utils/Env"],function(a,b,c,d,e,f,g,h,i){function j(){function a(a,b){var c,d,e=this;c=b.getBlob().getSource(),d=new window.FileReader,d.onload=function(){b.append(b.getBlobName(),new f(null,{type:c.type,data:d.result})),o.send.call(e,a,b)},d.readAsBinaryString(c)}function j(){return!window.XMLHttpRequest||"IE"===i.browser&&i.verComp(i.version,8,"<")?function(){for(var a=["Msxml2.XMLHTTP.6.0","Microsoft.XMLHTTP"],b=0;b<a.length;b++)try{return new ActiveXObject(a[b])}catch(c){}}():new window.XMLHttpRequest}function k(a){var b=a.responseXML,c=a.responseText;return"IE"===i.browser&&c&&b&&!b.documentElement&&/[^\/]+\/[^\+]+\+xml/.test(a.getResponseHeader("Content-Type"))&&(b=new window.ActiveXObject("Microsoft.XMLDOM"),b.async=!1,b.validateOnParse=!1,b.loadXML(c)),b&&("IE"===i.browser&&0!==b.parseError||!b.documentElement||"parsererror"===b.documentElement.tagName)?null:b}function l(a){var b="----moxieboundary"+(new Date).getTime(),c="--",d="\r\n",e="",g=this.getRuntime();if(!g.can("send_binary_string"))throw new h.RuntimeError(h.RuntimeError.NOT_SUPPORTED_ERR);return m.setRequestHeader("Content-Type","multipart/form-data; boundary="+b),a.each(function(a,g){e+=a instanceof f?c+b+d+'Content-Disposition: form-data; name="'+g+'"; filename="'+unescape(encodeURIComponent(a.name||"blob"))+'"'+d+"Content-Type: "+(a.type||"application/octet-stream")+d+d+a.getSource()+d:c+b+d+'Content-Disposition: form-data; name="'+g+'"'+d+d+unescape(encodeURIComponent(a))+d}),e+=c+b+c+d}var m,n,o=this;b.extend(this,{send:function(c,e){var h=this,k="Mozilla"===i.browser&&i.verComp(i.version,4,">=")&&i.verComp(i.version,7,"<"),o="Android Browser"===i.browser,p=!1;if(n=c.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),m=j(),m.open(c.method,c.url,c.async,c.user,c.password),e instanceof f)e.isDetached()&&(p=!0),e=e.getSource();else if(e instanceof g){if(e.hasBlob())if(e.getBlob().isDetached())e=l.call(h,e),p=!0;else if((k||o)&&"blob"===b.typeOf(e.getBlob().getSource())&&window.FileReader)return void a.call(h,c,e);if(e instanceof g){var q=new window.FormData;e.each(function(a,b){a instanceof f?q.append(b,a.getSource()):q.append(b,a)}),e=q}}m.upload?(c.withCredentials&&(m.withCredentials=!0),m.addEventListener("load",function(a){h.trigger(a)}),m.addEventListener("error",function(a){h.trigger(a)}),m.addEventListener("progress",function(a){h.trigger(a)}),m.upload.addEventListener("progress",function(a){h.trigger({type:"UploadProgress",loaded:a.loaded,total:a.total})})):m.onreadystatechange=function(){switch(m.readyState){case 1:break;case 2:break;case 3:var a,b;try{d.hasSameOrigin(c.url)&&(a=m.getResponseHeader("Content-Length")||0),m.responseText&&(b=m.responseText.length)}catch(e){a=b=0}h.trigger({type:"progress",lengthComputable:!!a,total:parseInt(a,10),loaded:b});break;case 4:m.onreadystatechange=function(){},0===m.status?h.trigger("error"):h.trigger("load")}},b.isEmptyObj(c.headers)||b.each(c.headers,function(a,b){m.setRequestHeader(b,a)}),""!==c.responseType&&"responseType"in m&&("json"!==c.responseType||i.can("return_response_type","json")?m.responseType=c.responseType:m.responseType="text"),p?m.sendAsBinary?m.sendAsBinary(e):!function(){for(var a=new Uint8Array(e.length),b=0;b<e.length;b++)a[b]=255&e.charCodeAt(b);m.send(a.buffer)}():m.send(e),h.trigger("loadstart")},getStatus:function(){try{if(m)return m.status}catch(a){}return 0},getResponse:function(a){var b=this.getRuntime();try{switch(a){case"blob":var d=new e(b.uid,m.response),f=m.getResponseHeader("Content-Disposition");if(f){var g=f.match(/filename=([\'\"'])([^\1]+)\1/);g&&(n=g[2])}return d.name=n,d.type||(d.type=c.getFileMime(n)),d;case"json":return i.can("return_response_type","json")?m.response:200===m.status&&window.JSON?JSON.parse(m.responseText):null;case"document":return k(m);default:return""!==m.responseText?m.responseText:null}}catch(h){return null}},getAllResponseHeaders:function(){try{return m.getAllResponseHeaders()}catch(a){}return""},abort:function(){m&&m.abort()},destroy:function(){o=n=null}})}return a.XMLHttpRequest=j}),d("moxie/runtime/html5/utils/BinaryReader",["moxie/core/utils/Basic"],function(a){function b(a){a instanceof ArrayBuffer?c.apply(this,arguments):d.apply(this,arguments)}function c(b){var c=new DataView(b);a.extend(this,{readByteAt:function(a){return c.getUint8(a)},writeByteAt:function(a,b){c.setUint8(a,b)},SEGMENT:function(a,d,e){switch(arguments.length){case 2:return b.slice(a,a+d);case 1:return b.slice(a);case 3:if(null===e&&(e=new ArrayBuffer),e instanceof ArrayBuffer){var f=new Uint8Array(this.length()-d+e.byteLength);a>0&&f.set(new Uint8Array(b.slice(0,a)),0),f.set(new Uint8Array(e),a),f.set(new Uint8Array(b.slice(a+d)),a+e.byteLength),this.clear(),b=f.buffer,c=new DataView(b);
break}default:return b}},length:function(){return b?b.byteLength:0},clear:function(){c=b=null}})}function d(b){function c(a,c,d){d=3===arguments.length?d:b.length-c-1,b=b.substr(0,c)+a+b.substr(d+c)}a.extend(this,{readByteAt:function(a){return b.charCodeAt(a)},writeByteAt:function(a,b){c(String.fromCharCode(b),a,1)},SEGMENT:function(a,d,e){switch(arguments.length){case 1:return b.substr(a);case 2:return b.substr(a,d);case 3:c(null!==e?e:"",a,d);break;default:return b}},length:function(){return b?b.length:0},clear:function(){b=null}})}return a.extend(b.prototype,{littleEndian:!1,read:function(a,b){var c,d,e;if(a+b>this.length())throw new Error("You are trying to read outside the source boundaries.");for(d=this.littleEndian?0:-8*(b-1),e=0,c=0;e<b;e++)c|=this.readByteAt(a+e)<<Math.abs(d+8*e);return c},write:function(a,b,c){var d,e;if(a>this.length())throw new Error("You are trying to write outside the source boundaries.");for(d=this.littleEndian?0:-8*(c-1),e=0;e<c;e++)this.writeByteAt(a+e,b>>Math.abs(d+8*e)&255)},BYTE:function(a){return this.read(a,1)},SHORT:function(a){return this.read(a,2)},LONG:function(a){return this.read(a,4)},SLONG:function(a){var b=this.read(a,4);return b>2147483647?b-4294967296:b},CHAR:function(a){return String.fromCharCode(this.read(a,1))},STRING:function(a,b){return this.asArray("CHAR",a,b).join("")},asArray:function(a,b,c){for(var d=[],e=0;e<c;e++)d[e]=this[a](b+e);return d}}),b}),d("moxie/runtime/html5/image/JPEGHeaders",["moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(a,b){return function c(d){var e,f,g,h=[],i=0;if(e=new a(d),65496!==e.SHORT(0))throw e.clear(),new b.ImageError(b.ImageError.WRONG_FORMAT);for(f=2;f<=e.length();)if(g=e.SHORT(f),g>=65488&&g<=65495)f+=2;else{if(65498===g||65497===g)break;i=e.SHORT(f+2)+2,g>=65505&&g<=65519&&h.push({hex:g,name:"APP"+(15&g),start:f,length:i,segment:e.SEGMENT(f,i)}),f+=i}return e.clear(),{headers:h,restore:function(b){var c,d,e;for(e=new a(b),f=65504==e.SHORT(2)?4+e.SHORT(4):2,d=0,c=h.length;d<c;d++)e.SEGMENT(f,0,h[d].segment),f+=h[d].length;return b=e.SEGMENT(),e.clear(),b},strip:function(b){var d,e,f,g;for(f=new c(b),e=f.headers,f.purge(),d=new a(b),g=e.length;g--;)d.SEGMENT(e[g].start,e[g].length,"");return b=d.SEGMENT(),d.clear(),b},get:function(a){for(var b=[],c=0,d=h.length;c<d;c++)h[c].name===a.toUpperCase()&&b.push(h[c].segment);return b},set:function(a,b){var c,d,e,f=[];for("string"==typeof b?f.push(b):f=b,c=d=0,e=h.length;c<e&&(h[c].name===a.toUpperCase()&&(h[c].segment=f[d],h[c].length=f[d].length,d++),!(d>=f.length));c++);},purge:function(){this.headers=h=[]}}}}),d("moxie/runtime/html5/image/ExifParser",["moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(a,c,d){function e(f){function g(c,e){var f,g,h,i,j,m,n,o,p=this,q=[],r={},s={1:"BYTE",7:"UNDEFINED",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",9:"SLONG",10:"SRATIONAL"},t={BYTE:1,UNDEFINED:1,ASCII:1,SHORT:2,LONG:4,RATIONAL:8,SLONG:4,SRATIONAL:8};for(f=p.SHORT(c),g=0;g<f;g++)if(q=[],n=c+2+12*g,h=e[p.SHORT(n)],h!==b){if(i=s[p.SHORT(n+=2)],j=p.LONG(n+=2),m=t[i],!m)throw new d.ImageError(d.ImageError.INVALID_META_ERR);if(n+=4,m*j>4&&(n=p.LONG(n)+l.tiffHeader),n+m*j>=this.length())throw new d.ImageError(d.ImageError.INVALID_META_ERR);"ASCII"!==i?(q=p.asArray(i,n,j),o=1==j?q[0]:q,k.hasOwnProperty(h)&&"object"!=typeof o?r[h]=k[h][o]:r[h]=o):r[h]=a.trim(p.STRING(n,j).replace(/\0$/,""))}return r}function h(a,b,c){var d,e,f,g=0;if("string"==typeof b){var h=j[a.toLowerCase()];for(var i in h)if(h[i]===b){b=i;break}}d=l[a.toLowerCase()+"IFD"],e=this.SHORT(d);for(var k=0;k<e;k++)if(f=d+12*k+2,this.SHORT(f)==b){g=f+8;break}if(!g)return!1;try{this.write(g,c,4)}catch(m){return!1}return!0}var i,j,k,l,m,n;if(c.call(this,f),j={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}},k={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},l={tiffHeader:10},m=l.tiffHeader,i={clear:this.clear},a.extend(this,{read:function(){try{return e.prototype.read.apply(this,arguments)}catch(a){throw new d.ImageError(d.ImageError.INVALID_META_ERR)}},write:function(){try{return e.prototype.write.apply(this,arguments)}catch(a){throw new d.ImageError(d.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(a){return this.LONG(a)/this.LONG(a+4)},SRATIONAL:function(a){return this.SLONG(a)/this.SLONG(a+4)},ASCII:function(a){return this.CHAR(a)},TIFF:function(){return n||null},EXIF:function(){var b=null;if(l.exifIFD){try{b=g.call(this,l.exifIFD,j.exif)}catch(c){return null}if(b.ExifVersion&&"array"===a.typeOf(b.ExifVersion)){for(var d=0,e="";d<b.ExifVersion.length;d++)e+=String.fromCharCode(b.ExifVersion[d]);b.ExifVersion=e}}return b},GPS:function(){var b=null;if(l.gpsIFD){try{b=g.call(this,l.gpsIFD,j.gps)}catch(c){return null}b.GPSVersionID&&"array"===a.typeOf(b.GPSVersionID)&&(b.GPSVersionID=b.GPSVersionID.join("."))}return b},thumb:function(){if(l.IFD1)try{var a=g.call(this,l.IFD1,j.thumb);if("JPEGInterchangeFormat"in a)return this.SEGMENT(l.tiffHeader+a.JPEGInterchangeFormat,a.JPEGInterchangeFormatLength)}catch(b){}return null},setExif:function(a,b){return("PixelXDimension"===a||"PixelYDimension"===a)&&h.call(this,"exif",a,b)},clear:function(){i.clear(),f=j=k=n=l=i=null}}),65505!==this.SHORT(0)||"EXIF\0"!==this.STRING(4,5).toUpperCase())throw new d.ImageError(d.ImageError.INVALID_META_ERR);if(this.littleEndian=18761==this.SHORT(m),42!==this.SHORT(m+=2))throw new d.ImageError(d.ImageError.INVALID_META_ERR);l.IFD0=l.tiffHeader+this.LONG(m+=2),n=g.call(this,l.IFD0,j.tiff),"ExifIFDPointer"in n&&(l.exifIFD=l.tiffHeader+n.ExifIFDPointer,delete n.ExifIFDPointer),"GPSInfoIFDPointer"in n&&(l.gpsIFD=l.tiffHeader+n.GPSInfoIFDPointer,delete n.GPSInfoIFDPointer),a.isEmptyObj(n)&&(n=null);var o=this.LONG(l.IFD0+12*this.SHORT(l.IFD0)+2);o&&(l.IFD1=l.tiffHeader+o)}return e.prototype=c.prototype,e}),d("moxie/runtime/html5/image/JPEG",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/html5/image/JPEGHeaders","moxie/runtime/html5/utils/BinaryReader","moxie/runtime/html5/image/ExifParser"],function(a,b,c,d,e){function f(f){function g(a){var b,c,d=0;for(a||(a=j);d<=a.length();){if(b=a.SHORT(d+=2),b>=65472&&b<=65475)return d+=5,{height:a.SHORT(d),width:a.SHORT(d+=2)};c=a.SHORT(d+=2),d+=c-2}return null}function h(){var a,b,c=l.thumb();return c&&(a=new d(c),b=g(a),a.clear(),b)?(b.data=c,b):null}function i(){l&&k&&j&&(l.clear(),k.purge(),j.clear(),m=k=l=j=null)}var j,k,l,m;if(j=new d(f),65496!==j.SHORT(0))throw new b.ImageError(b.ImageError.WRONG_FORMAT);k=new c(f);try{l=new e(k.get("app1")[0])}catch(n){}m=g.call(this),a.extend(this,{type:"image/jpeg",size:j.length(),width:m&&m.width||0,height:m&&m.height||0,setExif:function(b,c){return!!l&&("object"===a.typeOf(b)?a.each(b,function(a,b){l.setExif(b,a)}):l.setExif(b,c),void k.set("app1",l.SEGMENT()))},writeHeaders:function(){return arguments.length?k.restore(arguments[0]):k.restore(f)},stripHeaders:function(a){return k.strip(a)},purge:function(){i.call(this)}}),l&&(this.meta={tiff:l.TIFF(),exif:l.EXIF(),gps:l.GPS(),thumb:h()})}return f}),d("moxie/runtime/html5/image/PNG",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader"],function(a,b,c){function d(d){function e(){var a,b;return a=g.call(this,8),"IHDR"==a.type?(b=a.start,{width:h.LONG(b),height:h.LONG(b+=4)}):null}function f(){h&&(h.clear(),d=k=i=j=h=null)}function g(a){var b,c,d,e;return b=h.LONG(a),c=h.STRING(a+=4,4),d=a+=4,e=h.LONG(a+b),{length:b,type:c,start:d,CRC:e}}var h,i,j,k;h=new c(d),function(){var b=0,c=0,d=[35152,20039,3338,6666];for(c=0;c<d.length;c++,b+=2)if(d[c]!=h.SHORT(b))throw new a.ImageError(a.ImageError.WRONG_FORMAT)}(),k=e.call(this),b.extend(this,{type:"image/png",size:h.length(),width:k.width,height:k.height,purge:function(){f.call(this)}}),f.call(this)}return d}),d("moxie/runtime/html5/image/ImageInfo",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/html5/image/JPEG","moxie/runtime/html5/image/PNG"],function(a,b,c,d){return function(e){var f,g=[c,d];f=function(){for(var a=0;a<g.length;a++)try{return new g[a](e)}catch(c){}throw new b.ImageError(b.ImageError.WRONG_FORMAT)}(),a.extend(this,{type:"",size:0,width:0,height:0,setExif:function(){},writeHeaders:function(a){return a},stripHeaders:function(a){return a},purge:function(){e=null}}),a.extend(this,f),this.purge=function(){f.purge(),f=null}}}),d("moxie/runtime/html5/image/MegaPixel",[],function(){function a(a,d,e){var f=a.naturalWidth,g=a.naturalHeight,h=e.width,i=e.height,j=e.x||0,k=e.y||0,l=d.getContext("2d");b(a)&&(f/=2,g/=2);var m=1024,n=document.createElement("canvas");n.width=n.height=m;for(var o=n.getContext("2d"),p=c(a,f,g),q=0;q<g;){for(var r=q+m>g?g-q:m,s=0;s<f;){var t=s+m>f?f-s:m;o.clearRect(0,0,m,m),o.drawImage(a,-s,-q);var u=s*h/f+j<<0,v=Math.ceil(t*h/f),w=q*i/g/p+k<<0,x=Math.ceil(r*i/g/p);l.drawImage(n,0,0,t,r,u,w,v,x),s+=m}q+=m}n=o=null}function b(a){var b=a.naturalWidth,c=a.naturalHeight;if(b*c>1048576){var d=document.createElement("canvas");d.width=d.height=1;var e=d.getContext("2d");return e.drawImage(a,-b+1,0),0===e.getImageData(0,0,1,1).data[3]}return!1}function c(a,b,c){var d=document.createElement("canvas");d.width=1,d.height=c;var e=d.getContext("2d");e.drawImage(a,0,0);for(var f=e.getImageData(0,0,1,c).data,g=0,h=c,i=c;i>g;){var j=f[4*(i-1)+3];0===j?h=i:g=i,i=h+g>>1}d=null;var k=i/c;return 0===k?1:k}return{isSubsampled:b,renderTo:a}}),d("moxie/runtime/html5/image/Image",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/runtime/html5/image/ImageInfo","moxie/runtime/html5/image/MegaPixel","moxie/core/utils/Mime","moxie/core/utils/Env"],function(a,b,c,d,e,f,g,h,i,j){function k(){function a(){if(!u&&!s)throw new c.ImageError(c.DOMException.INVALID_STATE_ERR);return u||s}function k(a){return d.atob(a.substring(a.indexOf("base64,")+7))}function l(a,b){return"data:"+(b||"")+";base64,"+d.btoa(a)}function m(a){var b=this;s=new Image,s.onerror=function(){r.call(this),b.trigger("error",c.ImageError.WRONG_FORMAT)},s.onload=function(){b.trigger("load")},s.src="data:"==a.substr(0,5)?a:l(a,w.type)}function n(a,b){var d,e=this;return window.FileReader?(d=new FileReader,d.onload=function(){b(this.result)},d.onerror=function(){e.trigger("error",c.ImageError.WRONG_FORMAT)},d.readAsDataURL(a),void 0):b(a.getAsDataURL())}function o(c,d,e,f){var g,h,i,j,k,l=this,m=0,n=0;if(z=f,k=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,b.inArray(k,[5,6,7,8])!==-1){var o=c;c=d,d=o}return h=a(),e?(c=Math.min(c,h.width),d=Math.min(d,h.height),g=Math.max(c/h.width,d/h.height)):g=Math.min(c/h.width,d/h.height),g>1&&!e&&f?void this.trigger("Resize"):(u||(u=document.createElement("canvas")),i=Math.round(h.width*g),j=Math.round(h.height*g),e?(u.width=c,u.height=d,i>c&&(m=Math.round((i-c)/2)),j>d&&(n=Math.round((j-d)/2))):(u.width=i,u.height=j),z||q(u.width,u.height,k),p.call(this,h,u,-m,-n,i,j),this.width=u.width,this.height=u.height,y=!0,void l.trigger("Resize"))}function p(a,b,c,d,e,f){if("iOS"===j.OS)h.renderTo(a,b,{width:e,height:f,x:c,y:d});else{var g=b.getContext("2d");g.drawImage(a,c,d,e,f)}}function q(a,b,c){switch(c){case 5:case 6:case 7:case 8:u.width=b,u.height=a;break;default:u.width=a,u.height=b}var d=u.getContext("2d");switch(c){case 2:d.translate(a,0),d.scale(-1,1);break;case 3:d.translate(a,b),d.rotate(Math.PI);break;case 4:d.translate(0,b),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-b);break;case 7:d.rotate(.5*Math.PI),d.translate(a,-b),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-a,0)}}function r(){t&&(t.purge(),t=null),v=s=u=w=null,y=!1}var s,t,u,v,w,x=this,y=!1,z=!0;b.extend(this,{loadFromBlob:function(a){var b=this,d=b.getRuntime(),e=!(arguments.length>1)||arguments[1];if(!d.can("access_binary"))throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR);return w=a,a.isDetached()?(v=a.getSource(),void m.call(this,v)):void n.call(this,a.getSource(),function(a){e&&(v=k(a)),m.call(b,a)})},loadFromImage:function(a,b){this.meta=a.meta,w=new f(null,{name:a.name,size:a.size,type:a.type}),m.call(this,b?v=a.getAsBinaryString():a.getAsDataURL())},getInfo:function(){var b,c=this.getRuntime();return!t&&v&&c.can("access_image_binary")&&(t=new g(v)),b={width:a().width||0,height:a().height||0,type:w.type||i.getFileMime(w.name),size:v&&v.length||w.size||0,name:w.name||"",meta:t&&t.meta||this.meta||{}},!b.meta||!b.meta.thumb||b.meta.thumb.data instanceof e||(b.meta.thumb.data=new e(null,{type:"image/jpeg",data:b.meta.thumb.data})),b},downsize:function(){o.apply(this,arguments)},getAsCanvas:function(){return u&&(u.id=this.uid+"_canvas"),u},getAsBlob:function(a,b){return a!==this.type&&o.call(this,this.width,this.height,!1),new f(null,{name:w.name||"",type:a,data:x.getAsBinaryString.call(this,a,b)})},getAsDataURL:function(a){var b=arguments[1]||90;if(!y)return s.src;if("image/jpeg"!==a)return u.toDataURL("image/png");try{return u.toDataURL("image/jpeg",b/100)}catch(c){return u.toDataURL("image/jpeg")}},getAsBinaryString:function(a,b){if(!y)return v||(v=k(x.getAsDataURL(a,b))),v;if("image/jpeg"!==a)v=k(x.getAsDataURL(a,b));else{var c;b||(b=90);try{c=u.toDataURL("image/jpeg",b/100)}catch(d){c=u.toDataURL("image/jpeg")}v=k(c),t&&(v=t.stripHeaders(v),z&&(t.meta&&t.meta.exif&&t.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),v=t.writeHeaders(v)),t.purge(),t=null)}return y=!1,v},destroy:function(){x=null,r.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return a.Image=k}),d("moxie/runtime/flash/Runtime",[],function(){return{}}),d("moxie/runtime/silverlight/Runtime",[],function(){return{}}),d("moxie/runtime/html4/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(a,b,c,d){function e(b){var e=this,h=c.capTest,i=c.capTrue;c.call(this,b,f,{access_binary:h(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:h(g.Image&&(d.can("create_canvas")||d.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:h(function(){return"Chrome"===d.browser&&d.verComp(d.version,28,">=")||"IE"===d.browser&&d.verComp(d.version,10,">=")||"Safari"===d.browser&&d.verComp(d.version,7,">=")}()),resize_image:function(){return g.Image&&e.can("access_binary")&&d.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(b){return!("json"!==b||!window.JSON)||!!~a.inArray(b,["text","document",""])},return_status_code:function(b){return!a.arrayDiff(b,[200,404])},select_file:function(){return d.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return e.can("select_file")},summon_file_dialog:function(){return e.can("select_file")&&("Firefox"===d.browser&&d.verComp(d.version,4,">=")||"Opera"===d.browser&&d.verComp(d.version,12,">=")||"IE"===d.browser&&d.verComp(d.version,10,">=")||!!~a.inArray(d.browser,["Chrome","Safari"]))},upload_filesize:i,use_http_method:function(b){return!a.arrayDiff(b,["GET","POST"])}}),a.extend(this,{init:function(){this.trigger("Init")},destroy:function(a){return function(){a.call(e),a=e=null}}(this.destroy)}),a.extend(this.getShim(),g)}var f="html4",g={};return c.addConstructor(f,e),g}),d("moxie/runtime/html4/file/FileInput",["moxie/runtime/html4/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(a,b,c,d,e,f,g){function h(){function a(){var f,k,l,m,n,o,p=this,q=p.getRuntime();o=c.guid("uid_"),f=q.getShimContainer(),h&&(l=d.get(h+"_form"),l&&c.extend(l.style,{top:"100%"})),m=document.createElement("form"),m.setAttribute("id",o+"_form"),m.setAttribute("method","post"),m.setAttribute("enctype","multipart/form-data"),m.setAttribute("encoding","multipart/form-data"),c.extend(m.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),n=document.createElement("input"),n.setAttribute("id",o),n.setAttribute("type","file"),n.setAttribute("name",i.name||"Filedata"),n.setAttribute("accept",j.join(",")),c.extend(n.style,{fontSize:"999px",opacity:0}),m.appendChild(n),f.appendChild(m),c.extend(n.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===g.browser&&g.verComp(g.version,10,"<")&&c.extend(n.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),n.onchange=function(){var c;if(this.value){if(this.files){if(c=this.files[0],0===c.size)return void m.parentNode.removeChild(m)}else c={name:this.value};c=new b(q.uid,c),this.onchange=function(){},a.call(p),p.files=[c],n.setAttribute("id",c.uid),m.setAttribute("id",c.uid+"_form"),p.trigger("change"),n=m=null}},q.can("summon_file_dialog")&&(k=d.get(i.browse_button),e.removeEvent(k,"click",p.uid),e.addEvent(k,"click",function(a){n&&!n.disabled&&n.click(),a.preventDefault()},p.uid)),h=o,f=l=k=null}var h,i,j=[];c.extend(this,{init:function(b){var c,g=this,h=g.getRuntime();i=b,j=b.accept.mimes||f.extList2mimes(b.accept,h.can("filter_by_extension")),c=h.getShimContainer(),function(){var a,f,i;a=d.get(b.browse_button),h.can("summon_file_dialog")&&("static"===d.getStyle(a,"position")&&(a.style.position="relative"),f=parseInt(d.getStyle(a,"z-index"),10)||1,a.style.zIndex=f,c.style.zIndex=f-1),i=h.can("summon_file_dialog")?a:c,e.addEvent(i,"mouseover",function(){g.trigger("mouseenter")},g.uid),e.addEvent(i,"mouseout",function(){g.trigger("mouseleave")},g.uid),e.addEvent(i,"mousedown",function(){g.trigger("mousedown")},g.uid),e.addEvent(d.get(b.container),"mouseup",function(){g.trigger("mouseup")},g.uid),a=null}(),a.call(this),c=null,g.trigger({type:"ready",async:!0})},disable:function(a){var b;(b=d.get(h))&&(b.disabled=!!a)},destroy:function(){var a=this.getRuntime(),b=a.getShim(),c=a.getShimContainer();e.removeAllEvents(c,this.uid),e.removeAllEvents(i&&d.get(i.container),this.uid),e.removeAllEvents(i&&d.get(i.browse_button),this.uid),c&&(c.innerHTML=""),b.removeInstance(this.uid),h=j=i=c=b=null}})}return a.FileInput=h}),d("moxie/runtime/html4/file/FileReader",["moxie/runtime/html4/Runtime","moxie/runtime/html5/file/FileReader"],function(a,b){return a.FileReader=b}),d("moxie/runtime/html4/xhr/XMLHttpRequest",["moxie/runtime/html4/Runtime","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Url","moxie/core/Exceptions","moxie/core/utils/Events","moxie/file/Blob","moxie/xhr/FormData"],function(a,b,c,d,e,f,g,h){function i(){function a(a){var b,d,e,g,h=this,i=!1;if(k){if(b=k.id.replace(/_iframe$/,""),d=c.get(b+"_form")){for(e=d.getElementsByTagName("input"),g=e.length;g--;)switch(e[g].getAttribute("type")){case"hidden":e[g].parentNode.removeChild(e[g]);break;case"file":i=!0}e=[],i||d.parentNode.removeChild(d),d=null}setTimeout(function(){f.removeEvent(k,"load",h.uid),k.parentNode&&k.parentNode.removeChild(k);var b=h.getRuntime().getShimContainer();b.children.length||b.parentNode.removeChild(b),b=k=null,a()},1)}}var i,j,k;b.extend(this,{send:function(l,m){function n(){var c=t.getShimContainer()||document.body,e=document.createElement("div");e.innerHTML='<iframe id="'+o+'_iframe" name="'+o+'_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>',k=e.firstChild,c.appendChild(k),f.addEvent(k,"load",function(){var c;try{c=k.contentWindow.document||k.contentDocument||window.frames[k.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(c.title)?i=c.title.replace(/^(\d+).*$/,"$1"):(i=200,j=b.trim(c.body.innerHTML),s.trigger({type:"progress",loaded:j.length,total:j.length}),r&&s.trigger({type:"uploadprogress",loaded:r.size||1025,total:r.size||1025}))}catch(e){if(!d.hasSameOrigin(l.url))return void a.call(s,function(){s.trigger("error")});i=404}a.call(s,function(){s.trigger("load")})},s.uid)}var o,p,q,r,s=this,t=s.getRuntime();if(i=j=null,m instanceof h&&m.hasBlob()){if(r=m.getBlob(),o=r.uid,q=c.get(o),p=c.get(o+"_form"),!p)throw new e.DOMException(e.DOMException.NOT_FOUND_ERR)}else o=b.guid("uid_"),p=document.createElement("form"),p.setAttribute("id",o+"_form"),p.setAttribute("method",l.method),p.setAttribute("enctype","multipart/form-data"),p.setAttribute("encoding","multipart/form-data"),t.getShimContainer().appendChild(p);p.setAttribute("target",o+"_iframe"),m instanceof h&&m.each(function(a,c){if(a instanceof g)q&&q.setAttribute("name",c);else{var d=document.createElement("input");b.extend(d,{type:"hidden",name:c,value:a}),q?p.insertBefore(d,q):p.appendChild(d)}}),p.setAttribute("action",l.url),n(),p.submit(),s.trigger("loadstart")},getStatus:function(){return i},getResponse:function(a){if("json"===a&&"string"===b.typeOf(j)&&window.JSON)try{return JSON.parse(j.replace(/^\s*<pre[^>]*>/,"").replace(/<\/pre>\s*$/,""))}catch(c){return null}return j},abort:function(){var b=this;k&&k.contentWindow&&(k.contentWindow.stop?k.contentWindow.stop():k.contentWindow.document.execCommand?k.contentWindow.document.execCommand("Stop"):k.src="about:blank"),a.call(this,function(){b.dispatchEvent("abort")})}})}return a.XMLHttpRequest=i}),d("moxie/runtime/html4/image/Image",["moxie/runtime/html4/Runtime","moxie/runtime/html5/image/Image"],function(a,b){return a.Image=b}),f(["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/I18n","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/FileInput","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/runtime/Transporter","moxie/image/Image","moxie/core/utils/Events"])}(this),function(a){"use strict";var b={},c=a.moxie.core.utils.Basic.inArray;return function d(a){var e,f;for(e in a)f=typeof a[e],"object"!==f||~c(e,["Exceptions","Env","Mime"])?"function"===f&&(b[e]=a[e]):d(a[e])}(a.moxie),b.Env=a.moxie.core.utils.Env,b.Mime=a.moxie.core.utils.Mime,b.Exceptions=a.moxie.core.Exceptions,a.mOxie=b,a.o||(a.o=b),b}(this);
!function(a,b,c){function d(a){function b(a,b,c){var e={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};e[a]?d[e[a]]=b:c||(d[a]=b)}var c=a.required_features,d={};return"string"==typeof c?g.each(c.split(/\s*,\s*/),function(a){b(a,!0)}):"object"==typeof c?g.each(c,function(a,c){b(c,a)}):c===!0&&(a.chunk_size>0&&(d.slice_blob=!0),!a.resize.enabled&&a.multipart||(d.send_binary_string=!0),g.each(a,function(a,c){b(c,!!a,!0)})),a.runtimes="html5,html4",d}var e=a.setTimeout,f={},g={VERSION:"2.1.9",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:b.mimes,ua:b.ua,typeOf:b.typeOf,extend:b.extend,guid:b.guid,getAll:function(a){var b,c=[];"array"!==g.typeOf(a)&&(a=[a]);for(var d=a.length;d--;)b=g.get(a[d]),b&&c.push(b);return c.length?c:null},get:b.get,each:b.each,getPos:b.getPos,getSize:b.getSize,xmlEncode:function(a){var b={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},c=/[<>&\"\']/g;return a?(""+a).replace(c,function(a){return b[a]?"&"+b[a]+";":a}):a},toArray:b.toArray,inArray:b.inArray,addI18n:b.addI18n,translate:b.translate,isEmptyObj:b.isEmptyObj,hasClass:b.hasClass,addClass:b.addClass,removeClass:b.removeClass,getStyle:b.getStyle,addEvent:b.addEvent,removeEvent:b.removeEvent,removeAllEvents:b.removeAllEvents,cleanName:function(a){var b,c;for(c=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a=a.replace(/\s+/g,"_"),a=a.replace(/[^a-z0-9_\-\.]+/gi,"")},buildUrl:function(a,b){var c="";return g.each(b,function(a,b){c+=(c?"&":"")+encodeURIComponent(b)+"="+encodeURIComponent(a)}),c&&(a+=(a.indexOf("?")>0?"&":"?")+c),a},formatSize:function(a){function b(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)}if(a===c||/\D/.test(a))return g.translate("N/A");var d=Math.pow(1024,4);return a>d?b(a/d,1)+" "+g.translate("tb"):a>(d/=1024)?b(a/d,1)+" "+g.translate("gb"):a>(d/=1024)?b(a/d,1)+" "+g.translate("mb"):a>1024?Math.round(a/1024)+" "+g.translate("kb"):a+" "+g.translate("b")},parseSize:b.parseSizeStr,predictRuntime:function(a,c){var d,e;return d=new g.Uploader(a),e=b.Runtime.thatCan(d.getOption().required_features,c||a.runtimes),d.destroy(),e},addFileFilter:function(a,b){f[a]=b}};g.addFileFilter("mime_types",function(a,b,c){a.length&&!a.regexp.test(b.name)?(this.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File extension error."),file:b}),c(!1)):c(!0)}),g.addFileFilter("max_file_size",function(a,b,c){var d;a=g.parseSize(a),b.size!==d&&a&&b.size>a?(this.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:b}),c(!1)):c(!0)}),g.addFileFilter("prevent_duplicates",function(a,b,c){if(a)for(var d=this.files.length;d--;)if(b.name===this.files[d].name&&b.size===this.files[d].size)return this.trigger("Error",{code:g.FILE_DUPLICATE_ERROR,message:g.translate("Duplicate file error."),file:b}),void c(!1);c(!0)}),g.Uploader=function(a){function h(){var a,b,c=0;if(this.state==g.STARTED){for(b=0;b<D.length;b++)a||D[b].status!=g.QUEUED?c++:(a=D[b],this.trigger("BeforeUpload",a)&&(a.status=g.UPLOADING,this.trigger("UploadFile",a)));c==D.length&&(this.state!==g.STOPPED&&(this.state=g.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",D))}}function i(a){a.percent=a.size>0?Math.ceil(a.loaded/a.size*100):100,j()}function j(){var a,b;for(A.reset(),a=0;a<D.length;a++)b=D[a],b.size!==c?(A.size+=b.origSize,A.loaded+=b.loaded*b.origSize/b.size):A.size=c,b.status==g.DONE?A.uploaded++:b.status==g.FAILED?A.failed++:A.queued++;A.size===c?A.percent=D.length>0?Math.ceil(A.uploaded/D.length*100):0:(A.bytesPerSec=Math.ceil(A.loaded/((+new Date-z||1)/1e3)),A.percent=A.size>0?Math.ceil(A.loaded/A.size*100):0)}function k(){var a=F[0]||G[0];return!!a&&a.getRuntime().uid}function l(a,c){if(a.ruid){var d=b.Runtime.getInfo(a.ruid);if(d)return d.can(c)}return!1}function m(){this.bind("FilesAdded FilesRemoved",function(a){a.trigger("QueueChanged"),a.refresh()}),this.bind("CancelUpload",u),this.bind("BeforeUpload",q),this.bind("UploadFile",r),this.bind("UploadProgress",s),this.bind("StateChanged",t),this.bind("QueueChanged",j),this.bind("Error",w),this.bind("FileUploaded",v),this.bind("Destroy",x)}function n(a,c){var d=this,e=0,f=[],h={runtime_order:a.runtimes,required_caps:a.required_features,preferred_caps:E};g.each(a.runtimes.split(/\s*,\s*/),function(b){a[b]&&(h[b]=a[b])}),a.browse_button&&g.each(a.browse_button,function(c){f.push(function(f){var i=new b.FileInput(g.extend({},h,{accept:a.filters.mime_types,name:a.file_data_name,multiple:a.multi_selection,container:a.container,browse_button:c}));i.onready=function(){var a=b.Runtime.getInfo(this.ruid);b.extend(d.features,{chunks:a.can("slice_blob"),multipart:a.can("send_multipart"),multi_selection:a.can("select_multiple")}),e++,F.push(this),f()},i.onchange=function(){d.addFile(this.files)},i.bind("mouseenter mouseleave mousedown mouseup",function(d){H||(a.browse_button_hover&&("mouseenter"===d.type?b.addClass(c,a.browse_button_hover):"mouseleave"===d.type&&b.removeClass(c,a.browse_button_hover)),a.browse_button_active&&("mousedown"===d.type?b.addClass(c,a.browse_button_active):"mouseup"===d.type&&b.removeClass(c,a.browse_button_active)))}),i.bind("mousedown",function(){d.trigger("Browse")}),i.bind("error runtimeerror",function(){i=null,f()}),i.init()})}),a.drop_element&&g.each(a.drop_element,function(a){f.push(function(c){var f=new b.FileDrop(g.extend({},h,{drop_zone:a}));f.onready=function(){var a=b.Runtime.getInfo(this.ruid);b.extend(d.features,{chunks:a.can("slice_blob"),multipart:a.can("send_multipart"),dragdrop:a.can("drag_and_drop")}),e++,G.push(this),c()},f.ondrop=function(){d.addFile(this.files)},f.bind("error runtimeerror",function(){f=null,c()}),f.init()})}),b.inSeries(f,function(){"function"==typeof c&&c(e)})}function o(a,d,e){var f=new b.Image;try{f.onload=function(){return d.width>this.width&&d.height>this.height&&d.quality===c&&d.preserve_headers&&!d.crop?(this.destroy(),e(a)):void f.downsize(d.width,d.height,d.crop,d.preserve_headers)},f.onresize=function(){e(this.getAsBlob(a.type,d.quality)),this.destroy()},f.onerror=function(){e(a)},f.load(a)}catch(g){e(a)}}function p(a,c,e){function f(a,b,c){var d=y[a];switch(a){case"max_file_size":"max_file_size"===a&&(y.max_file_size=y.filters.max_file_size=b);break;case"chunk_size":(b=g.parseSize(b))&&(y[a]=b,y.send_file_name=!0);break;case"multipart":y[a]=b,b||(y.send_file_name=!0);break;case"unique_names":y[a]=b,b&&(y.send_file_name=!0);break;case"filters":"array"===g.typeOf(b)&&(b={mime_types:b}),c?g.extend(y.filters,b):y.filters=b,b.mime_types&&(y.filters.mime_types.regexp=function(a){var b=[];return g.each(a,function(a){g.each(a.extensions.split(/,/),function(a){/^\s*\*\s*$/.test(a)?b.push("\\.*"):b.push("\\."+a.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+b.join("|")+")$","i")}(y.filters.mime_types));break;case"resize":c?g.extend(y.resize,b,{enabled:!0}):y.resize=b;break;case"prevent_duplicates":y.prevent_duplicates=y.filters.prevent_duplicates=!!b;break;case"container":case"browse_button":case"drop_element":b="container"===a?g.get(b):g.getAll(b);case"runtimes":case"multi_selection":y[a]=b,c||(i=!0);break;default:y[a]=b}c||h.trigger("OptionChanged",a,b,d)}var h=this,i=!1;"object"==typeof a?g.each(a,function(a,b){f(b,a,e)}):f(a,c,e),e?(y.required_features=d(g.extend({},y)),E=d(g.extend({},y,{required_features:!0}))):i&&(h.trigger("Destroy"),n.call(h,y,function(a){a?(h.runtime=b.Runtime.getInfo(k()).type,h.trigger("Init",{runtime:h.runtime}),h.trigger("PostInit")):h.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}))}function q(a,b){if(a.settings.unique_names){var c=b.name.match(/\.([^.]+)$/),d="part";c&&(d=c[1]),b.target_name=b.id+"."+d}}function r(a,c){function d(){k-- >0?e(f,1e3):(c.loaded=n,a.trigger("Error",{code:g.HTTP_ERROR,message:g.translate("HTTP Error."),file:c,response:B.responseText,status:B.status,responseHeaders:B.getAllResponseHeaders()}))}function f(){var l,o,p,q={};c.status===g.UPLOADING&&a.state!==g.STOPPED&&(a.settings.send_file_name&&(q.name=c.target_name||c.name),j&&m.chunks&&h.size>j?(p=Math.min(j,h.size-n),l=h.slice(n,n+p)):(p=h.size,l=h),j&&m.chunks&&(a.settings.send_chunk_number?(q.chunk=Math.ceil(n/j),q.chunks=Math.ceil(h.size/j)):(q.offset=n,q.total=h.size)),B=new b.XMLHttpRequest,B.upload&&(B.upload.onprogress=function(b){c.loaded=Math.min(c.size,n+b.loaded),a.trigger("UploadProgress",c)}),B.onload=function(){return B.status>=400?void d():(k=a.settings.max_retries,p<h.size?(l.destroy(),n+=p,c.loaded=Math.min(n,h.size),a.trigger("ChunkUploaded",c,{offset:c.loaded,total:h.size,response:B.responseText,status:B.status,responseHeaders:B.getAllResponseHeaders()}),"Android Browser"===b.Env.browser&&a.trigger("UploadProgress",c)):c.loaded=c.size,l=o=null,void(!n||n>=h.size?(c.size!=c.origSize&&(h.destroy(),h=null),a.trigger("UploadProgress",c),c.status=g.DONE,a.trigger("FileUploaded",c,{response:B.responseText,status:B.status,responseHeaders:B.getAllResponseHeaders()})):e(f,1)))},B.onerror=function(){d()},B.onloadend=function(){this.destroy(),B=null},a.settings.multipart&&m.multipart?(B.open("post",i,!0),g.each(a.settings.headers,function(a,b){B.setRequestHeader(b,a)}),o=new b.FormData,g.each(g.extend(q,a.settings.multipart_params),function(a,b){o.append(b,a)}),o.append(a.settings.file_data_name,l),B.send(o,{runtime_order:a.settings.runtimes,required_caps:a.settings.required_features,preferred_caps:E})):(i=g.buildUrl(a.settings.url,g.extend(q,a.settings.multipart_params)),B.open("post",i,!0),B.setRequestHeader("Content-Type","application/octet-stream"),g.each(a.settings.headers,function(a,b){B.setRequestHeader(b,a)}),B.send(l,{runtime_order:a.settings.runtimes,required_caps:a.settings.required_features,preferred_caps:E})))}var h,i=a.settings.url,j=a.settings.chunk_size,k=a.settings.max_retries,m=a.features,n=0;c.loaded&&(n=c.loaded=j?j*Math.floor(c.loaded/j):0),h=c.getSource(),a.settings.resize.enabled&&l(h,"send_binary_string")&&~b.inArray(h.type,["image/jpeg","image/png"])?o.call(this,h,a.settings.resize,function(a){h=a,c.size=a.size,f()}):f()}function s(a,b){i(b)}function t(a){if(a.state==g.STARTED)z=+new Date;else if(a.state==g.STOPPED)for(var b=a.files.length-1;b>=0;b--)a.files[b].status==g.UPLOADING&&(a.files[b].status=g.QUEUED,j())}function u(){B&&B.abort()}function v(a){j(),e(function(){h.call(a)},1)}function w(a,b){b.code===g.INIT_ERROR?a.destroy():b.code===g.HTTP_ERROR&&(b.file.status=g.FAILED,i(b.file),a.state==g.STARTED&&(a.trigger("CancelUpload"),e(function(){h.call(a)},1)))}function x(a){a.stop(),g.each(D,function(a){a.destroy()}),D=[],F.length&&(g.each(F,function(a){a.destroy()}),F=[]),G.length&&(g.each(G,function(a){a.destroy()}),G=[]),E={},H=!1,z=B=null,A.reset()}var y,z,A,B,C=g.guid(),D=[],E={},F=[],G=[],H=!1;y={runtimes:b.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},p.call(this,a,null,!0),A=new g.QueueProgress,g.extend(this,{id:C,uid:C,state:g.STOPPED,features:{},runtime:null,files:D,settings:y,total:A,init:function(){var a,c,d=this;return a=d.getOption("preinit"),"function"==typeof a?a(d):g.each(a,function(a,b){d.bind(b,a)}),m.call(d),g.each(["container","browse_button","drop_element"],function(a){if(null===d.getOption(a))return c={code:g.INIT_ERROR,message:g.translate("'%' specified, but cannot be found.")},!1}),c?d.trigger("Error",c):y.browse_button||y.drop_element?void n.call(d,y,function(a){var c=d.getOption("init");"function"==typeof c?c(d):g.each(c,function(a,b){d.bind(b,a)}),a?(d.runtime=b.Runtime.getInfo(k()).type,d.trigger("Init",{runtime:d.runtime}),d.trigger("PostInit")):d.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}):d.trigger("Error",{code:g.INIT_ERROR,message:g.translate("You must specify either 'browse_button' or 'drop_element'.")})},setOption:function(a,b){p.call(this,a,b,!this.runtime)},getOption:function(a){return a?y[a]:y},refresh:function(){F.length&&g.each(F,function(a){a.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=g.STARTED&&(this.state=g.STARTED,this.trigger("StateChanged"),h.call(this))},stop:function(){this.state!=g.STOPPED&&(this.state=g.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){H=arguments[0]===c||arguments[0],F.length&&g.each(F,function(a){a.disable(H)}),this.trigger("DisableBrowse",H)},getFile:function(a){var b;for(b=D.length-1;b>=0;b--)if(D[b].id===a)return D[b]},addFile:function(a,c){function d(a,c){var d=[];b.each(j.settings.filters,function(b,c){f[c]&&d.push(function(d){f[c].call(j,b,a,function(a){d(!a)})})}),b.inSeries(d,c)}function h(a){var f=b.typeOf(a);if(a instanceof b.File){if(!a.ruid&&!a.isDetached()){if(!i)return!1;a.ruid=i,a.connectRuntime(i)}h(new g.File(a))}else a instanceof b.Blob?(h(a.getSource()),a.destroy()):a instanceof g.File?(c&&(a.name=c),l.push(function(b){d(a,function(c){c||(D.push(a),m.push(a),j.trigger("FileFiltered",a)),e(b,1)})})):b.inArray(f,["file","blob"])!==-1?h(new b.File(null,a)):"node"===f&&"filelist"===b.typeOf(a.files)?b.each(a.files,h):"array"===f&&(c=null,b.each(a,h))}var i,j=this,l=[],m=[];i=k(),h(a),l.length&&b.inSeries(l,function(){m.length&&j.trigger("FilesAdded",m)})},removeFile:function(a){for(var b="string"==typeof a?a:a.id,c=D.length-1;c>=0;c--)if(D[c].id===b)return this.splice(c,1)[0]},splice:function(a,b){var d=D.splice(a===c?0:a,b===c?D.length:b),e=!1;return this.state==g.STARTED&&(g.each(d,function(a){if(a.status===g.UPLOADING)return e=!0,!1}),e&&this.stop()),this.trigger("FilesRemoved",d),g.each(d,function(a){a.destroy()}),e&&this.start(),d},dispatchEvent:function(a){var b,c;if(a=a.toLowerCase(),b=this.hasEventListener(a)){b.sort(function(a,b){return b.priority-a.priority}),c=[].slice.call(arguments),c.shift(),c.unshift(this);for(var d=0;d<b.length;d++)if(b[d].fn.apply(b[d].scope,c)===!1)return!1}return!0},bind:function(a,b,c,d){g.Uploader.prototype.bind.call(this,a,b,d,c)},destroy:function(){this.trigger("Destroy"),y=A=null,this.unbindAll()}})},g.Uploader.prototype=b.EventTarget.instance,g.File=function(){function a(a){g.extend(this,{id:g.guid(),name:a.name||a.fileName,type:a.type||"",size:a.size||a.fileSize,origSize:a.size||a.fileSize,loaded:0,percent:0,status:g.QUEUED,lastModifiedDate:a.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var a=this.getSource().getSource();return b.inArray(b.typeOf(a),["blob","file"])!==-1?a:null},getSource:function(){return c[this.id]?c[this.id]:null},destroy:function(){var a=this.getSource();a&&(a.destroy(),delete c[this.id])}}),c[this.id]=a}var c={};return a}(),g.QueueProgress=function(){var a=this;a.size=0,a.loaded=0,a.uploaded=0,a.failed=0,a.queued=0,a.percent=0,a.bytesPerSec=0,a.reset=function(){a.size=a.loaded=a.uploaded=a.failed=a.queued=a.percent=a.bytesPerSec=0}},a.plupload=g}(window,mOxie);

(function(t){"use strict";function e(t,e,r){return t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):void 0}function r(t,e){var r,n;for(r=0,n=t.length;n>r;r++)if(t[r]===e)return!0;return!1}function n(t,e){var r;t.createTextRange?(r=t.createTextRange(),r.move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function a(t,e){try{return t.type=e,!0}catch(r){return!1}}t.Placeholders={Utils:{addEventListener:e,inArray:r,moveCaret:n,changeType:a}}})(this),function(t){"use strict";function e(){}function r(){try{return document.activeElement}catch(t){}}function n(t,e){var r,n,a=!!e&&t.value!==e,u=t.value===t.getAttribute(V);return(a||u)&&"true"===t.getAttribute(P)?(t.removeAttribute(P),t.value=t.value.replace(t.getAttribute(V),""),t.className=t.className.replace(R,""),n=t.getAttribute(z),parseInt(n,10)>=0&&(t.setAttribute("maxLength",n),t.removeAttribute(z)),r=t.getAttribute(D),r&&(t.type=r),!0):!1}function a(t){var e,r,n=t.getAttribute(V);return""===t.value&&n?(t.setAttribute(P,"true"),t.value=n,t.className+=" "+I,r=t.getAttribute(z),r||(t.setAttribute(z,t.maxLength),t.removeAttribute("maxLength")),e=t.getAttribute(D),e?t.type="text":"password"===t.type&&K.changeType(t,"text")&&t.setAttribute(D,"password"),!0):!1}function u(t,e){var r,n,a,u,i,l,o;if(t&&t.getAttribute(V))e(t);else for(a=t?t.getElementsByTagName("input"):f,u=t?t.getElementsByTagName("textarea"):h,r=a?a.length:0,n=u?u.length:0,o=0,l=r+n;l>o;o++)i=r>o?a[o]:u[o-r],e(i)}function i(t){u(t,n)}function l(t){u(t,a)}function o(t){return function(){b&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(P)?K.moveCaret(t,0):n(t)}}function c(t){return function(){a(t)}}function s(t){return function(e){return A=t.value,"true"===t.getAttribute(P)&&A===t.getAttribute(V)&&K.inArray(C,e.keyCode)?(e.preventDefault&&e.preventDefault(),!1):void 0}}function d(t){return function(){n(t,A),""===t.value&&(t.blur(),K.moveCaret(t,0))}}function v(t){return function(){t===r()&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(P)&&K.moveCaret(t,0)}}function g(t){return function(){i(t)}}function p(t){t.form&&(T=t.form,"string"==typeof T&&(T=document.getElementById(T)),T.getAttribute(U)||(K.addEventListener(T,"submit",g(T)),T.setAttribute(U,"true"))),K.addEventListener(t,"focus",o(t)),K.addEventListener(t,"blur",c(t)),b&&(K.addEventListener(t,"keydown",s(t)),K.addEventListener(t,"keyup",d(t)),K.addEventListener(t,"click",v(t))),t.setAttribute(j,"true"),t.setAttribute(V,x),(b||t!==r())&&a(t)}var f,h,b,m,A,y,E,x,L,T,S,N,w,B=["text","search","url","tel","email","password","number","textarea"],C=[27,33,34,35,36,37,38,39,40,8,46],k="#ccc",I="placeholdersjs",R=RegExp("(?:^|\\s)"+I+"(?!\\S)"),V="data-placeholder-value",P="data-placeholder-active",D="data-placeholder-type",U="data-placeholder-submit",j="data-placeholder-bound",q="data-placeholder-focus",Q="data-placeholder-live",z="data-placeholder-maxlength",F=document.createElement("input"),G=document.getElementsByTagName("head")[0],H=document.documentElement,J=t.Placeholders,K=J.Utils;if(J.nativeSupport=void 0!==F.placeholder,!J.nativeSupport){for(f=document.getElementsByTagName("input"),h=document.getElementsByTagName("textarea"),b="false"===H.getAttribute(q),m="false"!==H.getAttribute(Q),y=document.createElement("style"),y.type="text/css",E=document.createTextNode("."+I+" { color:"+k+"; }"),y.styleSheet?y.styleSheet.cssText=E.nodeValue:y.appendChild(E),G.insertBefore(y,G.firstChild),w=0,N=f.length+h.length;N>w;w++)S=f.length>w?f[w]:h[w-f.length],x=S.attributes.placeholder,x&&(x=x.nodeValue,x&&K.inArray(B,S.type)&&p(S));L=setInterval(function(){for(w=0,N=f.length+h.length;N>w;w++)S=f.length>w?f[w]:h[w-f.length],x=S.attributes.placeholder,x?(x=x.nodeValue,x&&K.inArray(B,S.type)&&(S.getAttribute(j)||p(S),(x!==S.getAttribute(V)||"password"===S.type&&!S.getAttribute(D))&&("password"===S.type&&!S.getAttribute(D)&&K.changeType(S,"text")&&S.setAttribute(D,"password"),S.value===S.getAttribute(V)&&(S.value=x),S.setAttribute(V,x)))):S.getAttribute(P)&&(n(S),S.removeAttribute(V));m||clearInterval(L)},100)}K.addEventListener(t,"beforeunload",function(){J.disable()}),J.disable=J.nativeSupport?e:i,J.enable=J.nativeSupport?e:l}(this),function(t){"use strict";var e=t.fn.val,r=t.fn.prop;Placeholders.nativeSupport||(t.fn.val=function(t){var r=e.apply(this,arguments),n=this.eq(0).data("placeholder-value");return void 0===t&&this.eq(0).data("placeholder-active")&&r===n?"":r},t.fn.prop=function(t,e){return void 0===e&&this.eq(0).data("placeholder-active")&&"value"===t?"":r.apply(this,arguments)})}(jQuery);
(function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if("object"==typeof a){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if("object"===c)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}).call(this),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):a.eventie=f}(this),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(c,d){return b(a,c,d)}):"object"==typeof module&&module.exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.imagesLoaded=b(a,a.EventEmitter,a.eventie)}(window,function(a,b,c){function d(a,b){for(var c in b)a[c]=b[c];return a}function e(a){return"[object Array]"==l.call(a)}function f(a){var b=[];if(e(a))b=a;else if("number"==typeof a.length)for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b,c);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a,b){this.url=a,this.element=b,this.img=new Image}var j=a.jQuery,k=a.console,l=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0;a<this.elements.length;a++){var b=this.elements[a];this.addElementImages(b)}},g.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a),this.options.background===!0&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&m[b]){for(var c=a.querySelectorAll("img"),d=0;d<c.length;d++){var e=c[d];this.addImage(e)}if("string"==typeof this.options.background){var f=a.querySelectorAll(this.options.background);for(d=0;d<f.length;d++){var g=f[d];this.addElementBackgroundImages(g)}}}};var m={1:!0,9:!0,11:!0};g.prototype.addElementBackgroundImages=function(a){for(var b=n(a),c=/url\(['"]*([^'"\)]+)['"]*\)/gi,d=c.exec(b.backgroundImage);null!==d;){var e=d&&d[1];e&&this.addBackground(e,a),d=c.exec(b.backgroundImage)}};var n=a.getComputedStyle||function(a){return a.currentStyle};return g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.addBackground=function(a,b){var c=new i(a,b);this.images.push(c)},g.prototype.check=function(){function a(a,c,d){setTimeout(function(){b.progress(a,c,d)})}var b=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var c=0;c<this.images.length;c++){var d=this.images[c];d.once("progress",a),d.check()}},g.prototype.progress=function(a,b,c){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emit("progress",this,a,b),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&k&&k.log("progress: "+c,a,b)},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(a,this),this.emit("always",this),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},h.prototype=new b,h.prototype.check=function(){var a=this.getIsImageComplete();return a?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,c.bind(this.proxyImage,"load",this),c.bind(this.proxyImage,"error",this),c.bind(this.img,"load",this),c.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("progress",this,this.img,b)},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){c.unbind(this.proxyImage,"load",this),c.unbind(this.proxyImage,"error",this),c.unbind(this.img,"load",this),c.unbind(this.img,"error",this)},i.prototype=new h,i.prototype.check=function(){c.bind(this.img,"load",this),c.bind(this.img,"error",this),this.img.src=this.url;var a=this.getIsImageComplete();a&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},i.prototype.unbindEvents=function(){c.unbind(this.img,"load",this),c.unbind(this.img,"error",this)},i.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("progress",this,this.element,b)},g.makeJQueryPlugin=function(b){b=b||a.jQuery,b&&(j=b,j.fn.imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))})},g.makeJQueryPlugin(),g});
/*!
 * Masonry PACKAGED v3.3.2
 * Cascading grid layout library
 * http://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d});
/*!
 * Masonry v2 shim
 * to maintain backwards compatibility
 * as of Masonry v3.1.2
 *
 * Cascading grid layout library
 * http://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */
!function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window);
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,
c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();if(!(a.length<1)){var b=a.data("data");null!=b.element&&b.element.selected||null==b.element&&b.selected||this.trigger("select",{data:b})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a;
}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},b.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},b.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},b.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},b.prototype.addOptions=function(b,c){var d=a.map(c,function(b){return a.data(b[0],"data")});this._currentData.push.apply(this._currentData,d)},b}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f],h=b(c.term,g.text,g);h||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c;var d=this.options.get("query");d.call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){var d=c.find(".dropdown-wrapper");d.append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});

(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this);
window.wp=window.wp||{},function(a){var b="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(b){var c,d={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(c=c||_.template(a("#tmpl-"+b).html(),d))(e)}}),wp.ajax={settings:b.ajax||{},post:function(a,b){return wp.ajax.send({data:_.isObject(a)?a:_.extend(b||{},{action:a})})},send:function(b,c){var d,e;return _.isObject(b)?c=b:(c=c||{},c.data=_.extend(c.data||{},{action:b})),c=_.defaults(c||{},{type:"POST",url:wp.ajax.settings.url,context:this}),e=a.Deferred(function(b){c.success&&b.done(c.success),c.error&&b.fail(c.error),delete c.success,delete c.error,b.jqXHR=a.ajax(c).done(function(a){"1"!==a&&1!==a||(a={success:!0}),_.isObject(a)&&!_.isUndefined(a.success)?b[a.success?"resolveWith":"rejectWith"](this,[a.data]):b.rejectWith(this,[a])}).fail(function(){b.rejectWith(this,arguments)})}),d=e.promise(),d.abort=function(){return e.jqXHR.abort(),this},d}}}(jQuery);
jQuery(document).ready(function(){jQuery(document).on("click",".um-popup-overlay",function(){remove_Modal()}),jQuery(document).on("click",'.um-modal-overlay, a[data-action="um_remove_modal"]',function(){um_remove_modal()}),jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"], .um-modal a',function(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-modal .um-single-file-preview a.cancel",function(e){e.preventDefault();var a=jQuery(this).parents(".um-modal-body"),t=jQuery(this).parents(".um-modal-body").find(".um-single-fileinfo a").attr("href");return a.find(".um-single-file-preview").hide(),a.find(".ajax-upload-dragdrop").show(),a.find(".um-modal-btn.um-finish-upload").addClass("disabled"),um_modal_responsive(),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:t}}),!1}),jQuery(document).on("click",".um-modal .um-single-image-preview a.cancel",function(e){e.preventDefault();var a=jQuery(this).parents(".um-modal-body"),t=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview img").attr("src");return jQuery("img.cropper-hidden").cropper("destroy"),a.find(".um-single-image-preview img").attr("src",""),a.find(".um-single-image-preview").hide(),a.find(".ajax-upload-dragdrop").show(),a.find(".um-modal-btn.um-finish-upload").addClass("disabled"),um_modal_responsive(),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:t}}),!1}),jQuery(document).on("click",".um-finish-upload.file:not(.disabled)",function(){var e=jQuery(this).attr("data-key"),a=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html();um_remove_modal(),jQuery(".um-single-file-preview[data-key="+e+"]").fadeIn().html(a);var t=jQuery(".um-field[data-key="+e+"]").find(".um-single-fileinfo a").data("file");jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change")),jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find('input[type="hidden"]').val(t)}),jQuery(document).on("click",".um-finish-upload.image:not(.disabled)",function(){var a=jQuery(this),t=jQuery(this).attr("data-key"),e=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),i=e.find("img").attr("src"),r=e.attr("data-coord"),u=e.find("img").data("file"),m=0;jQuery(this).parents("#um_upload_single").data("user_id")&&(m=jQuery(this).parents("#um_upload_single").data("user_id")),r?(jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled"),jQuery.ajax({url:wp.ajax.settings.url,type:"POST",dataType:"json",data:{action:"um_resize_image",src:i,coord:r,user_id:m,key:t},success:function(e){1==e.success&&(d=new Date,"profile_photo"==t&&jQuery(".um-profile-photo-img img").attr("src",e.data.image.source_url+"?"+d.getTime()),"cover_photo"==t&&(jQuery(".um-cover-e").empty().html('<img src="'+e.data.image.source_url+"?"+d.getTime()+'" alt="" />'),jQuery(".um").hasClass("um-editing")&&jQuery(".um-cover-overlay").show()),jQuery(".um-single-image-preview[data-key="+t+"]").fadeIn().find("img").attr("src",e.data.image.source_url+"?"+d.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change")),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find('input[type="hidden"]').val(e.data.image.filename))}})):(d=new Date,jQuery(".um-single-image-preview[data-key="+t+"]").fadeIn().find("img").attr("src",i+"?"+d.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find(".um-btn-auto-width").html(a.attr("data-change")),jQuery(".um-single-image-preview[data-key="+t+"]").parents(".um-field").find("input[type=hidden]").val(u))}),jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(e){var a=jQuery(this).attr("data-modal"),t="normal";if(jQuery(this).data("modal-size"))t=jQuery(this).data("modal-size");jQuery(this).data("modal-copy")&&(jQuery("#"+a).html(jQuery(this).parents(".um-field").find(".um-modal-hidden-content").html()),jQuery(this).parents(".um-profile-photo").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-profile-photo").attr("data-user_id")),jQuery(this).parents(".um-cover").attr("data-ratio")&&jQuery("#"+a).attr("data-ratio",jQuery(this).parents(".um-cover").attr("data-ratio")),jQuery(this).parents(".um-cover").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-cover").attr("data-user_id")),0<jQuery("input[type=hidden][name='user_id']").length&&jQuery("#"+a).attr("data-user_id",jQuery("input[type=hidden][name='user_id']").val())),um_new_modal(a,t)})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(X){"use strict";var b={};b.fileapi=void 0!==X("<input type='file'/>").get(0).files,b.formdata=void 0!==window.FormData;var C=!!X.fn.prop;function r(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),X(e.target).ajaxSubmit(t))}function a(e){var t=e.target,r=X(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n=this;if("image"==(n.clk=t).type)if(void 0!==e.offsetX)n.clk_x=e.offsetX,n.clk_y=e.offsetY;else if("function"==typeof X.fn.offset){var i=r.offset();n.clk_x=e.pageX-i.left,n.clk_y=e.pageY-i.top}else n.clk_x=e.pageX-t.offsetLeft,n.clk_y=e.pageY-t.offsetTop;setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function _(){if(X.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}X.fn.attr2=function(){if(!C)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},X.fn.ajaxSubmit=function(E){if(!this.length)return _("ajaxSubmit: skipping submit process - no element selected"),this;var M,e,t,F=this;"function"==typeof E?E={success:E}:void 0===E&&(E={}),M=E.type||this.attr2("method"),(t=(t="string"==typeof(e=E.url||this.attr2("action"))?X.trim(e):"")||window.location.href||"")&&(t=(t.match(/^([^#]+)/)||[])[1]),E=X.extend(!0,{url:t,success:X.ajaxSettings.success,type:M||X.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},E);var r={};if(this.trigger("form-pre-serialize",[this,E,r]),r.veto)return _("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(E.beforeSerialize&&!1===E.beforeSerialize(this,E))return _("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var a=E.traditional;void 0===a&&(a=X.ajaxSettings.traditional);var n,O=[],i=this.formToArray(E.semantic,O);if(E.data&&(E.extraData=E.data,n=X.param(E.data,a)),E.beforeSubmit&&!1===E.beforeSubmit(i,this,E))return _("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[i,this,E,r]),r.veto)return _("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var o=X.param(i,a);n&&(o=o?o+"&"+n:n),"GET"==E.type.toUpperCase()?(E.url+=(0<=E.url.indexOf("?")?"&":"?")+o,E.data=null):E.data=o;var s=[];if(E.resetForm&&s.push(function(){F.resetForm()}),E.clearForm&&s.push(function(){F.clearForm(E.includeHidden)}),!E.dataType&&E.target){var u=E.success||function(){};s.push(function(e){var t=E.replaceTarget?"replaceWith":"html";X(E.target)[t](e).each(u,arguments)})}else E.success&&s.push(E.success);if(E.success=function(e,t,r){for(var a=E.context||this,n=0,i=s.length;n<i;n++)s[n].apply(a,[e,t,r||F,F])},E.error){var c=E.error;E.error=function(e,t,r){var a=E.context||this;c.apply(a,[e,t,r,F])}}if(E.complete){var l=E.complete;E.complete=function(e,t){var r=E.context||this;l.apply(r,[e,t,F])}}var f=0<X("input[type=file]:enabled",this).filter(function(){return""!==X(this).val()}).length,m="multipart/form-data",p=F.attr("enctype")==m||F.attr("encoding")==m,d=b.fileapi&&b.formdata;_("fileAPI :"+d);var h,v=(f||p)&&!d;!1!==E.iframe&&(E.iframe||v)?E.closeKeepAlive?X.get(E.closeKeepAlive,function(){h=x(i)}):h=x(i):h=(f||p)&&d?function(e){for(var r=new FormData,t=0;t<e.length;t++)r.append(e[t].name,e[t].value);if(E.extraData){var a=function(e){var t,r,a=X.param(e,E.traditional).split("&"),n=a.length,i=[];for(t=0;t<n;t++)a[t]=a[t].replace(/\+/g," "),r=a[t].split("="),i.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return i}(E.extraData);for(t=0;t<a.length;t++)a[t]&&r.append(a[t][0],a[t][1])}E.data=null;var n=X.extend(!0,{},X.ajaxSettings,E,{contentType:!1,processData:!1,cache:!1,type:M||"POST"});E.uploadProgress&&(n.xhr=function(){var e=X.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,a=e.total;e.lengthComputable&&(t=Math.ceil(r/a*100)),E.uploadProgress(e,r,a,t)},!1),e});n.data=null;var i=n.beforeSend;return n.beforeSend=function(e,t){E.formData?t.data=E.formData:t.data=r,i&&i.call(this,e,t)},X.ajax(n)}(i):X.ajax(E),F.removeData("jqxhr").data("jqxhr",h);for(var g=0;g<O.length;g++)O[g]=null;return this.trigger("form-submit-notify",[this,E]),this;function x(e){var t,r,l,f,i,m,p,d,a,n,h,v,o=F[0],g=X.Deferred();if(g.abort=function(e){d.abort(e)},e)for(r=0;r<O.length;r++)t=X(O[r]),C?t.prop("disabled",!1):t.removeAttr("disabled");if((l=X.extend(!0,{},X.ajaxSettings,E)).context=l.context||l,i="jqFormIO"+(new Date).getTime(),l.iframeTarget?(n=(m=X(l.iframeTarget)).attr2("name"))?i=n:m.attr2("name",i):(m=X('<iframe name="'+i+'" src="'+l.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),p=m[0],d={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";_("aborting upload... "+t),this.aborted=1;try{p.contentWindow.document.execCommand&&p.contentWindow.document.execCommand("Stop")}catch(e){}m.attr("src",l.iframeSrc),d.error=t,l.error&&l.error.call(l.context,d,t,e),f&&X.event.trigger("ajaxError",[d,l,t]),l.complete&&l.complete.call(l.context,d,t)}},(f=l.global)&&0==X.active++&&X.event.trigger("ajaxStart"),f&&X.event.trigger("ajaxSend",[d,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,d,l))return l.global&&X.active--,g.reject(),g;if(d.aborted)return g.reject(),g;(a=o.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"==a.type&&(l.extraData[n+".x"]=o.clk_x,l.extraData[n+".y"]=o.clk_y));var x=1,b=2;function y(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){_("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){_("cannot get iframe.contentDocument: "+e),r=t.document}return r}var s=X("meta[name=csrf-token]").attr("content"),u=X("meta[name=csrf-param]").attr("content");function c(){var e=F.attr2("target"),t=F.attr2("action"),r=F.attr("enctype")||F.attr("encoding")||"multipart/form-data";o.setAttribute("target",i),M&&!/post/i.test(M)||o.setAttribute("method","POST"),t!=l.url&&o.setAttribute("action",l.url),l.skipEncodingOverride||M&&!/post/i.test(M)||F.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,D(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(X.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(X('<input type="hidden" name="'+l.extraData[n].name+'">').val(l.extraData[n].value).appendTo(o)[0]):a.push(X('<input type="hidden" name="'+n+'">').val(l.extraData[n]).appendTo(o)[0]));l.iframeTarget||m.appendTo("body"),p.attachEvent?p.attachEvent("onload",D):p.addEventListener("load",D,!1),setTimeout(function e(){try{var t=y(p).readyState;_("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){_("Server abort: ",e," (",e.name,")"),D(b),v&&clearTimeout(v),v=void 0}},15);try{o.submit()}catch(e){document.createElement("form").submit.apply(o)}}finally{o.setAttribute("action",t),o.setAttribute("enctype",r),e?o.setAttribute("target",e):F.removeAttr("target"),X(a).remove()}}u&&s&&(l.extraData=l.extraData||{},l.extraData[u]=s),l.forceSync?c():setTimeout(c,10);var T,j,w,S=50;function D(e){if(!d.aborted&&!w){if((j=y(p))||(_("cannot access response document"),e=b),e===x&&d)return d.abort("timeout"),void g.reject(d,"timeout");if(e==b&&d)return d.abort("server abort"),void g.reject(d,"error","server abort");if(j&&j.location.href!=l.iframeSrc||h){p.detachEvent?p.detachEvent("onload",D):p.removeEventListener("load",D,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"==l.dataType||j.XMLDocument||X.isXMLDoc(j);if(_("isXml="+a),!a&&window.opera&&(null===j.body||!j.body.innerHTML)&&--S)return _("requeing onLoad callback, DOM not available"),void setTimeout(D,250);var n=j.body?j.body:j.documentElement;d.responseText=n?n.innerHTML:null,d.responseXML=j.XMLDocument?j.XMLDocument:j,a&&(l.dataType="xml"),d.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(d.status=Number(n.getAttribute("status"))||d.status,d.statusText=n.getAttribute("statusText")||d.statusText);var i=(l.dataType||"").toLowerCase(),o=/(json|script|text)/.test(i);if(o||l.textarea){var s=j.getElementsByTagName("textarea")[0];if(s)d.responseText=s.value,d.status=Number(s.getAttribute("status"))||d.status,d.statusText=s.getAttribute("statusText")||d.statusText;else if(o){var u=j.getElementsByTagName("pre")[0],c=j.getElementsByTagName("body")[0];u?d.responseText=u.textContent?u.textContent:u.innerText:c&&(d.responseText=c.textContent?c.textContent:c.innerText)}}else"xml"==i&&!d.responseXML&&d.responseText&&(d.responseXML=k(d.responseText));try{T=L(d,i,l)}catch(e){r="parsererror",d.error=t=e||r}}catch(e){_("error caught: ",e),r="error",d.error=t=e||r}d.aborted&&(_("upload aborted"),r=null),d.status&&(r=200<=d.status&&d.status<300||304===d.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,T,"success",d),g.resolve(d.responseText,"success",d),f&&X.event.trigger("ajaxSuccess",[d,l])):r&&(void 0===t&&(t=d.statusText),l.error&&l.error.call(l.context,d,r,t),g.reject(d,"error",t),f&&X.event.trigger("ajaxError",[d,l,t])),f&&X.event.trigger("ajaxComplete",[d,l]),f&&!--X.active&&X.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,d,r),w=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?m.attr("src",l.iframeSrc):m.remove(),d.responseXML=null},100)}}}var k=X.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},A=X.parseJSON||function(e){return window.eval("("+e+")")},L=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n="xml"===t||!t&&0<=a.indexOf("xml"),i=n?e.responseXML:e.responseText;return n&&"parsererror"===i.documentElement.nodeName&&X.error&&X.error("parsererror"),r&&r.dataFilter&&(i=r.dataFilter(i,t)),"string"==typeof i&&("json"===t||!t&&0<=a.indexOf("json")?i=A(i):("script"===t||!t&&0<=a.indexOf("javascript"))&&X.globalEval(i)),i};return g}},X.fn.ajaxForm=function(e){if((e=e||{}).delegation=e.delegation&&X.isFunction(X.fn.on),!e.delegation&&0===this.length){var t={s:this.selector,c:this.context};return!X.isReady&&t.s?(_("DOM not ready, queuing ajaxForm"),X(function(){X(t.s,t.c).ajaxForm(e)})):_("terminating; zero elements found by selector"+(X.isReady?"":" (DOM not ready)")),this}return e.delegation?(X(document).off("submit.form-plugin",this.selector,r).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,e,r).on("click.form-plugin",this.selector,e,a),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,r).bind("click.form-plugin",e,a)},X.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},X.fn.formToArray=function(e,t){var r=[];if(0===this.length)return r;var a,n,i,o,s,u,c,l,f=this[0],m=this.attr("id"),p=e?f.getElementsByTagName("*"):f.elements;if(p&&!/MSIE [678]/.test(navigator.userAgent)&&(p=X(p).get()),m&&(a=X(':input[form="'+m+'"]').get()).length&&(p=(p||[]).concat(a)),!p||!p.length)return r;for(n=0,c=p.length;n<c;n++)if((o=(u=p[n]).name)&&!u.disabled)if(e&&f.clk&&"image"==u.type)f.clk==u&&(r.push({name:o,value:X(u).val(),type:u.type}),r.push({name:o+".x",value:f.clk_x},{name:o+".y",value:f.clk_y}));else if((s=X.fieldValue(u,!0))&&s.constructor==Array)for(t&&t.push(u),i=0,l=s.length;i<l;i++)r.push({name:o,value:s[i]});else if(b.fileapi&&"file"==u.type){t&&t.push(u);var d=u.files;if(d.length)for(i=0;i<d.length;i++)r.push({name:o,value:d[i],type:u.type});else r.push({name:o,value:"",type:u.type})}else null!=s&&(t&&t.push(u),r.push({name:o,value:s,type:u.type,required:u.required}));if(!e&&f.clk){var h=X(f.clk),v=h[0];(o=v.name)&&!v.disabled&&"image"==v.type&&(r.push({name:o,value:h.val()}),r.push({name:o+".x",value:f.clk_x},{name:o+".y",value:f.clk_y}))}return r},X.fn.formSerialize=function(e){return X.param(this.formToArray(e))},X.fn.fieldSerialize=function(n){var i=[];return this.each(function(){var e=this.name;if(e){var t=X.fieldValue(this,n);if(t&&t.constructor==Array)for(var r=0,a=t.length;r<a;r++)i.push({name:e,value:t[r]});else null!=t&&i.push({name:this.name,value:t})}}),X.param(i)},X.fn.fieldValue=function(e){for(var t=[],r=0,a=this.length;r<a;r++){var n=this[r],i=X.fieldValue(n,e);null==i||i.constructor==Array&&!i.length||(i.constructor==Array?X.merge(t,i):t.push(i))}return t},X.fieldValue=function(e,t){var r=e.name,a=e.type,n=e.tagName.toLowerCase();if(void 0===t&&(t=!0),t&&(!r||e.disabled||"reset"==a||"button"==a||("checkbox"==a||"radio"==a)&&!e.checked||("submit"==a||"image"==a)&&e.form&&e.form.clk!=e||"select"==n&&-1==e.selectedIndex))return null;if("select"==n){var i=e.selectedIndex;if(i<0)return null;for(var o=[],s=e.options,u="select-one"==a,c=u?i+1:s.length,l=u?i:0;l<c;l++){var f=s[l];if(f.selected){var m=f.value;if(m||(m=f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value),u)return m;o.push(m)}}return o}return X(e).val()},X.fn.clearForm=function(e){return this.each(function(){X("input,select,textarea",this).clearFields(e)})},X.fn.clearFields=X.fn.clearInputs=function(r){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();a.test(e)||"textarea"==t?this.value="":"checkbox"==e||"radio"==e?this.checked=!1:"select"==t?this.selectedIndex=-1:"file"==e?/MSIE/.test(navigator.userAgent)?X(this).replaceWith(X(this).clone(!0)):X(this).val(""):r&&(!0===r&&/hidden/.test(e)||"string"==typeof r&&X(this).is(r))&&(this.value="")})},X.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},X.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},X.fn.selected=function(r){return void 0===r&&(r=!0),this.each(function(){var e=this.type;if("checkbox"==e||"radio"==e)this.checked=r;else if("option"==this.tagName.toLowerCase()){var t=X(this).parent("select");r&&t[0]&&"select-one"==t[0].type&&t.find("option").selected(!1),this.selected=r}})},X.fn.ajaxSubmit.debug=!1});
!function(S){S.fn.ajaxForm;var C={};C.fileapi=void 0!==S("<input type='file'/>").get(0).files,C.formdata=void 0!==window.FormData,S.fn.uploadFile=function(e){var p=S.extend({url:"",method:"POST",enctype:"multipart/form-data",formData:null,returnType:null,allowedTypes:"*",fileName:"file",formData:{},dynamicFormData:function(){return{}},maxFileSize:-1,maxFileCount:-1,multiple:!0,dragDrop:!0,autoSubmit:!0,showCancel:!0,showAbort:!0,showDone:!0,showDelete:!1,showError:!0,showStatusAfterSuccess:!0,showStatusAfterError:!0,showFileCounter:!0,fileCounterStyle:"). ",showProgress:!1,onSelect:function(e){return!0},onSubmit:function(e,r){},onSuccess:function(e,r,t){},onError:function(e,r,t){},deleteCallback:!1,afterUploadAll:!1,uploadButtonClass:"upload",dragDropStr:"",abortStr:"Abort",cancelStr:"Cancel",deletelStr:"Delete",doneStr:"Done",multiDragErrorStr:"Multiple File Drag &amp; Drop is not allowed.",extErrorStr:"",sizeErrorStr:"",uploadErrorStr:"Upload is not allowed",maxFileCountErrorStr:""},e);this.fileCounter=1,this.selectedFiles=0,this.fCounter=0,this.sCounter=0,this.tCounter=0;var s="upload-"+(new Date).getTime();this.formGroup=s,this.hide(),this.errorLog=S("<div></div>"),this.after(this.errorLog),this.responses=[],C.formdata||(p.dragDrop=!1),C.formdata||(p.multiple=!1);var c=this,i=S("<div>"+S(this).html()+"</div>");S(i).addClass(p.uploadButtonClass),function e(){if(S.fn.ajaxForm){if(p.dragDrop){var r=S('<div class="ajax-upload-dragdrop" style="vertical-align:top;"></div>');S(c).before(r),S(r).append(i),S(r).prepend(S(p.dragDropStr)),t=c,o=p,(a=r).on("dragenter",function(e){e.stopPropagation(),e.preventDefault(),S(this).css("border","2px dashed #ddd")}),a.on("dragover",function(e){e.stopPropagation(),e.preventDefault()}),a.on("drop",function(e){S(this).css("border","2px dashed #ddd"),e.preventDefault(),t.errorLog.html("");var r=e.originalEvent.dataTransfer.files;!o.multiple&&1<r.length?o.showError&&S("<div class='um-error-block'>"+o.multiDragErrorStr+"</div>").appendTo(t.errorLog):0!=o.onSelect(r)&&m(o,t,r)}),S(document).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}),S(document).on("dragover",function(e){e.stopPropagation(),e.preventDefault(),a.css("border","2px dashed #ddd")}),S(document).on("drop",function(e){e.stopPropagation(),e.preventDefault(),a.css("border","2px dashed #ddd")})}else S(c).before(i);!function l(n,d,u,p){var e="ajax-upload-id-"+(new Date).getTime();var c=S("<form method='"+u.method+"' action='"+u.url+"' enctype='"+u.enctype+"'></form>");var r="<input type='file' id='"+e+"' name='"+u.fileName+"'/>";u.multiple&&(u.fileName.indexOf("[]")!=u.fileName.length-2&&(u.fileName+="[]"),r="<input type='file' id='"+e+"' name='"+u.fileName+"' multiple/>");var t=S(r).appendTo(c);t.change(function(){n.errorLog.html("");u.allowedTypes.toLowerCase().split(",");var e=[];if(this.files){for(s=0;s<this.files.length;s++)e.push(this.files[s].name);if(0==u.onSelect(this.files))return}else{var r=S(this).val(),t=[];if(e.push(r),!v(n,u,r))return void(u.showError&&S("<div class='um-error-block'>"+u.extErrorStr+"</div>").appendTo(n.errorLog));if(t.push({name:r,size:"NA"}),0==u.onSelect(t))return}if(g(u,n),p.unbind("click"),c.hide(),l(n,d,u,p),c.addClass(d),C.fileapi&&C.formdata){c.removeClass(d);var o=this.files;m(u,n,o)}else{for(var a="",s=0;s<e.length;s++)u.showFileCounter?a+=n.fileCounter+u.fileCounterStyle+e[s]+"<br>":a+=e[s]+"<br>",n.fileCounter++;if(-1!=u.maxFileCount&&n.selectedFiles+e.length>u.maxFileCount)return void(u.showError&&S("<div class='um-error-block'>"+u.maxFileCountErrorStr+"</div>").appendTo(n.errorLog));n.selectedFiles+=e.length;var i=new b(n,u);i.filename.html(a),w(c,u,i,e,n)}});c.css({margin:0,padding:0});var o=S(p).width()+10;10==o&&(o=120);var a=p.height()+10;10==a&&(a=35);p.css({position:"relative",overflow:"hidden",cursor:"default"});t.css({position:"absolute",cursor:"pointer",top:"0px",width:"100%",height:"34px",left:"0px","z-index":"100",opacity:"0.0",filter:"alpha(opacity=0)","-ms-filter":"alpha(opacity=0)","-khtml-opacity":"0.0","-moz-opacity":"0.0"});c.appendTo(p)}(c,s,p,i)}else window.setTimeout(e,10);var t,o,a}(),this.startUpload=function(){S("."+this.formGroup).each(function(e,r){S(this).is("form")&&S(this).submit()})},this.stopUpload=function(){S(".upload-red").each(function(e,r){S(this).hasClass(c.formGroup)&&S(this).click()})};var h=!(this.getResponses=function(){return this.responses});function f(e){var r,t,o=[],a=(o="string"==jQuery.type(e)?e.split("&"):S.param(e).split("&")).length,s=[];for(r=0;r<a;r++)o[r]=o[r].replace(/\+/g," "),t=o[r].split("="),s.push([decodeURIComponent(t[0]),decodeURIComponent(t[1])]);return s}function m(e,r,t){for(var o=0;o<t.length;o++)if(v(r,e,t[o].name))if(-1!=e.maxFileSize&&t[o].size>e.maxFileSize)e.showError&&S("<div class='um-error-block'>"+e.sizeErrorStr+"</div>").appendTo(r.errorLog);else if(-1!=e.maxFileCount&&r.selectedFiles>=e.maxFileCount)e.showError&&S("<div class='um-error-block'>"+e.maxFileCountErrorStr+"</div>").appendTo(r.errorLog);else{r.selectedFiles++;var a=e,s=new FormData,i=e.fileName.replace("[]","");s.append(i,t[o]);var l=e.formData;if(l)for(var n=f(l),d=0;d<n.length;d++)n[d]&&s.append(n[d][0],n[d][1]);a.fileData=s;var u=new b(r,e),p="";p=e.showFileCounter?r.fileCounter+e.fileCounterStyle+t[o].name:t[o].name,u.filename.html(p);var c=S("<form style='display:block; position:absolute;left: 150px;' class='"+r.formGroup+"' method='"+e.method+"' action='"+e.url+"' enctype='"+e.enctype+"'></form>");c.appendTo("body");var h=[];h.push(t[o].name),w(c,a,u,h,r),r.fileCounter++}else e.showError&&S("<div class='um-error-block'>"+e.extErrorStr+"</div>").appendTo(r.errorLog)}function v(e,r,t){var o=r.allowedTypes.toLowerCase().split(","),a=t.split(".").pop().toLowerCase();return!("*"!=r.allowedTypes&&jQuery.inArray(a,o)<0)}function g(a,e){if(a.showFileCounter){var s=S(".upload-filename").length;e.fileCounter=s+1,S(".upload-filename").each(function(e,r){var t=S(this).html().split(a.fileCounterStyle),o=(parseInt(t[0]),s+a.fileCounterStyle+t[1]);S(this).html(o),s--})}}function b(e,r){return this.statusbar=S("<div class='upload-statusbar'></div>"),this.filename=S("<div class='upload-filename'></div>").appendTo(this.statusbar),this.progressDiv=S("<div class='upload-progress'>").appendTo(this.statusbar).hide(),this.progressbar=S("<div class='upload-bar "+e.formGroup+"'></div>").appendTo(this.progressDiv),this.abort=S("<div class='upload-red "+e.formGroup+"'>"+r.abortStr+"</div>").appendTo(this.statusbar).hide(),this.cancel=S("<div class='upload-red'>"+r.cancelStr+"</div>").appendTo(this.statusbar).hide(),this.done=S("<div class='upload-green'>"+r.doneStr+"</div>").appendTo(this.statusbar).hide(),this.del=S("<div class='upload-red'>"+r.deletelStr+"</div>").appendTo(this.statusbar).hide(),e.errorLog.after(this.statusbar),this}function w(i,l,n,d,u){var e={cache:!1,contentType:!1,processData:!1,forceSync:!1,data:l.formData,formData:l.fileData,dataType:l.returnType,beforeSubmit:function(e,r,t){if(0!=l.onSubmit.call(this,d)){var o=l.dynamicFormData();if(o){var a=f(o);if(a)for(var s=0;s<a.length;s++)a[s]&&(null!=l.fileData?t.formData.append(a[s][0],a[s][1]):t.data[a[s][0]]=a[s][1])}return u.tCounter+=d.length,p.afterUploadAll&&!h&&(h=!0,function e(){0!=c.sCounter&&c.sCounter+c.fCounter==c.tCounter?(p.afterUploadAll(c),h=!1):window.setTimeout(e,100)}()),!0}return n.statusbar.append("<div class='um-error-block'>"+l.uploadErrorStr+"</div>"),n.cancel.show(),i.remove(),n.cancel.click(function(){n.statusbar.remove()}),!1},beforeSend:function(e,r){n.progressDiv.show(),n.cancel.hide(),n.done.hide(),l.showAbort&&(n.abort.show(),n.abort.click(function(){e.abort(),u.selectedFiles-=d.length})),C.formdata?n.progressbar.width("1%"):n.progressbar.width("5%")},uploadProgress:function(e,r,t,o){98<o&&(o=98);var a=o+"%";1<o&&n.progressbar.width(a),l.showProgress&&(n.progressbar.html(a),n.progressbar.css("text-align","center"))},success:function(e,r,t){u.responses.push(e),n.progressbar.width("100%"),l.showProgress&&(n.progressbar.html("100%"),n.progressbar.css("text-align","center")),n.abort.hide(),l.onSuccess.call(this,d,e,t),l.showStatusAfterSuccess?(l.showDone?(n.done.show(),n.done.click(function(){n.statusbar.hide("slow"),n.statusbar.remove()})):n.done.hide(),l.showDelete?(n.del.show(),n.del.click(function(){n.statusbar.hide().remove(),l.deleteCallback&&l.deleteCallback.call(this,e,n),u.selectedFiles-=d.length,g(l,u)})):n.del.hide()):(n.statusbar.hide("slow"),n.statusbar.remove()),i.remove(),u.sCounter+=d.length},error:function(e,r,t){n.abort.hide(),"abort"==e.statusText?(n.statusbar.hide("slow").remove(),g(l,u)):(l.onError.call(this,d,r,t),l.showStatusAfterError?(n.progressDiv.hide(),n.statusbar.append("<span class='um-error-block'>ERROR: "+t+"</span>")):(n.statusbar.hide(),n.statusbar.remove()),u.selectedFiles-=d.length),i.remove(),u.fCounter+=d.length}};l.autoSubmit?i.ajaxSubmit(e):(l.showCancel&&(n.cancel.show(),n.cancel.click(function(){i.remove(),n.statusbar.remove(),u.selectedFiles-=d.length,g(l,u)})),i.ajaxForm(e))}return this}}(jQuery);
/*!
 * pickadate.js v3.5.6, 2015/04/20
 * By Amsul, http://amsul.ca
 * Hosted on http://amsul.github.io/pickadate.js
 * Licensed under MIT
 */
(function(factory){if(typeof define=='function'&&define.amd)
define('picker',['jquery'],factory)
else if(typeof exports=='object')
module.exports=factory(require('jquery'))
else this.Picker=factory(jQuery)}(function($){var $window=$(window)
var $document=$(document)
var $html=$(document.documentElement)
var supportsTransitions=document.documentElement.style.transition!=null
function PickerConstructor(ELEMENT,NAME,COMPONENT,OPTIONS){if(!ELEMENT)return PickerConstructor
var
IS_DEFAULT_THEME=false,STATE={id:ELEMENT.id||'P'+Math.abs(~~(Math.random()*new Date()))},SETTINGS=COMPONENT?$.extend(true,{},COMPONENT.defaults,OPTIONS):OPTIONS||{},CLASSES=$.extend({},PickerConstructor.klasses(),SETTINGS.klass),$ELEMENT=$(ELEMENT),PickerInstance=function(){return this.start()},P=PickerInstance.prototype={constructor:PickerInstance,$node:$ELEMENT,start:function(){if(STATE&&STATE.start)return P
STATE.methods={}
STATE.start=true
STATE.open=false
STATE.type=ELEMENT.type
ELEMENT.autofocus=ELEMENT==getActiveElement()
ELEMENT.readOnly=!SETTINGS.editable
ELEMENT.id=ELEMENT.id||STATE.id
if(ELEMENT.type!='text'){ELEMENT.type='text'}
P.component=new COMPONENT(P,SETTINGS)
P.$root=$('<div class="'+CLASSES.picker+'" id="'+ELEMENT.id+'_root" />')
prepareElementRoot()
P.$holder=$(createWrappedComponent()).appendTo(P.$root)
prepareElementHolder()
if(SETTINGS.formatSubmit){prepareElementHidden()}
prepareElement()
if(SETTINGS.containerHidden)$(SETTINGS.containerHidden).append(P._hidden)
else $ELEMENT.after(P._hidden)
if(SETTINGS.container)$(SETTINGS.container).append(P.$root)
else $ELEMENT.after(P.$root)
P.on({start:P.component.onStart,render:P.component.onRender,stop:P.component.onStop,open:P.component.onOpen,close:P.component.onClose,set:P.component.onSet}).on({start:SETTINGS.onStart,render:SETTINGS.onRender,stop:SETTINGS.onStop,open:SETTINGS.onOpen,close:SETTINGS.onClose,set:SETTINGS.onSet})
IS_DEFAULT_THEME=isUsingDefaultTheme(P.$holder[0])
if(ELEMENT.autofocus){P.open()}
return P.trigger('start').trigger('render')},render:function(entireComponent){if(entireComponent){P.$holder=$(createWrappedComponent())
prepareElementHolder()
P.$root.html(P.$holder)}
else P.$root.find('.'+CLASSES.box).html(P.component.nodes(STATE.open))
return P.trigger('render')},stop:function(){if(!STATE.start)return P
P.close()
if(P._hidden){P._hidden.parentNode.removeChild(P._hidden)}
P.$root.remove()
$ELEMENT.removeClass(CLASSES.input).removeData(NAME)
setTimeout(function(){$ELEMENT.off('.'+STATE.id)},0)
ELEMENT.type=STATE.type
ELEMENT.readOnly=false
P.trigger('stop')
STATE.methods={}
STATE.start=false
return P},open:function(dontGiveFocus){if(STATE.open)return P
$ELEMENT.addClass(CLASSES.active)
aria(ELEMENT,'expanded',true)
setTimeout(function(){P.$root.addClass(CLASSES.opened)
aria(P.$root[0],'hidden',false)},0)
if(dontGiveFocus!==false){STATE.open=true
if(IS_DEFAULT_THEME){$html.css('overflow','hidden').css('padding-right','+='+getScrollbarWidth())}
focusPickerOnceOpened()
$document.on('click.'+STATE.id+' focusin.'+STATE.id,function(event){var target=event.target
if(target!=ELEMENT&&target!=document&&event.which!=3){P.close(target===P.$holder[0])}}).on('keydown.'+STATE.id,function(event){var
keycode=event.keyCode,keycodeToMove=P.component.key[keycode],target=event.target
if(keycode==27){P.close(true)}
else if(target==P.$holder[0]&&(keycodeToMove||keycode==13)){event.preventDefault()
if(keycodeToMove){PickerConstructor._.trigger(P.component.key.go,P,[PickerConstructor._.trigger(keycodeToMove)])}
else if(!P.$root.find('.'+CLASSES.highlighted).hasClass(CLASSES.disabled)){P.set('select',P.component.item.highlight)
if(SETTINGS.closeOnSelect){P.close(true)}}}
else if($.contains(P.$root[0],target)&&keycode==13){event.preventDefault()
target.click()}})}
return P.trigger('open')},close:function(giveFocus){if(giveFocus){if(SETTINGS.editable){ELEMENT.focus()}
else{P.$holder.off('focus.toOpen').focus()
setTimeout(function(){P.$holder.on('focus.toOpen',handleFocusToOpenEvent)},0)}}
$ELEMENT.removeClass(CLASSES.active)
aria(ELEMENT,'expanded',false)
setTimeout(function(){P.$root.removeClass(CLASSES.opened+' '+CLASSES.focused)
aria(P.$root[0],'hidden',true)},0)
if(!STATE.open)return P
STATE.open=false
if(IS_DEFAULT_THEME){$html.css('overflow','').css('padding-right','-='+getScrollbarWidth())}
$document.off('.'+STATE.id)
return P.trigger('close')},clear:function(options){return P.set('clear',null,options)},set:function(thing,value,options){var thingItem,thingValue,thingIsObject=$.isPlainObject(thing),thingObject=thingIsObject?thing:{}
options=thingIsObject&&$.isPlainObject(value)?value:options||{}
if(thing){if(!thingIsObject){thingObject[thing]=value}
for(thingItem in thingObject){thingValue=thingObject[thingItem]
if(thingItem in P.component.item){if(thingValue===undefined)thingValue=null
P.component.set(thingItem,thingValue,options)}
if(thingItem=='select'||thingItem=='clear'){$ELEMENT.val(thingItem=='clear'?'':P.get(thingItem,SETTINGS.format)).trigger('change')}}
P.render()}
return options.muted?P:P.trigger('set',thingObject)},get:function(thing,format){thing=thing||'value'
if(STATE[thing]!=null){return STATE[thing]}
if(thing=='valueSubmit'){if(P._hidden){return P._hidden.value}
thing='value'}
if(thing=='value'){return ELEMENT.value}
if(thing in P.component.item){if(typeof format=='string'){var thingValue=P.component.get(thing)
return thingValue?PickerConstructor._.trigger(P.component.formats.toString,P.component,[format,thingValue]):''}
return P.component.get(thing)}},on:function(thing,method,internal){var thingName,thingMethod,thingIsObject=$.isPlainObject(thing),thingObject=thingIsObject?thing:{}
if(thing){if(!thingIsObject){thingObject[thing]=method}
for(thingName in thingObject){thingMethod=thingObject[thingName]
if(internal){thingName='_'+thingName}
STATE.methods[thingName]=STATE.methods[thingName]||[]
STATE.methods[thingName].push(thingMethod)}}
return P},off:function(){var i,thingName,names=arguments;for(i=0,namesCount=names.length;i<namesCount;i+=1){thingName=names[i]
if(thingName in STATE.methods){delete STATE.methods[thingName]}}
return P},trigger:function(name,data){var _trigger=function(name){var methodList=STATE.methods[name]
if(methodList){methodList.map(function(method){PickerConstructor._.trigger(method,P,[data])})}}
_trigger('_'+name)
_trigger(name)
return P}}
function createWrappedComponent(){return PickerConstructor._.node('div',PickerConstructor._.node('div',PickerConstructor._.node('div',PickerConstructor._.node('div',P.component.nodes(STATE.open),CLASSES.box),CLASSES.wrap),CLASSES.frame),CLASSES.holder,'tabindex="-1"')}
function prepareElement(){$ELEMENT.data(NAME,P).addClass(CLASSES.input).val($ELEMENT.data('value')?P.get('select',SETTINGS.format):ELEMENT.value)
if(!SETTINGS.editable){$ELEMENT.on('focus.'+STATE.id+' click.'+STATE.id,function(event){event.preventDefault()
P.open()}).on('keydown.'+STATE.id,handleKeydownEvent)}
aria(ELEMENT,{haspopup:true,expanded:false,readonly:false,owns:ELEMENT.id+'_root'})}
function prepareElementRoot(){aria(P.$root[0],'hidden',true)}
function prepareElementHolder(){P.$holder.on({keydown:handleKeydownEvent,'focus.toOpen':handleFocusToOpenEvent,blur:function(){$ELEMENT.removeClass(CLASSES.target)},focusin:function(event){P.$root.removeClass(CLASSES.focused)
event.stopPropagation()},'mousedown click':function(event){var target=event.target
if(target!=P.$holder[0]){event.stopPropagation()
if(event.type=='mousedown'&&!$(target).is('input, select, textarea, button, option')){event.preventDefault()
P.$holder[0].focus()}}}}).on('click','[data-pick], [data-nav], [data-clear], [data-close]',function(){var $target=$(this),targetData=$target.data(),targetDisabled=$target.hasClass(CLASSES.navDisabled)||$target.hasClass(CLASSES.disabled),activeElement=getActiveElement()
activeElement=activeElement&&(activeElement.type||activeElement.href)
if(targetDisabled||activeElement&&!$.contains(P.$root[0],activeElement)){P.$holder[0].focus()}
if(!targetDisabled&&targetData.nav){P.set('highlight',P.component.item.highlight,{nav:targetData.nav})}
else if(!targetDisabled&&'pick'in targetData){P.set('select',targetData.pick)
if(SETTINGS.closeOnSelect){P.close(true)}}
else if(targetData.clear){P.clear()
if(SETTINGS.closeOnClear){P.close(true)}}
else if(targetData.close){P.close(true)}})}
function prepareElementHidden(){var name
if(SETTINGS.hiddenName===true){name=ELEMENT.name
ELEMENT.name=''}
else{name=[typeof SETTINGS.hiddenPrefix=='string'?SETTINGS.hiddenPrefix:'',typeof SETTINGS.hiddenSuffix=='string'?SETTINGS.hiddenSuffix:'_submit']
name=name[0]+ELEMENT.name+name[1]}
P._hidden=$('<input '+'type=hidden '+'name="'+name+'"'+
($ELEMENT.data('value')||ELEMENT.value?' value="'+P.get('select',SETTINGS.formatSubmit)+'"':'')+'>')[0]
$ELEMENT.on('change.'+STATE.id,function(){P._hidden.value=ELEMENT.value?P.get('select',SETTINGS.formatSubmit):''})}
function focusPickerOnceOpened(){if(IS_DEFAULT_THEME&&supportsTransitions){P.$holder.find('.'+CLASSES.frame).one('transitionend',function(){P.$holder[0].focus()})}
else{P.$holder[0].focus()}}
function handleFocusToOpenEvent(event){event.stopPropagation()
$ELEMENT.addClass(CLASSES.target)
P.$root.addClass(CLASSES.focused)
P.open()}
function handleKeydownEvent(event){var keycode=event.keyCode,isKeycodeDelete=/^(8|46)$/.test(keycode)
if(keycode==27){P.close(true)
return false}
if(keycode==32||isKeycodeDelete||!STATE.open&&P.component.key[keycode]){event.preventDefault()
event.stopPropagation()
if(isKeycodeDelete){P.clear().close()}
else{P.open()}}}
return new PickerInstance()}
PickerConstructor.klasses=function(prefix){prefix=prefix||'picker'
return{picker:prefix,opened:prefix+'--opened',focused:prefix+'--focused',input:prefix+'__input',active:prefix+'__input--active',target:prefix+'__input--target',holder:prefix+'__holder',frame:prefix+'__frame',wrap:prefix+'__wrap',box:prefix+'__box'}}
function isUsingDefaultTheme(element){var theme,prop='position'
if(element.currentStyle){theme=element.currentStyle[prop]}
else if(window.getComputedStyle){theme=getComputedStyle(element)[prop]}
return theme=='fixed'}
function getScrollbarWidth(){if($html.height()<=$window.height()){return 0}
var $outer=$('<div style="visibility:hidden;width:100px" />').appendTo('body')
var widthWithoutScroll=$outer[0].offsetWidth
$outer.css('overflow','scroll')
var $inner=$('<div style="width:100%" />').appendTo($outer)
var widthWithScroll=$inner[0].offsetWidth
$outer.remove()
return widthWithoutScroll-widthWithScroll}
PickerConstructor._={group:function(groupObject){var
loopObjectScope,nodesList='',counter=PickerConstructor._.trigger(groupObject.min,groupObject)
for(;counter<=PickerConstructor._.trigger(groupObject.max,groupObject,[counter]);counter+=groupObject.i){loopObjectScope=PickerConstructor._.trigger(groupObject.item,groupObject,[counter])
nodesList+=PickerConstructor._.node(groupObject.node,loopObjectScope[0],loopObjectScope[1],loopObjectScope[2])}
return nodesList},node:function(wrapper,item,klass,attribute){if(!item)return''
item=$.isArray(item)?item.join(''):item
klass=klass?' class="'+klass+'"':''
attribute=attribute?' '+attribute:''
return'<'+wrapper+klass+attribute+'>'+item+'</'+wrapper+'>'},lead:function(number){return(number<10?'0':'')+number},trigger:function(callback,scope,args){return typeof callback=='function'?callback.apply(scope,args||[]):callback},digits:function(string){return(/\d/).test(string[1])?2:1},isDate:function(value){return{}.toString.call(value).indexOf('Date')>-1&&this.isInteger(value.getDate())},isInteger:function(value){return{}.toString.call(value).indexOf('Number')>-1&&value%1===0},ariaAttr:ariaAttr}
PickerConstructor.extend=function(name,Component){$.fn[name]=function(options,action){var componentData=this.data(name)
if(options=='picker'){return componentData}
if(componentData&&typeof options=='string'){return PickerConstructor._.trigger(componentData[options],componentData,[action])}
return this.each(function(){var $this=$(this)
if(!$this.data(name)){new PickerConstructor(this,name,Component,options)}})}
$.fn[name].defaults=Component.defaults}
function aria(element,attribute,value){if($.isPlainObject(attribute)){for(var key in attribute){ariaSet(element,key,attribute[key])}}
else{ariaSet(element,attribute,value)}}
function ariaSet(element,attribute,value){element.setAttribute((attribute=='role'?'':'aria-')+attribute,value)}
function ariaAttr(attribute,data){if(!$.isPlainObject(attribute)){attribute={attribute:data}}
data=''
for(var key in attribute){var attr=(key=='role'?'':'aria-')+key,attrVal=attribute[key]
data+=attrVal==null?'':attr+'="'+attribute[key]+'"'}
return data}
function getActiveElement(){try{return document.activeElement}catch(err){}}
return PickerConstructor}));
/*!
 * Date picker for pickadate.js v3.5.6
 * http://amsul.github.io/pickadate.js/date.htm
 */
(function(factory){if(typeof define=='function'&&define.amd)
define(['picker','jquery'],factory)
else if(typeof exports=='object')
module.exports=factory(require('./picker.js'),require('jquery'))
else factory(Picker,jQuery)}(function(Picker,$){var DAYS_IN_WEEK=7,WEEKS_IN_CALENDAR=6,_=Picker._
function DatePicker(picker,settings){var calendar=this,element=picker.$node[0],elementValue=element.value,elementDataValue=picker.$node.data('value'),valueString=elementDataValue||elementValue,formatString=elementDataValue?settings.formatSubmit:settings.format,isRTL=function(){return element.currentStyle?element.currentStyle.direction=='rtl':getComputedStyle(picker.$root[0]).direction=='rtl'}
calendar.settings=settings
calendar.$node=picker.$node
calendar.queue={min:'measure create',max:'measure create',now:'now create',select:'parse create validate',highlight:'parse navigate create validate',view:'parse create validate viewset',disable:'deactivate',enable:'activate'}
calendar.item={}
calendar.item.clear=null
calendar.item.disable=(settings.disable||[]).slice(0)
calendar.item.enable=-(function(collectionDisabled){return collectionDisabled[0]===true?collectionDisabled.shift():-1})(calendar.item.disable)
calendar.set('min',settings.min).set('max',settings.max).set('now')
if(valueString){calendar.set('select',valueString,{format:formatString,defaultValue:true})}
else{calendar.set('select',null).set('highlight',calendar.item.now)}
calendar.key={40:7,38:-7,39:function(){return isRTL()?-1:1},37:function(){return isRTL()?1:-1},go:function(timeChange){var highlightedObject=calendar.item.highlight,targetDate=new Date(highlightedObject.year,highlightedObject.month,highlightedObject.date+timeChange)
calendar.set('highlight',targetDate,{interval:timeChange})
this.render()}}
picker.on('render',function(){picker.$root.find('.'+settings.klass.selectMonth).on('change',function(){var value=this.value
if(value){picker.set('highlight',[picker.get('view').year,value,picker.get('highlight').date])
picker.$root.find('.'+settings.klass.selectMonth).trigger('focus')}})
picker.$root.find('.'+settings.klass.selectYear).on('change',function(){var value=this.value
if(value){picker.set('highlight',[value,picker.get('view').month,picker.get('highlight').date])
picker.$root.find('.'+settings.klass.selectYear).trigger('focus')}})},1).on('open',function(){var includeToday=''
if(calendar.disabled(calendar.get('now'))){includeToday=':not(.'+settings.klass.buttonToday+')'}
picker.$root.find('button'+includeToday+', select').attr('disabled',false)},1).on('close',function(){picker.$root.find('button, select').attr('disabled',true)},1)}
DatePicker.prototype.set=function(type,value,options){var calendar=this,calendarItem=calendar.item
if(value===null){if(type=='clear')type='select'
calendarItem[type]=value
return calendar}
calendarItem[(type=='enable'?'disable':type=='flip'?'enable':type)]=calendar.queue[type].split(' ').map(function(method){value=calendar[method](type,value,options)
return value}).pop()
if(type=='select'){calendar.set('highlight',calendarItem.select,options)}
else if(type=='highlight'){calendar.set('view',calendarItem.highlight,options)}
else if(type.match(/^(flip|min|max|disable|enable)$/)){if(calendarItem.select&&calendar.disabled(calendarItem.select)){calendar.set('select',calendarItem.select,options)}
if(calendarItem.highlight&&calendar.disabled(calendarItem.highlight)){calendar.set('highlight',calendarItem.highlight,options)}}
return calendar}
DatePicker.prototype.get=function(type){return this.item[type]}
DatePicker.prototype.create=function(type,value,options){var isInfiniteValue,calendar=this
value=value===undefined?type:value
if(value==-Infinity||value==Infinity){isInfiniteValue=value}
else if($.isPlainObject(value)&&_.isInteger(value.pick)){value=value.obj}
else if($.isArray(value)){value=new Date(value[0],value[1],value[2])
value=_.isDate(value)?value:calendar.create().obj}
else if(_.isInteger(value)||_.isDate(value)){value=calendar.normalize(new Date(value),options)}
else{value=calendar.now(type,value,options)}
return{year:isInfiniteValue||value.getFullYear(),month:isInfiniteValue||value.getMonth(),date:isInfiniteValue||value.getDate(),day:isInfiniteValue||value.getDay(),obj:isInfiniteValue||value,pick:isInfiniteValue||value.getTime()}}
DatePicker.prototype.createRange=function(from,to){var calendar=this,createDate=function(date){if(date===true||$.isArray(date)||_.isDate(date)){return calendar.create(date)}
return date}
if(!_.isInteger(from)){from=createDate(from)}
if(!_.isInteger(to)){to=createDate(to)}
if(_.isInteger(from)&&$.isPlainObject(to)){from=[to.year,to.month,to.date+from];}
else if(_.isInteger(to)&&$.isPlainObject(from)){to=[from.year,from.month,from.date+to];}
return{from:createDate(from),to:createDate(to)}}
DatePicker.prototype.withinRange=function(range,dateUnit){range=this.createRange(range.from,range.to)
return dateUnit.pick>=range.from.pick&&dateUnit.pick<=range.to.pick}
DatePicker.prototype.overlapRanges=function(one,two){var calendar=this
one=calendar.createRange(one.from,one.to)
two=calendar.createRange(two.from,two.to)
return calendar.withinRange(one,two.from)||calendar.withinRange(one,two.to)||calendar.withinRange(two,one.from)||calendar.withinRange(two,one.to)}
DatePicker.prototype.now=function(type,value,options){value=new Date()
if(options&&options.rel){value.setDate(value.getDate()+options.rel)}
return this.normalize(value,options)}
DatePicker.prototype.navigate=function(type,value,options){var targetDateObject,targetYear,targetMonth,targetDate,isTargetArray=$.isArray(value),isTargetObject=$.isPlainObject(value),viewsetObject=this.item.view
if(isTargetArray||isTargetObject){if(isTargetObject){targetYear=value.year
targetMonth=value.month
targetDate=value.date}
else{targetYear=+value[0]
targetMonth=+value[1]
targetDate=+value[2]}
if(options&&options.nav&&viewsetObject&&viewsetObject.month!==targetMonth){targetYear=viewsetObject.year
targetMonth=viewsetObject.month}
targetDateObject=new Date(targetYear,targetMonth+(options&&options.nav?options.nav:0),1)
targetYear=targetDateObject.getFullYear()
targetMonth=targetDateObject.getMonth()
while(new Date(targetYear,targetMonth,targetDate).getMonth()!==targetMonth){targetDate-=1}
value=[targetYear,targetMonth,targetDate]}
return value}
DatePicker.prototype.normalize=function(value){value.setHours(0,0,0,0)
return value}
DatePicker.prototype.measure=function(type,value){var calendar=this
if(!value){value=type=='min'?-Infinity:Infinity}
else if(typeof value=='string'){value=calendar.parse(type,value)}
else if(_.isInteger(value)){value=calendar.now(type,value,{rel:value})}
return value}
DatePicker.prototype.viewset=function(type,dateObject){return this.create([dateObject.year,dateObject.month,1])}
DatePicker.prototype.validate=function(type,dateObject,options){var calendar=this,originalDateObject=dateObject,interval=options&&options.interval?options.interval:1,isFlippedBase=calendar.item.enable===-1,hasEnabledBeforeTarget,hasEnabledAfterTarget,minLimitObject=calendar.item.min,maxLimitObject=calendar.item.max,reachedMin,reachedMax,hasEnabledWeekdays=isFlippedBase&&calendar.item.disable.filter(function(value){if($.isArray(value)){var dateTime=calendar.create(value).pick
if(dateTime<dateObject.pick)hasEnabledBeforeTarget=true
else if(dateTime>dateObject.pick)hasEnabledAfterTarget=true}
return _.isInteger(value)}).length
if(!options||(!options.nav&&!options.defaultValue))if((!isFlippedBase&&calendar.disabled(dateObject))||(isFlippedBase&&calendar.disabled(dateObject)&&(hasEnabledWeekdays||hasEnabledBeforeTarget||hasEnabledAfterTarget))||(!isFlippedBase&&(dateObject.pick<=minLimitObject.pick||dateObject.pick>=maxLimitObject.pick))){if(isFlippedBase&&!hasEnabledWeekdays&&((!hasEnabledAfterTarget&&interval>0)||(!hasEnabledBeforeTarget&&interval<0))){interval*=-1}
while(calendar.disabled(dateObject)){if(Math.abs(interval)>1&&(dateObject.month<originalDateObject.month||dateObject.month>originalDateObject.month)){dateObject=originalDateObject
interval=interval>0?1:-1}
if(dateObject.pick<=minLimitObject.pick){reachedMin=true
interval=1
dateObject=calendar.create([minLimitObject.year,minLimitObject.month,minLimitObject.date+(dateObject.pick===minLimitObject.pick?0:-1)])}
else if(dateObject.pick>=maxLimitObject.pick){reachedMax=true
interval=-1
dateObject=calendar.create([maxLimitObject.year,maxLimitObject.month,maxLimitObject.date+(dateObject.pick===maxLimitObject.pick?0:1)])}
if(reachedMin&&reachedMax){break}
dateObject=calendar.create([dateObject.year,dateObject.month,dateObject.date+interval])}}
return dateObject}
DatePicker.prototype.disabled=function(dateToVerify){var
calendar=this,isDisabledMatch=calendar.item.disable.filter(function(dateToDisable){if(_.isInteger(dateToDisable)){return dateToVerify.day===(calendar.settings.firstDay?dateToDisable:dateToDisable-1)%7}
if($.isArray(dateToDisable)||_.isDate(dateToDisable)){return dateToVerify.pick===calendar.create(dateToDisable).pick}
if($.isPlainObject(dateToDisable)){return calendar.withinRange(dateToDisable,dateToVerify)}})
isDisabledMatch=isDisabledMatch.length&&!isDisabledMatch.filter(function(dateToDisable){return $.isArray(dateToDisable)&&dateToDisable[3]=='inverted'||$.isPlainObject(dateToDisable)&&dateToDisable.inverted}).length
return calendar.item.enable===-1?!isDisabledMatch:isDisabledMatch||dateToVerify.pick<calendar.item.min.pick||dateToVerify.pick>calendar.item.max.pick}
DatePicker.prototype.parse=function(type,value,options){var calendar=this,parsingObject={}
if(!value||typeof value!='string'){return value}
if(!(options&&options.format)){options=options||{}
options.format=calendar.settings.format}
calendar.formats.toArray(options.format).map(function(label){var
formattingLabel=calendar.formats[label],formatLength=formattingLabel?_.trigger(formattingLabel,calendar,[value,parsingObject]):label.replace(/^!/,'').length
if(formattingLabel){parsingObject[label]=value.substr(0,formatLength)}
value=value.substr(formatLength)})
return[parsingObject.yyyy||parsingObject.yy,+(parsingObject.mm||parsingObject.m)-1,parsingObject.dd||parsingObject.d]}
DatePicker.prototype.formats=(function(){function getWordLengthFromCollection(string,collection,dateObject){var word=string.match(/[^\x00-\x7F]+|\w+/)[0]
if(!dateObject.mm&&!dateObject.m){dateObject.m=collection.indexOf(word)+1}
return word.length}
function getFirstWordLength(string){return string.match(/\w+/)[0].length}
return{d:function(string,dateObject){return string?_.digits(string):dateObject.date},dd:function(string,dateObject){return string?2:_.lead(dateObject.date)},ddd:function(string,dateObject){return string?getFirstWordLength(string):this.settings.weekdaysShort[dateObject.day]},dddd:function(string,dateObject){return string?getFirstWordLength(string):this.settings.weekdaysFull[dateObject.day]},m:function(string,dateObject){return string?_.digits(string):dateObject.month+1},mm:function(string,dateObject){return string?2:_.lead(dateObject.month+1)},mmm:function(string,dateObject){var collection=this.settings.monthsShort
return string?getWordLengthFromCollection(string,collection,dateObject):collection[dateObject.month]},mmmm:function(string,dateObject){var collection=this.settings.monthsFull
return string?getWordLengthFromCollection(string,collection,dateObject):collection[dateObject.month]},yy:function(string,dateObject){return string?2:(''+dateObject.year).slice(2)},yyyy:function(string,dateObject){return string?4:dateObject.year},toArray:function(formatString){return formatString.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(formatString,itemObject){var calendar=this
return calendar.formats.toArray(formatString).map(function(label){return _.trigger(calendar.formats[label],calendar,[0,itemObject])||label.replace(/^!/,'')}).join('')}}})()
DatePicker.prototype.isDateExact=function(one,two){var calendar=this
if((_.isInteger(one)&&_.isInteger(two))||(typeof one=='boolean'&&typeof two=='boolean')){return one===two}
if((_.isDate(one)||$.isArray(one))&&(_.isDate(two)||$.isArray(two))){return calendar.create(one).pick===calendar.create(two).pick}
if($.isPlainObject(one)&&$.isPlainObject(two)){return calendar.isDateExact(one.from,two.from)&&calendar.isDateExact(one.to,two.to)}
return false}
DatePicker.prototype.isDateOverlap=function(one,two){var calendar=this,firstDay=calendar.settings.firstDay?1:0
if(_.isInteger(one)&&(_.isDate(two)||$.isArray(two))){one=one%7+firstDay
return one===calendar.create(two).day+1}
if(_.isInteger(two)&&(_.isDate(one)||$.isArray(one))){two=two%7+firstDay
return two===calendar.create(one).day+1}
if($.isPlainObject(one)&&$.isPlainObject(two)){return calendar.overlapRanges(one,two)}
return false}
DatePicker.prototype.flipEnable=function(val){var itemObject=this.item
itemObject.enable=val||(itemObject.enable==-1?1:-1)}
DatePicker.prototype.deactivate=function(type,datesToDisable){var calendar=this,disabledItems=calendar.item.disable.slice(0)
if(datesToDisable=='flip'){calendar.flipEnable()}
else if(datesToDisable===false){calendar.flipEnable(1)
disabledItems=[]}
else if(datesToDisable===true){calendar.flipEnable(-1)
disabledItems=[]}
else{datesToDisable.map(function(unitToDisable){var matchFound
for(var index=0;index<disabledItems.length;index+=1){if(calendar.isDateExact(unitToDisable,disabledItems[index])){matchFound=true
break}}
if(!matchFound){if(_.isInteger(unitToDisable)||_.isDate(unitToDisable)||$.isArray(unitToDisable)||($.isPlainObject(unitToDisable)&&unitToDisable.from&&unitToDisable.to)){disabledItems.push(unitToDisable)}}})}
return disabledItems}
DatePicker.prototype.activate=function(type,datesToEnable){var calendar=this,disabledItems=calendar.item.disable,disabledItemsCount=disabledItems.length
if(datesToEnable=='flip'){calendar.flipEnable()}
else if(datesToEnable===true){calendar.flipEnable(1)
disabledItems=[]}
else if(datesToEnable===false){calendar.flipEnable(-1)
disabledItems=[]}
else{datesToEnable.map(function(unitToEnable){var matchFound,disabledUnit,index,isExactRange
for(index=0;index<disabledItemsCount;index+=1){disabledUnit=disabledItems[index]
if(calendar.isDateExact(disabledUnit,unitToEnable)){matchFound=disabledItems[index]=null
isExactRange=true
break}
else if(calendar.isDateOverlap(disabledUnit,unitToEnable)){if($.isPlainObject(unitToEnable)){unitToEnable.inverted=true
matchFound=unitToEnable}
else if($.isArray(unitToEnable)){matchFound=unitToEnable
if(!matchFound[3])matchFound.push('inverted')}
else if(_.isDate(unitToEnable)){matchFound=[unitToEnable.getFullYear(),unitToEnable.getMonth(),unitToEnable.getDate(),'inverted']}
break}}
if(matchFound)for(index=0;index<disabledItemsCount;index+=1){if(calendar.isDateExact(disabledItems[index],unitToEnable)){disabledItems[index]=null
break}}
if(isExactRange)for(index=0;index<disabledItemsCount;index+=1){if(calendar.isDateOverlap(disabledItems[index],unitToEnable)){disabledItems[index]=null
break}}
if(matchFound){disabledItems.push(matchFound)}})}
return disabledItems.filter(function(val){return val!=null})}
DatePicker.prototype.nodes=function(isOpen){var
calendar=this,settings=calendar.settings,calendarItem=calendar.item,nowObject=calendarItem.now,selectedObject=calendarItem.select,highlightedObject=calendarItem.highlight,viewsetObject=calendarItem.view,disabledCollection=calendarItem.disable,minLimitObject=calendarItem.min,maxLimitObject=calendarItem.max,tableHead=(function(collection,fullCollection){if(settings.firstDay){collection.push(collection.shift())
fullCollection.push(fullCollection.shift())}
return _.node('thead',_.node('tr',_.group({min:0,max:DAYS_IN_WEEK-1,i:1,node:'th',item:function(counter){return[collection[counter],settings.klass.weekdays,'scope=col title="'+fullCollection[counter]+'"']}})))})((settings.showWeekdaysFull?settings.weekdaysFull:settings.weekdaysShort).slice(0),settings.weekdaysFull.slice(0)),createMonthNav=function(next){return _.node('div',' ',settings.klass['nav'+(next?'Next':'Prev')]+((next&&viewsetObject.year>=maxLimitObject.year&&viewsetObject.month>=maxLimitObject.month)||(!next&&viewsetObject.year<=minLimitObject.year&&viewsetObject.month<=minLimitObject.month)?' '+settings.klass.navDisabled:''),'data-nav='+(next||-1)+' '+
_.ariaAttr({role:'button',controls:calendar.$node[0].id+'_table'})+' '+'title="'+(next?settings.labelMonthNext:settings.labelMonthPrev)+'"')},createMonthLabel=function(){var monthsCollection=settings.showMonthsShort?settings.monthsShort:settings.monthsFull
if(settings.selectMonths){return _.node('select',_.group({min:0,max:11,i:1,node:'option',item:function(loopedMonth){return[monthsCollection[loopedMonth],0,'value='+loopedMonth+
(viewsetObject.month==loopedMonth?' selected':'')+
(((viewsetObject.year==minLimitObject.year&&loopedMonth<minLimitObject.month)||(viewsetObject.year==maxLimitObject.year&&loopedMonth>maxLimitObject.month))?' disabled':'')]}}),settings.klass.selectMonth,(isOpen?'':'disabled')+' '+
_.ariaAttr({controls:calendar.$node[0].id+'_table'})+' '+'title="'+settings.labelMonthSelect+'"')}
return _.node('div',monthsCollection[viewsetObject.month],settings.klass.month)},createYearLabel=function(){var focusedYear=viewsetObject.year,numberYears=settings.selectYears===true?5:~~(settings.selectYears/2)
if(numberYears){var
minYear=minLimitObject.year,maxYear=maxLimitObject.year,lowestYear=focusedYear-numberYears,highestYear=focusedYear+numberYears
if(minYear>lowestYear){highestYear+=minYear-lowestYear
lowestYear=minYear}
if(maxYear<highestYear){var availableYears=lowestYear-minYear,neededYears=highestYear-maxYear
lowestYear-=availableYears>neededYears?neededYears:availableYears
highestYear=maxYear}
return _.node('select',_.group({min:lowestYear,max:highestYear,i:1,node:'option',item:function(loopedYear){return[loopedYear,0,'value='+loopedYear+(focusedYear==loopedYear?' selected':'')]}}),settings.klass.selectYear,(isOpen?'':'disabled')+' '+_.ariaAttr({controls:calendar.$node[0].id+'_table'})+' '+'title="'+settings.labelYearSelect+'"')}
return _.node('div',focusedYear,settings.klass.year)}
return _.node('div',(settings.selectYears?createYearLabel()+createMonthLabel():createMonthLabel()+createYearLabel())+
createMonthNav()+createMonthNav(1),settings.klass.header)+_.node('table',tableHead+
_.node('tbody',_.group({min:0,max:WEEKS_IN_CALENDAR-1,i:1,node:'tr',item:function(rowCounter){var shiftDateBy=settings.firstDay&&calendar.create([viewsetObject.year,viewsetObject.month,1]).day===0?-7:0
return[_.group({min:DAYS_IN_WEEK*rowCounter-viewsetObject.day+shiftDateBy+1,max:function(){return this.min+DAYS_IN_WEEK-1},i:1,node:'td',item:function(targetDate){targetDate=calendar.create([viewsetObject.year,viewsetObject.month,targetDate+(settings.firstDay?1:0)])
var isSelected=selectedObject&&selectedObject.pick==targetDate.pick,isHighlighted=highlightedObject&&highlightedObject.pick==targetDate.pick,isDisabled=disabledCollection&&calendar.disabled(targetDate)||targetDate.pick<minLimitObject.pick||targetDate.pick>maxLimitObject.pick,formattedDate=_.trigger(calendar.formats.toString,calendar,[settings.format,targetDate])
return[_.node('div',targetDate.date,(function(klasses){klasses.push(viewsetObject.month==targetDate.month?settings.klass.infocus:settings.klass.outfocus)
if(nowObject.pick==targetDate.pick){klasses.push(settings.klass.now)}
if(isSelected){klasses.push(settings.klass.selected)}
if(isHighlighted){klasses.push(settings.klass.highlighted)}
if(isDisabled){klasses.push(settings.klass.disabled)}
return klasses.join(' ')})([settings.klass.day]),'data-pick='+targetDate.pick+' '+_.ariaAttr({role:'gridcell',label:formattedDate,selected:isSelected&&calendar.$node.val()===formattedDate?true:null,activedescendant:isHighlighted?true:null,disabled:isDisabled?true:null})),'',_.ariaAttr({role:'presentation'})]}})]}})),settings.klass.table,'id="'+calendar.$node[0].id+'_table'+'" '+_.ariaAttr({role:'grid',controls:calendar.$node[0].id,readonly:true}))+
_.node('div',_.node('button',settings.today,settings.klass.buttonToday,'type=button data-pick='+nowObject.pick+
(isOpen&&!calendar.disabled(nowObject)?'':' disabled')+' '+
_.ariaAttr({controls:calendar.$node[0].id}))+
_.node('button',settings.clear,settings.klass.buttonClear,'type=button data-clear=1'+
(isOpen?'':' disabled')+' '+
_.ariaAttr({controls:calendar.$node[0].id}))+
_.node('button',settings.close,settings.klass.buttonClose,'type=button data-close=true '+
(isOpen?'':' disabled')+' '+
_.ariaAttr({controls:calendar.$node[0].id})),settings.klass.footer)}
DatePicker.defaults=(function(prefix){return{labelMonthNext:'Next month',labelMonthPrev:'Previous month',labelMonthSelect:'Select a month',labelYearSelect:'Select a year',monthsFull:['January','February','March','April','May','June','July','August','September','October','November','December'],monthsShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],weekdaysFull:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],weekdaysShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],today:'Today',clear:'Clear',close:'Close',closeOnSelect:true,closeOnClear:true,format:'d mmmm, yyyy',klass:{table:prefix+'table',header:prefix+'header',navPrev:prefix+'nav--prev',navNext:prefix+'nav--next',navDisabled:prefix+'nav--disabled',month:prefix+'month',year:prefix+'year',selectMonth:prefix+'select--month',selectYear:prefix+'select--year',weekdays:prefix+'weekday',day:prefix+'day',disabled:prefix+'day--disabled',selected:prefix+'day--selected',highlighted:prefix+'day--highlighted',now:prefix+'day--today',infocus:prefix+'day--infocus',outfocus:prefix+'day--outfocus',footer:prefix+'footer',buttonClear:prefix+'button--clear',buttonToday:prefix+'button--today',buttonClose:prefix+'button--close'}}})(Picker.klasses().picker+'__')
Picker.extend('pickadate',DatePicker)}));
/*!
 * Time picker for pickadate.js v3.5.6
 * http://amsul.github.io/pickadate.js/time.htm
 */
(function(factory){if(typeof define=='function'&&define.amd)
define(['picker','jquery'],factory)
else if(typeof exports=='object')
module.exports=factory(require('./picker.js'),require('jquery'))
else factory(Picker,jQuery)}(function(Picker,$){var HOURS_IN_DAY=24,MINUTES_IN_HOUR=60,HOURS_TO_NOON=12,MINUTES_IN_DAY=HOURS_IN_DAY*MINUTES_IN_HOUR,_=Picker._
function TimePicker(picker,settings){var clock=this,elementValue=picker.$node[0].value,elementDataValue=picker.$node.data('value'),valueString=elementDataValue||elementValue,formatString=elementDataValue?settings.formatSubmit:settings.format
clock.settings=settings
clock.$node=picker.$node
clock.queue={interval:'i',min:'measure create',max:'measure create',now:'now create',select:'parse create validate',highlight:'parse create validate',view:'parse create validate',disable:'deactivate',enable:'activate'}
clock.item={}
clock.item.clear=null
clock.item.interval=settings.interval||30
clock.item.disable=(settings.disable||[]).slice(0)
clock.item.enable=-(function(collectionDisabled){return collectionDisabled[0]===true?collectionDisabled.shift():-1})(clock.item.disable)
clock.set('min',settings.min).set('max',settings.max).set('now')
if(valueString){clock.set('select',valueString,{format:formatString})}
else{clock.set('select',null).set('highlight',clock.item.now)}
clock.key={40:1,38:-1,39:1,37:-1,go:function(timeChange){clock.set('highlight',clock.item.highlight.pick+timeChange*clock.item.interval,{interval:timeChange*clock.item.interval})
this.render()}}
picker.on('render',function(){var $pickerHolder=picker.$root.children(),$viewset=$pickerHolder.find('.'+settings.klass.viewset),vendors=function(prop){return['webkit','moz','ms','o',''].map(function(vendor){return(vendor?'-'+vendor+'-':'')+prop})},animations=function($el,state){vendors('transform').map(function(prop){$el.css(prop,state)})
vendors('transition').map(function(prop){$el.css(prop,state)})}
if($viewset.length){animations($pickerHolder,'none')
$pickerHolder[0].scrollTop=~~$viewset.position().top-($viewset[0].clientHeight*2)
animations($pickerHolder,'')}},1).on('open',function(){picker.$root.find('button').attr('disabled',false)},1).on('close',function(){picker.$root.find('button').attr('disabled',true)},1)}
TimePicker.prototype.set=function(type,value,options){var clock=this,clockItem=clock.item
if(value===null){if(type=='clear')type='select'
clockItem[type]=value
return clock}
clockItem[(type=='enable'?'disable':type=='flip'?'enable':type)]=clock.queue[type].split(' ').map(function(method){value=clock[method](type,value,options)
return value}).pop()
if(type=='select'){clock.set('highlight',clockItem.select,options)}
else if(type=='highlight'){clock.set('view',clockItem.highlight,options)}
else if(type=='interval'){clock.set('min',clockItem.min,options).set('max',clockItem.max,options)}
else if(type.match(/^(flip|min|max|disable|enable)$/)){if(clockItem.select&&clock.disabled(clockItem.select)){clock.set('select',value,options)}
if(clockItem.highlight&&clock.disabled(clockItem.highlight)){clock.set('highlight',value,options)}
if(type=='min'){clock.set('max',clockItem.max,options)}}
return clock}
TimePicker.prototype.get=function(type){return this.item[type]}
TimePicker.prototype.create=function(type,value,options){var clock=this
value=value===undefined?type:value
if(_.isDate(value)){value=[value.getHours(),value.getMinutes()]}
if($.isPlainObject(value)&&_.isInteger(value.pick)){value=value.pick}
else if($.isArray(value)){value=+value[0]*MINUTES_IN_HOUR+(+value[1])}
else if(!_.isInteger(value)){value=clock.now(type,value,options)}
if(type=='max'&&value<clock.item.min.pick){value+=MINUTES_IN_DAY}
if(type!='min'&&type!='max'&&(value-clock.item.min.pick)%clock.item.interval!==0){value+=clock.item.interval}
value=clock.normalize(type,value,options)
return{hour:~~(HOURS_IN_DAY+value/MINUTES_IN_HOUR)%HOURS_IN_DAY,mins:(MINUTES_IN_HOUR+value%MINUTES_IN_HOUR)%MINUTES_IN_HOUR,time:(MINUTES_IN_DAY+value)%MINUTES_IN_DAY,pick:value%MINUTES_IN_DAY}}
TimePicker.prototype.createRange=function(from,to){var clock=this,createTime=function(time){if(time===true||$.isArray(time)||_.isDate(time)){return clock.create(time)}
return time}
if(!_.isInteger(from)){from=createTime(from)}
if(!_.isInteger(to)){to=createTime(to)}
if(_.isInteger(from)&&$.isPlainObject(to)){from=[to.hour,to.mins+(from*clock.settings.interval)];}
else if(_.isInteger(to)&&$.isPlainObject(from)){to=[from.hour,from.mins+(to*clock.settings.interval)];}
return{from:createTime(from),to:createTime(to)}}
TimePicker.prototype.withinRange=function(range,timeUnit){range=this.createRange(range.from,range.to)
return timeUnit.pick>=range.from.pick&&timeUnit.pick<=range.to.pick}
TimePicker.prototype.overlapRanges=function(one,two){var clock=this
one=clock.createRange(one.from,one.to)
two=clock.createRange(two.from,two.to)
return clock.withinRange(one,two.from)||clock.withinRange(one,two.to)||clock.withinRange(two,one.from)||clock.withinRange(two,one.to)}
TimePicker.prototype.now=function(type,value){var interval=this.item.interval,date=new Date(),nowMinutes=date.getHours()*MINUTES_IN_HOUR+date.getMinutes(),isValueInteger=_.isInteger(value),isBelowInterval
nowMinutes-=nowMinutes%interval
isBelowInterval=value<0&&interval*value+nowMinutes<=-interval
nowMinutes+=type=='min'&&isBelowInterval?0:interval
if(isValueInteger){nowMinutes+=interval*(isBelowInterval&&type!='max'?value+1:value)}
return nowMinutes}
TimePicker.prototype.normalize=function(type,value){var interval=this.item.interval,minTime=this.item.min&&this.item.min.pick||0
value-=type=='min'?0:(value-minTime)%interval
return value}
TimePicker.prototype.measure=function(type,value,options){var clock=this
if(!value){value=type=='min'?[0,0]:[HOURS_IN_DAY-1,MINUTES_IN_HOUR-1]}
if(typeof value=='string'){value=clock.parse(type,value)}
else if(value===true||_.isInteger(value)){value=clock.now(type,value,options)}
else if($.isPlainObject(value)&&_.isInteger(value.pick)){value=clock.normalize(type,value.pick,options)}
return value}
TimePicker.prototype.validate=function(type,timeObject,options){var clock=this,interval=options&&options.interval?options.interval:clock.item.interval
if(clock.disabled(timeObject)){timeObject=clock.shift(timeObject,interval)}
timeObject=clock.scope(timeObject)
if(clock.disabled(timeObject)){timeObject=clock.shift(timeObject,interval*-1)}
return timeObject}
TimePicker.prototype.disabled=function(timeToVerify){var clock=this,isDisabledMatch=clock.item.disable.filter(function(timeToDisable){if(_.isInteger(timeToDisable)){return timeToVerify.hour==timeToDisable}
if($.isArray(timeToDisable)||_.isDate(timeToDisable)){return timeToVerify.pick==clock.create(timeToDisable).pick}
if($.isPlainObject(timeToDisable)){return clock.withinRange(timeToDisable,timeToVerify)}})
isDisabledMatch=isDisabledMatch.length&&!isDisabledMatch.filter(function(timeToDisable){return $.isArray(timeToDisable)&&timeToDisable[2]=='inverted'||$.isPlainObject(timeToDisable)&&timeToDisable.inverted}).length
return clock.item.enable===-1?!isDisabledMatch:isDisabledMatch||timeToVerify.pick<clock.item.min.pick||timeToVerify.pick>clock.item.max.pick}
TimePicker.prototype.shift=function(timeObject,interval){var clock=this,minLimit=clock.item.min.pick,maxLimit=clock.item.max.pick
interval=interval||clock.item.interval
while(clock.disabled(timeObject)){timeObject=clock.create(timeObject.pick+=interval)
if(timeObject.pick<=minLimit||timeObject.pick>=maxLimit){break}}
return timeObject}
TimePicker.prototype.scope=function(timeObject){var minLimit=this.item.min.pick,maxLimit=this.item.max.pick
return this.create(timeObject.pick>maxLimit?maxLimit:timeObject.pick<minLimit?minLimit:timeObject)}
TimePicker.prototype.parse=function(type,value,options){var hour,minutes,isPM,item,parseValue,clock=this,parsingObject={}
if(!value||typeof value!='string'){return value}
if(!(options&&options.format)){options=options||{}
options.format=clock.settings.format}
clock.formats.toArray(options.format).map(function(label){var
substring,formattingLabel=clock.formats[label],formatLength=formattingLabel?_.trigger(formattingLabel,clock,[value,parsingObject]):label.replace(/^!/,'').length
if(formattingLabel){substring=value.substr(0,formatLength)
parsingObject[label]=substring.match(/^\d+$/)?+substring:substring}
value=value.substr(formatLength)})
for(item in parsingObject){parseValue=parsingObject[item]
if(_.isInteger(parseValue)){if(item.match(/^(h|hh)$/i)){hour=parseValue
if(item=='h'||item=='hh'){hour%=12}}
else if(item=='i'){minutes=parseValue}}
else if(item.match(/^a$/i)&&parseValue.match(/^p/i)&&('h'in parsingObject||'hh'in parsingObject)){isPM=true}}
return(isPM?hour+12:hour)*MINUTES_IN_HOUR+minutes}
TimePicker.prototype.formats={h:function(string,timeObject){return string?_.digits(string):timeObject.hour%HOURS_TO_NOON||HOURS_TO_NOON},hh:function(string,timeObject){return string?2:_.lead(timeObject.hour%HOURS_TO_NOON||HOURS_TO_NOON)},H:function(string,timeObject){return string?_.digits(string):''+(timeObject.hour%24)},HH:function(string,timeObject){return string?_.digits(string):_.lead(timeObject.hour%24)},i:function(string,timeObject){return string?2:_.lead(timeObject.mins)},a:function(string,timeObject){return string?4:MINUTES_IN_DAY/2>timeObject.time%MINUTES_IN_DAY?'a.m.':'p.m.'},A:function(string,timeObject){return string?2:MINUTES_IN_DAY/2>timeObject.time%MINUTES_IN_DAY?'AM':'PM'},toArray:function(formatString){return formatString.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g)},toString:function(formatString,itemObject){var clock=this
return clock.formats.toArray(formatString).map(function(label){return _.trigger(clock.formats[label],clock,[0,itemObject])||label.replace(/^!/,'')}).join('')}}
TimePicker.prototype.isTimeExact=function(one,two){var clock=this
if((_.isInteger(one)&&_.isInteger(two))||(typeof one=='boolean'&&typeof two=='boolean')){return one===two}
if((_.isDate(one)||$.isArray(one))&&(_.isDate(two)||$.isArray(two))){return clock.create(one).pick===clock.create(two).pick}
if($.isPlainObject(one)&&$.isPlainObject(two)){return clock.isTimeExact(one.from,two.from)&&clock.isTimeExact(one.to,two.to)}
return false}
TimePicker.prototype.isTimeOverlap=function(one,two){var clock=this
if(_.isInteger(one)&&(_.isDate(two)||$.isArray(two))){return one===clock.create(two).hour}
if(_.isInteger(two)&&(_.isDate(one)||$.isArray(one))){return two===clock.create(one).hour}
if($.isPlainObject(one)&&$.isPlainObject(two)){return clock.overlapRanges(one,two)}
return false}
TimePicker.prototype.flipEnable=function(val){var itemObject=this.item
itemObject.enable=val||(itemObject.enable==-1?1:-1)}
TimePicker.prototype.deactivate=function(type,timesToDisable){var clock=this,disabledItems=clock.item.disable.slice(0)
if(timesToDisable=='flip'){clock.flipEnable()}
else if(timesToDisable===false){clock.flipEnable(1)
disabledItems=[]}
else if(timesToDisable===true){clock.flipEnable(-1)
disabledItems=[]}
else{timesToDisable.map(function(unitToDisable){var matchFound
for(var index=0;index<disabledItems.length;index+=1){if(clock.isTimeExact(unitToDisable,disabledItems[index])){matchFound=true
break}}
if(!matchFound){if(_.isInteger(unitToDisable)||_.isDate(unitToDisable)||$.isArray(unitToDisable)||($.isPlainObject(unitToDisable)&&unitToDisable.from&&unitToDisable.to)){disabledItems.push(unitToDisable)}}})}
return disabledItems}
TimePicker.prototype.activate=function(type,timesToEnable){var clock=this,disabledItems=clock.item.disable,disabledItemsCount=disabledItems.length
if(timesToEnable=='flip'){clock.flipEnable()}
else if(timesToEnable===true){clock.flipEnable(1)
disabledItems=[]}
else if(timesToEnable===false){clock.flipEnable(-1)
disabledItems=[]}
else{timesToEnable.map(function(unitToEnable){var matchFound,disabledUnit,index,isRangeMatched
for(index=0;index<disabledItemsCount;index+=1){disabledUnit=disabledItems[index]
if(clock.isTimeExact(disabledUnit,unitToEnable)){matchFound=disabledItems[index]=null
isRangeMatched=true
break}
else if(clock.isTimeOverlap(disabledUnit,unitToEnable)){if($.isPlainObject(unitToEnable)){unitToEnable.inverted=true
matchFound=unitToEnable}
else if($.isArray(unitToEnable)){matchFound=unitToEnable
if(!matchFound[2])matchFound.push('inverted')}
else if(_.isDate(unitToEnable)){matchFound=[unitToEnable.getFullYear(),unitToEnable.getMonth(),unitToEnable.getDate(),'inverted']}
break}}
if(matchFound)for(index=0;index<disabledItemsCount;index+=1){if(clock.isTimeExact(disabledItems[index],unitToEnable)){disabledItems[index]=null
break}}
if(isRangeMatched)for(index=0;index<disabledItemsCount;index+=1){if(clock.isTimeOverlap(disabledItems[index],unitToEnable)){disabledItems[index]=null
break}}
if(matchFound){disabledItems.push(matchFound)}})}
return disabledItems.filter(function(val){return val!=null})}
TimePicker.prototype.i=function(type,value){return _.isInteger(value)&&value>0?value:this.item.interval}
TimePicker.prototype.nodes=function(isOpen){var
clock=this,settings=clock.settings,selectedObject=clock.item.select,highlightedObject=clock.item.highlight,viewsetObject=clock.item.view,disabledCollection=clock.item.disable
return _.node('ul',_.group({min:clock.item.min.pick,max:clock.item.max.pick,i:clock.item.interval,node:'li',item:function(loopedTime){loopedTime=clock.create(loopedTime)
var timeMinutes=loopedTime.pick,isSelected=selectedObject&&selectedObject.pick==timeMinutes,isHighlighted=highlightedObject&&highlightedObject.pick==timeMinutes,isDisabled=disabledCollection&&clock.disabled(loopedTime),formattedTime=_.trigger(clock.formats.toString,clock,[settings.format,loopedTime])
return[_.trigger(clock.formats.toString,clock,[_.trigger(settings.formatLabel,clock,[loopedTime])||settings.format,loopedTime]),(function(klasses){if(isSelected){klasses.push(settings.klass.selected)}
if(isHighlighted){klasses.push(settings.klass.highlighted)}
if(viewsetObject&&viewsetObject.pick==timeMinutes){klasses.push(settings.klass.viewset)}
if(isDisabled){klasses.push(settings.klass.disabled)}
return klasses.join(' ')})([settings.klass.listItem]),'data-pick='+loopedTime.pick+' '+_.ariaAttr({role:'option',label:formattedTime,selected:isSelected&&clock.$node.val()===formattedTime?true:null,activedescendant:isHighlighted?true:null,disabled:isDisabled?true:null})]}})+
_.node('li',_.node('button',settings.clear,settings.klass.buttonClear,'type=button data-clear=1'+(isOpen?'':' disabled')+' '+
_.ariaAttr({controls:clock.$node[0].id})),'',_.ariaAttr({role:'presentation'})),settings.klass.list,_.ariaAttr({role:'listbox',controls:clock.$node[0].id}))}
TimePicker.defaults=(function(prefix){return{clear:'Clear',format:'h:i A',interval:30,closeOnSelect:true,closeOnClear:true,klass:{picker:prefix+' '+prefix+'--time',holder:prefix+'__holder',list:prefix+'__list',listItem:prefix+'__list-item',disabled:prefix+'__list-item--disabled',selected:prefix+'__list-item--selected',highlighted:prefix+'__list-item--highlighted',viewset:prefix+'__list-item--viewset',now:prefix+'__list-item--now',buttonClear:prefix+'__button--clear'}}})(Picker.klasses().picker)
Picker.extend('pickatime',TimePicker)}));
/*!
 * Legacy browser support
 */
if(![].map){Array.prototype.map=function(callback,self){var array=this,len=array.length,newArray=new Array(len)
for(var i=0;i<len;i++){if(i in array){newArray[i]=callback.call(self,array[i],i,array)}}
return newArray}}
if(![].filter){Array.prototype.filter=function(callback){if(this==null)throw new TypeError()
var t=Object(this),len=t.length>>>0
if(typeof callback!='function')throw new TypeError()
var newArray=[],thisp=arguments[1]
for(var i=0;i<len;i++){if(i in t){var val=t[i]
if(callback.call(thisp,val,i,t))newArray.push(val)}}
return newArray}}
if(![].indexOf){Array.prototype.indexOf=function(searchElement){if(this==null)throw new TypeError()
var t=Object(this),len=t.length>>>0
if(len===0)return-1
var n=0
if(arguments.length>1){n=Number(arguments[1])
if(n!=n){n=0}
else if(n!==0&&n!=Infinity&&n!=-Infinity){n=(n>0||-1)*Math.floor(Math.abs(n))}}
if(n>=len)return-1
var k=n>=0?n:Math.max(len-Math.abs(n),0)
for(;k<len;k++){if(k in t&&t[k]===searchElement)return k}
return-1}}
/*!
 * Cross-Browser Split 1.1.1
 * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
 * Available under the MIT License
 * http://blog.stevenlevithan.com/archives/cross-browser-split
 */
var nativeSplit=String.prototype.split,compliantExecNpcg=/()??/.exec('')[1]===undefined
String.prototype.split=function(separator,limit){var str=this
if(Object.prototype.toString.call(separator)!=='[object RegExp]'){return nativeSplit.call(str,separator,limit)}
var output=[],flags=(separator.ignoreCase?'i':'')+
(separator.multiline?'m':'')+
(separator.extended?'x':'')+
(separator.sticky?'y':''),lastLastIndex=0,separator2,match,lastIndex,lastLength
separator=new RegExp(separator.source,flags+'g')
str+=''
if(!compliantExecNpcg){separator2=new RegExp('^'+separator.source+'$(?!\\s)',flags)}
limit=limit===undefined?-1>>>0:limit>>>0
while(match=separator.exec(str)){lastIndex=match.index+match[0].length
if(lastIndex>lastLastIndex){output.push(str.slice(lastLastIndex,match.index))
if(!compliantExecNpcg&&match.length>1){match[0].replace(separator2,function(){for(var i=1;i<arguments.length-2;i++){if(arguments[i]===undefined){match[i]=undefined}}})}
if(match.length>1&&match.index<str.length){Array.prototype.push.apply(output,match.slice(1))}
lastLength=match[0].length
lastLastIndex=lastIndex
if(output.length>=limit){break}}
if(separator.lastIndex===match.index){separator.lastIndex++}}
if(lastLastIndex===str.length){if(lastLength||!separator.test('')){output.push('')}}else{output.push(str.slice(lastLastIndex))}
return output.length>limit?output.slice(0,limit):output};
!function(l){"use strict";var c={init:function(t){return this.each(function(){this.self=l(this),c.destroy.call(this.self),this.opt=l.extend(!0,{},l.fn.um_raty.defaults,t),c._adjustCallback.call(this),c._adjustNumber.call(this),"img"!==this.opt.starType&&c._adjustStarType.call(this),c._adjustPath.call(this),c._createStars.call(this),this.opt.cancel&&c._createCancel.call(this),this.opt.precision&&c._adjustPrecision.call(this),c._createScore.call(this),c._apply.call(this,this.opt.score),c._target.call(this,this.opt.score),this.opt.readOnly?c._lock.call(this):(this.style.cursor="pointer",c._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var t=["number","readOnly","score","scoreName","target"],a=0;a<t.length;a++)"function"==typeof this.opt[t[a]]&&(this.opt[t[a]]=this.opt[t[a]].call(this))},_adjustNumber:function(){this.opt.number=c._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var t=["cancelOff","cancelOn","starHalf","starOff","starOn"],a=0;a<t.length;a++)this.opt[t[a]]=this.opt[t[a]].replace(".","-")},_apply:function(t){c._fill.call(this,t),t&&(0<t&&this.score.val(c._between(t,0,this.opt.number)),c._roundStars.call(this,t))},_between:function(t,a,e){return Math.min(Math.max(parseFloat(t),a),e)},_binds:function(){this.cancel&&(c._bindOverCancel.call(this),c._bindClickCancel.call(this),c._bindOutCancel.call(this)),c._bindOver.call(this),c._bindClick.call(this),c._bindOut.call(this)},_bindClick:function(){var e=this;e.stars.on("click.um_raty",function(t){var a=l(this);e.score.val(e.opt.half||e.opt.precision?e.self.data("score"):this.alt||a.data("alt")),e.opt.click&&e.opt.click.call(e,+e.score.val(),t)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.um_raty",function(t){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,t)})},_bindOut:function(){var e=this;e.self.on("mouseleave.um_raty",function(t){var a=+e.score.val()||void 0;c._apply.call(e,a),c._target.call(e,a,t),e.opt.mouseout&&e.opt.mouseout.call(e,a,t)})},_bindOutCancel:function(){var s=this;s.cancel.on("mouseleave.um_raty",function(t){var a=s.opt.cancelOff;if("img"!==s.opt.starType&&(a=s.opt.cancelClass+" "+a),c._setIcon.call(s,this,a),s.opt.mouseout){var e=+s.score.val()||void 0;s.opt.mouseout.call(s,e,t)}})},_bindOver:function(){var e=this,t=e.opt.half?"mousemove.um_raty":"mouseover.um_raty";e.stars.on(t,function(t){var a=c._getScoreByPosition.call(e,t,this);c._fill.call(e,a),e.opt.half&&(c._roundStars.call(e,a),e.self.data("score",a)),c._target.call(e,a,t),e.opt.mouseover&&e.opt.mouseover.call(e,a,t)})},_bindOverCancel:function(){var s=this;s.cancel.on("mouseover.um_raty",function(t){var a=s.opt.path+s.opt.starOff,e=s.opt.cancelOn;"img"===s.opt.starType?s.stars.attr("src",a):(e=s.opt.cancelClass+" "+e,s.stars.attr("class",a)),c._setIcon.call(s,this,e),c._target.call(s,null,t),s.opt.mouseover&&s.opt.mouseover.call(s,null)})},_buildScoreField:function(){return l("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var t=this.opt.path+this.opt.cancelOff,a=l("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:this.opt.cancelClass});"img"===this.opt.starType?a.attr({src:t,alt:"x"}):a.attr("data-alt","x").addClass(t),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(a):this.self.append("&#160;").append(a),this.cancel=a},_createScore:function(){var t=l(this.opt.targetScore);this.score=t.length?t:c._buildScoreField.call(this)},_createStars:function(){for(var t=1;t<=this.opt.number;t++){var a=c._nameForIndex.call(this,t),e={alt:t,src:this.opt.path+this.opt[a]};"img"!==this.opt.starType&&(e={"data-alt":t,class:e.src}),e.title=c._getHint.call(this,t),l("<"+this.opt.starType+" />",e).appendTo(this),this.opt.space&&this.self.append(t<this.opt.number?"&#160;":"")}this.stars=this.self.children(this.opt.starType)},_error:function(t){l(this).text(t),l.error(t)},_fill:function(t){for(var a=0,e=1;e<=this.stars.length;e++){var s,i=this.stars[e-1],o=c._turnOn.call(this,e,t);if(this.opt.iconRange&&this.opt.iconRange.length>a){var r=this.opt.iconRange[a];s=c._getRangeIcon.call(this,r,o),e<=r.range&&c._setIcon.call(this,i,s),e===r.range&&a++}else s=this.opt[o?"starOn":"starOff"],c._setIcon.call(this,i,s)}},_getRangeIcon:function(t,a){return a?t.on||this.opt.starOn:t.off||this.opt.starOff},_getScoreByPosition:function(t,a){var e=parseInt(a.alt||a.getAttribute("data-alt"),10);if(this.opt.half){var s=c._getSize.call(this),i=parseFloat((t.pageX-l(a).offset().left)/s);e=this.opt.precision?e-1+i:e-1+(.5<i?1:.5)}return e},_getSize:function(){var t;return(t="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")))||c._error.call(this,"Could not be possible get the icon size!"),t},_turnOn:function(t,a){return this.opt.single?t===a:t<=a},_getHint:function(t){var a=this.opt.hints[t-1];return""===a?"":a||t},_lock:function(){var t=parseInt(this.score.val(),10),a=t?c._getHint.call(this,t):this.opt.noRatedMsg;this.style.cursor="",this.title=a,this.score.prop("readonly",!0),this.stars.prop("title",a),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_nameForIndex:function(t){return this.opt.score&&this.opt.score>=t?"starOn":"starOff"},_roundStars:function(t){var a=(t%1).toFixed(2);if(a>this.opt.round.down){var e="starOn";this.opt.halfShow&&a<this.opt.round.up?e="starHalf":a<this.opt.round.full&&(e="starOff");var s=this.opt[e],i=this.stars[Math.ceil(t)-1];c._setIcon.call(this,i,s)}},_setIcon:function(t,a){t["img"===this.opt.starType?"src":"className"]=this.opt.path+a},_setTarget:function(t,a){a&&(a=this.opt.targetFormat.toString().replace("{score}",a)),t.is(":input")?t.val(a):t.html(a)},_target:function(t,a){if(this.opt.target){var e=l(this.opt.target);e.length||c._error.call(this,"Target selector invalid or missing!");var s=a&&"mouseover"===a.type;if(void 0===t)t=this.opt.targetText;else if(null===t)t=s?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?t=c._getHint.call(this,Math.ceil(t)):this.opt.precision&&(t=parseFloat(t).toFixed(1));var i=a&&"mousemove"===a.type;s||i||this.opt.targetKeep||(t=this.opt.targetText)}c._setTarget.call(this,e,t)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var t=0;t<this.opt.number;t++)this.stars[t].title=c._getHint.call(this,t+1);this.cancel&&this.cancel.css("display","")},cancel:function(a){return this.each(function(){var t=l(this);!0!==t.data("readonly")&&(c[a?"click":"score"].call(t,null),this.score.removeAttr("value"))})},click:function(t){return this.each(function(){!0!==l(this).data("readonly")&&(c._apply.call(this,t),this.opt.click&&this.opt.click.call(this,t,l.Event("click")),c._target.call(this,t))})},destroy:function(){return this.each(function(){var t=l(this),a=t.data("raw");a?t.off(".um_raty").empty().css({cursor:a.style.cursor}).removeData("readonly"):t.data("raw",t.clone()[0])})},getScore:function(){var t,a=[];return this.each(function(){t=this.score.val(),a.push(t?+t:void 0)}),1<a.length?a:a[0]},move:function(n){return this.each(function(){var t=parseInt(n,10),a=l(this).data("options"),e=(+n).toFixed(1).split(".")[1];t>=a.number&&(t=a.number-1,e=10);var s=c._getSize.call(this)/10,i=l(this.stars[t]),o=i.offset().left+s*parseInt(e,10),r=l.Event("mousemove",{pageX:o});i.trigger(r)})},readOnly:function(a){return this.each(function(){var t=l(this);t.data("readonly")!==a&&(a?(t.off(".um_raty").children("img").off(".um_raty"),c._lock.call(this)):(c._binds.call(this),c._unlock.call(this)),t.data("readonly",a))})},reload:function(){return c.set.call(this,{})},score:function(){var t=l(this);return arguments.length?c.setScore.apply(t,arguments):c.getScore.call(t)},set:function(s){return this.each(function(){var t=l(this),a=t.data("options"),e=l.extend({},a,s);t.um_raty(e)})},setScore:function(t){return this.each(function(){!0!==l(this).data("readonly")&&(c._apply.call(this,t),c._target.call(this,t))})}};l.fn.um_raty=function(t){return c[t]?c[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void l.error("Method "+t+" does not exist!"):c.init.apply(this,arguments)},l.fn.um_raty.defaults={cancel:!1,cancelClass:"raty-cancel",cancelHint:"Cancel this rating!",cancelOff:"cancel-off.png",cancelOn:"cancel-on.png",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["bad","poor","regular","good","gorgeous"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,starHalf:"star-half.png",starOff:"star-off.png",starOn:"star-on.png",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery);
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(w){"use strict";var y=w.scrollTo=function(e,t,o){return w(window).scrollTo(e,t,o)};function g(e){return!e.nodeName||-1!==w.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function t(e){return w.isFunction(e)||w.isPlainObject(e)?e:{top:e,left:e}}return y.defaults={axis:"xy",duration:0,limit:!0},w.fn.scrollTo=function(e,o,x){"object"==typeof o&&(x=o,o=0),"function"==typeof x&&(x={onAfter:x}),"max"===e&&(e=9e9),x=w.extend({},y.defaults,x),o=o||x.duration;var v=x.queue&&1<x.axis.length;return v&&(o/=2),x.offset=t(x.offset),x.over=t(x.over),this.each(function(){if(null!==e){var f,u=g(this),c=u?this.contentWindow||window:this,l=w(c),d=e,m={};switch(typeof d){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(d)){d=t(d);break}if(!(d=u?w(d):w(d,c)).length)return;case"object":(d.is||d.style)&&(f=(d=w(d)).offset())}var p=w.isFunction(x.offset)&&x.offset(c,d)||x.offset;w.each(x.axis.split(""),function(e,t){var o="x"===t?"Left":"Top",n=o.toLowerCase(),r="scroll"+o,i=l[r](),s=y.max(c,t);if(f)m[r]=f[n]+(u?0:i-l.offset()[n]),x.margin&&(m[r]-=parseInt(d.css("margin"+o),10)||0,m[r]-=parseInt(d.css("border"+o+"Width"),10)||0),m[r]+=p[n]||0,x.over[n]&&(m[r]+=d["x"===t?"width":"height"]()*x.over[n]);else{var a=d[n];m[r]=a.slice&&"%"===a.slice(-1)?parseFloat(a)/100*s:a}x.limit&&/^\d+$/.test(m[r])&&(m[r]=m[r]<=0?0:Math.min(m[r],s)),!e&&1<x.axis.length&&(i===m[r]?m={}:v&&(h(x.onAfterFirst),m={}))}),h(x.onAfter)}function h(e){var t=w.extend({},x,{queue:!0,duration:o,complete:e&&function(){e.call(c,d,x)}});l.animate(m,t)}})},y.max=function(e,t){var o="x"===t?"Width":"Height",n="scroll"+o;if(!g(e))return e[n]-w(e)[o.toLowerCase()]();var r="client"+o,i=e.ownerDocument||e.document,s=i.documentElement,a=i.body;return Math.max(s[n],a[n])-Math.min(s[r],a[r])},w.Tween.propHooks.scrollLeft=w.Tween.propHooks.scrollTop={get:function(e){return w(e.elem)[e.prop]()},set:function(e){var t=this.get(e);if(e.options.interrupt&&e._last&&e._last!==t)return w(e.elem).stop();var o=Math.round(e.now);t!==o&&(w(e.elem)[e.prop](o),e._last=this.get(e))}},y});
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(h){function t(e){var t=e||window.event,o=v.call(arguments,1),a=0,n=0,i=0,r=0,l=0,s=0;if((e=h.event.fix(t)).type="mousewheel","detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(n=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(n=-1*i,i=0),a=0===i?n:i,"deltaY"in t&&(a=i=-1*t.deltaY),"deltaX"in t&&(n=t.deltaX,0===i&&(a=-1*n)),0!==i||0!==n){if(1===t.deltaMode){var c=h.data(this,"mousewheel-line-height");a*=c,i*=c,n*=c}else if(2===t.deltaMode){var d=h.data(this,"mousewheel-page-height");a*=d,i*=d,n*=d}if(r=Math.max(Math.abs(i),Math.abs(n)),(!g||r<g)&&(m(t,g=r)&&(g/=40)),m(t,r)&&(a/=40,n/=40,i/=40),a=Math[1<=a?"floor":"ceil"](a/g),n=Math[1<=n?"floor":"ceil"](n/g),i=Math[1<=i?"floor":"ceil"](i/g),x.settings.normalizeOffset&&this.getBoundingClientRect){var u=this.getBoundingClientRect();l=e.clientX-u.left,s=e.clientY-u.top}return e.deltaX=n,e.deltaY=i,e.deltaFactor=g,e.offsetX=l,e.offsetY=s,e.deltaMode=0,o.unshift(e,a,n,i),p&&clearTimeout(p),p=setTimeout(f,200),(h.event.dispatch||h.event.handle).apply(this,o)}}function f(){g=null}function m(e,t){return x.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var p,g,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],v=Array.prototype.slice;if(h.event.fixHooks)for(var a=e.length;a;)h.event.fixHooks[e[--a]]=h.event.mouseHooks;var x=h.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t;h.data(this,"mousewheel-line-height",x.getLineHeight(this)),h.data(this,"mousewheel-page-height",x.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null;h.removeData(this,"mousewheel-line-height"),h.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=h(e),o=t["offsetParent"in h.fn?"offsetParent":"parent"]();return o.length||(o=h("body")),parseInt(o.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return h(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};h.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(E){var L,f,W,a,n,l,i,p,A,w,v,c,s,d,u,h,m,g,x,_,S,b,C,T,y,B,M,k,O,P,r,I,D,R,z,H,X,Y,U,j,q,F,N,V,Q,Z,G,J,K,$,ee,te,oe,ae,ne,e,t,o;e="function"==typeof define&&define.amd,t="undefined"!=typeof module&&module.exports,o="https:"==document.location.protocol?"https:":"http:",e||(t?require("jquery-mousewheel")(E):E.event.special.mousewheel||E("head").append(decodeURI("%3Cscript src="+o+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js%3E%3C/script%3E"))),f="mCustomScrollbar",W="mCS",a=".mCustomScrollbar",n={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},l=0,i={},p=window.attachEvent&&!window.addEventListener?1:0,A=!1,w=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],v={init:function(r){var r=E.extend(!0,{},n,r),e=c.call(this);if(r.live){var t=r.liveSelector||this.selector||a,o=E(t);if("off"===r.live)return void d(t);i[t]=setTimeout(function(){o.mCustomScrollbar(r),"once"===r.live&&o.length&&d(t)},500)}else d(t);return r.setWidth=r.set_width?r.set_width:r.setWidth,r.setHeight=r.set_height?r.set_height:r.setHeight,r.axis=r.horizontalScroll?"x":u(r.axis),r.scrollInertia=0<r.scrollInertia&&r.scrollInertia<17?17:r.scrollInertia,"object"!=typeof r.mouseWheel&&1==r.mouseWheel&&(r.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),r.mouseWheel.scrollAmount=r.mouseWheelPixels?r.mouseWheelPixels:r.mouseWheel.scrollAmount,r.mouseWheel.normalizeDelta=r.advanced.normalizeMouseWheelDelta?r.advanced.normalizeMouseWheelDelta:r.mouseWheel.normalizeDelta,r.scrollButtons.scrollType=h(r.scrollButtons.scrollType),s(r),E(e).each(function(){var e=E(this);if(!e.data(W)){e.data(W,{idx:++l,opt:r,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:e.css("direction"),cbOffsets:null,trigger:null});var t=e.data(W),o=t.opt,a=e.data("mcs-axis"),n=e.data("mcs-scrollbar-position"),i=e.data("mcs-theme");a&&(o.axis=a),n&&(o.scrollbarPosition=n),i&&(o.theme=i,s(o)),m.call(this),E("#mCSB_"+t.idx+"_container img:not(."+w[2]+")").addClass(w[2]),v.update.call(null,e)}})},update:function(e,r){var t=e||c.call(this);return E(t).each(function(){var e=E(this);if(e.data(W)){var t=e.data(W),o=t.opt,a=E("#mCSB_"+t.idx+"_container"),n=[E("#mCSB_"+t.idx+"_dragger_vertical"),E("#mCSB_"+t.idx+"_dragger_horizontal")];if(!a.length)return;t.tweenRunning&&Z(e),e.hasClass(w[3])&&e.removeClass(w[3]),e.hasClass(w[4])&&e.removeClass(w[4]),S.call(this),x.call(this),"y"===o.axis||o.advanced.autoExpandHorizontalScroll||a.css("width",g(a.children())),t.overflowed=y.call(this),O.call(this),o.autoDraggerLength&&b.call(this),C.call(this),M.call(this);var i=[Math.abs(a[0].offsetTop),Math.abs(a[0].offsetLeft)];"x"!==o.axis&&(t.overflowed[0]?n[0].height()>n[0].parent().height()?B.call(this):(G(e,i[0].toString(),{dir:"y",dur:0,overwrite:"none"}),t.contentReset.y=null):(B.call(this),"y"===o.axis?k.call(this):"yx"===o.axis&&t.overflowed[1]&&G(e,i[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==o.axis&&(t.overflowed[1]?n[1].width()>n[1].parent().width()?B.call(this):(G(e,i[1].toString(),{dir:"x",dur:0,overwrite:"none"}),t.contentReset.x=null):(B.call(this),"x"===o.axis?k.call(this):"yx"===o.axis&&t.overflowed[0]&&G(e,i[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),r&&t&&(2===r&&o.callbacks.onImageLoad&&"function"==typeof o.callbacks.onImageLoad?o.callbacks.onImageLoad.call(this):3===r&&o.callbacks.onSelectorChange&&"function"==typeof o.callbacks.onSelectorChange?o.callbacks.onSelectorChange.call(this):o.callbacks.onUpdate&&"function"==typeof o.callbacks.onUpdate&&o.callbacks.onUpdate.call(this)),Q.call(this)}})},scrollTo:function(l,s){if(void 0!==l&&null!=l){var e=c.call(this);return E(e).each(function(){var e=E(this);if(e.data(W)){var t=e.data(W),o=t.opt,a={trigger:"external",scrollInertia:o.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=E.extend(!0,{},a,s),i=N.call(this,l),r=0<n.scrollInertia&&n.scrollInertia<17?17:n.scrollInertia;i[0]=V.call(this,i[0],"y"),i[1]=V.call(this,i[1],"x"),n.moveDragger&&(i[0]*=t.scrollRatio.y,i[1]*=t.scrollRatio.x),n.dur=r,setTimeout(function(){null!==i[0]&&void 0!==i[0]&&"x"!==o.axis&&t.overflowed[0]&&(n.dir="y",n.overwrite="all",G(e,i[0].toString(),n)),null!==i[1]&&void 0!==i[1]&&"y"!==o.axis&&t.overflowed[1]&&(n.dir="x",n.overwrite="none",G(e,i[1].toString(),n))},n.timeout)}})}},stop:function(){var e=c.call(this);return E(e).each(function(){var e=E(this);e.data(W)&&Z(e)})},disable:function(t){var e=c.call(this);return E(e).each(function(){var e=E(this);e.data(W)&&(e.data(W),Q.call(this,"remove"),k.call(this),t&&B.call(this),O.call(this,!0),e.addClass(w[3]))})},destroy:function(){var r=c.call(this);return E(r).each(function(){var e=E(this);if(e.data(W)){var t=e.data(W),o=t.opt,a=E("#mCSB_"+t.idx),n=E("#mCSB_"+t.idx+"_container"),i=E(".mCSB_"+t.idx+"_scrollbar");o.live&&d(o.liveSelector||E(r).selector),Q.call(this,"remove"),k.call(this),B.call(this),e.removeData(W),ee(this,"mcs"),i.remove(),n.find("img."+w[2]).removeClass(w[2]),a.replaceWith(n.contents()),e.removeClass(f+" _"+W+"_"+t.idx+" "+w[6]+" "+w[7]+" "+w[5]+" "+w[3]).addClass(w[4])}})}},c=function(){return"object"!=typeof E(this)||E(this).length<1?a:this},s=function(e){e.autoDraggerLength=!(-1<E.inArray(e.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"]))&&e.autoDraggerLength,e.autoExpandScrollbar=!(-1<E.inArray(e.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"]))&&e.autoExpandScrollbar,e.scrollButtons.enable=!(-1<E.inArray(e.theme,["minimal","minimal-dark"]))&&e.scrollButtons.enable,e.autoHideScrollbar=-1<E.inArray(e.theme,["minimal","minimal-dark"])||e.autoHideScrollbar,e.scrollbarPosition=-1<E.inArray(e.theme,["minimal","minimal-dark"])?"outside":e.scrollbarPosition},d=function(e){i[e]&&(clearTimeout(i[e]),ee(i,e))},u=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},h=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},m=function(){var e=E(this),t=e.data(W),o=t.opt,a=o.autoExpandScrollbar?" "+w[1]+"_expand":"",n=["<div id='mCSB_"+t.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+t.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+a+"'><div class='"+w[12]+"'><div id='mCSB_"+t.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+t.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+t.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+a+"'><div class='"+w[12]+"'><div id='mCSB_"+t.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],i="yx"===o.axis?"mCSB_vertical_horizontal":"x"===o.axis?"mCSB_horizontal":"mCSB_vertical",r="yx"===o.axis?n[0]+n[1]:"x"===o.axis?n[1]:n[0],l="yx"===o.axis?"<div id='mCSB_"+t.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",s=o.autoHideScrollbar?" "+w[6]:"",c="x"!==o.axis&&"rtl"===t.langDir?" "+w[7]:"";o.setWidth&&e.css("width",o.setWidth),o.setHeight&&e.css("height",o.setHeight),o.setLeft="y"!==o.axis&&"rtl"===t.langDir?"989999px":o.setLeft,e.addClass(f+" _"+W+"_"+t.idx+s+c).wrapInner("<div id='mCSB_"+t.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+i+"'><div id='mCSB_"+t.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir="+t.langDir+" /></div>");var d=E("#mCSB_"+t.idx),u=E("#mCSB_"+t.idx+"_container");"y"===o.axis||o.advanced.autoExpandHorizontalScroll||u.css("width",g(u.children())),"outside"===o.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),d.addClass("mCSB_outside").after(r)):(d.addClass("mCSB_inside").append(r),u.wrap(l)),_.call(this);var h=[E("#mCSB_"+t.idx+"_dragger_vertical"),E("#mCSB_"+t.idx+"_dragger_horizontal")];h[0].css("min-height",h[0].height()),h[1].css("min-width",h[1].width())},g=function(e){return Math.max.apply(Math,e.map(function(){return E(this).outerWidth(!0)}).get())},x=function(){var e=E(this),t=e.data(W),o=t.opt,a=E("#mCSB_"+t.idx+"_container");o.advanced.autoExpandHorizontalScroll&&"y"!==o.axis&&a.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(a[0].getBoundingClientRect().right+.4)-Math.floor(a[0].getBoundingClientRect().left),position:"relative"}).unwrap()},_=function(){var e=E(this),t=e.data(W),o=t.opt,a=E(".mCSB_"+t.idx+"_scrollbar:first"),n=ae(o.scrollButtons.tabindex)?"tabindex='"+o.scrollButtons.tabindex+"'":"",i=["<a href='#' class='"+w[13]+"' oncontextmenu='return false;' "+n+" />","<a href='#' class='"+w[14]+"' oncontextmenu='return false;' "+n+" />","<a href='#' class='"+w[15]+"' oncontextmenu='return false;' "+n+" />","<a href='#' class='"+w[16]+"' oncontextmenu='return false;' "+n+" />"],r=["x"===o.axis?i[2]:i[0],"x"===o.axis?i[3]:i[1],i[2],i[3]];o.scrollButtons.enable&&a.prepend(r[0]).append(r[1]).next(".mCSB_scrollTools").prepend(r[2]).append(r[3])},S=function(){var e=E(this),t=e.data(W),o=E("#mCSB_"+t.idx),a=e.css("max-height")||"none",n=-1!==a.indexOf("%"),i=e.css("box-sizing");if("none"!==a){var r=n?e.parent().height()*parseInt(a)/100:parseInt(a);"border-box"===i&&(r-=e.innerHeight()-e.height()+(e.outerHeight()-e.innerHeight())),o.css("max-height",Math.round(r))}},b=function(){var e=E(this),t=e.data(W),o=E("#mCSB_"+t.idx),a=E("#mCSB_"+t.idx+"_container"),n=[E("#mCSB_"+t.idx+"_dragger_vertical"),E("#mCSB_"+t.idx+"_dragger_horizontal")],i=[o.height()/a.outerHeight(!1),o.width()/a.outerWidth(!1)],r=[parseInt(n[0].css("min-height")),Math.round(i[0]*n[0].parent().height()),parseInt(n[1].css("min-width")),Math.round(i[1]*n[1].parent().width())],l=p&&r[1]<r[0]?r[0]:r[1],s=p&&r[3]<r[2]?r[2]:r[3];n[0].css({height:l,"max-height":n[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":r[0]+"px"}),n[1].css({width:s,"max-width":n[1].parent().width()-10})},C=function(){var e=E(this),t=e.data(W),o=E("#mCSB_"+t.idx),a=E("#mCSB_"+t.idx+"_container"),n=[E("#mCSB_"+t.idx+"_dragger_vertical"),E("#mCSB_"+t.idx+"_dragger_horizontal")],i=[a.outerHeight(!1)-o.height(),a.outerWidth(!1)-o.width()],r=[i[0]/(n[0].parent().height()-n[0].height()),i[1]/(n[1].parent().width()-n[1].width())];t.scrollRatio={y:r[0],x:r[1]}},T=function(e,t,o){var a=o?w[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(w[0]+" "+a),n.toggleClass(w[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(w[0]),n.removeClass(w[1])):(e.addClass(w[0]),n.addClass(w[1])))},y=function(){var e=E(this),t=e.data(W),o=E("#mCSB_"+t.idx),a=E("#mCSB_"+t.idx+"_container"),n=null==t.overflowed?a.height():a.outerHeight(!1),i=null==t.overflowed?a.width():a.outerWidth(!1);return[n>o.height(),i>o.width()]},B=function(){var e=E(this),t=e.data(W),o=t.opt,a=E("#mCSB_"+t.idx),n=E("#mCSB_"+t.idx+"_container"),i=[E("#mCSB_"+t.idx+"_dragger_vertical"),E("#mCSB_"+t.idx+"_dragger_horizontal")];if(Z(e),("x"!==o.axis&&!t.overflowed[0]||"y"===o.axis&&t.overflowed[0])&&(i[0].add(n).css("top",0),G(e,"_resetY")),"y"!==o.axis&&!t.overflowed[1]||"x"===o.axis&&t.overflowed[1]){var r=dx=0;"rtl"===t.langDir&&(r=a.width()-n.outerWidth(!1),dx=Math.abs(r/t.scrollRatio.x)),n.css("left",r),i[1].css("left",dx),G(e,"_resetX")}},M=function(){var t,o=E(this),e=o.data(W),a=e.opt;e.bindEvents||(r.call(this),a.contentTouchScroll&&I.call(this),D.call(this),a.mouseWheel.enable&&function e(){t=setTimeout(function(){E.event.special.mousewheel?(clearTimeout(t),R.call(o[0])):e()},100)}(),X.call(this),U.call(this),a.advanced.autoScrollOnFocus&&Y.call(this),a.scrollButtons.enable&&j.call(this),a.keyboard.enable&&q.call(this),e.bindEvents=!0)},k=function(){var e=E(this),t=e.data(W),o=t.opt,a=W+"_"+t.idx,n=".mCSB_"+t.idx+"_scrollbar",i=E("#mCSB_"+t.idx+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+n+" ."+w[12]+",#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal,"+n+">a"),r=E("#mCSB_"+t.idx+"_container");o.advanced.releaseDraggableSelectors&&i.add(E(o.advanced.releaseDraggableSelectors)),t.bindEvents&&(E(document).unbind("."+a),i.each(function(){E(this).unbind("."+a)}),clearTimeout(e[0]._focusTimeout),ee(e[0],"_focusTimeout"),clearTimeout(t.sequential.step),ee(t.sequential,"step"),clearTimeout(r[0].onCompleteTimeout),ee(r[0],"onCompleteTimeout"),t.bindEvents=!1)},O=function(e){var t=E(this),o=t.data(W),a=o.opt,n=E("#mCSB_"+o.idx+"_container_wrapper"),i=n.length?n:E("#mCSB_"+o.idx+"_container"),r=[E("#mCSB_"+o.idx+"_scrollbar_vertical"),E("#mCSB_"+o.idx+"_scrollbar_horizontal")],l=[r[0].find(".mCSB_dragger"),r[1].find(".mCSB_dragger")];"x"!==a.axis&&(o.overflowed[0]&&!e?(r[0].add(l[0]).add(r[0].children("a")).css("display","block"),i.removeClass(w[8]+" "+w[10])):(a.alwaysShowScrollbar?(2!==a.alwaysShowScrollbar&&l[0].css("display","none"),i.removeClass(w[10])):(r[0].css("display","none"),i.addClass(w[10])),i.addClass(w[8]))),"y"!==a.axis&&(o.overflowed[1]&&!e?(r[1].add(l[1]).add(r[1].children("a")).css("display","block"),i.removeClass(w[9]+" "+w[11])):(a.alwaysShowScrollbar?(2!==a.alwaysShowScrollbar&&l[1].css("display","none"),i.removeClass(w[11])):(r[1].css("display","none"),i.addClass(w[11])),i.addClass(w[9]))),o.overflowed[0]||o.overflowed[1]?t.removeClass(w[5]):t.addClass(w[5])},P=function(e){var t=e.type;switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return e.target.ownerDocument!==document?[e.originalEvent.screenY,e.originalEvent.screenX,!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[o.screenY,o.screenX,1<a]:[o.pageY,o.pageX,1<a];default:return[e.pageY,e.pageX,!1]}},r=function(){function r(e){var t=m.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}}function n(e,t,o,a){if(m[0].idleTimer=h.scrollInertia<233?250:0,l.attr("id")===f[1])var n="x",i=(l[0].offsetLeft-t+a)*u.scrollRatio.x;else var n="y",i=(l[0].offsetTop-e+o)*u.scrollRatio.y;G(d,i.toString(),{dir:n,drag:!0})}var l,s,c,d=E(this),u=d.data(W),h=u.opt,e=W+"_"+u.idx,f=["mCSB_"+u.idx+"_dragger_vertical","mCSB_"+u.idx+"_dragger_horizontal"],m=E("#mCSB_"+u.idx+"_container"),t=E("#"+f[0]+",#"+f[1]),o=h.advanced.releaseDraggableSelectors?t.add(E(h.advanced.releaseDraggableSelectors)):t;t.bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){if(e.stopImmediatePropagation(),e.preventDefault(),te(e)){A=!0,p&&(document.onselectstart=function(){return!1}),r(!1),Z(d);var t=(l=E(this)).offset(),o=P(e)[0]-t.top,a=P(e)[1]-t.left,n=l.height()+t.top,i=l.width()+t.left;o<n&&0<o&&a<i&&0<a&&(s=o,c=a),T(l,"active",h.autoExpandScrollbar)}}).bind("touchmove."+e,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=l.offset(),o=P(e)[0]-t.top,a=P(e)[1]-t.left;n(s,c,o,a)}),E(document).bind("mousemove."+e+" pointermove."+e+" MSPointerMove."+e,function(e){if(l){var t=l.offset(),o=P(e)[0]-t.top,a=P(e)[1]-t.left;if(s===o)return;n(s,c,o,a)}}).add(o).bind("mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(){l&&(T(l,"active",h.autoExpandScrollbar),l=null),A=!1,p&&(document.onselectstart=null),r(!0)})},I=function(){function t(e){if(!oe(e)||A||P(e)[2])L=0;else{L=1,C=b=0;var t=M.offset();c=P(e)[0]-t.top,h=P(e)[1]-t.left,R=[P(e)[0],P(e)[1]]}}function o(e){if(oe(e)&&!A&&!P(e)[2]&&(e.stopImmediatePropagation(),!C||b)){g=K();var t=T.offset(),o=P(e)[0]-t.top,a=P(e)[1]-t.left,n="mcsLinearOut";if(O.push(o),I.push(a),R[2]=Math.abs(P(e)[0]-R[0]),R[3]=Math.abs(P(e)[1]-R[1]),y.overflowed[0])var i=k[0].parent().height()-k[0].height(),r=0<c-o&&o-c>-i*y.scrollRatio.y&&(2*R[3]<R[2]||"yx"===B.axis);if(y.overflowed[1])var l=k[1].parent().width()-k[1].width(),s=0<h-a&&a-h>-l*y.scrollRatio.x&&(2*R[2]<R[3]||"yx"===B.axis);r||s?(e.preventDefault(),b=1):C=1,w="yx"===B.axis?[c-o,h-a]:"x"===B.axis?[null,h-a]:[c-o,null],M[0].idleTimer=250,y.overflowed[0]&&u(w[0],0,n,"y","all",!0),y.overflowed[1]&&u(w[1],0,n,"x",D,!0)}}function a(e){if(!oe(e)||A||P(e)[2])L=0;else{L=1,e.stopImmediatePropagation(),Z(r),p=K();var t=T.offset();f=P(e)[0]-t.top,m=P(e)[1]-t.left,O=[],I=[]}}function n(e){if(oe(e)&&!A&&!P(e)[2]){e.stopImmediatePropagation(),C=b=0,v=K();var t=T.offset(),o=P(e)[0]-t.top,a=P(e)[1]-t.left;if(!(30<v-g)){var n="mcsEaseOut",i=(_=1e3/(v-p))<2.5,r=i?[O[O.length-2],I[I.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-f,a-m];var l=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var s=[Math.abs(M[0].offsetTop)-x[0]*d(l[0]/_[0],_[0]),Math.abs(M[0].offsetLeft)-x[1]*d(l[1]/_[1],_[1])];w="yx"===B.axis?[s[0],s[1]]:"x"===B.axis?[null,s[1]]:[s[0],null],S=[4*l[0]+B.scrollInertia,4*l[1]+B.scrollInertia];var c=parseInt(B.contentTouchScroll)||0;w[0]=c<l[0]?w[0]:0,w[1]=c<l[1]?w[1]:0,y.overflowed[0]&&u(w[0],S[0],n,"y",D,!1),y.overflowed[1]&&u(w[1],S[1],n,"x",D,!1)}}}function d(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return 90<e?4<t?o[0]:o[3]:60<e?3<t?o[3]:o[2]:30<e?8<t?o[1]:6<t?o[0]:4<t?t:o[2]:8<t?t:o[3]}function u(e,t,o,a,n,i){e&&G(r,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var c,h,f,m,p,g,v,x,_,w,S,b,C,r=E(this),y=r.data(W),B=y.opt,e=W+"_"+y.idx,T=E("#mCSB_"+y.idx),M=E("#mCSB_"+y.idx+"_container"),k=[E("#mCSB_"+y.idx+"_dragger_vertical"),E("#mCSB_"+y.idx+"_dragger_horizontal")],O=[],I=[],D="yx"===B.axis?"none":"all",R=[],i=M.find("iframe"),l=["touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,"touchmove."+e+" pointermove."+e+" MSPointerMove."+e,"touchend."+e+" pointerup."+e+" MSPointerUp."+e];M.bind(l[0],function(e){t(e)}).bind(l[1],function(e){o(e)}),T.bind(l[0],function(e){a(e)}).bind(l[2],function(e){n(e)}),i.length&&i.each(function(){E(this).load(function(){z(this)&&E(this.contentDocument||this.contentWindow.document).bind(l[0],function(e){t(e),a(e)}).bind(l[1],function(e){o(e)}).bind(l[2],function(e){n(e)})})})},D=function(){function n(e,t,o){s.type=o&&i?"stepped":"stepless",s.scrollAmount=10,F(a,e,t,"mcsLinearOut",o?60:null)}var i,a=E(this),r=a.data(W),l=r.opt,s=r.sequential,e=W+"_"+r.idx,c=E("#mCSB_"+r.idx+"_container"),d=c.parent();c.bind("mousedown."+e,function(){L||i||(i=1,A=!0)}).add(document).bind("mousemove."+e,function(e){if(!L&&i&&(window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&document.selection.createRange().text)){var t=c.offset(),o=P(e)[0]-t.top+c[0].offsetTop,a=P(e)[1]-t.left+c[0].offsetLeft;0<o&&o<d.height()&&0<a&&a<d.width()?s.step&&n("off",null,"stepped"):("x"!==l.axis&&r.overflowed[0]&&(o<0?n("on",38):o>d.height()&&n("on",40)),"y"!==l.axis&&r.overflowed[1]&&(a<0?n("on",37):a>d.width()&&n("on",39)))}}).bind("mouseup."+e,function(){L||(i&&(i=0,n("off",null)),A=!1)})},R=function(){function o(e,t){if(Z(d),!H(d,e.target)){var o="auto"!==h.mouseWheel.deltaFactor?parseInt(h.mouseWheel.deltaFactor):p&&e.deltaFactor<100?100:e.deltaFactor||100;if("x"===h.axis||"x"===h.mouseWheel.axis)var a="x",n=[Math.round(o*u.scrollRatio.x),parseInt(h.mouseWheel.scrollAmount)],i="auto"!==h.mouseWheel.scrollAmount?n[1]:n[0]>=f.width()?.9*f.width():n[0],r=Math.abs(E("#mCSB_"+u.idx+"_container")[0].offsetLeft),l=m[1][0].offsetLeft,s=m[1].parent().width()-m[1].width(),c=e.deltaX||e.deltaY||t;else var a="y",n=[Math.round(o*u.scrollRatio.y),parseInt(h.mouseWheel.scrollAmount)],i="auto"!==h.mouseWheel.scrollAmount?n[1]:n[0]>=f.height()?.9*f.height():n[0],r=Math.abs(E("#mCSB_"+u.idx+"_container")[0].offsetTop),l=m[0][0].offsetTop,s=m[0].parent().height()-m[0].height(),c=e.deltaY||t;"y"===a&&!u.overflowed[0]||"x"===a&&!u.overflowed[1]||(h.mouseWheel.invert&&(c=-c),h.mouseWheel.normalizeDelta&&(c=c<0?-1:1),(0<c&&0!==l||c<0&&l!==s||h.mouseWheel.preventDefault)&&(e.stopImmediatePropagation(),e.preventDefault()),G(d,(r-c*i).toString(),{dir:a}))}}var d=E(this),u=d.data(W),h=u.opt,e=W+"_"+u.idx,f=E("#mCSB_"+u.idx),m=[E("#mCSB_"+u.idx+"_dragger_vertical"),E("#mCSB_"+u.idx+"_dragger_horizontal")],t=E("#mCSB_"+u.idx+"_container").find("iframe");u&&(t.length&&t.each(function(){E(this).load(function(){z(this)&&E(this.contentDocument||this.contentWindow.document).bind("mousewheel."+e,function(e,t){o(e,t)})})}),f.bind("mousewheel."+e,function(e,t){o(e,t)}))},z=function(e){var t=null;try{var o=e.contentDocument||e.contentWindow.document;t=o.body.innerHTML}catch(e){}return null!==t},H=function(e,t){var o=t.nodeName.toLowerCase(),a=e.data(W).opt.mouseWheel.disableOver;return-1<E.inArray(o,a)&&!(-1<E.inArray(o,["select","textarea"])&&!E(t).is(":focus"))},X=function(){var r=E(this),l=r.data(W),e=W+"_"+l.idx,s=E("#mCSB_"+l.idx+"_container"),c=s.parent(),t=E(".mCSB_"+l.idx+"_scrollbar ."+w[12]);t.bind("touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(){A=!0}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(){A=!1}).bind("click."+e,function(e){if(E(e.target).hasClass(w[12])||E(e.target).hasClass("mCSB_draggerRail")){Z(r);var t=E(this),o=t.find(".mCSB_dragger");if(0<t.parent(".mCSB_scrollTools_horizontal").length){if(!l.overflowed[1])return;var a="x",n=e.pageX>o.offset().left?-1:1,i=Math.abs(s[0].offsetLeft)-.9*n*c.width()}else{if(!l.overflowed[0])return;var a="y",n=e.pageY>o.offset().top?-1:1,i=Math.abs(s[0].offsetTop)-.9*n*c.height()}G(r,i.toString(),{dir:a,scrollEasing:"mcsEaseInOut"})}})},Y=function(){var i=E(this),e=i.data(W),r=e.opt,t=W+"_"+e.idx,l=E("#mCSB_"+e.idx+"_container"),s=l.parent();l.bind("focusin."+t,function(){var n=E(document.activeElement),e=l.find(".mCustomScrollBox").length;n.is(r.advanced.autoScrollOnFocus)&&(Z(i),clearTimeout(i[0]._focusTimeout),i[0]._focusTimer=e?17*e:0,i[0]._focusTimeout=setTimeout(function(){var e=[ne(n)[0],ne(n)[1]],t=[l[0].offsetTop,l[0].offsetLeft],o=[0<=t[0]+e[0]&&t[0]+e[0]<s.height()-n.outerHeight(!1),0<=t[1]+e[1]&&t[0]+e[1]<s.width()-n.outerWidth(!1)],a="yx"!==r.axis||o[0]||o[1]?"all":"none";"x"===r.axis||o[0]||G(i,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:a,dur:0}),"y"===r.axis||o[1]||G(i,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:a,dur:0})},i[0]._focusTimer))})},U=function(){var e=E(this),t=e.data(W),o=W+"_"+t.idx,a=E("#mCSB_"+t.idx+"_container").parent();a.bind("scroll."+o,function(){(0!==a.scrollTop()||0!==a.scrollLeft())&&E(".mCSB_"+t.idx+"_scrollbar").css("visibility","hidden")})},j=function(){var a=E(this),n=a.data(W),i=n.opt,r=n.sequential,e=W+"_"+n.idx,t=".mCSB_"+n.idx+"_scrollbar",o=E(t+">a");o.bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e+" mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e+" mouseout."+e+" pointerout."+e+" MSPointerOut."+e+" click."+e,function(e){function t(e,t){r.scrollAmount=i.snapAmount||i.scrollButtons.scrollAmount,F(a,e,t)}if(e.preventDefault(),te(e)){var o=E(this).attr("class");switch(r.type=i.scrollButtons.scrollType,e.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===r.type)return;A=!0,n.tweenRunning=!1,t("on",o);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===r.type)return;A=!1,r.dir&&t("off",o);break;case"click":if("stepped"!==r.type||n.tweenRunning)return;t("on",o)}}})},q=function(){function t(e){function t(e,t){d.type=c.keyboard.scrollType,d.scrollAmount=c.snapAmount||c.keyboard.scrollAmount,"stepped"===d.type&&s.tweenRunning||F(l,e,t)}switch(e.type){case"blur":s.tweenRunning&&d.dir&&t("off",null);break;case"keydown":case"keyup":var o=e.keyCode?e.keyCode:e.which,a="on";if("x"!==c.axis&&(38===o||40===o)||"y"!==c.axis&&(37===o||39===o)){if((38===o||40===o)&&!s.overflowed[0]||(37===o||39===o)&&!s.overflowed[1])return;"keyup"===e.type&&(a="off"),E(document.activeElement).is(f)||(e.preventDefault(),e.stopImmediatePropagation(),t(a,o))}else if(33===o||34===o){if((s.overflowed[0]||s.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type){Z(l);var n=34===o?-1:1;if("x"===c.axis||"yx"===c.axis&&s.overflowed[1]&&!s.overflowed[0])var i="x",r=Math.abs(u[0].offsetLeft)-.9*n*h.width();else var i="y",r=Math.abs(u[0].offsetTop)-.9*n*h.height();G(l,r.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}}else if((35===o||36===o)&&!E(document.activeElement).is(f)&&((s.overflowed[0]||s.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type)){if("x"===c.axis||"yx"===c.axis&&s.overflowed[1]&&!s.overflowed[0])var i="x",r=35===o?Math.abs(h.width()-u.outerWidth(!1)):0;else var i="y",r=35===o?Math.abs(h.height()-u.outerHeight(!1)):0;G(l,r.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}}}var l=E(this),s=l.data(W),c=s.opt,d=s.sequential,e=W+"_"+s.idx,o=E("#mCSB_"+s.idx),u=E("#mCSB_"+s.idx+"_container"),h=u.parent(),f="input,textarea,select,datalist,keygen,[contenteditable='true']",a=u.find("iframe"),n=["blur."+e+" keydown."+e+" keyup."+e];a.length&&a.each(function(){E(this).load(function(){z(this)&&E(this.contentDocument||this.contentWindow.document).bind(n[0],function(e){t(e)})})}),o.attr("tabindex","0").bind(n[0],function(e){t(e)})},F=function(u,e,t,h,f){function m(e){var t="stepped"!==g.type,o=f||(e?t?x/1.5:_:1e3/60),a=e?t?7.5:40:2.5,n=[Math.abs(v[0].offsetTop),Math.abs(v[0].offsetLeft)],i=[10<p.scrollRatio.y?10:p.scrollRatio.y,10<p.scrollRatio.x?10:p.scrollRatio.x],r="x"===g.dir[0]?n[1]+g.dir[1]*i[1]*a:n[0]+g.dir[1]*i[0]*a,l="x"===g.dir[0]?n[1]+g.dir[1]*parseInt(g.scrollAmount):n[0]+g.dir[1]*parseInt(g.scrollAmount),s="auto"!==g.scrollAmount?l:r,c=h||(e?t?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),d=!!e;return e&&o<17&&(s="x"===g.dir[0]?n[1]:n[0]),G(u,s.toString(),{dir:g.dir[0],scrollEasing:c,dur:o,onComplete:d}),e?void(g.dir=!1):(clearTimeout(g.step),void(g.step=setTimeout(function(){m()},o)))}var p=u.data(W),o=p.opt,g=p.sequential,v=E("#mCSB_"+p.idx+"_container"),a="stepped"===g.type,x=o.scrollInertia<26?26:o.scrollInertia,_=o.scrollInertia<1?17:o.scrollInertia;switch(e){case"on":if(g.dir=[t===w[16]||t===w[15]||39===t||37===t?"x":"y",t===w[13]||t===w[15]||38===t||37===t?-1:1],Z(u),ae(t)&&"stepped"===g.type)return;m(a);break;case"off":clearTimeout(g.step),ee(g,"step"),Z(u),(a||p.tweenRunning&&g.dir)&&m(!0)}},N=function(e){var t=E(this).data(W).opt,o=[];return"function"==typeof e&&(e=e()),e instanceof Array?o=1<e.length?[e[0],e[1]]:"x"===t.axis?[null,e[0]]:[e[0],null]:(o[0]=e.y?e.y:e.x||"x"===t.axis?null:e,o[1]=e.x?e.x:e.y||"y"===t.axis?null:e),"function"==typeof o[0]&&(o[0]=o[0]()),"function"==typeof o[1]&&(o[1]=o[1]()),o},V=function(e,t){if(null!=e&&void 0!==e){var o=E(this),a=o.data(W),n=a.opt,i=E("#mCSB_"+a.idx+"_container"),r=i.parent(),l=typeof e;t||(t="x"===n.axis?"x":"y");var s="x"===t?i.outerWidth(!1):i.outerHeight(!1),c="x"===t?i[0].offsetLeft:i[0].offsetTop,d="x"===t?"left":"top";switch(l){case"function":return e();case"object":var u=e.jquery?e:E(e);if(!u.length)return;return"x"===t?ne(u)[1]:ne(u)[0];case"string":case"number":if(ae(e))return Math.abs(e);if(-1!==e.indexOf("%"))return Math.abs(s*parseInt(e)/100);if(-1!==e.indexOf("-="))return Math.abs(c-parseInt(e.split("-=")[1]));if(-1!==e.indexOf("+=")){var h=c+parseInt(e.split("+=")[1]);return 0<=h?0:Math.abs(h)}if(-1!==e.indexOf("px")&&ae(e.split("px")[0]))return Math.abs(e.split("px")[0]);if("top"===e||"left"===e)return 0;if("bottom"===e)return Math.abs(r.height()-i.outerHeight(!1));if("right"===e)return Math.abs(r.width()-i.outerWidth(!1));if("first"===e||"last"===e){var u=i.find(":"+e);return"x"===t?ne(u)[1]:ne(u)[0]}return E(e).length?"x"===t?ne(E(e))[1]:ne(E(e))[0]:(i.css(d,e),void v.update.call(null,o[0]))}}},Q=function(e){function t(){var e=0;return r.advanced.updateOnImageLoad&&(e=l.find("img").length),e}function o(){!0===r.advanced.updateOnSelectorChange&&(r.advanced.updateOnSelectorChange="*");var e=0,t=l.find(r.advanced.updateOnSelectorChange);return r.advanced.updateOnSelectorChange&&0<t.length&&t.each(function(){e+=E(this).height()+E(this).width()}),e}function n(e){clearTimeout(l[0].autoUpdate),v.update.call(null,a[0],e)}var a=E(this),i=a.data(W),r=i.opt,l=E("#mCSB_"+i.idx+"_container");if(e)return clearTimeout(l[0].autoUpdate),void ee(l[0],"autoUpdate");var s,c,d,u=l.parent(),h=[E("#mCSB_"+i.idx+"_scrollbar_vertical"),E("#mCSB_"+i.idx+"_scrollbar_horizontal")],f=function(){return[h[0].is(":visible")?h[0].outerHeight(!0):0,h[1].is(":visible")?h[1].outerWidth(!0):0]},m=o(),p=[l.outerHeight(!1),l.outerWidth(!1),u.height(),u.width(),f()[0],f()[1]],g=t();!function e(){clearTimeout(l[0].autoUpdate),l[0].autoUpdate=setTimeout(function(){return r.advanced.updateOnSelectorChange&&(s=o())!==m?(n(3),void(m=s)):(r.advanced.updateOnContentResize&&((c=[l.outerHeight(!1),l.outerWidth(!1),u.height(),u.width(),f()[0],f()[1]])[0]!==p[0]||c[1]!==p[1]||c[2]!==p[2]||c[3]!==p[3]||c[4]!==p[4]||c[5]!==p[5])&&(n(c[0]!==p[0]||c[1]!==p[1]),p=c),r.advanced.updateOnImageLoad&&(d=t())!==g&&(l.find("img").each(function(){!function(e){if(E(e).hasClass(w[2]))return n();var t,o,a=new Image;a.onload=(t=a,o=function(){this.onload=null,E(e).addClass(w[2]),n(2)},function(){return o.apply(t,arguments)}),a.src=e.src}(this)}),g=d),void((r.advanced.updateOnSelectorChange||r.advanced.updateOnContentResize||r.advanced.updateOnImageLoad)&&e()))},60)}()},Z=function(e){var t=e.data(W),o=E("#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal");o.each(function(){$.call(this)})},G=function(n,e,i){function t(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function o(){var e=[f[0].offsetTop,f[0].offsetLeft],t=[v[0].offsetTop,v[0].offsetLeft],o=[f.outerHeight(!1),f.outerWidth(!1)],a=[h.height(),h.width()];n[0].mcs={content:f,top:e[0],left:e[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(o[0])-a[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(o[1])-a[1])),direction:i.dir}}var a,r,l,s=n.data(W),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=E.extend(d,i),u=[i.dur,i.drag?0:i.dur],h=E("#mCSB_"+s.idx),f=E("#mCSB_"+s.idx+"_container"),m=f.parent(),p=c.callbacks.onTotalScrollOffset?N.call(n,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?N.call(n,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=i.trigger,(0!==m.scrollTop()||0!==m.scrollLeft())&&(E(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==e||s.contentReset.y||(t("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(n[0]),s.contentReset.y=1),"_resetX"!==e||s.contentReset.x||(t("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(n[0]),s.contentReset.x=1),"_resetY"!==e&&"_resetX"!==e){switch(!s.contentReset.y&&n[0].mcs||!s.overflowed[0]||(t("onOverflowY")&&c.callbacks.onOverflowY.call(n[0]),s.contentReset.x=null),!s.contentReset.x&&n[0].mcs||!s.overflowed[1]||(t("onOverflowX")&&c.callbacks.onOverflowX.call(n[0]),s.contentReset.x=null),c.snapAmount&&(a=e,r=c.snapAmount,l=c.snapOffset,e=Math.round(a/r)*r-l),i.dir){case"x":var v=E("#mCSB_"+s.idx+"_dragger_horizontal"),x="left",_=f[0].offsetLeft,w=[h.width()-f.outerWidth(!1),v.parent().width()-v.width()],S=[e,0===e?0:e/s.scrollRatio.x],b=p[1],C=g[1],y=0<b?b/s.scrollRatio.x:0,B=0<C?C/s.scrollRatio.x:0;break;case"y":var v=E("#mCSB_"+s.idx+"_dragger_vertical"),x="top",_=f[0].offsetTop,w=[h.height()-f.outerHeight(!1),v.parent().height()-v.height()],S=[e,0===e?0:e/s.scrollRatio.y],b=p[0],C=g[0],y=0<b?b/s.scrollRatio.y:0,B=0<C?C/s.scrollRatio.y:0}S[1]<0||0===S[0]&&0===S[1]?S=[0,0]:S[1]>=w[1]?S=[w[0],w[1]]:S[0]=-S[0],n[0].mcs||(o(),t("onInit")&&c.callbacks.onInit.call(n[0])),clearTimeout(f[0].onCompleteTimeout),(s.tweenRunning||!(0===_&&0<=S[0]||_===w[0]&&S[0]<=w[0]))&&(J(v[0],x,Math.round(S[1]),u[1],i.scrollEasing),J(f[0],x,Math.round(S[0]),u[0],i.scrollEasing,i.overwrite,{onStart:function(){i.callbacks&&i.onStart&&!s.tweenRunning&&(t("onScrollStart")&&(o(),c.callbacks.onScrollStart.call(n[0])),s.tweenRunning=!0,T(v),s.cbOffsets=[c.callbacks.alwaysTriggerOffsets||_>=w[0]+b,c.callbacks.alwaysTriggerOffsets||_<=-C])},onUpdate:function(){i.callbacks&&i.onUpdate&&t("whileScrolling")&&(o(),c.callbacks.whileScrolling.call(n[0]))},onComplete:function(){if(i.callbacks&&i.onComplete){"yx"===c.axis&&clearTimeout(f[0].onCompleteTimeout);var e=f[0].idleTimer||0;f[0].onCompleteTimeout=setTimeout(function(){t("onScroll")&&(o(),c.callbacks.onScroll.call(n[0])),t("onTotalScroll")&&S[1]>=w[1]-y&&s.cbOffsets[0]&&(o(),c.callbacks.onTotalScroll.call(n[0])),t("onTotalScrollBack")&&S[1]<=B&&s.cbOffsets[1]&&(o(),c.callbacks.onTotalScrollBack.call(n[0])),s.tweenRunning=!1,f[0].idleTimer=0,T(v,"hide")},e)}}}))}},J=function(e,t,o,a,n,i,r){function l(){x.stop||(p||u.call(),p=K()-m,s(),p>=x.time&&(x.time=p>x.time?p+c-(p-x.time):p+c-1,x.time<p+1&&(x.time=p+1)),x.time<a?x.id=d(l):f.call())}function s(){0<a?(x.currVal=function(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return(e/=a/2)<1?o/2*e*e+t:-o/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return(e/=a/2)<1?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return(e/=a/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=a,-o*(--e*e*e*e-1)+t;case"easeOutStrong":return o*(1-Math.pow(2,-10*e/a))+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}(x.time,g,_,a,n),v[t]=Math.round(x.currVal)+"px"):v[t]=o+"px",h.call()}e._mTween||(e._mTween={top:{},left:{}});var c,d,r=r||{},u=r.onStart||function(){},h=r.onUpdate||function(){},f=r.onComplete||function(){},m=K(),p=0,g=e.offsetTop,v=e.style,x=e._mTween[t];"left"===t&&(g=e.offsetLeft);var _=o-g;x.stop=0,"none"!==i&&null!=x.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(x.id):clearTimeout(x.id),x.id=null),c=1e3/60,x.time=p+c,d=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},x.id=d(l)},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},ee=function(t,o){try{delete t[o]}catch(e){t[o]=null}},te=function(e){return!(e.which&&1!==e.which)},oe=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},ae=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ne=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},E.fn[f]=function(e){return v[e]?v[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void E.error("Method "+e+" does not exist"):v.init.apply(this,arguments)},E[f]=function(e){return v[e]?v[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void E.error("Method "+e+" does not exist"):v.init.apply(this,arguments)},E[f].defaults=n,window[f]=!0,E(window).load(function(){E(a)[f](),E.extend(E.expr[":"],{mcsInView:E.expr[":"].mcsInView||function(e){var t,o,a=E(e),n=a.parents(".mCSB_container");if(n.length)return t=n.parent(),0<=(o=[n[0].offsetTop,n[0].offsetLeft])[0]+ne(a)[0]&&o[0]+ne(a)[0]<t.height()-a.outerHeight(!1)&&0<=o[1]+ne(a)[1]&&o[1]+ne(a)[1]<t.width()-a.outerWidth(!1)},mcsOverflow:E.expr[":"].mcsOverflow||function(e){var t=E(e).data(W);if(t)return t.overflowed[0]||t.overflowed[1]}})})});
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(l){"use strict";var i,e=l(window),h=l(document),a=window.location,D=!0,W=!1,r=null,n="undefined",o="directive",t=".cropper",d=/^(e|n|w|s|ne|nw|sw|se|all|crop|move|zoom)$/,g=/^(x|y|width|height)$/,s=/^(naturalWidth|naturalHeight|width|height|aspectRatio|ratio|rotate)$/,p="cropper-modal",H="cropper-hidden",c="cropper-invisible",f="cropper-crop",m="cropper-disabled",u="mousedown touchstart",w="mousemove touchmove",v="mouseup mouseleave touchend touchleave touchcancel",x="wheel mousewheel DOMMouseScroll",b="resize"+t,y="dblclick",$="build"+t,C="built"+t,k="dragstart"+t,R="dragmove"+t,z="dragend"+t,L=function(t){return"number"==typeof t},Y=function(t,i){var e=[];return"number"==typeof i&&e.push(i),e.slice.apply(t,e)},X=function(t,i){var e=Y(arguments,2);return function(){return t.apply(i,e.concat(Y(arguments)))}},M=function(t,i){this.element=t,this.$element=l(t),this.defaults=l.extend({},M.DEFAULTS,l.isPlainObject(i)?i:{}),this.$original=r,this.ready=W,this.built=W,this.cropped=W,this.rotated=W,this.disabled=W,this.replaced=W,this.init()},T=Math.sqrt,I=Math.min,E=Math.max,_=Math.abs,P=Math.sin,O=Math.cos,U=parseFloat;M.prototype={constructor:M,support:{canvas:l.isFunction(l("<canvas>")[0].getContext)},init:function(){var e=this.defaults;l.each(e,function(t,i){switch(t){case"aspectRatio":e[t]=_(U(i))||NaN;break;case"autoCropArea":e[t]=_(U(i))||.8;break;case"minWidth":case"minHeight":e[t]=_(U(i))||0;break;case"maxWidth":case"maxHeight":e[t]=_(U(i))||1/0}}),this.image={rotate:0},this.load()},load:function(){var t,i,e=this,h=this.$element,a=this.element,s=this.image,r="";h.is("img")?i=h.prop("src"):h.is("canvas")&&this.support.canvas&&(i=a.toDataURL()),i&&(this.replaced&&(s.rotate=0),this.defaults.checkImageOrigin&&(h.prop("crossOrigin")||this.isCrossOriginURL(i))&&(r=" crossOrigin"),this.$clone=t=l("<img"+r+' src="'+i+'">'),t.one("load",function(){s.naturalWidth=this.naturalWidth||t.width(),s.naturalHeight=this.naturalHeight||t.height(),s.aspectRatio=s.naturalWidth/s.naturalHeight,e.url=i,e.ready=D,e.build()}),t.addClass(c).prependTo("body"))},isCrossOriginURL:function(t){var i=t.match(/^(https?:)\/\/([^\:\/\?#]+):?(\d*)/i);return!i||i[1]===a.protocol&&i[2]===a.hostname&&i[3]===a.port?W:D},build:function(){var t,i,e=this.$element,h=this.defaults;this.ready&&(this.built&&this.unbuild(),e.one($,h.build),t=l.Event($),e.trigger(t),t.isDefaultPrevented()||(this.$cropper=i=l(M.TEMPLATE),e.addClass(H),this.$clone.removeClass(c).prependTo(i),this.rotated||(this.$original=this.$clone.clone(),this.$original.addClass(H).prependTo(this.$cropper),this.originalImage=l.extend({},this.image)),this.$container=e.parent(),this.$container.append(i),this.$canvas=i.find(".cropper-canvas"),this.$dragger=i.find(".cropper-dragger"),this.$viewer=i.find(".cropper-viewer"),h.autoCrop?this.cropped=D:this.$dragger.addClass(H),h.dragCrop&&this.setDragMode("crop"),h.modal&&this.$canvas.addClass(p),!h.dashed&&this.$dragger.find(".cropper-dashed").addClass(H),!h.movable&&this.$dragger.find(".cropper-face").data(o,"move"),!h.resizable&&this.$dragger.find(".cropper-line, .cropper-point").addClass(H),this.addListeners(),this.initPreview(),this.built=D,this.update(),this.replaced=W,e.one(C,h.built),e.trigger(C)))},unbuild:function(){this.built&&(this.built=W,this.removeListeners(),this.$preview.empty(),this.$preview=r,this.$dragger=r,this.$canvas=r,this.$container=r,this.$cropper.remove(),this.$cropper=r)},update:function(t){this.initContainer(),this.initCropper(),this.initImage(),this.initDragger(),t?(this.setData(t,D),this.setDragMode("crop")):this.setData(this.defaults.data)},resize:function(){clearTimeout(this.resizing),this.resizing=setTimeout(l.proxy(this.update,this,this.getData()),200)},preview:function(){var t=this.image,e=this.dragger,h=t.width,a=t.height,s=e.left-t.left,r=e.top-t.top;this.$viewer.find("img").css({width:h,height:a,marginLeft:-s,marginTop:-r}),this.$preview.each(function(){var t=l(this),i=t.width()/e.width;t.find("img").css({width:h*i,height:a*i,marginLeft:-s*i,marginTop:-r*i})})},addListeners:function(){var t=this.defaults;this.$element.on(k,t.dragstart).on(R,t.dragmove).on(z,t.dragend),this.$cropper.on(u,l.proxy(this.dragstart,this)).on(y,l.proxy(this.dblclick,this)),t.zoomable&&this.$cropper.on(x,l.proxy(this.wheel,this)),t.multiple?this.$cropper.on(w,l.proxy(this.dragmove,this)).on(v,l.proxy(this.dragend,this)):h.on(w,this._dragmove=X(this.dragmove,this)).on(v,this._dragend=X(this.dragend,this)),e.on(b,this._resize=X(this.resize,this))},removeListeners:function(){var t=this.defaults;this.$element.off(k,t.dragstart).off(R,t.dragmove).off(z,t.dragend),this.$cropper.off(u,this.dragstart).off(y,this.dblclick),t.zoomable&&this.$cropper.off(x,this.wheel),t.multiple?this.$cropper.off(w,this.dragmove).off(v,this.dragend):h.off(w,this._dragmove).off(v,this._dragend),e.off(b,this._resize)},initPreview:function(){var t='<img src="'+this.url+'">';this.$preview=l(this.defaults.preview),this.$viewer.html(t),this.$preview.html(t).find("img").css("cssText","min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;")},initContainer:function(){var t=this.$container;t!==r&&(this.container={width:E(t.width(),300),height:E(t.height(),150)})},initCropper:function(){var t,i=this.container,e=this.image;0<=e.naturalWidth*i.height/e.naturalHeight-i.width?(t={width:i.width,height:i.width/e.aspectRatio,left:0}).top=(i.height-t.height)/2:(t={width:i.height*e.aspectRatio,height:i.height,top:0}).left=(i.width-t.width)/2,this.$cropper&&this.$cropper.css({width:t.width,height:t.height,left:t.left,top:t.top}),this.cropper=t},initImage:function(){var t=this.image,i=this.cropper,e={_width:i.width,_height:i.height,width:i.width,height:i.height,left:0,top:0,ratio:i.width/t.naturalWidth};this.defaultImage=l.extend({},t,e),t._width!==i.width||t._height!==i.height?l.extend(t,e):(t=l.extend({},e,t),this.replaced&&(t.ratio=e.ratio)),this.image=t,this.renderImage()},renderImage:function(t){var i=this.image;"zoom"===t&&(i.left-=(i.width-i.oldWidth)/2,i.top-=(i.height-i.oldHeight)/2),i.left=I(E(i.left,i._width-i.width),0),i.top=I(E(i.top,i._height-i.height),0),this.$clone.css({width:i.width,height:i.height,marginLeft:i.left,marginTop:i.top}),t&&(this.defaults.done(this.getData()),this.preview())},initDragger:function(){var t,i=this.defaults,e=this.cropper,h=i.aspectRatio||this.image.aspectRatio,a=this.image.ratio;(t=0<=e.height*h-e.width?{height:e.width/h,width:e.width,left:0,top:(e.height-e.width/h)/2,maxWidth:e.width,maxHeight:e.width/h}:{height:e.height,width:e.height*h,left:(e.width-e.height*h)/2,top:0,maxWidth:e.height*h,maxHeight:e.height}).minWidth=0,t.minHeight=0,i.aspectRatio?(isFinite(i.maxWidth)?(t.maxWidth=I(t.maxWidth,i.maxWidth*a),t.maxHeight=t.maxWidth/h):isFinite(i.maxHeight)&&(t.maxHeight=I(t.maxHeight,i.maxHeight*a),t.maxWidth=t.maxHeight*h),0<i.minWidth?(t.minWidth=E(0,i.minWidth*a),t.minHeight=t.minWidth/h):0<i.minHeight&&(t.minHeight=E(0,i.minHeight*a),t.minWidth=t.minHeight*h)):(t.maxWidth=I(t.maxWidth,i.maxWidth*a),t.maxHeight=I(t.maxHeight,i.maxHeight*a),t.minWidth=E(0,i.minWidth*a),t.minHeight=E(0,i.minHeight*a)),t.minWidth=I(t.maxWidth,t.minWidth),t.minHeight=I(t.maxHeight,t.minHeight),t.height*=i.autoCropArea,t.width*=i.autoCropArea,t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.defaultDragger=t,this.dragger=l.extend({},t)},renderDragger:function(){var t=this.dragger,i=this.cropper;t.width>t.maxWidth?(t.width=t.maxWidth,t.left=t.oldLeft):t.width<t.minWidth&&(t.width=t.minWidth,t.left=t.oldLeft),t.height>t.maxHeight?(t.height=t.maxHeight,t.top=t.oldTop):t.height<t.minHeight&&(t.height=t.minHeight,t.top=t.oldTop),t.left=I(E(t.left,0),i.width-t.width),t.top=I(E(t.top,0),i.height-t.height),t.oldLeft=t.left,t.oldTop=t.top,this.dragger=t,this.disabled||this.defaults.done(this.getData()),this.$dragger.css({width:t.width,height:t.height,left:t.left,top:t.top}),this.preview()},reset:function(t){this.cropped&&(t&&(this.defaults.data={}),this.image=l.extend({},this.defaultImage),this.renderImage(),this.dragger=l.extend({},this.defaultDragger),this.setData(this.defaults.data))},clear:function(){this.cropped&&(this.cropped=W,this.setData({x:0,y:0,width:0,height:0}),this.$canvas.removeClass(p),this.$dragger.addClass(H))},destroy:function(){var t=this.$element;this.ready&&(this.unbuild(),t.removeClass(H).removeData("cropper"),this.rotated&&t.attr("src",this.$original.attr("src")))},replace:function(t,i){var e,h=this,a=this.$element,s=this.element;t&&t!==this.url&&t!==a.attr("src")&&(i||(this.rotated=W,this.replaced=D),a.is("img")?(a.attr("src",t),this.load()):a.is("canvas")&&this.support.canvas&&(e=s.getContext("2d"),l('<img src="'+t+'">').one("load",function(){s.width=this.width,s.height=this.height,e.clearRect(0,0,s.width,s.height),e.drawImage(this,0,0),h.load()})))},setData:function(t,i){var e=this.cropper,h=this.dragger,a=this.image,s=this.defaults.aspectRatio;this.built&&typeof t!==n&&((t===r||l.isEmptyObject(t))&&(h=l.extend({},this.defaultDragger)),l.isPlainObject(t)&&!l.isEmptyObject(t)&&(i||(this.defaults.data=t),t=this.transformData(t),L(t.x)&&t.x<=e.width-a.left&&(h.left=t.x+a.left),L(t.y)&&t.y<=e.height-a.top&&(h.top=t.y+a.top),s?L(t.width)&&t.width<=h.maxWidth&&t.width>=h.minWidth?(h.width=t.width,h.height=h.width/s):L(t.height)&&t.height<=h.maxHeight&&t.height>=h.minHeight&&(h.height=t.height,h.width=h.height*s):(L(t.width)&&t.width<=h.maxWidth&&t.width>=h.minWidth&&(h.width=t.width),L(t.height)&&t.height<=h.maxHeight&&t.height>=h.minHeight&&(h.height=t.height))),this.dragger=h,this.renderDragger())},getData:function(t){var i=this.dragger,e=this.image,h={};return this.built&&(h={x:i.left-e.left,y:i.top-e.top,width:i.width,height:i.height},h=this.transformData(h,D,t)),h},transformData:function(t,e,h){var a=this.image.ratio,s={};return l.each(t,function(t,i){i=U(i),g.test(t)&&!isNaN(i)&&(s[t]=e?h?Math.round(i/a):i/a:i*a)}),s},setAspectRatio:function(t){var i="auto"===t;t=U(t),(i||!isNaN(t)&&0<t)&&(this.defaults.aspectRatio=i?NaN:t,this.built&&(this.initDragger(),this.renderDragger()))},getImageData:function(){var e={};return this.ready&&l.each(this.image,function(t,i){s.test(t)&&(e[t]=i)}),e},getDataURL:function(t,i,e){var h,a=l("<canvas>")[0],s=this.getData(),r="";return l.isPlainObject(t)||(e=i,i=t,t={}),t=l.extend({width:s.width,height:s.height},t),this.cropped&&this.support.canvas&&(a.width=t.width,a.height=t.height,h=a.getContext("2d"),"image/jpeg"===i&&(h.fillStyle="#fff",h.fillRect(0,0,t.width,t.height)),h.drawImage(this.$clone[0],s.x,s.y,s.width,s.height,0,0,t.width,t.height),r=a.toDataURL(i,e)),r},setDragMode:function(t){var i=this.$canvas,e=this.defaults,h=W,a=W;if(this.built&&!this.disabled){switch(t){case"crop":e.dragCrop&&(h=D,i.data(o,t));break;case"move":a=D,i.data(o,t);break;default:i.removeData(o)}i.toggleClass(f,h).toggleClass("cropper-move",a)}},enable:function(){this.built&&(this.disabled=W,this.$cropper.removeClass(m))},disable:function(){this.built&&(this.disabled=D,this.$cropper.addClass(m))},rotate:function(t){var i=this.image;t=U(t)||0,this.built&&0!==t&&!this.disabled&&this.defaults.rotatable&&this.support.canvas&&(this.rotated=D,t=i.rotate=(i.rotate+t)%360,this.replace(this.getRotatedDataURL(t),!0))},getRotatedDataURL:function(t){var i=l("<canvas>")[0],e=i.getContext("2d"),h=t*Math.PI/180,a=_(t)%180,s=(90<a?180-a:a)*Math.PI/180,r=this.originalImage,n=r.naturalWidth,o=r.naturalHeight,d=_(n*O(s)+o*P(s)),g=_(n*P(s)+o*O(s));return i.width=d,i.height=g,e.save(),e.translate(d/2,g/2),e.rotate(h),e.drawImage(this.$original[0],-n/2,-o/2,n,o),e.restore(),i.toDataURL()},zoom:function(t){var i,e,h,a=this.image;t=U(t),this.built&&t&&!this.disabled&&this.defaults.zoomable&&(i=a.width*(1+t),e=a.height*(1+t),10<(h=i/a._width)||(h<1&&(i=a._width,e=a._height),h<=1?this.setDragMode("crop"):this.setDragMode("move"),a.oldWidth=a.width,a.oldHeight=a.height,a.width=i,a.height=e,a.ratio=a.width/a.naturalWidth,this.renderImage("zoom")))},dblclick:function(){this.disabled||(this.$canvas.hasClass(f)?this.setDragMode("move"):this.setDragMode("crop"))},wheel:function(t){var i,e=t.originalEvent;this.disabled||(t.preventDefault(),i=e.deltaY?(i=e.deltaY)%5==0?i/5:i%117.25==0?i/117.25:i/166.66665649414062:e.wheelDelta?-e.wheelDelta/120:e.detail?e.detail/3:0,this.zoom(.1*i))},dragstart:function(t){var i,e,h,a=t.originalEvent.touches,s=t;if(!this.disabled){if(a){if(1<(h=a.length)){if(!this.defaults.zoomable||2!==h)return;s=a[1],this.startX2=s.pageX,this.startY2=s.pageY,i="zoom"}s=a[0]}if(i=i||l(s.target).data(o),d.test(i)){if(t.preventDefault(),e=l.Event(k),this.$element.trigger(e),e.isDefaultPrevented())return;this.directive=i,this.cropping=W,this.startX=s.pageX,this.startY=s.pageY,"crop"===i&&(this.cropping=D,this.$canvas.addClass(p))}}},dragmove:function(t){var i,e,h=t.originalEvent.touches,a=t;if(!this.disabled){if(h){if(1<(e=h.length)){if(!this.defaults.zoomable||2!==e)return;a=h[1],this.endX2=a.pageX,this.endY2=a.pageY}a=h[0]}if(this.directive){if(t.preventDefault(),i=l.Event(R),this.$element.trigger(i),i.isDefaultPrevented())return;this.endX=a.pageX,this.endY=a.pageY,this.dragging()}}},dragend:function(t){var i;if(!this.disabled&&this.directive){if(t.preventDefault(),i=l.Event(z),this.$element.trigger(i),i.isDefaultPrevented())return;this.cropping&&(this.cropping=W,this.$canvas.toggleClass(p,this.cropped&&this.defaults.modal)),this.directive=""}},dragging:function(){var t,i,e,h,a,s,r,n=this.directive,o=this.image,d=this.cropper,g=d.width,l=d.height,p=this.dragger,c=p.width,f=p.height,m=p.left,u=p.top,w=m+c,v=u+f,x=D,b=this.defaults,y=b.aspectRatio,$={x:this.endX-this.startX,y:this.endY-this.startY};switch(y&&($.X=$.y*y,$.Y=$.x/y),n){case"all":m+=$.x,u+=$.y;break;case"e":if(0<=$.x&&(g<=w||y&&(u<=0||l<=v))){x=W;break}c+=$.x,y&&(f=c/y,u-=$.Y/2),c<0&&(n="w",c=0);break;case"n":if($.y<=0&&(u<=0||y&&(m<=0||g<=w))){x=W;break}f-=$.y,u+=$.y,y&&(c=f*y,m+=$.X/2),f<0&&(n="s",f=0);break;case"w":if($.x<=0&&(m<=0||y&&(u<=0||l<=v))){x=W;break}c-=$.x,m+=$.x,y&&(f=c/y,u+=$.Y/2),c<0&&(n="e",c=0);break;case"s":if(0<=$.y&&(l<=v||y&&(m<=0||g<=w))){x=W;break}f+=$.y,y&&(c=f*y,m-=$.X/2),f<0&&(n="n",f=0);break;case"ne":if(y){if($.y<=0&&(u<=0||g<=w)){x=W;break}f-=$.y,u+=$.y,c=f*y}else 0<=$.x?w<g?c+=$.x:$.y<=0&&u<=0&&(x=W):c+=$.x,$.y<=0?0<u&&(f-=$.y,u+=$.y):(f-=$.y,u+=$.y);f<0&&(n="sw",c=f=0);break;case"nw":if(y){if($.y<=0&&(u<=0||m<=0)){x=W;break}f-=$.y,u+=$.y,c=f*y,m+=$.X}else $.x<=0?0<m?(c-=$.x,m+=$.x):$.y<=0&&u<=0&&(x=W):(c-=$.x,m+=$.x),$.y<=0?0<u&&(f-=$.y,u+=$.y):(f-=$.y,u+=$.y);f<0&&(n="se",c=f=0);break;case"sw":if(y){if($.x<=0&&(m<=0||l<=v)){x=W;break}c-=$.x,m+=$.x,f=c/y}else $.x<=0?0<m?(c-=$.x,m+=$.x):0<=$.y&&l<=v&&(x=W):(c-=$.x,m+=$.x),0<=$.y?v<l&&(f+=$.y):f+=$.y;c<0&&(n="ne",c=f=0);break;case"se":if(y){if(0<=$.x&&(g<=w||l<=v)){x=W;break}f=(c+=$.x)/y}else 0<=$.x?w<g?c+=$.x:0<=$.y&&l<=v&&(x=W):c+=$.x,0<=$.y?v<l&&(f+=$.y):f+=$.y;c<0&&(n="nw",c=f=0);break;case"move":o.left+=$.x,o.top+=$.y,this.renderImage("move"),x=W;break;case"zoom":b.zoomable&&(this.zoom((i=o.width,e=o.height,h=_(this.startX-this.startX2),a=_(this.startY-this.startY2),s=_(this.endX-this.endX2),r=_(this.endY-this.endY2),(T(s*s+r*r)-T(h*h+a*a))/T(i*i+e*e))),this.endX2=this.startX2,this.endY2=this.startY2);break;case"crop":$.x&&$.y&&(t=this.$cropper.offset(),m=this.startX-t.left,u=this.startY-t.top,c=p.minWidth,f=p.minHeight,0<$.x?0<$.y?n="se":(n="ne",u-=f):0<$.y?(n="sw",m-=c):(n="nw",m-=c,u-=f),this.cropped||(this.cropped=D,this.$dragger.removeClass(H)))}x&&(p.width=c,p.height=f,p.left=m,p.top=u,this.directive=n,this.renderDragger()),this.startX=this.endX,this.startY=this.endY}},M.TEMPLATE=(i=(i="div,span,directive,data,point,cropper,class,line,dashed").split(","),'<0 6="5-container"><0 6="5-canvas"></0><0 6="5-dragger"><1 6="5-viewer"></1><1 6="5-8 8-h"></1><1 6="5-8 8-v"></1><1 6="5-face" 3-2="all"></1><1 6="5-7 7-e" 3-2="e"></1><1 6="5-7 7-n" 3-2="n"></1><1 6="5-7 7-w" 3-2="w"></1><1 6="5-7 7-s" 3-2="s"></1><1 6="5-4 4-e" 3-2="e"></1><1 6="5-4 4-n" 3-2="n"></1><1 6="5-4 4-w" 3-2="w"></1><1 6="5-4 4-s" 3-2="s"></1><1 6="5-4 4-ne" 3-2="ne"></1><1 6="5-4 4-nw" 3-2="nw"></1><1 6="5-4 4-sw" 3-2="sw"></1><1 6="5-4 4-se" 3-2="se"></1></0></0>'.replace(/\d+/g,function(t){return i[t]})),M.DEFAULTS={aspectRatio:"auto",autoCropArea:.8,data:{},done:l.noop,preview:"",multiple:W,autoCrop:D,dragCrop:D,dashed:D,modal:D,movable:D,resizable:D,zoomable:D,rotatable:D,checkImageOrigin:D,minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,build:r,built:r,dragstart:r,dragmove:r,dragend:r},M.setDefaults=function(t){l.extend(M.DEFAULTS,t)},M.other=l.fn.cropper,l.fn.cropper=function(h){var a,s=Y(arguments,1);return this.each(function(){var t,i=l(this),e=i.data("cropper");e||i.data("cropper",e=new M(this,h)),"string"==typeof h&&l.isFunction(t=e[h])&&(a=t.apply(e,s))}),typeof a!==n?a:this},l.fn.cropper.Constructor=M,l.fn.cropper.setDefaults=M.setDefaults,l.fn.cropper.noConflict=function(){return l.fn.cropper=M.other,this}});
!function(l){function f(t,e){return"function"==typeof t?t.call(e):t}function h(t,e){this.$element=l(t),this.options=e,this.enabled=!0,this.fixTitle()}h.prototype={show:function(){var t=this.getTitle();if(t&&this.enabled){var e=this.tip();e.find(".tipsy-inner")[this.options.html?"html":"text"](t),e[0].className="tipsy",e.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var i,s=l.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),n=e[0].offsetWidth,o=e[0].offsetHeight,a=f(this.options.gravity,this.$element[0]);switch(a.charAt(0)){case"n":i={top:s.top+s.height+this.options.offset,left:s.left+s.width/2-n/2};break;case"s":i={top:s.top-o-this.options.offset,left:s.left+s.width/2-n/2};break;case"e":i={top:s.top+s.height/2-o/2,left:s.left-n-this.options.offset};break;case"w":(extra_gap=0)<l("body").css("position").length&&"relative"==l("body").css("position")&&l("#wpadminbar").length&&(extra_gap=l("#wpadminbar").height()),i={top:s.top+s.height/2-o/2-extra_gap,left:s.left+s.width+this.options.offset}}2==a.length&&("w"==a.charAt(1)?i.left=s.left+s.width/2-15:i.left=s.left+s.width/2-n+15),e.css(i).addClass("tipsy-"+a),e.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+a.charAt(0),this.options.className&&e.addClass(f(this.options.className,this.$element[0])),this.options.fade?e.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):e.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){l(this).remove()}):this.tip().remove()},fixTitle:function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("original-title"))&&t.attr("original-title",t.attr("title")||"").removeAttr("title")},getTitle:function(){var t,e=this.$element,i=this.options;return this.fixTitle(),"string"==typeof(i=this.options).title?t=e.attr("title"==i.title?"original-title":i.title):"function"==typeof i.title&&(t=i.title.call(e[0])),(t=(""+t).replace(/(^\s*|\s*$)/,""))||i.fallback},tip:function(){return this.$tip||(this.$tip=l('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),this.$tip.data("tipsy-pointee",this.$element[0])),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}},l.fn.tipsy=function(i){if(!0===i)return this.data("tipsy");if("string"==typeof i){var t=this.data("tipsy");return t&&t[i](),this}function e(t){var e=l.data(t,"tipsy");return e||(e=new h(t,l.fn.tipsy.elementOptions(t,i)),l.data(t,"tipsy",e)),e}function s(){var t=e(this);t.hoverState="in",0==i.delayIn?t.show():(t.fixTitle(),setTimeout(function(){"in"==t.hoverState&&t.show()},i.delayIn))}function n(){var t=e(this);t.hoverState="out",0==i.delayOut?t.hide():setTimeout(function(){"out"==t.hoverState&&t.hide()},i.delayOut)}if((i=l.extend({},l.fn.tipsy.defaults,i)).live||this.each(function(){e(this)}),"manual"!=i.trigger){var o="hover"==i.trigger?"mouseenter":"focus",a="hover"==i.trigger?"mouseleave":"blur";i.live?l(document).on(o,this.selector,s).on(a,this.selector,n):this.bind(o,s).bind(a,n)}return this},l.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},l.fn.tipsy.revalidate=function(){l(".tipsy").each(function(){var t=l.data(this,"tipsy-pointee");t&&function(t){for(;t=t.parentNode;)if(t==document)return!0;return!1}(t)||l(this).remove()})},l.fn.tipsy.elementOptions=function(t,e){return l.metadata?l.extend({},e,l(t).metadata()):e},l.fn.tipsy.autoNS=function(){return l(this).offset().top>l(document).scrollTop()+l(window).height()/2?"s":"n"},l.fn.tipsy.autoWE=function(){return l(this).offset().left>l(document).scrollLeft()+l(window).width()/2?"e":"w"},l.fn.tipsy.autoBounds=function(n,o){return function(){var t={ns:o[0],ew:1<o.length&&o[1]},e=l(document).scrollTop()+n,i=l(document).scrollLeft()+n,s=l(this);return s.offset().top<e&&(t.ns="n"),s.offset().left<i&&(t.ew="w"),l(window).width()+l(document).scrollLeft()-s.offset().left<n&&(t.ew="e"),l(window).height()+l(document).scrollTop()-s.offset().top<n&&(t.ns="s"),t.ns+(t.ew?t.ew:"")}}}(jQuery);
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),o=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?o.removeClass("um-validate-matched").addClass("um-validate-not-matched"):o.removeClass("um-validate-not-matched").addClass("um-validate-matched"):o.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function UM_hide_menus(){menu=jQuery(".um-dropdown"),menu.parents("div").find("a").removeClass("active"),menu.hide()}function UM_domenus(){jQuery(".um-dropdown").each(function(){var e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):960<element_width&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),0<jQuery(".um-account-nav").length&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),o=t.split(":");calcHeight=Math.round(a/o[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(r){r.data("upload_help_text")?upload_help_text='<span class="help">'+r.data("upload_help_text")+"</span>":upload_help_text="",r.data("icon")?icon='<span class="icon"><i class="'+r.data("icon")+'"></i></span>':icon="",r.data("upload_text")?upload_text='<span class="str">'+r.data("upload_text")+"</span>":upload_text="";var e=0;jQuery("#um_upload_single:visible").data("user_id")&&(e=jQuery("#um_upload_single:visible").data("user_id")),r.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_imageupload",key:r.data("key"),set_id:r.data("set_id"),set_mode:r.data("set_mode"),_wpnonce:r.data("nonce"),timestamp:r.data("timestamp"),user_id:e},fileName:r.data("key"),allowedTypes:r.data("allowed_types"),maxFileSize:r.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:r.data("max_size_error"),extErrorStr:r.data("extension_error"),maxFileCountErrorStr:r.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,returnType:"json",onSubmit:function(e){r.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){r.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(r.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),r.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(t.data,function(e,t){var a=r.parents(".um-modal-body").find(".um-single-image-preview img"),o=r.parents(".um-modal-body").find(".um-single-image-preview"),i=new Date;a.attr("src",t.url+"?"+i.getTime()),a.data("file",t.file),a.load(function(){r.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),r.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),o.show(0),um_modal_responsive()})})},onError:function(e){console.log(e)}})}function initFileUpload_UM(o){o.data("upload_help_text")?upload_help_text='<span class="help">'+o.data("upload_help_text")+"</span>":upload_help_text="",o.data("icon")?icon='<span class="icon"><i class="'+o.data("icon")+'"></i></span>':icon="",o.data("upload_text")?upload_text='<span class="str">'+o.data("upload_text")+"</span>":upload_text="",jQuery("#um_upload_single:visible").data("user_id")&&(user_id=jQuery("#um_upload_single:visible").data("user_id")),o.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_fileupload",key:o.data("key"),set_id:o.data("set_id"),user_id:o.data("user_id"),set_mode:o.data("set_mode"),_wpnonce:o.data("nonce"),timestamp:o.data("timestamp")},fileName:o.data("key"),allowedTypes:o.data("allowed_types"),maxFileSize:o.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:o.data("max_size_error"),extErrorStr:o.data("extension_error"),maxFileCountErrorStr:o.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(e){o.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){o.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(o.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),o.parents(".um-modal-body").find(".upload-statusbar").hide(0)):jQuery.each(t.data,function(e,t){o.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),o.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),o.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==e?o.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(t):"icon_bg"==e?o.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":t}):"filename"==e?o.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-file",t):"original_name"==e?(o.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-orignal-name",t),o.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(t)):"url"==e&&o.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",t)}),setTimeout(function(){um_modal_responsive()},1e3)},onError:function(e){console.log(e)}})}function initCrop_UM(){var t=jQuery(".um-modal .um-single-image-preview img").first(),e=jQuery(".um-modal .um-single-image-preview"),a=t.parent().attr("data-crop"),o=t.parent().attr("data-min_width"),i=t.parent().attr("data-min_height"),r=t.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))r=(r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio")).split(":")[0];if(t.length&&""!=t.attr("src")){var u=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(t.css({height:"auto"}),e.css({height:"auto"}),jQuery(window).height()<=400?(e.css({height:u+"px","max-height":u+"px"}),t.css({height:"auto"})):(t.css({height:"auto","max-height":u+"px"}),e.css({height:t.height(),"max-height":u+"px"})),"square"==a)var d={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};else if("cover"==a){0<Math.round(o/r)&&(i=Math.round(o/r));d={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}}}else if("user"==a)d={minWidth:o,minHeight:i,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};0!=a&&(t.cropper(d),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,o){if(0==jQuery("body").find(".um-modal-overlay").length)if(jQuery(".tipsy").hide(),UM_hide_menus(),jQuery("body,html,textarea").css("overflow","hidden"),jQuery(document).bind("touchmove",function(e){e.preventDefault()}),jQuery(".um-modal").on("touchmove",function(e){e.stopPropagation()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var i=jQuery(".um-modal-photo img"),r=jQuery(window).width()-60,u=jQuery(window).height()-.25*jQuery(window).height();i.attr("src",o),i.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),i.css({opacity:0}),i.css({"max-width":r}),i.css({"max-height":u}),jQuery(".um-modal").css({width:i.width(),"margin-left":"-"+i.width()/2+"px"}),i.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),initImageUpload_UM(jQuery(".um-modal:visible").find(".um-single-image-upload")),initFileUpload_UM(jQuery(".um-modal:visible").find(".um-single-file-upload")),um_modal_responsive()}function um_modal_responsive(){var e=jQuery(".um-modal:visible");if(jQuery(".um-modal-body.photo:visible").length){e.removeClass("uimob340"),e.removeClass("uimob500");var t=jQuery(".um-modal-photo img"),a=jQuery(window).width()-60,o=jQuery(window).height()-.25*jQuery(window).height();t.css({opacity:0}),t.css({"max-width":a}),t.css({"max-height":o}),jQuery(".um-modal").css({width:t.width(),"margin-left":"-"+t.width()/2+"px"}),t.animate({opacity:1},1e3);var i=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:i},300)}else if(e.length){var r=jQuery(window).width();if(e.removeClass("uimob340"),e.removeClass("uimob500"),r<=340)e.addClass("uimob340"),initCrop_UM(),e.animate({bottom:0},300);else if(r<=500)e.addClass("uimob500"),initCrop_UM(),e.animate({bottom:0},300);else if(r<=800){initCrop_UM();i=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:i},300)}else if(r<=960){initCrop_UM();i=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:i},300)}else if(960<r){initCrop_UM();i=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:i},300)}}}function um_remove_modal(){jQuery("img.cropper-hidden").cropper("destroy"),jQuery("body,html,textarea").css("overflow","auto"),jQuery(document).unbind("touchmove"),jQuery('.um-modal div[id^="um_"]').hide().appendTo("body"),jQuery(".um-modal,.um-modal-overlay").remove()}function um_modal_size(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(jQuery("body").append('<div class="um-popup-overlay"></div>'),jQuery("body").append('<div class="um-popup"></div>'),jQuery(".um-popup").addClass("loading"),jQuery("body,html").css({overflow:"hidden"}))}function remove_Modal(){jQuery(".um-popup-overlay").length&&(jQuery(document).trigger("um_before_modal_removed"),jQuery(".um-popup-autogrow:visible").length?jQuery(".um-popup-autogrow:visible").mCustomScrollbar("destroy"):jQuery(".um-popup-autogrow2:visible").length&&jQuery(".um-popup-autogrow2:visible").mCustomScrollbar("destroy"),jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,offset:3}))}function responsive_Modal(){jQuery(".um-popup-overlay").length&&(ag_height=jQuery(window).height()-jQuery(".um-popup um-popup-header").outerHeight()-jQuery(".um-popup .um-popup-footer").outerHeight()-80,350<ag_height&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?(jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}),jQuery(".um-popup-autogrow:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500}).mCustomScrollbar("scrollTo","bottom",{scrollInertia:0})):jQuery(".um-popup-autogrow2:visible").length&&(jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}),jQuery(".um-popup-autogrow2:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500})))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
!function(e){"use strict";e(document).on("click","a.um-toggle-gdpr",function(){var t=jQuery(this);e(".um-gdpr-content").toggle("fast",function(){e(".um-gdpr-content").is(":visible")&&t.text(t.data("toggle-hide")),e(".um-gdpr-content").is(":hidden")&&t.text(t.data("toggle-show"))})})}(jQuery);
jQuery(window).load(function(){um_responsive(),um_modal_responsive()}),jQuery(window).resize(function(){responsive_Modal(),jQuery("img.cropper-hidden").cropper("destroy"),um_responsive(),um_modal_responsive()});
jQuery(document).ready(function(){var e,t=[],d={},o={};function r(e){switch(s(e)){case"text":case"number":case"date":case"textarea":case"select":case"multiselect":case"radio":case"checkbox":return e.find("input,textarea,select")}return""}function s(e){var n="",i=e.attr("class");return jQuery.each(i.split(" "),function(e,i){-1!=i.indexOf("um-field-type")&&(n=i.split("_")[1])}),n}function l(e,i,n){var a,t=!1;n=!!n;for(a in i)if(n&&i[a]===e||!n&&i[a]==e){t=!0;break}return t}function i(n,e){var i,a=n.parents(".um-field[data-key]").data("key"),t=d[a],c=(i=n,um_live_field=i.parents(".um-field").data("key"),um_live_value=i.val(),i.is(":checkbox")&&(um_live_value="",1<i.parents(".um-field").find("input:checked").length?i.parents(".um-field").find("input:checked").each(function(){um_live_value=um_live_value+jQuery(this).val()+" "}):1<=i.parents(".um-field").find("input:checked").length&&(um_live_value=i.parents(".um-field").find("input:checked").val())),i.is(":radio")&&(um_live_value=i.parents(".um-field").find("input[type=radio]:checked").val()),um_live_value),o={},r={},u={};jQuery.each(t,function(e,i){void 0===r[i.owner]&&(r[i.owner]=[],u[i.owner]={}),r[i.owner].push(i.value),u[i.owner]=i}),jQuery.each(t,function(e,i){void 0===o[i.owner]&&(o[i.owner]={}),"empty"==i.operator&&(!c||""==c&&l(c,r[i.owner])?o[i.owner][e]=!0:o[i.owner][e]=!1),"not empty"==i.operator&&(c&&""!=c&&!l(c,r[i.owner])?o[i.owner][e]=!0:o[i.owner][e]=!1),"equals to"==i.operator&&(i.value==c&&l(c,r[i.owner])?o[i.owner][e]=!0:o[i.owner][e]=!1),"not equals"==i.operator&&(jQuery.isNumeric(i.value)&&parseInt(c)!=parseInt(i.value)&&c&&!l(c,r[i.owner])?o[i.owner][e]=!0:i.value==c||l(c,r[i.owner])?o[i.owner][e]=!1:o[i.owner][e]=!0),"greater than"==i.operator&&(jQuery.isNumeric(i.value)&&parseInt(c)>parseInt(i.value)?o[i.owner][e]=!0:o[i.owner][e]=!1),"less than"==i.operator&&(jQuery.isNumeric(i.value)&&parseInt(c)<parseInt(i.value)?o[i.owner][e]=!0:o[i.owner][e]=!1),"contains"==i.operator&&("multiselect"==s(n.parents(".um-field[data-key]"))?c&&0<=c.indexOf(i.value)&&l(i.value,c)?o[i.owner][e]=!0:o[i.owner][e]=!1:"checkbox"==s(n.parents(".um-field[data-key]"))?c&&0<=c.indexOf(i.value)?o[i.owner][e]=!0:o[i.owner][e]=!1:c&&0<=c.indexOf(i.value)&&l(c,r[i.owner])?o[i.owner][e]=!0:o[i.owner][e]=!1)}),jQuery.each(o,function(e,i){l(!0,i)?f(n,u[e],!0):f(n,u[e],!1)}),n.trigger("um_fields_change")}function f(e,i,n){var a=jQuery('div.um-field[data-key="'+i.owner+'"]');"show"==i.action&&n&&(a.show(),h(a),c(a)),"show"!=i.action||n||(a.hide(),u(a)),"hide"==i.action&&n&&(a.hide(),u(a)),"hide"!=i.action||n||(a.show(),h(a),c(a)),e.removeClass("um-field-has-changed")}function c(a){var e=s(a),i=a.data("key"),n=o[i];switch(e){case"text":case"number":case"date":case"textarea":a.find("input:text,input[type=number],textareas").val(n.value);break;case"select":a.find("select").find("option").prop("selected",!1),a.find("select").val(n.value),a.find("select").trigger("change");break;case"multiselect":a.find("select").find("option").prop("selected",!1),jQuery.each(n.value,function(e,i){a.find("select").find('option[value="'+i+'"]').attr("selected",!0)}),a.find("select").trigger("change");break;case"checkbox":if(1<=a.find("input[type=checkbox]:checked").length)if(a.find("input[type=checkbox]:checked").removeAttr("checked"),a.find("span.um-field-checkbox-state i").removeClass("um-icon-android-checkbox-outline"),a.find("span.um-field-checkbox-state i").addClass("um-icon-android-checkbox-outline-blank"),a.find(".um-field-checkbox.active").removeClass("active"),jQuery.isArray(n.value))jQuery.each(n.value,function(e,i){var n=a.find('input[type=checkbox][value="'+i+'"]');n.attr("checked",!0),n.closest(".um-field-checkbox").find("i").removeClass("um-icon-android-checkbox-outline-blank"),n.closest(".um-field-checkbox").find("i").addClass("um-icon-android-checkbox-outline"),n.closest(".um-field-checkbox").addClass("active")});else{var t=a.find('input[type=checkbox][value="'+n.value+'"]');t.attr("checked",!0),t.closest(".um-field-checkbox").find("i").removeClass("um-icon-android-checkbox-outline-blank"),t.closest(".um-field-checkbox").find("i").addClass("um-icon-android-checkbox-outline"),t.closest(".um-field-checkbox").addClass("active")}break;case"radio":1<=a.find("input[type=radio]:checked").length&&setTimeout(function(){a.find("input[type=radio]:checked").removeAttr("checked"),a.find("span.um-field-radio-state i").removeClass("um-icon-android-radio-button-on"),a.find("span.um-field-radio-state i").addClass("um-icon-android-radio-button-off"),a.find(".um-field-radio.active").removeClass("active");var e=a.find("input[type=radio][value='"+n.value+"']");e.attr("checked",!0),e.closest(".um-field-radio").find("i").removeClass("um-icon-android-radio-button-off"),e.closest(".um-field-radio").find("i").addClass("um-icon-android-radio-button-on"),e.closest(".um-field-radio").addClass("active")},100)}if(!a.hasClass("um-field-has-changed")){var c=r(a);"radio"!=e&&"checkbox"!=e||(c=c.find(":checked")),c&&(c.trigger("change"),a.addClass("um-field-has-changed"))}}function n(){jQuery.each(d,function(e,i){(1<=jQuery('.um-field[data-key="'+e+'"]:hidden').length||"none"==jQuery('.um-field[data-key="'+e+'"]').css("display"))&&jQuery.each(i,function(e,i){jQuery('.um-field[data-key="'+i.owner+'"]').hide()})})}function u(e){void 0!==jQuery.browser&&jQuery.browser.msie&&e.css({visibility:"hidden"})}function h(e){void 0!==jQuery.browser&&jQuery.browser.msie&&e.css({visibility:"visible"})}jQuery(document).on("change",'.um-field select, .um-field input[type="radio"], .um-field input[type="checkbox"]',function(){i(jQuery(this))}),jQuery(document).on("input change",'.um-field input[type="text"]',function(){i(jQuery(this))}),jQuery(document).on("input change",'.um-field input[type="number"]',function(){i(jQuery(this))}),jQuery(document).on("input change",'.um-field input[type="password"]',function(){i(jQuery(this))}),jQuery(document).on("um_fields_change",function(){n(),n()}),e=[],jQuery(".um-field[data-key]").each(function(){var a=jQuery(this).data("key");e.push(a);var c={};jQuery.each(jQuery(this)[0].attributes,function(e,i){if(-1!=i.name.indexOf("data-cond")){var n=i.name.slice(10),a=n.substring(1,0),t=n.slice(2);void 0===c[a]&&(c[a]={}),c[a][t]=i.value}}),jQuery.each(c,function(e,i){var n={field:{owner:a,action:i.action,parent:i.field,operator:i.operator,value:i.value,condition:{owner:a,action:i.action,operator:i.operator,value:i.value}}};t.push(n)}),o[jQuery(this).data("key")]=function(e){var i="",n=s(e);switch(n){case"text":case"number":case"date":case"textarea":case"select":i=e.find("input:text,input[type=number],textarea,select").val();break;case"multiselect":i=e.find("select").val();break;case"radio":1<=e.find("input[type=radio]:checked").length&&(i=e.find("input[type=radio]:checked").val());break;case"checkbox":1<=e.find("input[type=checkbox]:checked").length&&(1<e.find("input[type=checkbox]:checked").length?e.find("input[type=checkbox]:checked").each(function(){i=i+jQuery(this).val()+" "}):i=e.find("input[type=checkbox]:checked").val())}return{type:n,value:i}}(jQuery(this))}),jQuery.each(e,function(e,i){var n,a;d[i]=(n=i,a=[],jQuery.each(t,function(e,i){i.field.parent==n&&a.push(i.field.condition)}),a)}),jQuery(".um-field[data-key]:visible").each(function(){var e=r(jQuery(this));void 0!==e.trigger&&e.trigger("change")})});
jQuery(document).ready(function(){jQuery(document).on("click",".um-dropdown a",function(e){return!1}),jQuery(document).on("click",".um-dropdown a.real_url",function(e){window.location=jQuery(this).attr("href")}),jQuery(document).on("click",".um-trigger-menu-on-click",function(e){return jQuery(".um-dropdown").hide(),menu=jQuery(this).find(".um-dropdown"),menu.show(),!1}),jQuery(document).on("click",".um-dropdown-hide",function(e){UM_hide_menus()}),jQuery(document).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");jQuery(this).parents(t).find(e).trigger("click")}),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}),jQuery(document).on("change",".um-field-area input[type=radio]",function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",".um-field-area input[type=checkbox]",function(){jQuery(this).parents(".um-field-area");var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),jQuery(".um-datepicker").each(function(){if(elem=jQuery(this),""!=elem.attr("data-disabled_weekdays"))var e=JSON.parse(elem.attr("data-disabled_weekdays"));else e=!1;var t=elem.attr("data-years"),a=elem.attr("data-date_min"),i=elem.attr("data-date_max"),r=a.split(","),n=i.split(","),u=r.length?new Date(r):null,o=r.length?new Date(n):null;if(u&&"Invalid Date"==u.toString()&&3==r.length){var d=r[1]+"/"+r[2]+"/"+r[0];u=new Date(Date.parse(d))}if(o&&"Invalid Date"==o.toString()&&3==n.length){var s=n[1]+"/"+n[2]+"/"+n[0];o=new Date(Date.parse(s))}elem.pickadate({selectYears:t,min:u,max:o,disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})}),jQuery(".um-timepicker").each(function(){elem=jQuery(this),elem.pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})}),jQuery(".um-rating").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,click:function(e,t){live_field=this.id,live_value=e,um_conditional()}}),jQuery(".um-rating-readonly").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,readOnly:!0}),jQuery(document).on("click",".um .um-single-image-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-image-preview img").attr("src");return t.find(".um-single-image-preview img").attr("src",""),t.find(".um-single-image-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a}}),!1}),jQuery(document).on("click",".um .um-single-file-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-fileinfo a").attr("href");return t.find(".um-single-file-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a}}),!1}),jQuery(".um-s1,.um-s2").css({display:"block"}),jQuery(".um-s1").select2({allowClear:!0}),jQuery(".um-s2").select2({allowClear:!1,minimumResultsForSearch:10}),jQuery(document).on("click",".um-field-group-head:not(.disabled)",function(){var e=jQuery(this).parents(".um-field-group"),t=e.data("max_entries");e.find(".um-field-group-body").is(":hidden")?e.find(".um-field-group-body").show():e.find(".um-field-group-body:first").clone().appendTo(e),increase_id=0,e.find(".um-field-group-body").each(function(){increase_id++,jQuery(this).find("input").each(function(){var e=jQuery(this);e.attr("id",e.data("key")+"-"+increase_id),e.attr("name",e.data("key")+"-"+increase_id),e.parent().parent().find("label").attr("for",e.data("key")+"-"+increase_id)})}),0<t&&e.find(".um-field-group-body").length==t&&jQuery(this).addClass("disabled")}),jQuery(document).on("click",".um-field-group-cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field-group"),a=t.data("max_entries");return 1<t.find(".um-field-group-body").length?jQuery(this).parents(".um-field-group-body").remove():jQuery(this).parents(".um-field-group-body").hide(),0<a&&t.find(".um-field-group-body").length<a&&t.find(".um-field-group-head").removeClass("disabled"),!1}),jQuery(document.body).on("click",".um-ajax-paginate",function(e){e.preventDefault();var t=jQuery(this),a=jQuery(this).parent();a.addClass("loading");var i=jQuery(this).data("hook");if("um_load_posts"===i){var r=1*jQuery(this).data("pages"),n=1*jQuery(this).data("page")+1;jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate_posts",author:jQuery(this).data("author"),page:n},complete:function(){a.removeClass("loading")},success:function(e){a.before(e),n===r?a.remove():t.data("page",n)}})}else{var u=jQuery(this).data("args"),o=jQuery(this).parents(".um").find(".um-ajax-items");jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate",hook:i,args:u},complete:function(){a.removeClass("loading")},success:function(e){a.remove(),o.append(e)}})}}),jQuery(document).on("click",".um-ajax-action",function(e){e.preventDefault();var t=jQuery(this).data("hook"),a=jQuery(this).data("user_id"),arguments=jQuery(this).data("arguments");return jQuery(this).data("js-remove")&&jQuery(this).parents("."+jQuery(this).data("js-remove")).fadeOut("fast"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_muted_action",hook:t,user_id:a,arguments:arguments},success:function(e){}}),!1}),jQuery(document).on("click","#um-search-button",function(){jQuery(this).parents("form").submit()}),jQuery(".um-form input[class=um-button][type=submit]").removeAttr("disabled"),jQuery(document).one("click",".um:not(.um-account) .um-form input[class=um-button][type=submit]:not(.um-has-recaptcha)",function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parents("form").submit()});var o={};function d(e,t,a,i){var r=e.data("um-parent");e.attr("name"),jQuery('select[name="'+r+'"]');e.find('option[value!=""]').remove(),e.hasClass("um-child-option-disabled")||e.removeAttr("disabled");i=[];var n="";if("yes"===t.post.members_directory){var u=new URLSearchParams(window.location.search);n=u.get(t.post.child_name)}jQuery.each(t.items,function(e,t){i.push({id:e,text:t,selected:t===n})}),e.select2("destroy"),e.select2({data:i,allowClear:!0,minimumResultsForSearch:10}),"yes"!==t.post.members_directory&&(void 0===t.field.default||e.data("um-original-value")?""!=e.data("um-original-value")&&e.val(e.data("um-original-value")).trigger("change"):e.val(t.field.default).trigger("change"),0==t.field.editable&&(e.addClass("um-child-option-disabled"),e.attr("disabled","disabled"))),o[a]=t}jQuery("select[data-um-parent]").each(function(){var r=jQuery(this),n=r.data("um-parent"),u=(r.data("um-ajax-url"),r.data("um-ajax-source"));r.val();r.attr("data-um-init-field",!0),jQuery(document).on("change",'select[name="'+n+'"]',function(){var t=jQuery(this),e=t.closest("form").find("input[type=hidden][name=form_id]").val(),a=t.val();if(""!=t.val()&&"object"!=typeof o[a]&&jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_select_options",parent_option_name:n,parent_option:t.val(),child_callback:u,child_name:r.attr("name"),members_directory:r.attr("data-mebers-directory"),form_id:e},success:function(e){"success"==e.status&&""!=t.val()&&d(r,e,a),void 0!==e.debug&&console.log(e)},error:function(e){console.log(e)}}),""!=t.val()&&"object"==typeof o[a]){var i=o[a];d(r,i,a)}""==t.val()&&(r.find('option[value!=""]').remove(),r.val("").trigger("change"))}),jQuery('select[name="'+n+'"]').trigger("change")})});
jQuery(document).ready(function(){jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),jQuery(".um-directory .um-member-connect").each(function(){0==jQuery(this).find("a").length&&jQuery(this).remove()}),jQuery(".um-member-meta-main").each(function(){0==jQuery(this).find(".um-member-metaline").length&&0==jQuery(this).find(".um-member-connect").find("a").length&&jQuery(this).remove()}),jQuery(document.body).on("click",".um-member-more a",function(e){e.preventDefault();var r=jQuery(this).parents(".um-member"),m=jQuery(this).parents(".um-members");return r.find(".um-member-more").hide(),r.find(".um-member-meta").slideDown(function(){UM_Member_Grid(m)}),r.find(".um-member-less").fadeIn(),setTimeout(function(){UM_Member_Grid(m)},100),!1}),jQuery(document.body).on("click",".um-member-less a",function(e){e.preventDefault();var r=jQuery(this).parents(".um-member"),m=jQuery(this).parents(".um-members");return r.find(".um-member-less").hide(),r.find(".um-member-meta").slideUp(function(){r.find(".um-member-more").fadeIn(),UM_Member_Grid(m)}),!1}),jQuery(document.body).on("click",".um-do-search",function(e){return e.preventDefault(),jQuery(this).parents("form").find("input").filter(function(e){if(0===this.value.length)return!0}).prop("disabled",!0),jQuery(this).parents("form").find("select").filter(function(e){if(0===this.value.length)return!0}).prop("disabled",!0),jQuery(this).parents("form").submit(),!1})});
jQuery(document).ready(function(){function e(){if(void 0!==jQuery("textarea[id=um-meta-bio]").val()){var e=jQuery("textarea[id=um-meta-bio]").attr("data-character-limit")-jQuery("textarea[id=um-meta-bio]").val().length;jQuery("span.um-meta-bio-character span.um-bio-limit").text(e),e<5?jQuery("span.um-meta-bio-character").css("color","red"):jQuery("span.um-meta-bio-character").css("color","")}}jQuery(".um-profile.um-viewing .um-profile-body .um-row").each(function(){var e=jQuery(this);0==e.find(".um-field").length&&(e.prev(".um-row-heading").remove(),e.remove())}),jQuery(".um-profile.um-viewing .um-profile-body").length&&0==jQuery(".um-profile.um-viewing .um-profile-body").find(".um-field").length&&(jQuery(".um-row-heading,.um-row").remove(),jQuery(".um-profile-note").show()),jQuery(document).on("click",".um-profile-save",function(e){return e.preventDefault(),jQuery(this).parents(".um").find("form").submit(),!1}),jQuery(document).on("click",".um-profile-edit-a",function(e){jQuery(this).addClass("active")}),jQuery(document).on("click",".um-cover a.um-cover-add, .um-photo a",function(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-photo-modal",function(e){e.preventDefault();var t=jQuery(this).attr("data-src");return um_new_modal("um_view_photo","fit",!0,t),!1}),jQuery(document).on("click",".um-reset-profile-photo",function(e){jQuery(".um-profile-photo-img img").attr("src",jQuery(this).attr("data-default_src")),user_id=jQuery(this).attr("data-user_id"),metakey="profile_photo",jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_delete_profile_photo",metakey:metakey,user_id:user_id}})}),jQuery(document).on("click",".um-reset-cover-photo",function(e){var t=jQuery(this);jQuery(".um-cover-overlay").hide(),jQuery(".um-cover-e").html('<a href="#" class="um-cover-add um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width"><span class="um-cover-add-i"><i class="um-icon-plus um-tip-n" title="Upload a cover photo"></i></span></a>'),jQuery(".um-dropdown").hide(),um_responsive(),user_id=jQuery(this).attr("data-user_id"),metakey="cover_photo",jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_delete_cover_photo",metakey:metakey,user_id:user_id},success:function(e){t.hide()}})}),e(),jQuery("textarea[id=um-meta-bio]").change(e),jQuery("textarea[id=um-meta-bio]").keyup(e),jQuery(".um-profile-edit a.um_delete-item").click(function(e){if(e.preventDefault(),!confirm("Are you sure that you want to delete this user?"))return!1})});
jQuery(document).ready(function(){var a=jQuery(".um-account-main").attr("data-current_tab");a&&jQuery(".um-account-tab[data-tab="+a+"]").show(),jQuery(document).on("click",".um-account-side li a",function(a){a.preventDefault();var t=jQuery(this);t.parents("ul").find("li a").removeClass("current"),t.addClass("current");var u=jQuery(this).attr("href"),e=jQuery(this).attr("data-tab");return jQuery("input[id=_um_account_tab]:hidden").val(e),window.history.pushState("","",u),jQuery(".um-account-tab").hide(),jQuery(".um-account-tab[data-tab="+e+"]").fadeIn(),jQuery(".um-account-nav a").removeClass("current"),jQuery(".um-account-nav a[data-tab="+e+"]").addClass("current"),!1})}),jQuery(document).on("click",".um-account-nav a",function(a){a.preventDefault();var t=jQuery(this).attr("data-tab"),u=jQuery(this).parents("div"),e=jQuery(this);return jQuery("input[id=_um_account_tab]:hidden").val(t),jQuery(".um-account-tab").hide(),e.hasClass("current")?(u.next(".um-account-tab").slideUp(),e.removeClass("current")):(u.next(".um-account-tab").slideDown(),e.parents("div").find("a").removeClass("current"),e.addClass("current")),jQuery(".um-account-side li a").removeClass("current"),jQuery(".um-account-side li a[data-tab="+t+"]").addClass("current"),!1});
(function($){'use strict';if(typeof wpcf7==='undefined'||wpcf7===null){return;}
wpcf7=$.extend({cached:0,inputs:[]},wpcf7);$(function(){wpcf7.supportHtml5=(function(){var features={};var input=document.createElement('input');features.placeholder='placeholder'in input;var inputTypes=['email','url','tel','number','range','date'];$.each(inputTypes,function(index,value){input.setAttribute('type',value);features[value]=input.type!=='text';});return features;})();$('div.wpcf7 > form').each(function(){var $form=$(this);wpcf7.initForm($form);if(wpcf7.cached){wpcf7.refill($form);}});});wpcf7.getId=function(form){return parseInt($('input[name="_wpcf7"]',form).val(),10);};wpcf7.initForm=function(form){var $form=$(form);$form.submit(function(event){if(!wpcf7.supportHtml5.placeholder){$('[placeholder].placeheld',$form).each(function(i,n){$(n).val('').removeClass('placeheld');});}
if(typeof window.FormData==='function'){wpcf7.submit($form);event.preventDefault();}});$('.wpcf7-submit',$form).after('<span class="ajax-loader"></span>');wpcf7.toggleSubmit($form);$form.on('click','.wpcf7-acceptance',function(){wpcf7.toggleSubmit($form);});$('.wpcf7-exclusive-checkbox',$form).on('click','input:checkbox',function(){var name=$(this).attr('name');$form.find('input:checkbox[name="'+name+'"]').not(this).prop('checked',false);});$('.wpcf7-list-item.has-free-text',$form).each(function(){var $freetext=$(':input.wpcf7-free-text',this);var $wrap=$(this).closest('.wpcf7-form-control');if($(':checkbox, :radio',this).is(':checked')){$freetext.prop('disabled',false);}else{$freetext.prop('disabled',true);}
$wrap.on('change',':checkbox, :radio',function(){var $cb=$('.has-free-text',$wrap).find(':checkbox, :radio');if($cb.is(':checked')){$freetext.prop('disabled',false).focus();}else{$freetext.prop('disabled',true);}});});if(!wpcf7.supportHtml5.placeholder){$('[placeholder]',$form).each(function(){$(this).val($(this).attr('placeholder'));$(this).addClass('placeheld');$(this).focus(function(){if($(this).hasClass('placeheld')){$(this).val('').removeClass('placeheld');}});$(this).blur(function(){if(''===$(this).val()){$(this).val($(this).attr('placeholder'));$(this).addClass('placeheld');}});});}
if(wpcf7.jqueryUi&&!wpcf7.supportHtml5.date){$form.find('input.wpcf7-date[type="date"]').each(function(){$(this).datepicker({dateFormat:'yy-mm-dd',minDate:new Date($(this).attr('min')),maxDate:new Date($(this).attr('max'))});});}
if(wpcf7.jqueryUi&&!wpcf7.supportHtml5.number){$form.find('input.wpcf7-number[type="number"]').each(function(){$(this).spinner({min:$(this).attr('min'),max:$(this).attr('max'),step:$(this).attr('step')});});}
$('.wpcf7-character-count',$form).each(function(){var $count=$(this);var name=$count.attr('data-target-name');var down=$count.hasClass('down');var starting=parseInt($count.attr('data-starting-value'),10);var maximum=parseInt($count.attr('data-maximum-value'),10);var minimum=parseInt($count.attr('data-minimum-value'),10);var updateCount=function(target){var $target=$(target);var length=$target.val().length;var count=down?starting-length:length;$count.attr('data-current-value',count);$count.text(count);if(maximum&&maximum<length){$count.addClass('too-long');}else{$count.removeClass('too-long');}
if(minimum&&length<minimum){$count.addClass('too-short');}else{$count.removeClass('too-short');}};$(':input[name="'+name+'"]',$form).each(function(){updateCount(this);$(this).keyup(function(){updateCount(this);});});});$form.on('change','.wpcf7-validates-as-url',function(){var val=$.trim($(this).val());if(val&&!val.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==val.indexOf('.')){val=val.replace(/^\/+/,'');val='http://'+val;}
$(this).val(val);});};wpcf7.submit=function(form){if(typeof window.FormData!=='function'){return;}
var $form=$(form);$('.ajax-loader',$form).addClass('is-active');wpcf7.clearResponse($form);var formData=new FormData($form.get(0));var detail={id:$form.closest('div.wpcf7').attr('id'),status:'init',inputs:[],formData:formData};$.each($form.serializeArray(),function(i,field){if('_wpcf7'==field.name){detail.contactFormId=field.value;}else if('_wpcf7_version'==field.name){detail.pluginVersion=field.value;}else if('_wpcf7_locale'==field.name){detail.contactFormLocale=field.value;}else if('_wpcf7_unit_tag'==field.name){detail.unitTag=field.value;}else if('_wpcf7_container_post'==field.name){detail.containerPostId=field.value;}else if(field.name.match(/^_wpcf7_\w+_free_text_/)){var owner=field.name.replace(/^_wpcf7_\w+_free_text_/,'');detail.inputs.push({name:owner+'-free-text',value:field.value});}else if(field.name.match(/^_/)){}else{detail.inputs.push(field);}});wpcf7.triggerEvent($form.closest('div.wpcf7'),'beforesubmit',detail);var ajaxSuccess=function(data,status,xhr,$form){detail.id=$(data.into).attr('id');detail.status=data.status;detail.apiResponse=data;var $message=$('.wpcf7-response-output',$form);switch(data.status){case'validation_failed':$.each(data.invalidFields,function(i,n){$(n.into,$form).each(function(){wpcf7.notValidTip(this,n.message);$('.wpcf7-form-control',this).addClass('wpcf7-not-valid');$('[aria-invalid]',this).attr('aria-invalid','true');});});$message.addClass('wpcf7-validation-errors');$form.addClass('invalid');wpcf7.triggerEvent(data.into,'invalid',detail);break;case'acceptance_missing':$message.addClass('wpcf7-acceptance-missing');$form.addClass('unaccepted');wpcf7.triggerEvent(data.into,'unaccepted',detail);break;case'spam':$message.addClass('wpcf7-spam-blocked');$form.addClass('spam');$('[name="g-recaptcha-response"]',$form).each(function(){if(''===$(this).val()){var $recaptcha=$(this).closest('.wpcf7-form-control-wrap');wpcf7.notValidTip($recaptcha,wpcf7.recaptcha.messages.empty);}});wpcf7.triggerEvent(data.into,'spam',detail);break;case'aborted':$message.addClass('wpcf7-aborted');$form.addClass('aborted');wpcf7.triggerEvent(data.into,'aborted',detail);break;case'mail_sent':$message.addClass('wpcf7-mail-sent-ok');$form.addClass('sent');wpcf7.triggerEvent(data.into,'mailsent',detail);break;case'mail_failed':$message.addClass('wpcf7-mail-sent-ng');$form.addClass('failed');wpcf7.triggerEvent(data.into,'mailfailed',detail);break;default:var customStatusClass='custom-'
+data.status.replace(/[^0-9a-z]+/i,'-');$message.addClass('wpcf7-'+customStatusClass);$form.addClass(customStatusClass);}
wpcf7.refill($form,data);wpcf7.triggerEvent(data.into,'submit',detail);if('mail_sent'==data.status){$form.each(function(){this.reset();});wpcf7.toggleSubmit($form);}
if(!wpcf7.supportHtml5.placeholder){$form.find('[placeholder].placeheld').each(function(i,n){$(n).val($(n).attr('placeholder'));});}
$message.html('').append(data.message).slideDown('fast');$message.attr('role','alert');$('.screen-reader-response',$form.closest('.wpcf7')).each(function(){var $response=$(this);$response.html('').attr('role','').append(data.message);if(data.invalidFields){var $invalids=$('<ul></ul>');$.each(data.invalidFields,function(i,n){if(n.idref){var $li=$('<li></li>').append($('<a></a>').attr('href','#'+n.idref).append(n.message));}else{var $li=$('<li></li>').append(n.message);}
$invalids.append($li);});$response.append($invalids);}
$response.attr('role','alert').focus();});};$.ajax({type:'POST',url:wpcf7.apiSettings.getRoute('/contact-forms/'+wpcf7.getId($form)+'/feedback'),data:formData,dataType:'json',processData:false,contentType:false}).done(function(data,status,xhr){ajaxSuccess(data,status,xhr,$form);$('.ajax-loader',$form).removeClass('is-active');}).fail(function(xhr,status,error){var $e=$('<div class="ajax-error"></div>').text(error.message);$form.after($e);});};wpcf7.triggerEvent=function(target,name,detail){var $target=$(target);var event=new CustomEvent('wpcf7'+name,{bubbles:true,detail:detail});$target.get(0).dispatchEvent(event);$target.trigger('wpcf7:'+name,detail);$target.trigger(name+'.wpcf7',detail);};wpcf7.toggleSubmit=function(form,state){var $form=$(form);var $submit=$('input:submit',$form);if(typeof state!=='undefined'){$submit.prop('disabled',!state);return;}
if($form.hasClass('wpcf7-acceptance-as-validation')){return;}
$submit.prop('disabled',false);$('.wpcf7-acceptance',$form).each(function(){var $span=$(this);var $input=$('input:checkbox',$span);if(!$span.hasClass('optional')){if($span.hasClass('invert')&&$input.is(':checked')||!$span.hasClass('invert')&&!$input.is(':checked')){$submit.prop('disabled',true);return false;}}});};wpcf7.notValidTip=function(target,message){var $target=$(target);$('.wpcf7-not-valid-tip',$target).remove();$('<span role="alert" class="wpcf7-not-valid-tip"></span>').text(message).appendTo($target);if($target.is('.use-floating-validation-tip *')){var fadeOut=function(target){$(target).not(':hidden').animate({opacity:0},'fast',function(){$(this).css({'z-index':-100});});};$target.on('mouseover','.wpcf7-not-valid-tip',function(){fadeOut(this);});$target.on('focus',':input',function(){fadeOut($('.wpcf7-not-valid-tip',$target));});}};wpcf7.refill=function(form,data){var $form=$(form);var refillCaptcha=function($form,items){$.each(items,function(i,n){$form.find(':input[name="'+i+'"]').val('');$form.find('img.wpcf7-captcha-'+i).attr('src',n);var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);$form.find('input:hidden[name="_wpcf7_captcha_challenge_'+i+'"]').attr('value',match[1]);});};var refillQuiz=function($form,items){$.each(items,function(i,n){$form.find(':input[name="'+i+'"]').val('');$form.find(':input[name="'+i+'"]').siblings('span.wpcf7-quiz-label').text(n[0]);$form.find('input:hidden[name="_wpcf7_quiz_answer_'+i+'"]').attr('value',n[1]);});};if(typeof data==='undefined'){$.ajax({type:'GET',url:wpcf7.apiSettings.getRoute('/contact-forms/'+wpcf7.getId($form)+'/refill'),beforeSend:function(xhr){var nonce=$form.find(':input[name="_wpnonce"]').val();if(nonce){xhr.setRequestHeader('X-WP-Nonce',nonce);}},dataType:'json'}).done(function(data,status,xhr){if(data.captcha){refillCaptcha($form,data.captcha);}
if(data.quiz){refillQuiz($form,data.quiz);}});}else{if(data.captcha){refillCaptcha($form,data.captcha);}
if(data.quiz){refillQuiz($form,data.quiz);}}};wpcf7.clearResponse=function(form){var $form=$(form);$form.removeClass('invalid spam sent failed');$form.siblings('.screen-reader-response').html('').attr('role','');$('.wpcf7-not-valid-tip',$form).remove();$('[aria-invalid]',$form).attr('aria-invalid','false');$('.wpcf7-form-control',$form).removeClass('wpcf7-not-valid');$('.wpcf7-response-output',$form).hide().empty().removeAttr('role').removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked');};wpcf7.apiSettings.getRoute=function(path){var url=wpcf7.apiSettings.root;url=url.replace(wpcf7.apiSettings.namespace,wpcf7.apiSettings.namespace+path);return url;};})(jQuery);(function(){if(typeof window.CustomEvent==="function")return false;function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:undefined};var evt=document.createEvent('CustomEvent');evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt;}
CustomEvent.prototype=window.Event.prototype;window.CustomEvent=CustomEvent;})();
/*!
 * jQuery UI Core 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/ui-core/
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",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}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<f.length;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}}});
/*!
 * jQuery UI Datepicker 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/datepicker/
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery","./core"],a):a(jQuery)}(function(a){function b(a){for(var b,c;a.length&&a[0]!==document;){if(b=a.css("position"),("absolute"===b||"relative"===b||"fixed"===b)&&(c=parseInt(a.css("zIndex"),10),!isNaN(c)&&0!==c))return c;a=a.parent()}return 0}function c(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.regional.en=a.extend(!0,{},this.regional[""]),this.regional["en-US"]=a.extend(!0,{},this.regional.en),this.dpDiv=d(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function d(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",e)}function e(){a.datepicker._isDisabledDatepicker(g.inline?g.dpDiv.parent()[0]:g.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).addClass("ui-datepicker-next-hover"))}function f(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.11.4"}});var g;return a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return f(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var e=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:e,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?d(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(b,c){var d=a(b);c.append=a([]),c.trigger=a([]),d.hasClass(this.markerClassName)||(this._attachments(d,c),d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(c),a.data(b,"datepicker",c),c.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a("<span class='"+this._appendClass+"'>"+g+"</span>"),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),"focus"!==d&&"both"!==d||b.focus(this._showDatepicker),"button"!==d&&"both"!==d||(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("<button type='button'></button>").addClass(this._triggerClass).html(f?a("<img/>").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;e<a.length;e++)a[e].length>c&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,c){var d=a(b);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(c.dpDiv),a.data(b,"datepicker",c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&this._disableDatepicker(b),c.dpDiv.css("display","block"))},_dialogDatepicker:function(b,c,d,e,g){var h,i,j,k,l,m=this._dialogInst;return m||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),m=this._dialogInst=this._newInst(this._dialogInput,!1),m.settings={},a.data(this._dialogInput[0],"datepicker",m)),f(m.settings,e||{}),c=c&&c.constructor===Date?this._formatDate(m,c):c,this._dialogInput.val(c),this._pos=g?g.length?g:[g.pageX,g.pageY]:null,this._pos||(i=document.documentElement.clientWidth,j=document.documentElement.clientHeight,k=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[i/2-100+k,j/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),m.settings.onSelect=d,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],"datepicker",m),this},_destroyDatepicker:function(b){var c,d=a(b),e=a.data(b,"datepicker");d.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),a.removeData(b,"datepicker"),"input"===c?(e.append.remove(),e.trigger.remove(),d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==c&&"span"!==c||d.removeClass(this.markerClassName).empty(),g===e&&(g=null))},_enableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==c&&"span"!==c||(d=e.children("."+this._inlineClass),d.children().removeClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==c&&"span"!==c||(d=e.children("."+this._inlineClass),d.children().addClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(b){try{return a.data(b,"datepicker")}catch(c){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(b,c,d){var e,g,h,i,j=this._getInst(b);return 2===arguments.length&&"string"==typeof c?"defaults"===c?a.extend({},a.datepicker._defaults):j?"all"===c?a.extend({},j.settings):this._get(j,c):null:(e=c||{},"string"==typeof c&&(e={},e[c]=d),void(j&&(this._curInst===j&&this._hideDatepicker(),g=this._getDateDatepicker(b,!0),h=this._getMinMaxDate(j,"min"),i=this._getMinMaxDate(j,"max"),f(j.settings,e),null!==h&&void 0!==e.dateFormat&&void 0===e.minDate&&(j.settings.minDate=this._formatDate(j,h)),null!==i&&void 0!==e.dateFormat&&void 0===e.maxDate&&(j.settings.maxDate=this._formatDate(j,i)),"disabled"in e&&(e.disabled?this._disableDatepicker(b):this._enableDatepicker(b)),this._attachments(a(b),j),this._autoSize(j),this._setDate(j,g),this._updateAlternate(j),this._updateDatepicker(j))))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(b){var c,d,e,f=a.datepicker._getInst(b.target),g=!0,h=f.dpDiv.is(".ui-datepicker-rtl");if(f._keyEvent=!0,a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(),g=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,e[0]),c=a.datepicker._get(f,"onSelect"),c?(d=a.datepicker._formatDate(f),c.apply(f.input?f.input[0]:null,[d,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target),g=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target),g=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?1:-1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D"),g=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?-1:1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D"),g=b.ctrlKey||b.metaKey;break;default:g=!1}else 36===b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):g=!1;g&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var c,d,e=a.datepicker._getInst(b.target);if(a.datepicker._get(e,"constrainInput"))return c=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),d=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode),b.ctrlKey||b.metaKey||d<" "||!c||c.indexOf(d)>-1},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(e){}return!0},_showDatepicker:function(c){if(c=c.target||c,"input"!==c.nodeName.toLowerCase()&&(c=a("input",c.parentNode)[0]),!a.datepicker._isDisabledDatepicker(c)&&a.datepicker._lastInput!==c){var d,e,g,h,i,j,k;d=a.datepicker._getInst(c),a.datepicker._curInst&&a.datepicker._curInst!==d&&(a.datepicker._curInst.dpDiv.stop(!0,!0),d&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),e=a.datepicker._get(d,"beforeShow"),g=e?e.apply(c,[c,d]):{},g!==!1&&(f(d.settings,g),d.lastVal=null,a.datepicker._lastInput=c,a.datepicker._setDateFromField(d),a.datepicker._inDialog&&(c.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(c),a.datepicker._pos[1]+=c.offsetHeight),h=!1,a(c).parents().each(function(){return h|="fixed"===a(this).css("position"),!h}),i={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,d.dpDiv.empty(),d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(d),i=a.datepicker._checkOffset(d,i,h),d.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":h?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),d.inline||(j=a.datepicker._get(d,"showAnim"),k=a.datepicker._get(d,"duration"),d.dpDiv.css("z-index",b(a(c))+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[j]?d.dpDiv.show(j,a.datepicker._get(d,"showOptions"),k):d.dpDiv[j||"show"](j?k:null),a.datepicker._shouldFocusInput(d)&&d.input.focus(),a.datepicker._curInst=d))}},_updateDatepicker:function(b){this.maxRows=4,g=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b);var c,d=this._getNumberOfMonths(b),f=d[1],h=17,i=b.dpDiv.find("."+this._dayOverClass+" a");i.length>0&&e.apply(i.get(0)),b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",h*f+"em"),b.dpDiv[(1!==d[0]||1!==d[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var c,d,e,f,g=this._curInst;!g||b&&g!==a.data(b,"datepicker")||this._datepickerShowing&&(c=this._get(g,"showAnim"),d=this._get(g,"duration"),e=function(){a.datepicker._tidyDialog(g)},a.effects&&(a.effects.effect[c]||a.effects[c])?g.dpDiv.hide(c,a.datepicker._get(g,"showOptions"),d,e):g.dpDiv["slideDown"===c?"slideUp":"fadeIn"===c?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1,f=this._get(g,"onClose"),f&&f.apply(g.input?g.input[0]:null,[g.input?g.input.val():"",g]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id===a.datepicker._mainDivId||0!==c.parents("#"+a.datepicker._mainDivId).length||c.hasClass(a.datepicker.markerClassName)||c.closest("."+a.datepicker._triggerClass).length||!a.datepicker._datepickerShowing||a.datepicker._inDialog&&a.blockUI)&&(!c.hasClass(a.datepicker.markerClassName)||a.datepicker._curInst===d)||a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,h,i=0,j=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,k="string"!=typeof j?j:(new Date).getFullYear()%100+parseInt(j,10),l=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,m=(d?d.dayNames:null)||this._defaults.dayNames,n=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,o=(d?d.monthNames:null)||this._defaults.monthNames,p=-1,q=-1,r=-1,s=-1,t=!1,u=function(a){var c=e+1<b.length&&b.charAt(e+1)===a;return c&&e++,c},v=function(a){var b=u(a),d="@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2,e="y"===a?d:1,f=new RegExp("^\\d{"+e+","+d+"}"),g=c.substring(i).match(f);if(!g)throw"Missing number at position "+i;return i+=g[0].length,parseInt(g[0],10)},w=function(b,d,e){var f=-1,g=a.map(u(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if(a.each(g,function(a,b){var d=b[1];if(c.substr(i,d.length).toLowerCase()===d.toLowerCase())return f=b[0],i+=d.length,!1}),f!==-1)return f+1;throw"Unknown name at position "+i},x=function(){if(c.charAt(i)!==b.charAt(e))throw"Unexpected literal at position "+i;i++};for(e=0;e<b.length;e++)if(t)"'"!==b.charAt(e)||u("'")?x():t=!1;else switch(b.charAt(e)){case"d":r=v("d");break;case"D":w("D",l,m);break;case"o":s=v("o");break;case"m":q=v("m");break;case"M":q=w("M",n,o);break;case"y":p=v("y");break;case"@":h=new Date(v("@")),p=h.getFullYear(),q=h.getMonth()+1,r=h.getDate();break;case"!":h=new Date((v("!")-this._ticksTo1970)/1e4),p=h.getFullYear(),q=h.getMonth()+1,r=h.getDate();break;case"'":u("'")?x():t=!0;break;default:x()}if(i<c.length&&(g=c.substr(i),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;if(p===-1?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=k?0:-100)),s>-1)for(q=1,r=s;;){if(f=this._getDaysInMonth(p,q-1),r<=f)break;q++,r-=f}if(h=this._daylightSavingAdjust(new Date(p,q-1,r)),h.getFullYear()!==p||h.getMonth()+1!==q||h.getDate()!==r)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+1<a.length&&a.charAt(d+1)===b;return c&&d++,c},j=function(a,b,c){var d=""+b;if(i(a))for(;d.length<c;)d="0"+d;return d},k=function(a,b,c,d){return i(a)?d[b]:c[b]},l="",m=!1;if(b)for(d=0;d<a.length;d++)if(m)"'"!==a.charAt(d)||i("'")?l+=a.charAt(d):m=!1;else switch(a.charAt(d)){case"d":l+=j("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=j("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=j("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),g,h);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=1e4*b.getTime()+this._ticksTo1970;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(d)}return l},_possibleChars:function(a){var b,c="",d=!1,e=function(c){var d=b+1<a.length&&a.charAt(b+1)===c;return d&&b++,d};for(b=0;b<a.length;b++)if(d)"'"!==a.charAt(b)||e("'")?c+=a.charAt(b):d=!1;else switch(a.charAt(b)){case"d":case"m":case"y":case"@":c+="0123456789";break;case"D":case"M":return null;case"'":e("'")?c+="'":d=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,b){return void 0!==a.settings[b]?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e=this._getDefaultDate(a),f=e,g=this._getFormatConfig(a);try{f=this.parseDate(c,d,g)||e}catch(h){d=b?"":d}a.selectedDay=f.getDate(),a.drawMonth=a.selectedMonth=f.getMonth(),a.drawYear=a.selectedYear=f.getFullYear(),a.currentDay=d?f.getDate():0,a.currentMonth=d?f.getMonth():0,a.currentYear=d?f.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,d){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(d){}for(var e=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,f=e.getFullYear(),g=e.getMonth(),h=e.getDate(),i=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=i.exec(c);j;){switch(j[2]||"d"){case"d":case"D":h+=parseInt(j[1],10);break;case"w":case"W":h+=7*parseInt(j[1],10);break;case"m":case"M":g+=parseInt(j[1],10),h=Math.min(h,a.datepicker._getDaysInMonth(f,g));break;case"y":case"Y":f+=parseInt(j[1],10),h=Math.min(h,a.datepicker._getDaysInMonth(f,g))}j=i.exec(c)}return new Date(f,g,h)},g=null==c||""===c?d:"string"==typeof c?f(c):"number"==typeof c?isNaN(c)?d:e(c):new Date(c.getTime());return g=g&&"Invalid Date"===g.toString()?d:g,g&&(g.setHours(0),g.setMinutes(0),g.setSeconds(0),g.setMilliseconds(0)),this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,aa=a.drawYear;if(_<0&&(_+=12,aa--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&b<Z?Z:b;this._daylightSavingAdjust(new Date(aa,_,1))>b;)_--,_<0&&(_=11,aa--);for(a.drawMonth=_,a.drawYear=aa,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(aa,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,aa,_)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>":S?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(aa,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,aa,_)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>":S?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+"</button>",j=R?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Q?i:"")+(this._isInRange(a,h)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"</button>":"")+(Q?"":i)+"</div>":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w<U[0];w++){for(x="",this.maxRows=4,y=0;y<U[1];y++){if(z=this._daylightSavingAdjust(new Date(aa,_,a.selectedDay)),A=" ui-corner-all",B="",X){if(B+="<div class='ui-datepicker-group",U[1]>1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,aa,Z,$,w>0||y>0,o,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=l?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"",v=0;v<7;v++)D=(v+k)%7,C+="<th scope='col'"+((v+k+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+m[D]+"'>"+n[D]+"</span></th>";for(B+=C+"</tr></thead><tbody>",E=this._getDaysInMonth(aa,_),aa===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(aa,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(aa,_,1-F)),J=0;J<H;J++){for(B+="<tr>",K=l?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(I)+"</td>":"",v=0;v<7;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&I<Z||$&&I>$,K+="<td class='"+((v+k+6)%7>=5?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(I.getTime()===z.getTime()&&_===a.selectedMonth&&a._keyEvent||t.getTime()===I.getTime()&&t.getTime()===z.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!r?"":" "+L[1]+(I.getTime()===Y.getTime()?" "+this._currentClass:"")+(I.getTime()===P.getTime()?" ui-datepicker-today":""))+"'"+(M&&!r||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(M&&!r?"&#xa0;":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===P.getTime()?" ui-state-highlight":"")+(I.getTime()===Y.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+"</tr>"}_++,_>11&&(_=0,aa++),B+="</tbody></table>"+(X?"</div>"+(U[0]>0&&y===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="<div class='ui-datepicker-title'>",u="";if(f||!q)u+="<span class='ui-datepicker-month'>"+g[b]+"</span>";else{
for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",k=0;k<12;k++)(!i||k>=d.getMonth())&&(!j||k<=e.getMonth())&&(u+="<option value='"+k+"'"+(k===b?" selected='selected'":"")+">"+h[k]+"</option>");u+="</select>"}if(s||(t+=u+(!f&&q&&r?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!r)t+="<span class='ui-datepicker-year'>"+c+"</span>";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";o<=p;o++)a.yearshtml+="<option value='"+o+"'"+(o===c?" selected='selected'":"")+">"+o+"</option>";a.yearshtml+="</select>",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":"&#xa0;")+u),t+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new c,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.11.4",a.datepicker});
/*! jQuery Timepicker Addon - v1.4.1 - 2013-10-23
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.4.1"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=' style="display:none;"',d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+'"><dl>'+'<dt class="ui_tpicker_time_label"'+(t.showTime?"":m)+">"+t.timeText+"</dt>"+'<dd class="ui_tpicker_time"'+(t.showTime?"":m)+"></dd>";for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+'_label"'+(n?"":m)+">"+t[s+"Text"]+"</dt>"+'<dd class="ui_tpicker_'+s+'"><div class="ui_tpicker_'+s+'_slider"'+(n?"":m)+"></div>",n&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var p=t[s+"Min"];r[s]>=p;p+=parseInt(t[s+"Grid"],10)){l[s]++;var h=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:p},t);d+='<td data-for="'+s+'">'+h+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label"'+(f?"":m)+">"+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone" '+(f?"":m)+"></dd>",d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div>"+"</div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(void 0!==t&&t===!0){var o=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),c=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),u=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),m=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),d=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:o}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:c}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:u}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:m}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:d}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=parseInt(n,10));var c=r[12>e?"amNames":"pmNames"][0],u=e!==this.hour||t!==this.minute||i!==this.second||s!==this.millisec||a!==this.microsec||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0?r=this.formattedTime:this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+(""+c),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min||r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),i.amNames)?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i=this._getInst($(e)[0]),s=this._get(i,"timepicker");s?(s._limitMinMaxDateTime(i,!0),i.inline=i.stay_open=!0,this._base_selectDate(e,t),i.inline=i.stay_open=!1,this._notifyChange(i),this._updateDatepicker(i)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(n)}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]),i=t.dpDiv;this._base_gotoToday(e);var s=this._get(t,"timepicker");selectLocalTimezone(s);var a=new Date;this._setTime(t,a),$(".ui-datepicker-today",i).click()},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e);if(i){"string"==typeof t&&(t=new Date(t),t.getTime()||$.timepicker.log("Error creating Date object from string."));var s,a=this._get(i,"timepicker");t instanceof Date?(s=new Date(t.getTime()),s.setMicroseconds(t.getMicroseconds())):s=t,a&&(a.support.timezone||null!==a._defaults.timezone||(a.timezone=-1*s.getTimezoneOffset()),t=$.timepicker.timezoneAdjust(t,a.timezone),s=$.timepicker.timezoneAdjust(s,a.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,s,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i);return a&&s._parseTime($(e).val(),s.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a
}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l=null,o=null,c=null,u=n._defaults.evnts,m={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)l=i;else if("maxDate"===t||"maxDateTime"===t)o=i;else if("onSelect"===t)c=i;else if(u.hasOwnProperty(t)){if(i===void 0)return u[t];m[t]=i,s={}}}else if("object"==typeof t){t.minDate?l=t.minDate:t.minDateTime?l=t.minDateTime:t.maxDate?o=t.maxDate:t.maxDateTime&&(o=t.maxDateTime);for(r in u)u.hasOwnProperty(r)&&t[r]&&(m[r]=t[r])}for(r in m)m.hasOwnProperty(r)&&(u[r]=m[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;l?(l=0===l?new Date:new Date(l),n._defaults.minDate=l,n._defaults.minDateTime=l):o?(o=0===o?new Date:new Date(o),n._defaults.maxDate=o,n._defaults.maxDateTime=o):c&&(n._defaults.onSelect=c)}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}return s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s),$.fn[e].call(t,$.extend({onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(e){window.console&&window.console.log(e)},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="1.4.1"}})(jQuery);
(function($){$.timepicker.regional['fr']={timeOnlyTitle:'Choisir une heure',timeText:'Heure',hourText:'Heures',minuteText:'Minutes',secondText:'Secondes',millisecText:'Millisecondes',microsecText:'Microsecondes',timezoneText:'Fuseau horaire',currentText:'Maintenant',closeText:'Terminé',timeFormat:'HH:mm',amNames:['AM','A'],pmNames:['PM','P'],isRTL:false};$.timepicker.setDefaults($.timepicker.regional['fr']);})(jQuery);
/*!
 * jQuery UI Widget 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;g<h;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(a.isPlainObject(e)?b[d]=a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):b[d]=e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget});
/*!
 * jQuery UI Mouse 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/mouse/
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery","./widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).mouseup(function(){b=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f=!("string"!=typeof this.options.cancel||!c.target.nodeName)&&a(c.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(c))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),b=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
/*!
 * jQuery UI Slider 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/slider/
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.slider",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;b<c;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,d=Math.floor(+(a-b).toFixed(this._precision())/c)*c;a=d+b,this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return c===-1?0:b.length-c-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100,k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var c,d,e,f,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,g),c===!1))return}switch(f=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(g):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;e=this._trimAlignValue(d+f);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-f)}this._slide(b,g,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})});
/*!
 * jQuery UI Button 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/button/
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){var b,c="ui-button ui-widget ui-state-default ui-corner-all",d="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",e=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},f=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"'][type=radio]"):a("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return!this.form})),e};return a.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,e),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var d=this,g=this.options,h="checkbox"===this.type||"radio"===this.type,i=h?"":"ui-state-active";null===g.label&&(g.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(c).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){g.disabled||this===b&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){g.disabled||a(this).removeClass(i)}).bind("click"+this.eventNamespace,function(a){g.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),h&&this.element.bind("change"+this.eventNamespace,function(){d.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(g.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(g.disabled)return!1;a(this).addClass("ui-state-active"),d.buttonElement.attr("aria-pressed","true");var b=d.element[0];f(b).not(b).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!g.disabled&&(a(this).addClass("ui-state-active"),b=this,void d.document.one("mouseup",function(){b=null}))}).bind("mouseup"+this.eventNamespace,function(){return!g.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!g.disabled&&void(b.keyCode!==a.ui.keyCode.SPACE&&b.keyCode!==a.ui.keyCode.ENTER||a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",g.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(c+" ui-state-active "+d).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),void(b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?f(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(d),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,g=[];e.primary||e.secondary?(this.options.text&&g.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary")),e.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>"),e.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>"),this.options.text||(g.push(f?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):g.push("ui-button-text-only"),b.addClass(g.join(" "))}}),a.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction"),c=this.element.find(this.options.items),d=c.filter(":ui-button");c.not(":ui-button").button(),d.button("refresh"),this.buttons=c.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),a.ui.button});
(function($){$.fn.extend({sliderAccess:function(options){options=options||{};options.touchonly=options.touchonly!==undefined?options.touchonly:true;if(options.touchonly===true&&!("ontouchend"in document))
return $(this);return $(this).each(function(i,obj){var $t=$(this),o=$.extend({},{where:'after',step:$t.slider('option','step'),upIcon:'ui-icon-plus',downIcon:'ui-icon-minus',text:false,upText:'+',downText:'-',buttonset:true,buttonsetTag:'span',isRTL:false},options),$buttons=$('<'+o.buttonsetTag+' class="ui-slider-access">'+'<button data-icon="'+o.downIcon+'" data-step="'+(o.isRTL?o.step:o.step*-1)+'">'+o.downText+'</button>'+'<button data-icon="'+o.upIcon+'" data-step="'+(o.isRTL?o.step*-1:o.step)+'">'+o.upText+'</button>'+'</'+o.buttonsetTag+'>');$buttons.children('button').each(function(j,jobj){var $jt=$(this);$jt.button({text:o.text,icons:{primary:$jt.data('icon')}}).click(function(e){var step=$jt.data('step'),curr=$t.slider('value'),newval=curr+=step*1,minval=$t.slider('option','min'),maxval=$t.slider('option','max'),slidee=$t.slider("option","slide")||function(){},stope=$t.slider("option","stop")||function(){};e.preventDefault();if(newval<minval||newval>maxval)
return;$t.slider('value',newval);slidee.call($t,null,{value:newval});stope.call($t,null,{value:newval});});});$t[o.where]($buttons);if(o.buttonset){$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();$buttons.eq(0).addClass('ui-corner-left');$buttons.eq(1).addClass('ui-corner-right');}
var bOuterWidth=$buttons.css({marginLeft:((o.where=='after'&&!o.isRTL)||(o.where=='before'&&o.isRTL)?10:0),marginRight:((o.where=='before'&&!o.isRTL)||(o.where=='after'&&o.isRTL)?10:0)}).outerWidth(true)+5;var tOuterWidth=$t.outerWidth(true);$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);});}});})(jQuery);
/*! Idle Timer v1.0.1 2014-03-21 | https://github.com/thorst/jquery-idletimer | (c) 2014 Paul Irish | Licensed MIT */
!function(a){a.idleTimer=function(b,c){var d;"object"==typeof b?(d=b,b=null):"number"==typeof b&&(d={timeout:b},b=null),c=c||document,d=a.extend({idle:!1,timeout:3e4,events:"mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"},d);var e=a(c),f=e.data("idleTimerObj")||{},g=function(b){var d=a.data(c,"idleTimerObj")||{};d.idle=!d.idle,d.olddate=+new Date;var e=a.Event((d.idle?"idle":"active")+".idleTimer");a(c).trigger(e,[c,a.extend({},d),b])},h=function(b){var d=a.data(c,"idleTimerObj")||{};if(null==d.remaining){if("mousemove"===b.type){if(b.pageX===d.pageX&&b.pageY===d.pageY)return;if("undefined"==typeof b.pageX&&"undefined"==typeof b.pageY)return;var e=+new Date-d.olddate;if(200>e)return}clearTimeout(d.tId),d.idle&&g(b),d.lastActive=+new Date,d.pageX=b.pageX,d.pageY=b.pageY,d.tId=setTimeout(g,d.timeout)}},i=function(){var b=a.data(c,"idleTimerObj")||{};b.idle=b.idleBackup,b.olddate=+new Date,b.lastActive=b.olddate,b.remaining=null,clearTimeout(b.tId),b.idle||(b.tId=setTimeout(g,b.timeout))},j=function(){var b=a.data(c,"idleTimerObj")||{};null==b.remaining&&(b.remaining=b.timeout-(+new Date-b.olddate),clearTimeout(b.tId))},k=function(){var b=a.data(c,"idleTimerObj")||{};null!=b.remaining&&(b.idle||(b.tId=setTimeout(g,b.remaining)),b.remaining=null)},l=function(){var b=a.data(c,"idleTimerObj")||{};clearTimeout(b.tId),e.removeData("idleTimerObj"),e.off("._idleTimer")},m=function(){var b=a.data(c,"idleTimerObj")||{};if(b.idle)return 0;if(null!=b.remaining)return b.remaining;var d=b.timeout-(+new Date-b.lastActive);return 0>d&&(d=0),d};if(null===b&&"undefined"!=typeof f.idle)return i(),e;if(null===b);else{if(null!==b&&"undefined"==typeof f.idle)return!1;if("destroy"===b)return l(),e;if("pause"===b)return j(),e;if("resume"===b)return k(),e;if("reset"===b)return i(),e;if("getRemainingTime"===b)return m();if("getElapsedTime"===b)return+new Date-f.olddate;if("getLastActiveTime"===b)return f.lastActive;if("isIdle"===b)return f.idle}return e.on(a.trim((d.events+" ").split(" ").join("._idleTimer ")),function(a){h(a)}),f=a.extend({},{olddate:+new Date,lastActive:+new Date,idle:d.idle,idleBackup:d.idle,timeout:d.timeout,remaining:null,tId:null,pageX:null,pageY:null}),f.idle||(f.tId=setTimeout(g,f.timeout)),a.data(c,"idleTimerObj",f),e},a.fn.idleTimer=function(b){return this[0]?a.idleTimer(b,this[0]):this}}(jQuery);
(function($){$(document).ready(function(){var all_networks_opened=0;et_pb_fix_gallery_wrapper();$('body').on('click','.et_social_share',function(){var $this_el=$(this),social_type=$this_el.data('social_type'),social_network=$this_el.data('social_name'),share_link='media'==social_type?$this_el.data('social_link'):$this_el.prop('href');update_stats_table(social_network,$this_el);if('like'===social_network){return false;}
var left=($(window).width()/2)-(550/2);var top=($(window).height()/2)-(450/2);var new_window=window.open(share_link,'','scrollbars=1, height=450, width=550, left='+left+', top='+top);if(window.focus){new_window.focus();}
return false;});$('.et_social_follow').click(function(){var $this_el=$(this),social_network=$this_el.data('social_name');update_stats_table(social_network,$this_el);if('like'===social_network){return false;}});$('body').on('click','.et_social_share_pinterest',function(){if($(this).hasClass('et_social_pin_all')){var left=($(window).width()/2)-(550/2),top=($(window).height()/2)-(450/2),share_link=$(this).attr('href'),new_window=window.open(share_link,'','scrollbars=1, height=450, width=550, left='+left+', top='+top);if(window.focus){new_window.focus();}}else{$('.et_social_pin_images_outer').fadeToggle(400);}
return false;});function get_url_parameter(param_name){var page_url=window.location.search.substring(1);var url_variables=page_url.split('&');for(var i=0;i<url_variables.length;i++){var curr_param_name=url_variables[i].split('=');if(curr_param_name[0]==param_name){return curr_param_name[1];}}}
function update_stats_table($social_network,$this_el){var action=$this_el.data('social_type'),media_url='media'==action?$this_el.closest('.et_social_media_wrapper').find('img').attr('src'):'',post_id=$this_el.data('post_id'),location=$this_el.data('location'),stats_data='';stats_data=JSON.stringify({'action':action,'network':$social_network,'media_url':media_url,'post_id':post_id,'location':location});$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'add_stats_record_db',stats_data_array:stats_data,add_stats_nonce:monarchSettings.stats_nonce},success:function(data){if(true==data){if('like'===action){update_single_shares($this_el,'',post_id,$social_network,'like');}
if('media'===action){update_total_media_shares($this_el.closest('.et_social_media_wrapper'));update_single_shares($this_el,media_url,post_id,$social_network,'media');}}}});}
function append_share_counts($current_network){var network=$current_network.data('social_name'),min_count=$current_network.data('min_count'),post_id=$current_network.data('post_id'),url=monarchSettings.pageurl!==''?monarchSettings.pageurl:window.location.href,label_div=$current_network.find('.et_social_network_label'),append_to=(0!=(label_div.length))?label_div:$current_network;$share_count_data=JSON.stringify({'network':network,'min_count':min_count,'post_id':post_id,'url':url});$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'get_shares_count',share_count_array:$share_count_data,get_share_counts_nonce:monarchSettings.share_counts},beforeSend:function(data){append_to.append('<span class="et_social_placeholder"></span>');},success:function(data){$current_network.find('span.et_social_placeholder').remove();append_to.append(data);}});}
function append_total_shares($current_area){var post_id=$current_area.data('post_id'),url=monarchSettings.pageurl!==''?monarchSettings.pageurl:window.location.href,append_to=$current_area;$share_total_count_data=JSON.stringify({'post_id':post_id,'url':url});$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'get_total_shares',share_total_count_array:$share_total_count_data,get_total_counts_nonce:monarchSettings.total_counts},beforeSend:function(data){append_to.append('<span class="et_social_placeholder"></span>');},success:function(data){append_to.find('span.et_social_placeholder').remove();append_to.append(data);}});}
function append_follow_counts($current_area){var network=$current_area.data('network'),min_count=$current_area.data('min_count'),index=$current_area.data('index'),append_to=$current_area;$follow_count_data=JSON.stringify({'network':network,'min_count':min_count,'index':index});$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'get_follow_counts',follow_count_array:$follow_count_data,get_follow_counts_nonce:monarchSettings.follow_counts},beforeSend:function(data){append_to.append('<span class="et_social_placeholder"></span>');},success:function(data){$current_area.find('span.et_social_placeholder').remove();append_to.append(data);}});}
function append_total_follows($current_area){var append_to=$current_area;$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'get_follow_total',get_total_counts_nonce:monarchSettings.total_counts},beforeSend:function(data){append_to.append('<span class="et_social_placeholder"></span>');},success:function(data){append_to.find('span.et_social_placeholder').remove();append_to.append(data);}});}
if($('.et_social_display_follow_counts').length){$('.et_social_display_follow_counts').each(function(){append_follow_counts($(this));});}
if($('.et_social_follow_total').length){$('.et_social_follow_total').each(function(){append_total_follows($(this));});}
if($('.et_social_total_share').length){$('.et_social_total_share').each(function(){append_total_shares($(this));});}
if($('.et_social_display_count').length){$('.et_social_display_count').each(function(){append_share_counts($(this));});}
if($('.et_social_media_wrapper').length&&$('.et_social_media_wrapper .et_social_totalcount').length){$('.et_social_media_wrapper').each(function(){update_total_media_shares($(this));});}
if($('.et_social_media_wrapper').length&&$('.et_social_media_wrapper .et_social_withcounts').length){$('.et_social_media_wrapper .et_social_share').each(function(){var this_el=$(this),media_url=this_el.closest('.et_social_media_wrapper').find('img').attr('src'),post_id=this_el.data('post_id'),social_network=this_el.data('social_name');update_single_shares(this_el,media_url,post_id,social_network,'media');});}
function update_total_media_shares($element){if($('.et_social_totalcount').length){var this_el=$element,media_url=this_el.find('img').attr('src'),post_id=this_el.find('.et_social_share').first().data('post_id'),media_data=JSON.stringify({'media_url':media_url,'post_id':post_id});$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'get_media_shares_total',media_total:media_data,get_media_shares_total_nonce:monarchSettings.media_total},success:function(data){this_el.find('.et_social_totalcount_count').empty().append(data);}});}}
function update_single_shares($this_el,$media_url,$post_id,$network,$action){if($('.et_social_withcounts').length){var media_data=JSON.stringify({'media_url':$media_url,'post_id':$post_id,'network':$network,'action':$action});$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'get_shares_single',media_single:media_data,get_media_shares_nonce:monarchSettings.media_single},success:function(data){$this_el.find('.et_social_count span').not('.et_social_count_label').empty().append(data);}});}}
function setCookieExpire(days){var ms=days*24*60*60*1000;var date=new Date();date.setTime(date.getTime()+ms);return"; expires="+date.toUTCString();}
function checkCookieValue(cookieName,value){return parseCookies()[cookieName]===value;}
function parseCookies(){var cookies=document.cookie.split('; ');var ret={};for(var i=cookies.length-1;i>=0;i--){var el=cookies[i].split('=');ret[el[0]]=el[1];}
return ret;}
function set_cookie($expire){cookieExpire=setCookieExpire($expire);document.cookie='etSocialCookie=true'+cookieExpire;}
function make_popup_visible($popup,$delay){setTimeout(function(){$popup.addClass('et_social_visible et_social_animated');if($('.et_social_resize').length){$('.et_social_resize').each(function(){define_popup_position($(this));});}},$delay);}
function auto_popup(this_el,delay){var $current_popup_auto=this_el;if(!$current_popup_auto.hasClass('et_social_animated')){var $cookies_expire_auto=$current_popup_auto.data('cookie_duration')?$current_popup_auto.data('cookie_duration'):false,$delay=delay;if((false!==$cookies_expire_auto&&!checkCookieValue('etSocialCookie','true'))||false==$cookies_expire_auto){make_popup_visible($current_popup_auto,$delay);if(false!==$cookies_expire_auto){set_cookie($cookies_expire_auto);}}}}
if('true'==get_url_parameter('et_monarch_popup')){$('.et_social_after_comment').each(function(){var $current_popup=$(this);auto_popup($current_popup,0);});}
if($('.et_social_auto_popup').length){$('.et_social_auto_popup').each(function(){var $current_popup_auto=$(this);auto_popup($current_popup_auto,''!==$current_popup_auto.data('delay')?$current_popup_auto.data('delay')*1000:0);});}
$('.et_social_pinterest_window .et_social_close').on('click',function(){$('.et_social_pin_images_outer').fadeToggle(400);});$('body').on('click','.et_social_icon_cancel',function(){var this_el=$(this);if(this_el.parent().hasClass('et_social_flyin')){$popup=this_el.parent();}else{$popup=this_el.parent().parent();if($popup.hasClass('et_social_all_networks_popup')){all_networks_opened=0;}}
$popup.addClass('et_social_fadeout');setTimeout(function(){$popup.remove();},800);return false;});if($('.et_monarch_after_order').length){$('.et_social_after_purchase').each(function(){var $current_popup=$(this);if(!$current_popup.hasClass('et_social_animated')){var $cookies_expire=$current_popup.data('cookie_duration')?$current_popup.data('cookie_duration'):false,$delay=0;if((false!==$cookies_expire&&!checkCookieValue('etSocialCookie','true'))||false==$cookies_expire){make_popup_visible($current_popup,$delay);if(false!==$cookies_expire){set_cookie($cookies_expire);}}}});}
if($('.et_social_trigger_bottom').length){$('.et_social_trigger_bottom').each(function(){scroll_trigger($(this),true);});}
if($('.et_social_scroll').length){$('.et_social_scroll').each(function(){scroll_trigger($(this),false);});}
function scroll_trigger(this_el,is_bottom_trigger){var current_popup_bottom=this_el;if(!current_popup_bottom.hasClass('et_social_animated')){var cookies_expire_bottom=current_popup_bottom.data('cookie_duration')?current_popup_bottom.data('cookie_duration'):false;if(true==is_bottom_trigger){var scroll_trigger=$('.et_social_bottom_trigger').length?$('.et_social_bottom_trigger').offset().top:$(document).height()-500;}else{var scroll_pos=this_el.data('scroll_pos')>100?100:this_el.data('scroll_pos'),scroll_trigger=100==scroll_pos?$(document).height()-10:$(document).height()*scroll_pos/100;}
$(window).scroll(function(){if((false!==cookies_expire_bottom&&!checkCookieValue('etSocialCookie','true'))||false==cookies_expire_bottom){if($(window).scrollTop()+$(window).height()>scroll_trigger){current_popup_bottom.addClass('et_social_visible et_social_animated');if($('.et_social_resize').length){$('.et_social_resize').each(function(){define_popup_position($(this));});}
if(false!==cookies_expire_bottom){set_cookie(cookies_expire_bottom);}}}});}}
if($('.et_social_trigger_idle').length){$('.et_social_trigger_idle').each(function(){var this_el=$(this);if(!this_el.hasClass('et_social_animated')){var $cookies_expire_idle=this_el.data('cookie_duration')?this_el.data('cookie_duration'):false,$idle_timeout=''!==this_el.data('idle_timeout')?this_el.data('idle_timeout')*1000:30000;if((false!==$cookies_expire_idle&&!checkCookieValue('etSocialCookie','true'))||false==$cookies_expire_idle){$(document).idleTimer($idle_timeout);$(document).on("idle.idleTimer",function(){make_popup_visible(this_el,0);});if(false!==$cookies_expire_idle){set_cookie($cookies_expire_idle);}}}});}
$('.et_social_heading, .et_social_mobile_button').click(function(){$this_mobile_div=$('.et_social_mobile');$this_mobile_div.css({'display':'block'});$('.et_social_mobile_button').removeClass('et_social_active_button');if($this_mobile_div.hasClass('et_social_opened')){$this_mobile_div.find('.et_social_networks').slideToggle(600);$this_mobile_div.removeClass('et_social_opened').addClass('et_social_closed');$('.et_social_mobile_overlay').removeClass('et_social_visible_overlay');$('.et_social_mobile_overlay').fadeToggle(600);}else{$this_mobile_div.removeClass('et_social_closed').addClass('et_social_opened');$this_mobile_div.find('.et_social_networks').slideToggle(600);$('.et_social_mobile_overlay').addClass('et_social_visible_overlay').css({'display':'block'});}});$('.et_social_mobile .et_social_close').click(function(){$mobile_div=$('.et_social_mobile');$mobile_div.fadeToggle(600);$('.et_social_mobile_button').addClass('et_social_active_button');if($mobile_div.hasClass('et_social_opened')){$('.et_social_mobile_overlay').fadeToggle(600);$mobile_div.removeClass('et_social_opened');$mobile_div.find('.et_social_networks').fadeToggle(600);}});if($('.et_social_inline').length){if($('body').hasClass('et_pb_pagebuilder_layout')){var top_inline=$('.et_social_inline_top'),bottom_inline=$('.et_social_inline_bottom'),divi_container='<div class="et_pb_row"><div class="et_pb_column et_pb_column_4_4"></div></div>';if(top_inline.length){$('.et_pb_section').not('.et_pb_fullwidth_section').first().prepend(divi_container).find('.et_pb_row').first().find('.et_pb_column').append(top_inline);}
if(bottom_inline.length){$('.et_pb_section').not('.et_pb_fullwidth_section').last().append(divi_container).find('.et_pb_row').last().find('.et_pb_column').append(bottom_inline);}}}
function define_popup_position($this_popup){setTimeout(function(){var this_popup=$this_popup,networks_div=this_popup.find('.et_social_networks'),header_height=this_popup.find('.et_social_header').outerHeight(),total_count_height=this_popup.find('.et_social_totalcount').height(),extra_height=0<total_count_height?20:0;this_popup.height(this_popup.find('.et_social_icons_container').innerHeight()+header_height+total_count_height+20+extra_height);var popup_max_height=this_popup.hasClass('et_social_popup_content')?$(window).height():$(window).height()-60;if(this_popup.hasClass('et_social_popup_content')&&768<$(window).width()){popup_max_height=popup_max_height-50;}
this_popup.css({'max-height':popup_max_height});if(this_popup.hasClass('et_social_popup_content')){var top_position=$(window).height()/2-this_popup.innerHeight()/2;this_popup.css({'top':top_position+'px'});}
var networks_div_height=this_popup.height()-header_height+total_count_height-extra_height;networks_div.height(networks_div_height);},400);}
function set_mobile_sidebar_height(){setTimeout(function(){var mobile_div=$('.et_social_mobile');if(!mobile_div.hasClass('et_social_opened')){$('.et_social_mobile .et_social_networks').css({'display':'block'});}
if($('.et_social_active_button').length){mobile_div.css({'display':'block'});}
var inner_contatiner_height=mobile_div.find('.et_social_icons_container').innerHeight()+45;if(!mobile_div.hasClass('et_social_opened')){$('.et_social_mobile .et_social_networks').css({'display':'none'});}
if($('.et_social_active_button').length){mobile_div.css({'display':'none'});}
mobile_div.find('.et_social_networks').css({'max-height':inner_contatiner_height,'height':inner_contatiner_height});if($(window).height()<inner_contatiner_height){var inner_height=$(window).height()-mobile_div.find('.et_social_heading').innerHeight()+10;mobile_div.find('.et_social_networks').css({'height':inner_height});}},400);}
function set_sidebar_position(){if($('.et_social_sidebar_networks').length){var this_sidebar=$('.et_social_sidebar_networks'),top_position=$(window).height()/2-this_sidebar.innerHeight()/2;top_position=0>top_position?0:top_position;this_sidebar.css({'top':top_position+'px'});}}
function set_media_wrapper_size(){if($('.et_social_media_wrapper').length){$('.et_social_media_wrapper').each(function(){var this_wrapper=$(this),this_wrapper_media=this_wrapper.find('.et_social_media'),this_image=this_wrapper.find('img'),image_position=this_image.position(),image_left_offset=typeof image_position!=='undefined'?image_position.left:0,this_image_height=this_image.height(),this_image_width=this_image.width(),this_wrapper_networks_height=this_wrapper.find('.et_social_networks').innerHeight();this_wrapper.addClass(this_image.attr('class'));this_wrapper_media.css({'max-height':this_image_height});this_wrapper_media.css({'height':this_wrapper_networks_height+50});this_wrapper_media.width(this_image_width-80);if(0!==image_left_offset){this_wrapper_media.css({'left':image_left_offset+20});}});et_pb_fix_gallery_slider_icons_size();}}
function et_pb_fix_gallery_wrapper(){var $media_wrappers_inside_gallery=$('.et_pb_gallery_grid .et_social_media_wrapper');if(0>$media_wrappers_inside_gallery.length){return;}
$media_wrappers_inside_gallery.each(function(){var $this_wrapper=$(this);var $gallery_item=$this_wrapper.closest('.et_pb_gallery_image');var $gallery_overlay=$gallery_item.find('.et_overlay');if(0<$gallery_overlay.length){$this_wrapper.append($gallery_overlay);}});}
function et_pb_fix_gallery_slider_icons_size(){var $gallery_slider_icons=$('.et_pb_gallery_fullwidth .et_social_media_wrapper');if(0>$gallery_slider_icons.length){return;}
var $all_galleries=$('.et_pb_gallery_fullwidth');$all_galleries.each(function(){var $this_gallery=$(this);var $this_gallery_media=$this_gallery.find('.et_social_media_wrapper .et_social_media');if(0>$this_gallery_media.length){return;}
var $first_icon_wrapper=$this_gallery_media.first();var icons_width=$first_icon_wrapper.width();var icons_height=$first_icon_wrapper.css('height');var icons_max_height=$first_icon_wrapper.css('max-height');$this_gallery_media.width(icons_width-80);$this_gallery_media.height(icons_height);$this_gallery_media.css({'max-height':icons_max_height});});}
$('body').on('click','.et_social_open_all',function(){all_networks_opened++;if(1==all_networks_opened){var this_button=$(this),page_id=this_button.data('page_id'),permalink=this_button.data('permalink'),title=this_button.data('title'),media=typeof this_button.data('media')!=='undefined'?this_button.data('media'):'',is_popup='popup'==this_button.data('location')?'true':'false';$.ajax({type:'POST',url:monarchSettings.ajaxurl,data:{action:'generate_all_networks_popup',all_networks_page_id:page_id,all_networks_link:permalink,all_networks_title:title,all_networks_media:media,is_popup:is_popup,generate_all_window_nonce:monarchSettings.generate_all_window_nonce},success:function(data){if('false'==is_popup){$('body').append(data);make_popup_visible($('.et_social_all_networks_popup'),1);}else{var popup_container=this_button.parent().closest('.et_social_popup_content');this_button.parent().replaceWith(data);define_popup_position(popup_container);all_networks_opened=0;}}});}
return false;});set_mobile_sidebar_height();set_sidebar_position();$(window).resize(function(){if($('.et_social_resize').length){$('.et_social_resize').each(function(){define_popup_position($(this));});}
if($('.et_social_mobile')){set_mobile_sidebar_height();}
if($('.et_social_sidebar_networks').length){set_sidebar_position();}
set_media_wrapper_size();});$('.et_social_hide_sidebar').click(function(){$('.et_social_hide_sidebar').toggleClass('et_social_hidden_sidebar');$('.et_social_sidebar_networks').toggleClass('et_social_hidden_sidebar et_social_visible_sidebar');});$(window).load(function(){set_media_wrapper_size();if($('.et_social_pin_images').length&&($('.et_social_all_button').length||$('.et_social_pinterest').length)){var pin_container=$('.et_social_pin_images'),permalink=pin_container.data('permalink'),title=pin_container.data('title'),post_id=pin_container.data('post_id'),$i=0;$('img').each(function(){if(!$(this).hasClass('avatar')){var this_img=$(this).attr('src'),this_alt=$(this).attr('alt');if(''!=this_img){var pin_link='http://www.pinterest.com/pin/create/button/?url='+permalink+'&media='+this_img+'&description='+title,this_img_container='<div class="et_social_pin_image"><a href="'+pin_link+'" rel="nofollow" class="et_social_icon et_social_share" data-social_name="pinterest" data-post_id="'+post_id+'" data-social_type="share"><img src="'+this_img+'" alt="'+this_alt+'"/><span class="et_social_pin_overlay et_social_icon"></span></a></div>';$('.et_social_pin_images').append(this_img_container);$i++;}}});if(0==$i){$('.et_social_pin_images').append(monarchSettings.no_img_message);}}});});})(jQuery);
/*! ET et_shortcodes_frontend.js */
!function($){$.fn.et_shortcodes_switcher=function(options){var defaults={slides:">div",activeClass:"active",linksNav:"",findParent:!0,lengthElement:"li",useArrows:!1,arrowLeft:"a#prev-arrow",arrowRight:"a#next-arrow",auto:!1,autoSpeed:5e3,slidePadding:"",pauseOnHover:!0,fx:"fade",sliderType:""},options=$.extend(defaults,options);return this.each(function(){function changeTab(){""!=linkSwitcherTab&&(linkSwitcherTab.siblings().removeClass("active"),linkSwitcherTab.filter(":eq("+(currentPosition-1)+")").addClass("active"))}function gotoSlide(slideNumber,dir){if(!$slide.filter(":animated").length&&($activeSlide=$slide.parent().find(".et_slidecontent").filter(":eq("+(currentPosition-1)+")"),currentPosition!==slideNumber))return $activeSlide.removeClass("et_shortcode_slide_active"),$nextSlide=$slide.parent().find(".et_slidecontent").filter(":eq("+(slideNumber-1)+")").addClass("et_shortcode_slide_active"),(currentPosition>slideNumber||1===currentPosition)&&-1===dir?("slide"===options.fx&&slideBack(500),"fade"===options.fx&&slideFade(500)):("slide"===options.fx&&slideForward(500),"fade"===options.fx&&slideFade(500)),currentPosition=$nextSlide.prevAll(".et_slidecontent").length+1,""!=options.linksNav&&changeTab(),"images"!==options.sliderType&&"simple"!==options.sliderType||($et_shortcodes_mobile_controls.find("li").removeClass("et_shortcodes_active_control"),$et_shortcodes_mobile_controls.find("li").eq(currentPosition-1).addClass("et_shortcodes_active_control")),!1}function slideFade(speed){$activeSlide.css({display:"none",opacity:"0"}),$nextSlide.css({opacity:"0",display:"block"}).animate({opacity:1},700)}function slideForward(speed){var next_slide_order=$nextSlide.prevAll(".et_slidecontent").length+1,go_to_first_slide=!1;$activeSlide.next(".et_slidecontent_cloned").length&&(next_slide_order=$activeSlide.prevAll().length+1,go_to_first_slide=!0),$slides_wrapper_box.animate({left:-$slides_wrapper.width()*next_slide_order},500,function(){go_to_first_slide&&$slides_wrapper_box.css("left",-$slides_wrapper.width())})}function slideBack(speed){var next_slide_order=$nextSlide.prevAll(".et_slidecontent").length+1,go_to_last_slide=!1;$activeSlide.prev(".et_slidecontent_cloned").length&&(next_slide_order=0,go_to_last_slide=!0),$slides_wrapper_box.animate({left:-$slides_wrapper.width()*next_slide_order},500,function(){go_to_last_slide&&$slides_wrapper_box.css("left",-$slides_wrapper.width()*slidesNum)})}function et_shortcodes_go_to_next_slide(){currentPosition===slidesNum?gotoSlide(1,1):gotoSlide(currentPosition+1),""!=options.linksNav&&changeTab()}function et_shortcodes_go_to_previous_slide(){1===currentPosition?gotoSlide(slidesNum,-1):gotoSlide(currentPosition-1,-1),""!=options.linksNav&&changeTab()}var $activeSlide,$nextSlide,$et_shortcodes_mobile_nav,$et_shortcodes_mobile_controls,slidesContainer=jQuery(this).parent().css("position","relative"),$slides=jQuery(this).css({overflow:"hidden",position:"relative"}),$slides_wrapper_box=slidesContainer.find(".et-tabs-content-wrapper"),$slides_wrapper=$slides_wrapper_box.parent(),$slide=$slides.find(".et-tabs-content-wrapper"+options.slides),slidesNum=$slide.length,currentPosition=1,slides_wrapper_width=$slides_wrapper.width();if("slide"===options.fx&&($slides_wrapper_box.width(200*(slidesNum+2)+"%"),$slide.css({width:slides_wrapper_width,visibility:"visible"}),$slides_wrapper_box.append($slide.filter(":first").clone().removeClass().addClass("et_slidecontent_cloned")),$slides_wrapper_box.prepend($slide.filter(":last").clone().removeClass().addClass("et_slidecontent_cloned")),$slides_wrapper_box.css("left",-slides_wrapper_width)),$slide.filter(":first").css({display:"block"}).addClass("et_shortcode_slide_active"),""!=options.slidePadding&&$slide.css("padding",options.slidePadding),""!=options.linksNav){var linkSwitcher=jQuery(options.linksNav),linkSwitcherTab="";(linkSwitcherTab=options.findParent?linkSwitcher.parent():linkSwitcher).filter(".active").length||linkSwitcherTab.filter(":first").addClass("active"),linkSwitcher.click(function(){var targetElement,orderNum;return targetElement=options.findParent?jQuery(this).parent():jQuery(this),(orderNum=targetElement.prevAll(options.lengthElement).length+1)>currentPosition?gotoSlide(orderNum,1):gotoSlide(orderNum,-1),!1})}if(options.useArrows){var $right_arrow=jQuery(options.arrowRight),$left_arrow=jQuery(options.arrowLeft);$right_arrow.click(function(){return et_shortcodes_go_to_next_slide(),!1}),$left_arrow.click(function(){return et_shortcodes_go_to_previous_slide(),!1})}if(options.auto){interval_shortcodes=setInterval(function(){pauseSlider||(currentPosition===slidesNum?gotoSlide(1,1):gotoSlide(currentPosition+1,1),""!=options.linksNav&&changeTab())},options.autoSpeed);var pauseSlider=!1}options.pauseOnHover&&slidesContainer.hover(function(){pauseSlider=!0},function(){pauseSlider=!1}),"slide"===options.fx&&$(window).resize(function(){$slides_wrapper_box.find(">div").css({width:$slides_wrapper.width()}),$slides_wrapper_box.css("left",-$slides_wrapper.width()*currentPosition)}),function(){var et_shortcodes_slides_num=slidesContainer.find(".et_slidecontent").length,et_shortcodes_controllers_html="";if(et_shortcodes_slides_num>1&&("images"===options.sliderType||"simple"===options.sliderType)){slidesContainer.append('<div class="et_shortcodes_controller_nav"><ul class="et_shortcodes_controls"></ul><ul class="et_shortcodes_controls_arrows"><li><a href="#" class="et_sc_nav_next">'+et_shortcodes_strings.next+'<span></span></a></li><li><a href="#" class="et_sc_nav_prev">'+et_shortcodes_strings.previous+"<span></span></a></li></ul></div>"),$et_shortcodes_mobile_controls=slidesContainer.find(".et_shortcodes_controls");for(var i=0;i<et_shortcodes_slides_num;i++)et_shortcodes_controllers_html+='<li><a href="#"></a></li>';$et_shortcodes_mobile_controls.prepend(et_shortcodes_controllers_html),$et_shortcodes_mobile_controls.find("li:first").addClass("et_shortcodes_active_control"),$et_shortcodes_mobile_controls.find("a").click(function(){var this_order=$(this).parent("li").prevAll().length+1;return this_order!=currentPosition&&(this_order>currentPosition?gotoSlide(this_order,1):gotoSlide(this_order,-1),!1)}),($et_shortcodes_mobile_nav=slidesContainer.find(".et_shortcodes_controls_arrows")).find("a").click(function(){var et_active_slide_order,$this_link=jQuery(this);return $this_link.hasClass("et_sc_nav_next")&&et_shortcodes_go_to_next_slide(),$this_link.hasClass("et_sc_nav_prev")&&et_shortcodes_go_to_previous_slide(),$et_shortcodes_mobile_controls.find("li").removeClass("et_shortcodes_active_control"),et_active_slide_order=currentPosition-1,$et_shortcodes_mobile_controls.find("li").eq(et_active_slide_order).addClass("et_shortcodes_active_control"),!1})}else"images"!==options.sliderType&&"simple"!==options.sliderType&&(slidesContainer.prepend('<ul class="et_shortcodes_mobile_nav"><li><a href="#" class="et_sc_nav_next">'+et_shortcodes_strings.next+'<span></span></a></li><li><a href="#" class="et_sc_nav_prev">'+et_shortcodes_strings.previous+"<span></span></a></li></ul>"),($et_shortcodes_mobile_nav=slidesContainer.find(".et_shortcodes_mobile_nav")).find("a").click(function(){var $this_link=jQuery(this);return $this_link.hasClass("et_sc_nav_next")&&et_shortcodes_go_to_next_slide(),$this_link.hasClass("et_sc_nav_prev")&&et_shortcodes_go_to_previous_slide(),!1}))}()})},window.et_shortcodes_init=function($container){var $processed_container=void 0!==$container?$container:$("body"),$et_pricing_table_button=$processed_container.find(".pricing-table a.icon-button");$et_tooltip=$processed_container.find(".et-tooltip"),$et_tooltip.on("mouseover mouseout",function(event){"mouseover"==event.type?$(this).find(".et-tooltip-box").stop(!0,!0).animate({opacity:"show",bottom:"25px"},300):$(this).find(".et-tooltip-box").delay(200).animate({opacity:"hide",bottom:"35px"},300)}),$et_learn_more=$processed_container.find(".et-learn-more .heading-more"),$et_learn_more.on("click",function(){$(this).hasClass("open")?$(this).removeClass("open"):$(this).addClass("open"),$(this).parent(".et-learn-more").find(".learn-more-content").animate({opacity:"toggle",height:"toggle"},300)}),$processed_container.find(".et-learn-more").not(".et-open").find(".learn-more-content").css({visibility:"visible",display:"none"}),$et_pricing_table_button.each(function(){var $this_button=$(this),this_button_width=$this_button.width(),this_button_innerwidth=$this_button.innerWidth();$this_button.css({width:this_button_width,marginLeft:"-"+this_button_innerwidth/2+"px",visibility:"visible"})}),$processed_container.find(".et-tabs-container, .tabs-left, .et-simple-slider, .et-image-slider").each(function(i){var et_shortcodes_tab_class=$(this).attr("class"),et_shortcodes_tab_autospeed=/et_sliderauto_speed_(\d+)/g.exec(et_shortcodes_tab_class),et_shortcodes_tab_auto=/et_sliderauto_(\w+)/g.exec(et_shortcodes_tab_class),et_shortcodes_tab_type=/et_slidertype_(\w+)/g.exec(et_shortcodes_tab_class),et_shortcodes_tab_fx=/et_sliderfx_(\w+)/g.exec(et_shortcodes_tab_class),et_shortcodes_tab_apply_to_element=".et-tabs-content",et_shortcodes_tab_settings={};et_shortcodes_tab_settings.linksNav=$(this).find(".et-tabs-control li a"),et_shortcodes_tab_settings.findParent=!0,et_shortcodes_tab_settings.fx=et_shortcodes_tab_fx[1],et_shortcodes_tab_settings.auto="false"!==et_shortcodes_tab_auto[1],et_shortcodes_tab_settings.autoSpeed=et_shortcodes_tab_autospeed[1],"simple"===et_shortcodes_tab_type[1]?((et_shortcodes_tab_settings={}).fx=et_shortcodes_tab_fx[1],et_shortcodes_tab_settings.auto="false"!==et_shortcodes_tab_auto[1],et_shortcodes_tab_settings.autoSpeed=et_shortcodes_tab_autospeed[1],et_shortcodes_tab_settings.sliderType="simple",et_shortcodes_tab_apply_to_element=".et-simple-slides"):"images"===et_shortcodes_tab_type[1]&&(et_shortcodes_tab_settings.sliderType="images",et_shortcodes_tab_settings.linksNav="#"+$(this).attr("id")+" .controllers a.switch",et_shortcodes_tab_settings.findParent=!1,et_shortcodes_tab_settings.lengthElement="#"+$(this).attr("id")+" a.switch",et_shortcodes_tab_apply_to_element=".et-image-slides"),$(this).find(et_shortcodes_tab_apply_to_element).et_shortcodes_switcher(et_shortcodes_tab_settings)})}}(jQuery),jQuery(document).ready(function($){window.et_shortcodes_init()});
/*! ET frontend-builder-scripts.js */
!function($){var $et_window=$(window);window.et_load_event_fired=!1,window.et_is_transparent_nav=$("body").hasClass("et_transparent_nav"),window.et_is_vertical_nav=$("body").hasClass("et_vertical_nav"),window.et_is_fixed_nav=$("body").hasClass("et_fixed_nav"),window.et_is_minified_js=$("body").hasClass("et_minified_js"),window.et_is_minified_css=$("body").hasClass("et_minified_css"),window.et_force_width_container_change=!1,jQuery.fn.reverse=[].reverse,jQuery.fn.closest_descendent=function(selector){for(var $found,$current_children=this.children();$current_children.length&&!($found=$current_children.filter(selector)).length;)$current_children=$current_children.children();return $found},window.et_pb_init_modules=function(){function process_et_hashchange(hash){if(-1!==hash.indexOf(et_hash_module_seperator,0)){modules=hash.split(et_hash_module_seperator);for(var i=0;i<modules.length;i++){var module_params=modules[i].split(et_hash_module_param_seperator),element=module_params[0];module_params.shift(),$("#"+element).length&&$("#"+element).trigger({type:"et_hashchange",params:module_params})}}else{element=(module_params=hash.split(et_hash_module_param_seperator))[0];module_params.shift(),$("#"+element).length&&$("#"+element).trigger({type:"et_hashchange",params:module_params})}}function et_set_hash(module_state_hash){if(module_id=module_state_hash.split(et_hash_module_param_seperator)[0],$("#"+module_id).length){if(window.location.hash){var hash=window.location.hash.substring(1),new_hash=[];if(-1!==hash.indexOf(et_hash_module_seperator,0)){modules=hash.split(et_hash_module_seperator);for(var in_hash=!1,i=0;i<modules.length;i++)(element=modules[i].split(et_hash_module_param_seperator)[0])===module_id?(new_hash.push(module_state_hash),in_hash=!0):new_hash.push(modules[i]);in_hash||new_hash.push(module_state_hash)}else{module_params=hash.split(et_hash_module_param_seperator);var element=module_params[0];element!==module_id&&new_hash.push(hash),new_hash.push(module_state_hash)}hash=new_hash.join(et_hash_module_seperator)}else hash=module_state_hash;var yScroll=document.body.scrollTop;window.location.hash=hash,document.body.scrollTop=yScroll}}$.et_pb_simple_slider=function(el,options){function et_slider_auto_rotate(){settings.slideshow&&et_slides_number>1&&!$et_slider.hasClass("et_slider_hovered")&&(et_slider_timer=setTimeout(function(){$et_slider.et_slider_move_to("next")},settings.slideshow_speed))}function et_stop_video(active_slide){var $et_video,et_video_src;active_slide.has("iframe").length?(et_video_src=($et_video=active_slide.find("iframe")).attr("src"),$et_video.attr("src",""),$et_video.attr("src",et_video_src)):active_slide.has("video").length&&(active_slide.find(".et_pb_section_video_bg").length||($et_video=active_slide.find("video"))[0].pause())}function et_fix_slider_content_images(){var $this_slider=$et_slider,$slide_image_container=$this_slider.find(".et-pb-active-slide .et_pb_slide_image"),$slide_video_container=$this_slider.find(".et-pb-active-slide .et_pb_slide_video"),$slide=$slide_image_container.closest(".et_pb_slide"),$slider=$slide.closest(".et_pb_slider"),slide_height=parseFloat($slider.innerHeight()),image_height=parseFloat(.8*slide_height),slide_image_container_height=parseFloat($slide_image_container.height()),slide_video_container_height=parseFloat($slide_video_container.height());isNaN(image_height)||($slide_image_container.find("img").css("maxHeight",image_height+"px"),slide_image_container_height=parseInt($slide_image_container.height())),!isNaN(slide_image_container_height)&&$slide.hasClass("et_pb_media_alignment_center")&&$slide_image_container.css("marginTop","-"+slide_image_container_height/2+"px"),isNaN(slide_video_container_height)||$slide_video_container.css("marginTop","-"+slide_video_container_height/2+"px")}function et_get_bg_layout_color($slide){return $slide.hasClass("et_pb_bg_layout_light")?"et_pb_bg_layout_light":"et_pb_bg_layout_dark"}function et_maybe_set_controls_color($slide){var next_slide_dot_color,$arrows,arrows_color;void 0!==$et_slider_controls&&$et_slider_controls.length&&(""!==(next_slide_dot_color=$slide.attr("data-dots_color")||"")?($et_slider_controls.attr("style","background-color: "+hex_to_rgba(next_slide_dot_color,"0.3")+";"),$et_slider_controls.filter(".et-pb-active-control").attr("style","background-color: "+hex_to_rgba(next_slide_dot_color)+"!important;")):$et_slider_controls.removeAttr("style")),void 0!==$et_slider_arrows&&$et_slider_arrows.length&&($arrows=$et_slider_arrows.find("a"),""!==(arrows_color=$slide.attr("data-arrows_color")||"")?$arrows.attr("style","color: "+arrows_color+"!important;"):$arrows.css("color","inherit"))}function et_fix_builder_content(){is_post_slider&&setTimeout(function(){var $et_pb_circle_counter=$(".et_pb_circle_counter"),$et_pb_number_counter=$(".et_pb_number_counter");window.et_fix_testimonial_inner_width(),$et_pb_circle_counter.length&&window.et_pb_reinit_circle_counters($et_pb_circle_counter),$et_pb_number_counter.length&&window.et_pb_reinit_number_counters($et_pb_number_counter),window.et_reinit_waypoint_modules()},1e3)}function hex_to_rgba(color,alpha){var rgba,color_16=parseInt(color.replace("#",""),16);return rgba=(color_16>>16&255)+","+(color_16>>8&255)+","+(255&color_16)+","+(alpha=alpha||1),rgba="rgba("+rgba+")"}var $et_slider_arrows,$et_slider_controls,$et_slider_carousel_controls,et_slider_timer,settings=$.extend({slide:".et-slide",arrows:".et-pb-slider-arrows",prev_arrow:".et-pb-arrow-prev",next_arrow:".et-pb-arrow-next",controls:".et-pb-controllers a",carousel_controls:".et_pb_carousel_item",control_active_class:"et-pb-active-control",previous_text:et_pb_custom.previous,next_text:et_pb_custom.next,fade_speed:500,use_arrows:!0,use_controls:!0,manual_arrows:"",append_controls_to:"",controls_below:!1,controls_class:"et-pb-controllers",slideshow:!1,slideshow_speed:7e3,show_progress_bar:!1,tabs_animation:!1,use_carousel:!1},options),$et_slider=$(el),$et_slide=$et_slider.closest_descendent(settings.slide),et_slides_number=$et_slide.length,et_fade_speed=settings.fade_speed,et_active_slide=0,controls_html="",carousel_html="",is_post_slider=($et_slider.find(".et_pb_container").width(),$et_slider.hasClass("et_pb_post_slider"));if($et_slider.et_animation_running=!1,$.data(el,"et_pb_simple_slider",$et_slider),$et_slide.eq(0).addClass("et-pb-active-slide"),settings.tabs_animation||$et_slider.hasClass("et_pb_bg_layout_dark")||$et_slider.hasClass("et_pb_bg_layout_light")||$et_slider.addClass(et_get_bg_layout_color($et_slide.eq(0))),settings.use_arrows&&et_slides_number>1&&(""==settings.manual_arrows?$et_slider.append('<div class="et-pb-slider-arrows"><a class="et-pb-arrow-prev" href="#"><span>'+settings.previous_text+'</span></a><a class="et-pb-arrow-next" href="#"><span>'+settings.next_text+"</span></a></div>"):$et_slider.append(settings.manual_arrows),$et_slider_arrows=$et_slider.find(settings.arrows),$et_slider.find(settings.prev_arrow),$et_slider.find(settings.next_arrow),$et_slider.on("click.et_pb_simple_slider",settings.next_arrow,function(){return!$et_slider.et_animation_running&&($et_slider.et_slider_move_to("next"),!1)}),$et_slider.on("click.et_pb_simple_slider",settings.prev_arrow,function(){return!$et_slider.et_animation_running&&($et_slider.et_slider_move_to("previous"),!1)}),$et_slider.on("swipeleft.et_pb_simple_slider",settings.slide,function(event){$(event.target).closest(".et-fb-popover-tinymce").length||$(event.target).closest(".et-fb-editable-element").length||$et_slider.et_slider_move_to("next")}),$et_slider.on("swiperight.et_pb_simple_slider",settings.slide,function(event){$(event.target).closest(".et-fb-popover-tinymce").length||$(event.target).closest(".et-fb-editable-element").length||$et_slider.et_slider_move_to("previous")})),settings.use_controls&&et_slides_number>1){for(i=1;i<=et_slides_number;i++)controls_html+='<a href="#"'+(1==i?' class="'+settings.control_active_class+'"':"")+">"+i+"</a>";$et_slider.find("video").length>0&&(settings.controls_class+=" et-pb-controllers-has-video-tag"),controls_html='<div class="'+settings.controls_class+'">'+controls_html+"</div>",""==settings.append_controls_to?$et_slider.append(controls_html):$(settings.append_controls_to).append(controls_html),($et_slider_controls=settings.controls_below?$et_slider.parent().find(settings.controls):$et_slider.find(settings.controls)).on("click.et_pb_simple_slider",function(){return!$et_slider.et_animation_running&&($et_slider.et_slider_move_to($(this).index()),!1)})}if(et_maybe_set_controls_color($et_slide.eq(0)),settings.use_carousel&&et_slides_number>1){for(var i=1;i<=et_slides_number;i++)slide_id=i-1,image_src=void 0!==$et_slide.eq(slide_id).data("image")?"url("+$et_slide.eq(slide_id).data("image")+")":"none",carousel_html+='<div class="et_pb_carousel_item '+(1==i?settings.control_active_class:"")+'" data-slide-id="'+slide_id+'"><div class="et_pb_video_overlay" href="#" style="background-image: '+image_src+';"><div class="et_pb_video_overlay_hover"><a href="#" class="et_pb_video_play"></a></div></div></div>';carousel_html='<div class="et_pb_carousel"><div class="et_pb_carousel_items">'+carousel_html+"</div></div>",$et_slider.after(carousel_html),($et_slider_carousel_controls=$et_slider.siblings(".et_pb_carousel").find(settings.carousel_controls)).on("click.et_pb_simple_slider",function(){if($et_slider.et_animation_running)return!1;var $this=$(this);return $et_slider.et_slider_move_to($this.data("slide-id")),!1})}settings.slideshow&&et_slides_number>1&&$et_slider.on("mouseenter.et_pb_simple_slider",function(){$et_slider.hasClass("et_slider_auto_ignore_hover")||($et_slider.addClass("et_slider_hovered"),void 0!==et_slider_timer&&clearInterval(et_slider_timer))}).on("mouseleave.et_pb_simple_slider",function(){$et_slider.hasClass("et_slider_auto_ignore_hover")||($et_slider.removeClass("et_slider_hovered"),et_slider_auto_rotate())}),et_slider_auto_rotate(),$et_slider.et_slider_destroy=function(){void 0!==et_slider_timer&&clearInterval(et_slider_timer),$et_slider.off(".et_pb_simple_slider"),$et_slider.find(".et_pb_slide").css({"z-index":"",display:"",opacity:""}),$et_slider.find(".et-pb-active-slide").removeClass("et-pb-active-slide"),$et_slider.find(".et-pb-moved-slide").removeClass("et-pb-moved-slide"),$et_slider.find(".et-pb-slider-arrows, .et-pb-controllers").remove(),$et_slider.siblings(".et_pb_carousel").remove(),$et_slider.removeData("et_pb_simple_slider")},$et_slider.et_fix_slider_content_images=et_fix_slider_content_images,window.et_load_event_fired?et_fix_slider_height($et_slider):$et_window.on("load",function(){et_fix_slider_height($et_slider)}),$et_window.on("resize.et_simple_slider",function(){et_fix_slider_height($et_slider)}),$et_slider.et_slider_move_to=function(direction){var $active_slide=$et_slide.eq(et_active_slide);if($et_slider.et_animation_running=!0,$et_slider.removeClass("et_slide_transition_to_next et_slide_transition_to_previous").addClass("et_slide_transition_to_"+direction),$et_slider.find(".et-pb-moved-slide").removeClass("et-pb-moved-slide"),"next"==direction||"previous"==direction)et_active_slide="next"==direction?et_active_slide+1<et_slides_number?et_active_slide+1:0:et_active_slide-1>=0?et_active_slide-1:et_slides_number-1;else{if(et_active_slide==direction)return void($et_slider.et_animation_running=!1);et_active_slide=direction}void 0!==et_slider_timer&&clearInterval(et_slider_timer);var $next_slide=$et_slide.eq(et_active_slide);$et_slider.trigger("slide",{current:$active_slide,next:$next_slide}),void 0!==$active_slide.find("video")[0]&&void 0!==$active_slide.find("video")[0].player&&$active_slide.find("video")[0].player.pause(),void 0!==$next_slide.find("video")[0]&&void 0!==$next_slide.find("video")[0].player&&$next_slide.find("video")[0].player.play();var $active_slide_video=$active_slide.find(".et_pb_video_box iframe");if($active_slide_video.length){var active_slide_video_src=$active_slide_video.attr("src");active_slide_video_src=active_slide_video_src.replace(/\?autoplay=1$/,""),active_slide_video_src=active_slide_video_src.replace(/\?autoplay=1&(amp;)?/,"?"),active_slide_video_src=active_slide_video_src.replace(/&(amp;)?autoplay=1/,""),setTimeout(function(){$active_slide_video.attr({src:active_slide_video_src})},settings.fade_speed),$active_slide_video.parents(".et_pb_video_box").next(".et_pb_video_overlay").css({display:"block",opacity:1})}$et_slider.trigger("simple_slider_before_move_to",{direction:direction,next_slide:$next_slide}),$et_slide.each(function(){$(this).css("zIndex",1)}),$active_slide.css("zIndex",2).removeClass("et-pb-active-slide").addClass("et-pb-moved-slide").data("slide-status","inactive"),$next_slide.css({display:"block",opacity:0}).addClass("et-pb-active-slide").data("slide-status","active"),et_fix_slider_content_images(),et_fix_builder_content(),settings.use_controls&&$et_slider_controls.removeClass(settings.control_active_class).eq(et_active_slide).addClass(settings.control_active_class),settings.use_carousel&&$et_slider_carousel_controls&&$et_slider_carousel_controls.removeClass(settings.control_active_class).eq(et_active_slide).addClass(settings.control_active_class),settings.tabs_animation?($next_slide.css({display:"none",opacity:0}),$active_slide.addClass("et_slide_transition").css({display:"block",opacity:1}).animate({opacity:0},et_fade_speed,function(){$(this).css("display","none").removeClass("et_slide_transition"),$next_slide.css({display:"block",opacity:0}).animate({opacity:1},et_fade_speed,function(){$et_slider.et_animation_running=!1,$et_slider.trigger("simple_slider_after_move_to",{next_slide:$next_slide})})})):(et_maybe_set_controls_color($next_slide),$next_slide.animate({opacity:1},et_fade_speed),$active_slide.addClass("et_slide_transition").css({display:"list-item",opacity:1}).animate({opacity:0},et_fade_speed,function(){var active_slide_layout_bg_color=et_get_bg_layout_color($active_slide),next_slide_layout_bg_color=et_get_bg_layout_color($next_slide);$(this).css("display","none").removeClass("et_slide_transition"),et_stop_video($active_slide),$et_slider.removeClass(active_slide_layout_bg_color).addClass(next_slide_layout_bg_color),$et_slider.et_animation_running=!1,$et_slider.trigger("simple_slider_after_move_to",{next_slide:$next_slide})})),$next_slide.find(".et_parallax_bg").length&&window.et_pb_parallax_init($next_slide.find(".et_parallax_bg")),et_slider_auto_rotate()}},$.fn.et_pb_simple_slider=function(options){return this.each(function(){var slider=$.data(this,"et_pb_simple_slider");return slider||new $.et_pb_simple_slider(this,options)})};var et_hash_module_seperator="||",et_hash_module_param_seperator="|";$.et_pb_simple_carousel=function(el,options){function set_carousel_height($the_carousel){$the_carousel_items.width();var carousel_items_height=$the_carousel_items.height();$the_carousel.parent().hasClass("et_pb_with_border")&&(carousel_items_height=$the_carousel_items.outerHeight()),$carousel_items.css("height",carousel_items_height+"px")}function set_carousel_columns($the_carousel){var columns,$carousel_parent=$the_carousel.parents(".et_pb_column");$carousel_items.width(),$the_carousel_items.length;if($carousel_parent.hasClass("et_pb_column_4_4")||$carousel_parent.hasClass("et_pb_column_3_4")||$carousel_parent.hasClass("et_pb_column_2_3")?columns=$et_window.width()<768?3:4:$carousel_parent.hasClass("et_pb_column_1_2")||$carousel_parent.hasClass("et_pb_column_3_8")||$carousel_parent.hasClass("et_pb_column_1_3")?columns=3:$carousel_parent.hasClass("et_pb_column_1_4")&&(columns=$et_window.width()>480&&$et_window.width()<980?3:2),columns!==$carousel_items.data("portfolio-columns")&&!$the_carousel.data("columns_setting_up")){$the_carousel.data("columns_setting_up",!0),$carousel_items.removeClass("columns-"+$carousel_items.data("portfolio-columns")),$carousel_items.addClass("columns-"+columns),$carousel_items.data("portfolio-columns",columns),$carousel_items.find(".et-carousel-group").length&&($the_carousel_items.appendTo($carousel_items),$carousel_items.find(".et-carousel-group").remove());var the_carousel_items=$carousel_items.data("items"),$carousel_group=$('<div class="et-carousel-group active">').appendTo($carousel_items);for($the_carousel_items.data("position",""),the_carousel_items.length<=columns?$carousel_items.find(".et-pb-slider-arrows").hide():$carousel_items.find(".et-pb-slider-arrows").show(),position=1,x=0;x<the_carousel_items.length;x++,position++)x<columns?($(the_carousel_items[x]).show(),$(the_carousel_items[x]).appendTo($carousel_group),$(the_carousel_items[x]).data("position",position),$(the_carousel_items[x]).addClass("position_"+position)):(position=$(the_carousel_items[x]).data("position"),$(the_carousel_items[x]).removeClass("position_"+position),$(the_carousel_items[x]).data("position",""),$(the_carousel_items[x]).hide());$the_carousel.data("columns_setting_up",!1)}}var settings=$.extend({slide_duration:500},options),$et_carousel=$(el),$carousel_items=$et_carousel.find(".et_pb_carousel_items"),$the_carousel_items=$carousel_items.find(".et_pb_carousel_item");$et_carousel.et_animation_running=!1,$et_carousel.addClass("container-width-change-notify").on("containerWidthChanged",function(event){set_carousel_columns($et_carousel),set_carousel_height($et_carousel)}),$carousel_items.data("items",$the_carousel_items.toArray()),$et_carousel.data("columns_setting_up",!1),$carousel_items.prepend('<div class="et-pb-slider-arrows"><a class="et-pb-slider-arrow et-pb-arrow-prev" href="#"><span>'+et_pb_custom.previous+'</span></a><a class="et-pb-slider-arrow et-pb-arrow-next" href="#"><span>'+et_pb_custom.next+"</span></a></div>"),set_carousel_columns($et_carousel),set_carousel_height($et_carousel),$et_carousel_next=$et_carousel.find(".et-pb-arrow-next"),$et_carousel_prev=$et_carousel.find(".et-pb-arrow-prev"),$et_carousel.on("click",".et-pb-arrow-next",function(){return!$et_carousel.et_animation_running&&($et_carousel.et_carousel_move_to("next"),!1)}),$et_carousel.on("click",".et-pb-arrow-prev",function(){return!$et_carousel.et_animation_running&&($et_carousel.et_carousel_move_to("previous"),!1)}),$et_carousel.on("swipeleft",function(){$et_carousel.et_carousel_move_to("next")}),$et_carousel.on("swiperight",function(){$et_carousel.et_carousel_move_to("previous")}),$et_carousel.et_carousel_move_to=function(direction){var $active_carousel_group=$carousel_items.find(".et-carousel-group.active"),items=$carousel_items.data("items"),columns=$carousel_items.data("portfolio-columns");$et_carousel.et_animation_running=!0;left=0;$active_carousel_group.children().each(function(){$(this).css({position:"absolute",left:left}),left+=$(this).outerWidth(!0)}),$("body").addClass("et-pb-is-sliding-carousel");var carousel_group_item_size=$active_carousel_group.find(".et_pb_carousel_item").size(),carousel_group_item_progress=0;if("next"==direction){var $next_carousel_group,current_position=1,next_position=1,next_items_start=active_items_end=(active_items_start=items.indexOf($active_carousel_group.children().first()[0]))+columns,next_items_end=next_items_start+columns;for(($next_carousel_group=$('<div class="et-carousel-group next" style="display: none;left: 100%;position: absolute;top: 0;">').insertAfter($active_carousel_group)).css({width:$active_carousel_group.innerWidth()}).show(),x=0,total=0;total>=active_items_start&&total<active_items_end&&($(items[x]).addClass("changing_position current_position current_position_"+current_position),$(items[x]).data("current_position",current_position),current_position++),total>=next_items_start&&total<next_items_end&&($(items[x]).data("next_position",next_position),$(items[x]).addClass("changing_position next_position next_position_"+next_position),$(items[x]).hasClass("current_position")?($(items[x]).clone(!0).appendTo($active_carousel_group).hide().addClass("delayed_container_append_dup").attr("id",$(items[x]).attr("id")+"-dup"),$(items[x]).addClass("delayed_container_append")):$(items[x]).addClass("container_append"),next_position++),!(next_position>columns);x++,total++)x>=items.length-1&&(x=-1);sorted=$carousel_items.find(".container_append, .delayed_container_append_dup").sort(function(a,b){var el_a_position=parseInt($(a).data("next_position")),el_b_position=parseInt($(b).data("next_position"));return el_a_position<el_b_position?-1:el_a_position>el_b_position?1:0});$(sorted).show().appendTo($next_carousel_group);left=0;$next_carousel_group.children().each(function(){$(this).css({position:"absolute",left:left}),left+=$(this).outerWidth(!0)}),$active_carousel_group.animate({left:"-100%"},{duration:settings.slide_duration,progress:function(animation,progress){progress>carousel_group_item_progress/carousel_group_item_size&&(carousel_group_item_progress++,$active_carousel_group.find(".et_pb_carousel_item:nth-child("+carousel_group_item_progress+")").addClass("item-fade-out"),$next_carousel_group.find(".et_pb_carousel_item:nth-child("+carousel_group_item_progress+")").addClass("item-fade-in"))},complete:function(){$carousel_items.find(".delayed_container_append").each(function(){left=$("#"+$(this).attr("id")+"-dup").css("left"),$(this).css({position:"absolute",left:left}),$(this).appendTo($next_carousel_group)}),$active_carousel_group.removeClass("active"),$active_carousel_group.children().each(function(){position=$(this).data("position"),current_position=$(this).data("current_position"),$(this).removeClass("position_"+position+" changing_position current_position current_position_"+current_position),$(this).data("position",""),$(this).data("current_position",""),$(this).hide(),$(this).css({position:"",left:""}),$(this).appendTo($carousel_items)}),$carousel_items.find(".item-fade-out").removeClass("item-fade-out"),$next_carousel_group.find(".item-fade-in").removeClass("item-fade-in"),$("body").removeClass("et-pb-is-sliding-carousel"),$active_carousel_group.remove()}}),next_left=$active_carousel_group.width()+parseInt($the_carousel_items.first().css("marginRight").slice(0,-2)),$next_carousel_group.addClass("active").css({position:"absolute",top:0,left:next_left}),$next_carousel_group.animate({left:"0%"},{duration:settings.slide_duration,complete:function(){$next_carousel_group.removeClass("next").addClass("active").css({position:"",width:"",top:"",left:""}),$next_carousel_group.find(".changing_position").each(function(index){position=$(this).data("position"),current_position=$(this).data("current_position"),next_position=$(this).data("next_position"),$(this).removeClass("container_append delayed_container_append position_"+position+" changing_position current_position current_position_"+current_position+" next_position next_position_"+next_position),$(this).data("current_position",""),$(this).data("next_position",""),$(this).data("position",index+1)}),$next_carousel_group.children().css({position:"",left:""}),$next_carousel_group.find(".delayed_container_append_dup").remove(),$et_carousel.et_animation_running=!1}})}else if("previous"==direction){var $prev_carousel_group,current_position=columns,prev_position=columns,columns_span=columns-1,active_items_start=items.indexOf($active_carousel_group.children().last()[0]),active_items_end=active_items_start-columns_span,prev_items_start=active_items_end-1,prev_items_end=prev_items_start-columns_span;for(($prev_carousel_group=$('<div class="et-carousel-group prev" style="display: none;left: 100%;position: absolute;top: 0;">').insertBefore($active_carousel_group)).css({left:"-"+$active_carousel_group.innerWidth(),width:$active_carousel_group.innerWidth()}).show(),x=items.length-1,total=items.length-1;total<=active_items_start&&total>=active_items_end&&($(items[x]).addClass("changing_position current_position current_position_"+current_position),$(items[x]).data("current_position",current_position),current_position--),total<=prev_items_start&&total>=prev_items_end&&($(items[x]).data("prev_position",prev_position),$(items[x]).addClass("changing_position prev_position prev_position_"+prev_position),$(items[x]).hasClass("current_position")?($(items[x]).clone(!0).appendTo($active_carousel_group).addClass("delayed_container_append_dup").attr("id",$(items[x]).attr("id")+"-dup"),$(items[x]).addClass("delayed_container_append")):$(items[x]).addClass("container_append"),prev_position--),!(prev_position<=0);x--,total--)0==x&&(x=items.length);var sorted=$carousel_items.find(".container_append, .delayed_container_append_dup").sort(function(a,b){var el_a_position=parseInt($(a).data("prev_position")),el_b_position=parseInt($(b).data("prev_position"));return el_a_position<el_b_position?-1:el_a_position>el_b_position?1:0});$(sorted).show().appendTo($prev_carousel_group);var left=0;$prev_carousel_group.children().each(function(){$(this).css({position:"absolute",left:left}),left+=$(this).outerWidth(!0)}),$active_carousel_group.animate({left:"100%"},{duration:settings.slide_duration,progress:function(animation,progress){if(progress>carousel_group_item_progress/carousel_group_item_size){var group_item_nth=carousel_group_item_size-carousel_group_item_progress;$active_carousel_group.find(".et_pb_carousel_item:nth-child("+group_item_nth+")").addClass("item-fade-out"),$prev_carousel_group.find(".et_pb_carousel_item:nth-child("+group_item_nth+")").addClass("item-fade-in"),carousel_group_item_progress++}},complete:function(){$carousel_items.find(".delayed_container_append").reverse().each(function(){left=$("#"+$(this).attr("id")+"-dup").css("left"),$(this).css({position:"absolute",left:left}),$(this).prependTo($prev_carousel_group)}),$active_carousel_group.removeClass("active"),$active_carousel_group.children().each(function(){position=$(this).data("position"),current_position=$(this).data("current_position"),$(this).removeClass("position_"+position+" changing_position current_position current_position_"+current_position),$(this).data("position",""),$(this).data("current_position",""),$(this).hide(),$(this).css({position:"",left:""}),$(this).appendTo($carousel_items)}),$carousel_items.find(".item-fade-out").removeClass("item-fade-out"),$prev_carousel_group.find(".item-fade-in").removeClass("item-fade-in"),$("body").removeClass("et-pb-is-sliding-carousel"),$active_carousel_group.remove()}}),prev_left=-1*$active_carousel_group.width()-parseInt($the_carousel_items.first().css("marginRight").slice(0,-2)),$prev_carousel_group.addClass("active").css({position:"absolute",top:0,left:prev_left}),$prev_carousel_group.animate({left:"0%"},{duration:settings.slide_duration,complete:function(){$prev_carousel_group.removeClass("prev").addClass("active").css({position:"",width:"",top:"",left:""}),$prev_carousel_group.find(".delayed_container_append_dup").remove(),$prev_carousel_group.find(".changing_position").each(function(index){position=$(this).data("position"),current_position=$(this).data("current_position"),prev_position=$(this).data("prev_position"),$(this).removeClass("container_append delayed_container_append position_"+position+" changing_position current_position current_position_"+current_position+" prev_position prev_position_"+prev_position),$(this).data("current_position",""),$(this).data("prev_position",""),position=index+1,$(this).data("position",position),$(this).addClass("position_"+position)}),$prev_carousel_group.children().css({position:"",left:""}),$et_carousel.et_animation_running=!1}})}}},$.fn.et_pb_simple_carousel=function(options){return this.each(function(){var carousel=$.data(this,"et_pb_simple_carousel");return carousel||new $.et_pb_simple_carousel(this,options)})},$(document).ready(function(){function et_get_column_types($columns){var row_class="";if($columns.length)if($columns.each(function(){var column_type=$(this).attr("class").split("et_pb_column_")[1],column_type_updated=(void 0!==column_type?column_type.split(" ",1)[0]:"4_4").replace("_","-").trim();row_class+="_"+column_type_updated}),-1!==row_class.indexOf("1-4")||-1!==row_class.indexOf("1-5_1-5")||-1!==row_class.indexOf("1-6_1-6"))switch(row_class){case"_1-4_1-4_1-4_1-4":row_class="et_pb_row_4col";break;case"_1-5_1-5_1-5_1-5_1-5":row_class="et_pb_row_5col";break;case"_1-6_1-6_1-6_1-6_1-6_1-6":row_class="et_pb_row_6col";break;default:row_class="et_pb_row"+row_class}else row_class="";return row_class}function fullwidth_portfolio_carousel_slide($arrow){var $the_portfolio=$arrow.parents(".et_pb_fullwidth_portfolio"),$portfolio_items=$the_portfolio.find(".et_pb_portfolio_items"),$active_carousel_group=($portfolio_items.find(".et_pb_portfolio_item"),$portfolio_items.find(".et_pb_carousel_group.active")),items=$portfolio_items.data("items"),columns=$portfolio_items.data("portfolio-columns"),item_width=$active_carousel_group.innerWidth()/columns,original_item_width=100/columns+"%";if(void 0!==items&&!$the_portfolio.data("carouseling"))if($the_portfolio.data("carouseling",!0),$active_carousel_group.children().each(function(){$(this).css({width:item_width+1,"max-width":item_width,position:"absolute",left:item_width*($(this).data("position")-1)})}),$arrow.hasClass("et-pb-arrow-next")){var $next_carousel_group,current_position=1,next_position=1,next_items_start=active_items_end=(active_items_start=items.indexOf($active_carousel_group.children().first()[0]))+columns,next_items_end=next_items_start+columns,active_carousel_width=$active_carousel_group.innerWidth();for(($next_carousel_group=$('<div class="et_pb_carousel_group next" style="display: none;left: 100%;position: absolute;top: 0;">').insertAfter($active_carousel_group)).css({width:active_carousel_width,"max-width":active_carousel_width}).show(),x=0,total=0;total>=active_items_start&&total<active_items_end&&($(items[x]).addClass("changing_position current_position current_position_"+current_position),$(items[x]).data("current_position",current_position),current_position++),total>=next_items_start&&total<next_items_end&&($(items[x]).data("next_position",next_position),$(items[x]).addClass("changing_position next_position next_position_"+next_position),$(items[x]).hasClass("current_position")?($(items[x]).clone(!0).appendTo($active_carousel_group).hide().addClass("delayed_container_append_dup").attr("id",$(items[x]).attr("id")+"-dup"),$(items[x]).addClass("delayed_container_append")):$(items[x]).addClass("container_append"),next_position++),!(next_position>columns);x++,total++)x>=items.length-1&&(x=-1);sorted=$portfolio_items.find(".container_append, .delayed_container_append_dup").sort(function(a,b){var el_a_position=parseInt($(a).data("next_position")),el_b_position=parseInt($(b).data("next_position"));return el_a_position<el_b_position?-1:el_a_position>el_b_position?1:0}),$(sorted).show().appendTo($next_carousel_group),$next_carousel_group.children().each(function(){$(this).css({width:item_width,"max-width":item_width,position:"absolute",left:item_width*($(this).data("next_position")-1)})}),$active_carousel_group.animate({left:"-100%"},{duration:700,complete:function(){$portfolio_items.find(".delayed_container_append").each(function(){$(this).css({width:item_width,"max-width":item_width,position:"absolute",left:item_width*($(this).data("next_position")-1)}),$(this).appendTo($next_carousel_group)}),$active_carousel_group.removeClass("active"),$active_carousel_group.children().each(function(){position=$(this).data("position"),current_position=$(this).data("current_position"),$(this).removeClass("position_"+position+" changing_position current_position current_position_"+current_position),$(this).data("position",""),$(this).data("current_position",""),$(this).hide(),$(this).css({position:"",width:"","max-width":"",left:""}),$(this).appendTo($portfolio_items)}),$active_carousel_group.remove(),et_carousel_auto_rotate($the_portfolio)}}),$next_carousel_group.addClass("active").css({position:"absolute",top:0,left:"100%"}),$next_carousel_group.animate({left:"0%"},{duration:700,complete:function(){setTimeout(function(){$next_carousel_group.removeClass("next").addClass("active").css({position:"",width:"","max-width":"",top:"",left:""}),$next_carousel_group.find(".delayed_container_append_dup").remove(),$next_carousel_group.find(".changing_position").each(function(index){position=$(this).data("position"),current_position=$(this).data("current_position"),next_position=$(this).data("next_position"),$(this).removeClass("container_append delayed_container_append position_"+position+" changing_position current_position current_position_"+current_position+" next_position next_position_"+next_position),$(this).data("current_position",""),$(this).data("next_position",""),$(this).data("position",index+1)}),$next_carousel_group.children().css({position:"",width:original_item_width,"max-width":original_item_width,left:""}),$the_portfolio.data("carouseling",!1)},100)}})}else{var $prev_carousel_group,current_position=columns,prev_position=columns,columns_span=columns-1,active_items_start=items.indexOf($active_carousel_group.children().last()[0]),active_items_end=active_items_start-columns_span,prev_items_start=active_items_end-1,prev_items_end=prev_items_start-columns_span,active_carousel_width=$active_carousel_group.innerWidth();for(($prev_carousel_group=$('<div class="et_pb_carousel_group prev" style="display: none;left: 100%;position: absolute;top: 0;">').insertBefore($active_carousel_group)).css({left:"-"+active_carousel_width,width:active_carousel_width,"max-width":active_carousel_width}).show(),x=items.length-1,total=items.length-1;total<=active_items_start&&total>=active_items_end&&($(items[x]).addClass("changing_position current_position current_position_"+current_position),$(items[x]).data("current_position",current_position),current_position--),total<=prev_items_start&&total>=prev_items_end&&($(items[x]).data("prev_position",prev_position),$(items[x]).addClass("changing_position prev_position prev_position_"+prev_position),$(items[x]).hasClass("current_position")?($(items[x]).clone(!0).appendTo($active_carousel_group).addClass("delayed_container_append_dup").attr("id",$(items[x]).attr("id")+"-dup"),$(items[x]).addClass("delayed_container_append")):$(items[x]).addClass("container_append"),prev_position--),!(prev_position<=0);x--,total--)0==x&&(x=items.length);sorted=$portfolio_items.find(".container_append, .delayed_container_append_dup").sort(function(a,b){var el_a_position=parseInt($(a).data("prev_position")),el_b_position=parseInt($(b).data("prev_position"));return el_a_position<el_b_position?-1:el_a_position>el_b_position?1:0}),$(sorted).show().appendTo($prev_carousel_group),$prev_carousel_group.children().each(function(){$(this).css({width:item_width,"max-width":item_width,position:"absolute",left:item_width*($(this).data("prev_position")-1)})}),$active_carousel_group.animate({left:"100%"},{duration:700,complete:function(){$portfolio_items.find(".delayed_container_append").reverse().each(function(){$(this).css({width:item_width,"max-width":item_width,position:"absolute",left:item_width*($(this).data("prev_position")-1)}),$(this).prependTo($prev_carousel_group)}),$active_carousel_group.removeClass("active"),$active_carousel_group.children().each(function(){position=$(this).data("position"),current_position=$(this).data("current_position"),$(this).removeClass("position_"+position+" changing_position current_position current_position_"+current_position),$(this).data("position",""),$(this).data("current_position",""),$(this).hide(),$(this).css({position:"",width:"","max-width":"",left:""}),$(this).appendTo($portfolio_items)}),$active_carousel_group.remove()}}),$prev_carousel_group.addClass("active").css({position:"absolute",top:0,left:"-100%"}),$prev_carousel_group.animate({left:"0%"},{duration:700,complete:function(){setTimeout(function(){$prev_carousel_group.removeClass("prev").addClass("active").css({position:"",width:"","max-width":"",top:"",left:""}),$prev_carousel_group.find(".delayed_container_append_dup").remove(),$prev_carousel_group.find(".changing_position").each(function(index){position=$(this).data("position"),current_position=$(this).data("current_position"),prev_position=$(this).data("prev_position"),$(this).removeClass("container_append delayed_container_append position_"+position+" changing_position current_position current_position_"+current_position+" prev_position prev_position_"+prev_position),$(this).data("current_position",""),$(this).data("prev_position",""),position=index+1,$(this).data("position",position),$(this).addClass("position_"+position)}),$prev_carousel_group.children().css({position:"",width:original_item_width,"max-width":original_item_width,left:""}),$the_portfolio.data("carouseling",!1)},100)}})}}function set_fullwidth_portfolio_columns($the_portfolio,carousel_mode){var columns,$portfolio_items=$the_portfolio.find(".et_pb_portfolio_items"),portfolio_items_width=$portfolio_items.width(),$the_portfolio_items=$portfolio_items.find(".et_pb_portfolio_item");$the_portfolio_items.length;if(void 0!==$the_portfolio_items&&(columns=portfolio_items_width>=1600?5:portfolio_items_width>=1024?4:portfolio_items_width>=768?3:portfolio_items_width>=480?2:1,portfolio_item_width=portfolio_items_width/columns,portfolio_item_height=.75*portfolio_item_width,carousel_mode&&$portfolio_items.css({height:portfolio_item_height}),$the_portfolio_items.css({height:portfolio_item_height}),columns!==$portfolio_items.data("portfolio-columns")&&!$the_portfolio.data("columns_setting_up"))){$the_portfolio.data("columns_setting_up",!0);var portfolio_item_width_percentage=100/columns+"%";if($the_portfolio_items.css({width:portfolio_item_width_percentage,"max-width":portfolio_item_width_percentage}),$portfolio_items.removeClass("columns-"+$portfolio_items.data("portfolio-columns")),$portfolio_items.addClass("columns-"+columns),$portfolio_items.data("portfolio-columns",columns),!carousel_mode)return $the_portfolio.data("columns_setting_up",!1);$portfolio_items.find(".et_pb_carousel_group").length&&($the_portfolio_items.appendTo($portfolio_items),$portfolio_items.find(".et_pb_carousel_group").remove());var the_portfolio_items=$portfolio_items.data("items"),$carousel_group=$('<div class="et_pb_carousel_group active">').appendTo($portfolio_items);if(void 0!==the_portfolio_items){for($the_portfolio_items.data("position",""),the_portfolio_items.length<=columns?$portfolio_items.find(".et-pb-slider-arrows").hide():$portfolio_items.find(".et-pb-slider-arrows").show(),position=1,x=0;x<the_portfolio_items.length;x++,position++)x<columns?($(the_portfolio_items[x]).show(),$(the_portfolio_items[x]).appendTo($carousel_group),$(the_portfolio_items[x]).data("position",position),$(the_portfolio_items[x]).addClass("position_"+position)):(position=$(the_portfolio_items[x]).data("position"),$(the_portfolio_items[x]).removeClass("position_"+position),$(the_portfolio_items[x]).data("position",""),$(the_portfolio_items[x]).hide());$the_portfolio.data("columns_setting_up",!1)}}}function et_carousel_auto_rotate($carousel){"on"===$carousel.data("auto-rotate")&&$carousel.find(".et_pb_portfolio_item").length>$carousel.find(".et_pb_carousel_group .et_pb_portfolio_item").length&&!$carousel.hasClass("et_carousel_hovered")&&(et_carousel_timer=setTimeout(function(){fullwidth_portfolio_carousel_slide($carousel.find(".et-pb-arrow-next"))},$carousel.data("auto-rotate-speed")),$carousel.data("et_carousel_timer",et_carousel_timer))}function set_filterable_grid_items($the_portfolio){var active_category=$the_portfolio.find(".et_pb_portfolio_filter > a.active").data("category-slug");window.et_pb_set_responsive_grid($the_portfolio.find(".et_pb_portfolio_items"),".et_pb_portfolio_item"),$the_portfolio_visible_items="all"===active_category?$the_portfolio.find(".et_pb_portfolio_item"):$the_portfolio.find(".et_pb_portfolio_item.project_category_"+active_category);var visible_grid_items=$the_portfolio_visible_items.length,posts_number=$the_portfolio.data("posts-number");set_filterable_grid_pages($the_portfolio,0===posts_number?1:Math.ceil(visible_grid_items/posts_number));var visible_grid_items=0,_page=1;$the_portfolio.find(".et_pb_portfolio_item").data("page",""),$the_portfolio_visible_items.each(function(i){visible_grid_items++,0===parseInt(visible_grid_items%posts_number)?($(this).data("page",_page),_page++):$(this).data("page",_page)}),$the_portfolio_visible_items.filter(function(){return 1==$(this).data("page")}).show(),$the_portfolio_visible_items.filter(function(){return 1!=$(this).data("page")}).hide()}function set_filterable_grid_pages($the_portfolio,pages){if($pagination=$the_portfolio.find(".et_pb_portofolio_pagination"),$pagination.length&&($pagination.html("<ul></ul>"),!(pages<=1))){$pagination_list=$pagination.children("ul"),$pagination_list.append('<li class="prev" style="display:none;"><a href="#" data-page="prev" class="page-prev">'+et_pb_custom.prev+"</a></li>");for(var page=1;page<=pages;page++){var first_page_class=1===page?" active":"",last_page_class=page===pages?" last-page":"",hidden_page_class=page>=5?' style="display:none;"':"";$pagination_list.append("<li"+hidden_page_class+' class="page page-'+page+'"><a href="#" data-page="'+page+'" class="page-'+page+first_page_class+last_page_class+'">'+page+"</a></li>")}$pagination_list.append('<li class="next"><a href="#" data-page="next" class="page-next">'+et_pb_custom.next+"</a></li>")}}function set_filterable_portfolio_hash($the_portfolio){if($the_portfolio.attr("id")){var this_portfolio_state=[];this_portfolio_state.push($the_portfolio.attr("id")),this_portfolio_state.push($the_portfolio.find(".et_pb_portfolio_filter > a.active").data("category-slug")),$the_portfolio.find(".et_pb_portofolio_pagination a.active").length?this_portfolio_state.push($the_portfolio.find(".et_pb_portofolio_pagination a.active").data("page")):this_portfolio_state.push(1),et_set_hash(this_portfolio_state=this_portfolio_state.join(et_hash_module_param_seperator))}}function et_pb_init_maps(){$et_pb_map.each(function(){et_pb_map_init($(this))})}function et_toggle_animation_callback(initial_toggle_state,$module,$section){"closed"===initial_toggle_state?$module.removeClass("et_pb_toggle_close").addClass("et_pb_toggle_open"):$module.removeClass("et_pb_toggle_open").addClass("et_pb_toggle_close"),$section.hasClass("et_pb_section_parallax")&&!$section.children().hasClass("et_pb_parallax_css")&&$.proxy(et_parallax_set_height,$section)()}function et_fix_slider_height($slider){var $this_slider=$slider||$et_pb_slider;$this_slider&&$this_slider.length&&$this_slider.each(function(){var $slide_section=$(this).parent(".et_pb_section"),$slides=$(this).find(".et_pb_slide"),$slide_containers=$slides.find(".et_pb_container"),max_height=0,image_margin=0,need_image_margin_top=$(this).hasClass("et_pb_post_slider_image_top"),need_image_margin_bottom=$(this).hasClass("et_pb_post_slider_image_bottom");if($slide_section.is(".et_pb_section_first"))return!0;$slide_containers.css("height",0),$slides.addClass("et_pb_temp_slide"),"object"==typeof $(this).data("et_pb_simple_slider")&&$(this).data("et_pb_simple_slider").et_fix_slider_content_images(),$slides.each(function(){var height=parseFloat($(this).innerHeight()),$slide_image=$(this).find(".et_pb_slide_image"),adjustedHeight=parseFloat($(this).data("adjustedHeight")),autoTopPadding=isNaN(adjustedHeight)?0:adjustedHeight;height=autoTopPadding&&autoTopPadding<height?height-autoTopPadding:height,(need_image_margin_top||need_image_margin_bottom)&&($slide_image.length?(image_margin=need_image_margin_top?parseFloat($slide_image.css("margin-top")):parseFloat($slide_image.css("margin-bottom")),image_margin+=10):$(this).find(".et_pb_container").addClass("et_pb_no_image")),0===Math.abs(parseInt($(this).find(".et_pb_slide_description").height()))&&$(this).find(".et_pb_container").addClass("et_pb_empty_slide"),max_height<height&&(max_height=height)}),max_height+image_margin<1?$slide_containers.css("height",""):$slide_containers.css("height",max_height+image_margin),$slides.removeClass("et_pb_temp_slide"),$slides.filter(".et-pb-active-slide").find(".et_pb_slide_image").children("img").addClass("active")})}function et_fix_nav_direction(){window_width=$(window).width(),$(".nav li.et-reverse-direction-nav").removeClass("et-reverse-direction-nav"),$(".nav li li ul").each(function(){var $dropdown=$(this),dropdown_width=$dropdown.width(),dropdown_offset=$dropdown.offset(),$parents=$dropdown.parents(".nav > li");dropdown_offset.left>window_width-dropdown_width&&$parents.addClass("et-reverse-direction-nav")})}function et_waypoint($element,options,max_instances){max_instances=max_instances||$element.data("et_waypoint_max_instances")||1;var current_instances=$element.data("et_waypoint")||[];if(current_instances.length<max_instances){var new_instances=$element.waypoint(options);new_instances&&new_instances.length>0&&(current_instances.push(new_instances[0]),$element.data("et_waypoint",current_instances))}else for(var i=0;i<current_instances.length;i++)current_instances[i].context.refresh()}function et_get_offset(element,fallback){var section_index=element.parents(".et_pb_section").index(),section_length=$(".et_pb_section").length-1,row_index=element.parents(".et_pb_row").index(),row_length=element.parents(".et_pb_section").children().length-1;return section_index===section_length&&row_index===row_length?"bottom-in-view":fallback}function et_animate_element($element){var animation_style=$element.attr("data-animation-style"),animation_repeat=$element.attr("data-animation-repeat"),animation_duration=$element.attr("data-animation-duration"),animation_delay=$element.attr("data-animation-delay"),animation_intensity=$element.attr("data-animation-intensity"),animation_starting_opacity=$element.attr("data-animation-starting-opacity"),animation_speed_curve=$element.attr("data-animation-speed-curve");et_remove_animation_data($element);var starting_opacity=isNaN(parseInt(animation_starting_opacity))?0:.01*parseInt(animation_starting_opacity);-1===$.inArray(animation_speed_curve,["linear","ease","ease-in","ease-out","ease-in-out"])&&(animation_speed_curve="ease-in-out"),$element.css({"animation-duration":animation_duration,"animation-delay":animation_delay,opacity:starting_opacity,"animation-timing-function":animation_speed_curve});for(var intensity_css={},intensity_percentage=isNaN(parseInt(animation_intensity))?50:parseInt(animation_intensity),intensity_animations=["slide","zoom","flip","fold","roll"],original_animation=!1,original_direction=!1,i=0;i<intensity_animations.length;i++){var animation=intensity_animations[i];if(animation_style&&animation_style.substr(0,animation.length)===animation){original_animation=animation;""!==(original_direction=animation_style.substr(animation.length,animation_style.length))&&(original_direction=original_direction.toLowerCase());break}}if(!1!==original_animation&&!1!==original_direction&&(intensity_css=et_process_animation_intensity(original_animation,original_direction,intensity_percentage)),$.isEmptyObject(intensity_css)||$element.css(intensity_css),$element.addClass("et_animated"),$element.addClass(animation_style),$element.addClass(animation_repeat),!animation_repeat){var animation_duration_ms=parseInt(animation_duration),animation_delay_ms=parseInt(animation_delay);setTimeout(function(){et_remove_animation($element)},animation_duration_ms+animation_delay_ms)}}function et_process_animation_data(waypoints_enabled){if("undefined"!=typeof et_animation_data&&et_animation_data.length>0){$("body").css("overflow-x","hidden"),$("#page-container").css("overflow-y","hidden");for(var i=0;i<et_animation_data.length;i++){var animation_entry=et_animation_data[i];if(animation_entry.class&&animation_entry.style&&animation_entry.repeat&&animation_entry.duration&&animation_entry.delay&&animation_entry.intensity&&animation_entry.starting_opacity&&animation_entry.speed_curve){var $animated=$("."+animation_entry.class);$animated.attr({"data-animation-style":animation_entry.style,"data-animation-repeat":"once"===animation_entry.repeat?"":"infinite","data-animation-duration":animation_entry.duration,"data-animation-delay":animation_entry.delay,"data-animation-intensity":animation_entry.intensity,"data-animation-starting-opacity":animation_entry.starting_opacity,"data-animation-speed-curve":animation_entry.speed_curve}),!0===waypoints_enabled?$animated.hasClass("et_pb_circle_counter")?(et_waypoint($animated,{offset:"100%",handler:function(){var $this_counter=$(this.element).find(".et_pb_circle_counter_inner");$this_counter.data("PieChartHasLoaded")||void 0===$this_counter.data("easyPieChart")||($this_counter.data("easyPieChart").update($this_counter.data("number-value")),$this_counter.data("PieChartHasLoaded",!0),et_animate_element($(this.element)))}}),et_waypoint($animated,{offset:"bottom-in-view",handler:function(){var $this_counter=$(this.element).find(".et_pb_circle_counter_inner");$this_counter.data("PieChartHasLoaded")||void 0===$this_counter.data("easyPieChart")||($this_counter.data("easyPieChart").update($this_counter.data("number-value")),$this_counter.data("PieChartHasLoaded",!0),et_animate_element($(this.element)))}})):$animated.hasClass("et_pb_number_counter")?(et_waypoint($animated,{offset:"100%",handler:function(){$(this.element).data("easyPieChart").update($(this.element).data("number-value")),et_animate_element($(this.element))}}),et_waypoint($animated,{offset:"bottom-in-view",handler:function(){$(this.element).data("easyPieChart").update($(this.element).data("number-value")),et_animate_element($(this.element))}})):et_waypoint($animated,{offset:"100%",handler:function(){et_animate_element($(this.element))}}):et_animate_element($animated)}}}}function et_process_animation_intensity(animation,direction,intensity){var intensity_css={};switch(animation){case"slide":switch(direction){case"top":intensity_css={transform:"translate3d(0, "+(percentage=-2*intensity)+"%, 0)"};break;case"right":intensity_css={transform:"translate3d("+(percentage=2*intensity)+"%, 0, 0)"};break;case"bottom":intensity_css={transform:"translate3d(0, "+(percentage=2*intensity)+"%, 0)"};break;case"left":var percentage=-2*intensity;intensity_css={transform:"translate3d("+percentage+"%, 0, 0)"};break;default:intensity_css={transform:"scale3d("+(scale=.01*(100-intensity))+", "+scale+", "+scale+")"}}break;case"zoom":var scale=.01*(100-intensity);switch(direction){case"top":case"right":case"bottom":case"left":default:intensity_css={transform:"scale3d("+scale+", "+scale+", "+scale+")"}}break;case"flip":switch(direction){case"right":intensity_css={transform:"perspective(2000px) rotateY("+(degree=Math.ceil(.9*intensity))+"deg)"};break;case"left":intensity_css={transform:"perspective(2000px) rotateY("+(degree=-1*Math.ceil(.9*intensity))+"deg)"};break;case"top":default:intensity_css={transform:"perspective(2000px) rotateX("+(degree=Math.ceil(.9*intensity))+"deg)"};break;case"bottom":intensity_css={transform:"perspective(2000px) rotateX("+(degree=-1*Math.ceil(.9*intensity))+"deg)"}}break;case"fold":switch(direction){case"top":intensity_css={transform:"perspective(2000px) rotateX("+(degree=-1*Math.ceil(.9*intensity))+"deg)"};break;case"bottom":intensity_css={transform:"perspective(2000px) rotateX("+(degree=Math.ceil(.9*intensity))+"deg)"};break;case"left":intensity_css={transform:"perspective(2000px) rotateY("+(degree=Math.ceil(.9*intensity))+"deg)"};break;case"right":default:intensity_css={transform:"perspective(2000px) rotateY("+(degree=-1*Math.ceil(.9*intensity))+"deg)"}}break;case"roll":switch(direction){case"right":case"bottom":intensity_css={transform:"rotateZ("+(degree=-1*Math.ceil(3.6*intensity))+"deg)"};break;case"top":case"left":intensity_css={transform:"rotateZ("+(degree=Math.ceil(3.6*intensity))+"deg)"};break;default:var degree=Math.ceil(3.6*intensity);intensity_css={transform:"rotateZ("+degree+"deg)"}}}return intensity_css}function et_has_animation_data($element){var has_animation=!1;if("undefined"!=typeof et_animation_data&&et_animation_data.length>0)for(var i=0;i<et_animation_data.length;i++){var animation_entry=et_animation_data[i];if(animation_entry.class&&$element.hasClass(animation_entry.class)){has_animation=!0;break}}return has_animation}function et_get_animation_classes(){return["et_animated","infinite","et-waypoint","fade","fadeTop","fadeRight","fadeBottom","fadeLeft","slide","slideTop","slideRight","slideBottom","slideLeft","bounce","bounceTop","bounceRight","bounceBottom","bounceLeft","zoom","zoomTop","zoomRight","zoomBottom","zoomLeft","flip","flipTop","flipRight","flipBottom","flipLeft","fold","foldTop","foldRight","foldBottom","foldLeft","roll","rollTop","rollRight","rollBottom","rollLeft"]}function et_remove_animation($element){var animation_classes=et_get_animation_classes();$element.removeClass(animation_classes.join(" ")),$element.css({"animation-delay":"","animation-duration":"","animation-timing-function":"",opacity:"",transform:""})}function et_remove_animation_data($element){for(var data_attrs_to_remove=[],data_attrs=$element.get(0).attributes,i=0;i<data_attrs.length;i++)"data-animation-"===data_attrs[i].name.substring(0,15)&&data_attrs_to_remove.push(data_attrs[i].name);$.each(data_attrs_to_remove,function(index,attr_name){$element.removeAttr(attr_name)})}function et_is_click_exception($element){for(var is_exception=!1,click_exceptions=[".et_pb_toggle_title",".mejs-container *",".et_pb_contact_field input",".et_pb_contact_field textarea",".et_pb_contact_field_checkbox *",".et_pb_contact_field_radio *",".et_pb_contact_captcha",".et_pb_tabs_controls a"],i=0;i<click_exceptions.length;i++)if($element.is(click_exceptions[i])){is_exception=!0;break}return is_exception}function et_pb_maybe_log_event($goal_container,event,callback){var log_event=void 0===event?"con_goal":event;$goal_container.hasClass("et_pb_ab_goal")&&!et_pb_ab_logged_status[log_event]?et_pb_ab_update_stats(log_event,callback):void 0!==callback&&callback()}function et_pb_ab_update_stats(record_type,set_page_id,set_subject_id,set_test_id,callback){var subject_id=void 0===set_subject_id?et_pb_get_subject_id():set_subject_id,page_id=void 0===set_page_id?et_pb_custom.page_id:set_page_id,test_id=void 0===set_test_id?et_pb_custom.unique_test_id:set_test_id,stats_data=JSON.stringify({test_id:page_id,subject_id:subject_id,record_type:record_type});et_pb_set_cookie(365,"et_pb_ab_"+record_type+"_"+page_id+test_id+("click_goal"===record_type||"con_short"===record_type?"":subject_id)+"=true"),et_pb_ab_logged_status[record_type]=!0,$.ajax({type:"POST",url:et_pb_custom.ajaxurl,data:{action:"et_pb_update_stats_table",stats_data_array:stats_data,et_ab_log_nonce:et_pb_custom.et_ab_log_nonce}}).always(function(){void 0!==callback&&callback()})}function et_pb_get_subject_id(){var $subject=$(".et_pb_ab_subject");return!($subject.length<=0||$("html").is(".et_fb_preview_active--wireframe_preview"))&&$subject.attr("class").split("et_pb_ab_subject_id-")[1].split(" ")[0].split("_")[1]}function et_pb_set_cookie_expire(days){var ms=24*days*60*60*1e3,date=new Date;return date.setTime(date.getTime()+ms),"; expires="+date.toUTCString()}function et_pb_check_cookie_value(cookie_name,value){return et_pb_get_cookie_value(cookie_name)==value}function et_pb_get_cookie_value(cookie_name){return et_pb_parse_cookies()[cookie_name]}function et_pb_parse_cookies(){for(var cookies=document.cookie.split("; "),ret={},i=cookies.length-1;i>=0;i--){var el=cookies[i].split("=");ret[el[0]]=el[1]}return ret}function et_pb_set_cookie(expire,cookie_content){cookie_expire=et_pb_set_cookie_expire(expire),document.cookie=cookie_content+cookie_expire+"; path=/"}function et_pb_get_fixed_main_header_height(){if(!window.et_is_fixed_nav)return 0;var fixed_height_onload=void 0===$("#main-header").attr("data-fixed-height-onload")?0:$("#main-header").attr("data-fixed-height-onload");return window.et_is_fixed_nav?parseFloat(fixed_height_onload):0}function et_pb_window_load_scripts(){et_fix_fullscreen_section(),$("section.et_pb_fullscreen").each(function(){var $this_section=$(this);$.proxy(et_calc_fullscreen_section,$this_section)()}),$(".et_pb_fullwidth_header_scroll").on("click","a",et_pb_fullwidth_header_scroll),setTimeout(function(){$(".et_pb_preload").removeClass("et_pb_preload")},500),$.fn.hashchange&&($(window).hashchange(function(){process_et_hashchange(window.location.hash.substring(1))}),$(window).hashchange()),$et_pb_parallax.length&&!et_is_mobile_device&&$et_pb_parallax.each(function(){et_pb_parallax_init($(this))}),window.et_reinit_waypoint_modules(),$(".et_audio_content").length&&$(window).trigger("resize")}function et_pb_set_paginated_content($current_module,is_cache){void 0!==$current_module.find(".et_pb_salvattore_content").attr("data-columns")&&(is_cache||salvattore.registerGrid($current_module.find(".et_pb_salvattore_content")[0]),salvattore.recreateColumns($current_module.find(".et_pb_salvattore_content")[0]),$current_module.find(".et_pb_post").css({opacity:"1"})),$current_module.find(".et_audio_container").length>0&&"undefined"!=typeof wp&&void 0!==wp.mediaelement&&"function"==typeof wp.mediaelement.initialize&&(wp.mediaelement.initialize(),$(window).trigger("resize")),$current_module.find(".et-waypoint, .et_pb_circle_counter, .et_pb_number_counter").length>0&&$current_module.find(".et-waypoint, .et_pb_circle_counter, .et_pb_number_counter").each(function(){var $waypoint_module=$(this);$waypoint_module.hasClass("et_pb_circle_counter")&&window.et_pb_reinit_circle_counters($waypoint_module),$waypoint_module.hasClass("et_pb_number_counter")&&window.et_pb_reinit_number_counters($waypoint_module),$waypoint_module.find(".et_pb_counter_amount").length>0&&$waypoint_module.find(".et_pb_counter_amount").each(function(){window.et_bar_counters_init($(this))}),$(this).css({opacity:"1"}),window.et_reinit_waypoint_modules()}),$current_module.find(".et_pb_slider").length>0&&$current_module.find(".et_pb_slider").each(function(){et_pb_slider_init($(this))}),$current_module.on("click",".et_pb_video_overlay",function(e){e.preventDefault(),et_pb_play_overlayed_video($(this))}),$current_module.fitVids({customSelector:"iframe[src^='http://www.hulu.com'], iframe[src^='http://www.dailymotion.com'], iframe[src^='http://www.funnyordie.com'], iframe[src^='https://embed-ssl.ted.com'], iframe[src^='http://embed.revision3.com'], iframe[src^='https://flickr.com'], iframe[src^='http://blip.tv'], iframe[src^='http://www.collegehumor.com']"}),$current_module.fadeTo("slow",1),"function"==typeof window.et_shortcodes_init&&window.et_shortcodes_init($current_module),$("html, body").animate({scrollTop:$current_module.offset().top-($("#main-header").innerHeight()+$("#top-header").innerHeight()+50)})}function et_conditional_check($form){$form.find("[data-conditional-logic]").each(function(){for(var $conditional=$(this),rules=$conditional.data("conditional-logic"),relation=$conditional.data("conditional-relation"),matched_rules=[],i=0;i<rules.length;i++){var field_value,ruleset=rules[i],check_id=ruleset[0],check_type=ruleset[1],check_value=ruleset[2],$wrapper=$form.find('.et_pb_contact_field[data-id="'+check_id+'"]'),field_type=($wrapper.data("id"),$wrapper.data("type"));if($wrapper.is(":visible")){switch(field_type){case"input":case"email":field_value=$wrapper.find("input").val();break;case"text":field_value=$wrapper.find("textarea").val();break;case"radio":field_value=$wrapper.find("input:checked").val()||"";break;case"checkbox":var $checkbox=$wrapper.find(":checkbox:checked");field_value=!1,$checkbox.each(function(){if(check_value===$(this).val())return field_value=!0,!1}),check_value=!0;break;case"select":field_value=$wrapper.find("select").val()}if("is empty"!==check_type&&"is not empty"!==check_type||(check_type="is empty"===check_type?"is":"is not",check_value="","checkbox"===field_type&&!1===field_value&&(field_value="")),!("is"===check_type&&field_value!==check_value||"is not"===check_type&&field_value===check_value)){var containsRegExp=new RegExp(check_value,"i");if(("contains"!==check_type||field_value.match(containsRegExp))&&("does not contain"!==check_type||!field_value.match(containsRegExp))){var maybeNumericValue=parseInt(field_value),maybeNumbericCheckValue=parseInt(check_value);("is greater"!==check_type&&"is less"!==check_type||!isNaN(maybeNumericValue)&&!isNaN(maybeNumbericCheckValue))&&("is greater"===check_type&&maybeNumericValue<=maybeNumbericCheckValue||"is less"===check_type&&maybeNumericValue>=maybeNumbericCheckValue||matched_rules.push(!0))}}}}$conditional.hide();var $conditional_input=$conditional.find('input[type="text"]'),conditional_pattern=$conditional_input.attr("pattern");$conditional_input.attr("novalidate","novalidate"),$conditional_input.attr("data-pattern",conditional_pattern),$conditional_input.removeAttr("pattern"),"all"===relation&&rules.length===matched_rules.length&&($conditional.show(),$conditional_input.removeAttr("novalidate"),$conditional_input.attr("pattern",$conditional_input.data("pattern"))),"any"===relation&&0<matched_rules.length&&($conditional.show(),$conditional_input.removeAttr("novalidate"),$conditional_input.attr("pattern",$conditional_input.data("pattern")))})}$(window).trigger("et_pb_before_init_modules");var $et_pb_slider=$(".et_pb_slider"),$et_pb_tabs=$(".et_pb_tabs"),$et_pb_video_section=$(".et_pb_section_video_bg"),$et_pb_newsletter_button=$(".et_pb_newsletter_button"),$et_pb_filterable_portfolio=$(".et_pb_filterable_portfolio"),$et_pb_fullwidth_portfolio=$(".et_pb_fullwidth_portfolio"),$et_pb_gallery=$(".et_pb_gallery"),$et_pb_countdown_timer=$(".et_pb_countdown_timer"),$et_post_gallery=$(".et_post_gallery"),$et_lightbox_image=$(".et_pb_lightbox_image"),$et_pb_map=$(".et_pb_map_container"),$et_pb_circle_counter=$(".et_pb_circle_counter"),$et_pb_number_counter=$(".et_pb_number_counter"),$et_pb_parallax=$(".et_parallax_bg"),$et_pb_shop=$(".et_pb_shop"),$et_pb_background_layout_hoverable=($(".single.et_pb_pagebuilder_layout.et_full_width_page"),$("[data-background-layout][data-background-layout-hover]")),et_is_mobile_device=null!==navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/),et_is_ipad=navigator.userAgent.match(/iPad/),et_is_ie9=null!==navigator.userAgent.match(/MSIE 9.0/),et_all_rows=$(".et_pb_row"),$et_container=et_pb_custom.is_builder_plugin_used?et_all_rows:$(".container"),et_container_width=$et_container.width(),et_hide_nav=($("body").hasClass("et_vertical_fixed"),$("body").hasClass("rtl"),$("body").hasClass("et_hide_nav")),$top_header=($("body").hasClass("et_header_style_left"),$("#top-header")),$et_main_content_first_row=($("#main-header"),$("#page-container"),$(".et_transparent_nav"),$("body.et_pb_pagebuilder_layout .et_pb_section:first-child"),$("#main-content .container:first-child")),etRecalculateOffset=($et_main_content_first_row.find(".et_post_meta_wrapper:first").find("h1"),$et_main_content_first_row.find(".entry-content:first"),$("body.single-post"),!1),$et_sticky_image=($(".et_header_style_split"),$("#et-top-navigation"),$("#logo"),$(".et_pb_image_sticky")),$et_pb_counter_amount=$(".et_pb_counter_amount"),$et_pb_carousel=$(".et_pb_carousel"),$et_menu_selector=$(et_pb_custom.is_divi_theme_used?"ul.nav":".et_pb_fullwidth_menu ul.nav"),et_pb_ab_bounce_rate=1e3*et_pb_custom.ab_bounce_rate,et_pb_ab_logged_status={read_page:!1,read_goal:!1,view_goal:!1,click_goal:!1,con_goal:!1,con_short:!1},$hover_gutter_modules=$(".et_pb_gutter_hover");window.et_pb_slider_init=function($this_slider){var et_slider_settings={fade_speed:700,slide:$this_slider.hasClass("et_pb_gallery")?".et_pb_gallery_item":".et_pb_slide"};if($this_slider.hasClass("et_pb_slider_no_arrows")&&(et_slider_settings.use_arrows=!1),$this_slider.hasClass("et_pb_slider_no_pagination")&&(et_slider_settings.use_controls=!1),$this_slider.hasClass("et_slider_auto")){var et_slider_autospeed_class_value=/et_slider_speed_(\d+)/g;et_slider_settings.slideshow=!0;var et_slider_autospeed=et_slider_autospeed_class_value.exec($this_slider.attr("class"));et_slider_settings.slideshow_speed=null===et_slider_autospeed?10:et_slider_autospeed[1]}$this_slider.parent().hasClass("et_pb_video_slider")&&(et_slider_settings.controls_below=!0,et_slider_settings.append_controls_to=$this_slider.parent(),setTimeout(function(){$(".et_pb_preload").removeClass("et_pb_preload")},500)),$this_slider.hasClass("et_pb_slider_carousel")&&(et_slider_settings.use_carousel=!0),$this_slider.et_pb_simple_slider(et_slider_settings)};var $et_top_menu=$et_menu_selector,is_frontend_builder=$("body").hasClass("et-fb");if($(".et_pb_ab_shop_conversion").length&&void 0!==et_pb_get_cookie_value("et_pb_ab_shop_log")&&""!==et_pb_get_cookie_value("et_pb_ab_shop_log")){var shop_log_data=et_pb_get_cookie_value("et_pb_ab_shop_log").split("_");page_id=shop_log_data[0],subject_id=shop_log_data[1],test_id=shop_log_data[2],et_pb_ab_update_stats("con_goal",page_id,subject_id,test_id),et_pb_set_cookie(0,"et_pb_ab_shop_log=true")}if($(".et_pb_ab_split_track").length&&$(".et_pb_ab_split_track").each(function(){var cookies_name="et_pb_ab_shortcode_track_"+$(this).data("test_id");if(void 0!==et_pb_get_cookie_value(cookies_name)&&""!==et_pb_get_cookie_value(cookies_name)){var track_data=et_pb_get_cookie_value(cookies_name).split("_");page_id=track_data[0],subject_id=track_data[1],test_id=track_data[2],et_pb_ab_update_stats("con_short",page_id,subject_id,test_id),et_pb_set_cookie(0,cookies_name+"=true")}}),$hover_gutter_modules.length>0&&$hover_gutter_modules.each(function(){var $thisEl=$(this),originalGutter=$thisEl.data("original_gutter"),hoverGutter=$thisEl.data("hover_gutter");$thisEl.hover(function(){$thisEl.removeClass("et_pb_gutters"+originalGutter),$thisEl.addClass("et_pb_gutters"+hoverGutter)},function(){$thisEl.removeClass("et_pb_gutters"+hoverGutter),$thisEl.addClass("et_pb_gutters"+originalGutter)})}),et_pb_custom.is_ab_testing_active&&function(){var $et_pb_ab_goal=$(".et_pb_ab_goal"),et_ab_subject_id=et_pb_get_subject_id();if(!is_frontend_builder&&($.each(et_pb_ab_logged_status,function(key,value){var cookie_subject="click_goal"===key||"con_short"===key?"":et_ab_subject_id;et_pb_ab_logged_status[key]=et_pb_check_cookie_value("et_pb_ab_"+key+"_"+et_pb_custom.page_id+et_pb_custom.unique_test_id+cookie_subject,"true")}),et_pb_ab_logged_status.read_page||setTimeout(function(){et_pb_ab_update_stats("read_page")},et_pb_ab_bounce_rate),"on"!==et_pb_custom.is_shortcode_tracking||et_pb_ab_logged_status.con_short||et_pb_set_cookie(365,"et_pb_ab_shortcode_track_"+et_pb_custom.page_id+"="+et_pb_custom.page_id+"_"+et_pb_get_subject_id()+"_"+et_pb_custom.unique_test_id),$et_pb_ab_goal.length))if($et_pb_ab_goal.hasClass("et_pb_module")&&($et_pb_ab_goal.hasClass("et_pb_button")||$et_pb_ab_goal.find(".et_pb_button").length)){if(!$et_pb_ab_goal.hasClass("et_pb_contact_form_container")&&!$et_pb_ab_goal.hasClass("et_pb_newsletter")){var $goal_button=$et_pb_ab_goal.hasClass("et_pb_button")?$et_pb_ab_goal:$et_pb_ab_goal.find(".et_pb_button");if($et_pb_ab_goal.hasClass("et_pb_comments_module")){var comment_submitted=-1!==window.location.href.indexOf("#comment-"),log_conversion=et_pb_check_cookie_value("et_pb_ab_comment_log_"+et_pb_custom.page_id+et_pb_custom.unique_test_id,"true");comment_submitted&&log_conversion&&(et_pb_ab_update_stats("con_goal"),et_pb_set_cookie(0,"et_pb_ab_comment_log_"+et_pb_custom.page_id+et_pb_custom.unique_test_id+"=true"))}$goal_button.click(function(){!$et_pb_ab_goal.hasClass("et_pb_comments_module")||et_pb_ab_logged_status.con_goal?et_pb_maybe_log_event($et_pb_ab_goal,"click_goal"):et_pb_set_cookie(365,"et_pb_ab_comment_log_"+et_pb_custom.page_id+et_pb_custom.unique_test_id+"=true")})}}else $et_pb_ab_goal.click(function(){$et_pb_ab_goal.hasClass("et_pb_shop")&&!et_pb_ab_logged_status.con_goal&&et_pb_set_cookie(365,"et_pb_ab_shop_log="+et_pb_custom.page_id+"_"+et_pb_get_subject_id()+"_"+et_pb_custom.unique_test_id),et_pb_maybe_log_event($et_pb_ab_goal,"click_goal")})}(),et_all_rows.length&&et_all_rows.each(function(){var $this_row=$(this),row_class="";""!==(row_class=et_get_column_types($this_row.find(">.et_pb_column")))&&$this_row.addClass(row_class),$this_row.find(".et_pb_row_inner").length&&$this_row.find(".et_pb_row_inner").each(function(){var $this_row_inner=$(this);""!==(row_class=et_get_column_types($this_row_inner.find(".et_pb_column")))&&$this_row_inner.addClass(row_class)})}),window.et_pb_init_nav_menu($et_top_menu),$et_sticky_image.each(function(){window.et_pb_apply_sticky_image_effect($(this))}),et_is_mobile_device&&($(".et_pb_section_video_bg").each(function(){var $this_el=$(this);$this_el.closest(".et_pb_preload").removeClass("et_pb_preload"),$this_el.remove()}),$("body").addClass("et_mobile_device"),et_is_ipad||$("body").addClass("et_mobile_device_not_ipad")),et_is_ie9&&$("body").addClass("et_ie9"),($et_pb_video_section.length||is_frontend_builder)&&(window.et_pb_video_section_init=function($et_pb_video_section){$et_pb_video_section.find("video").mediaelementplayer({pauseOtherPlayers:!1,success:function(mediaElement,domObject){mediaElement.addEventListener("loadeddata",function(){et_pb_resize_section_video_bg($(domObject)),et_pb_center_video($(domObject).closest(".mejs-video"))},!1),mediaElement.addEventListener("canplay",function(){$(domObject).closest(".et_pb_preload").removeClass("et_pb_preload")},!1)}})},et_pb_video_section_init($et_pb_video_section)),$et_post_gallery.length){var magnificPopup=$.magnificPopup.instance;$("body").on("swiperight",".mfp-container",function(){magnificPopup.prev()}),$("body").on("swipeleft",".mfp-container",function(){magnificPopup.next()}),$et_post_gallery.each(function(){$(this).magnificPopup({delegate:".et_pb_gallery_image a",type:"image",removalDelay:500,gallery:{enabled:!0,navigateByImgClick:!0},mainClass:"mfp-fade",zoom:{enabled:!et_pb_custom.is_builder_plugin_used,duration:500,opener:function(element){return element.find("img")}},autoFocusLast:!1})}),$et_post_gallery.find("a").unbind("click")}($et_lightbox_image.length||is_frontend_builder)&&($et_lightbox_image.unbind("click"),$et_lightbox_image.bind("click"),window.et_pb_image_lightbox_init=function($et_lightbox_image){$et_lightbox_image.magnificPopup({type:"image",removalDelay:500,mainClass:"mfp-fade",zoom:{enabled:!et_pb_custom.is_builder_plugin_used,duration:500,opener:function(element){return element.find("img")}},autoFocusLast:!1})},et_pb_image_lightbox_init($et_lightbox_image)),($et_pb_slider.length||is_frontend_builder)&&$et_pb_slider.each(function(){$this_slider=$(this),et_pb_slider_init($this_slider)}),(($et_pb_carousel=$(".et_pb_carousel")).length||is_frontend_builder)&&$et_pb_carousel.each(function(){var et_carousel_settings={slide_duration:1e3};$(this).et_pb_simple_carousel(et_carousel_settings)}),($et_pb_fullwidth_portfolio.length||is_frontend_builder)&&(window.et_fullwidth_portfolio_init=function($the_portfolio){var $portfolio_items=$the_portfolio.find(".et_pb_portfolio_items");$portfolio_items.data("items",$portfolio_items.find(".et_pb_portfolio_item").toArray()),$the_portfolio.data("columns_setting_up",!1),$the_portfolio.hasClass("et_pb_fullwidth_portfolio_carousel")?($portfolio_items.prepend('<div class="et-pb-slider-arrows"><a class="et-pb-arrow-prev" href="#"><span>'+et_pb_custom.previous+'</span></a><a class="et-pb-arrow-next" href="#"><span>'+et_pb_custom.next+"</span></a></div>"),set_fullwidth_portfolio_columns($the_portfolio,!0),et_carousel_auto_rotate($the_portfolio),$the_portfolio.on("swiperight",function(){$(this).find(".et-pb-arrow-prev").click()}),$the_portfolio.on("swipeleft",function(){$(this).find(".et-pb-arrow-next").click()}),$the_portfolio.hover(function(){$(this).addClass("et_carousel_hovered"),void 0!==$(this).data("et_carousel_timer")&&clearInterval($(this).data("et_carousel_timer"))},function(){$(this).removeClass("et_carousel_hovered"),et_carousel_auto_rotate($(this))}),$the_portfolio.data("carouseling",!1),$the_portfolio.on("click",".et-pb-slider-arrows a",function(e){return fullwidth_portfolio_carousel_slide($(this)),e.preventDefault(),!1})):set_fullwidth_portfolio_columns($the_portfolio,!1)},$et_pb_fullwidth_portfolio.each(function(){et_fullwidth_portfolio_init($(this))})),$(".et_pb_section_video").length&&(window._wpmejsSettings.pauseOtherPlayers=!1),($et_pb_filterable_portfolio.length||is_frontend_builder)&&(window.et_pb_filterable_portfolio_init=function($selector){void 0!==$selector?set_filterable_portfolio_init($selector):$et_pb_filterable_portfolio.each(function(){set_filterable_portfolio_init($(this))})},window.set_filterable_portfolio_init=function($the_portfolio){var $the_portfolio_items=$the_portfolio.find(".et_pb_portfolio_items"),all_portfolio_items=($the_portfolio.data("rtl"),$the_portfolio_items.clone());$the_portfolio.show(),$the_portfolio.find(".et_pb_portfolio_item").addClass("active"),$the_portfolio.css("display","block"),set_filterable_grid_items($the_portfolio),$the_portfolio.on("click",".et_pb_portfolio_filter a",function(e){e.preventDefault();var category_slug=$(this).data("category-slug"),$the_portfolio=$(this).parents(".et_pb_filterable_portfolio"),$the_portfolio_items=$the_portfolio.find(".et_pb_portfolio_items");"all"==category_slug?($the_portfolio.find(".et_pb_portfolio_filter a").removeClass("active"),$the_portfolio.find(".et_pb_portfolio_filter_all a").addClass("active"),$the_portfolio_items.empty(),$the_portfolio_items.append(all_portfolio_items.find(".et_pb_portfolio_item").clone()),$the_portfolio.find(".et_pb_portfolio_item").addClass("active")):($the_portfolio.find(".et_pb_portfolio_filter_all").removeClass("active"),$the_portfolio.find(".et_pb_portfolio_filter a").removeClass("active"),$the_portfolio.find(".et_pb_portfolio_filter_all a").removeClass("active"),$(this).addClass("active"),$the_portfolio_items.empty(),$the_portfolio_items.append(all_portfolio_items.find(".et_pb_portfolio_item.project_category_"+$(this).data("category-slug")).clone()),$the_portfolio_items.find(".et_pb_portfolio_item").removeClass("active"),$the_portfolio_items.find(".et_pb_portfolio_item.project_category_"+$(this).data("category-slug")).addClass("active").removeClass("inactive")),set_filterable_grid_items($the_portfolio),setTimeout(function(){set_filterable_portfolio_hash($the_portfolio)},500),$the_portfolio.find(".et_pb_portfolio_item").removeClass("first_in_row last_in_row"),et_pb_set_responsive_grid($the_portfolio,".et_pb_portfolio_item:visible")}),$the_portfolio.on("click",".et_pb_portofolio_pagination a",function(e){e.preventDefault();var to_page=$(this).data("page"),$the_portfolio=$(this).parents(".et_pb_filterable_portfolio");$the_portfolio.find(".et_pb_portfolio_items");et_pb_smooth_scroll($the_portfolio,!1,800),$(this).hasClass("page-prev")?to_page=parseInt($(this).parents("ul").find("a.active").data("page"))-1:$(this).hasClass("page-next")&&(to_page=parseInt($(this).parents("ul").find("a.active").data("page"))+1),$(this).parents("ul").find("a").removeClass("active"),$(this).parents("ul").find("a.page-"+to_page).addClass("active");var current_index=$(this).parents("ul").find("a.page-"+to_page).parent().index(),total_pages=$(this).parents("ul").find("li.page").length;$(this).parent().nextUntil(".page-"+(current_index+3)).show(),$(this).parent().prevUntil(".page-"+(current_index-3)).show(),$(this).parents("ul").find("li.page").each(function(i){$(this).hasClass("prev")||$(this).hasClass("next")||(i<current_index-3?$(this).hide():i>current_index+1?$(this).hide():$(this).show(),total_pages-current_index<=2&&total_pages-i<=5?$(this).show():current_index<=3&&i<=4&&$(this).show())}),to_page>1?$(this).parents("ul").find("li.prev").show():$(this).parents("ul").find("li.prev").hide(),$(this).parents("ul").find("a.active").hasClass("last-page")?$(this).parents("ul").find("li.next").hide():$(this).parents("ul").find("li.next").show(),$the_portfolio.find(".et_pb_portfolio_item").hide(),$the_portfolio.find(".et_pb_portfolio_item").filter(function(index){return $(this).data("page")===to_page}).show(),window.et_pb_set_responsive_grid($the_portfolio.find(".et_pb_portfolio_items"),".et_pb_portfolio_item"),setTimeout(function(){set_filterable_portfolio_hash($the_portfolio)},500),$the_portfolio.find(".et_pb_portfolio_item").removeClass("first_in_row last_in_row"),et_pb_set_responsive_grid($the_portfolio,".et_pb_portfolio_item:visible")}),$(this).on("et_hashchange",function(event){var params=event.params;($the_portfolio=$("#"+event.target.id)).find('.et_pb_portfolio_filter a[data-category-slug="'+params[0]+'"]').hasClass("active")||$the_portfolio.find('.et_pb_portfolio_filter a[data-category-slug="'+params[0]+'"]').click(),params[1]&&setTimeout(function(){$the_portfolio.find(".et_pb_portofolio_pagination a.page-"+params[1]).hasClass("active")||$the_portfolio.find(".et_pb_portofolio_pagination a.page-"+params[1]).addClass("active").click()},300)})},window.et_load_event_fired?et_pb_filterable_portfolio_init():$(window).load(function(){et_pb_filterable_portfolio_init()})),($et_pb_gallery.length||is_frontend_builder)&&(window.set_gallery_grid_items=function($the_gallery){var $the_gallery_items_container=$the_gallery.find(".et_pb_gallery_items"),$the_gallery_items=$the_gallery_items_container.find(".et_pb_gallery_item"),total_grid_items=$the_gallery_items.length,posts_number_original=parseInt($the_gallery_items_container.attr("data-per_page")),posts_number=isNaN(posts_number_original)||0===posts_number_original?4:posts_number_original,pages=Math.ceil(total_grid_items/posts_number);set_gallery_grid_pages($the_gallery,pages);var total_grid_items=0,_page=1;$the_gallery_items_container.find(".et_pb_gallery_filler").remove();var fillers_added=0;$the_gallery_items.data("page",""),$the_gallery_items.each(function(i){total_grid_items++;var $this=$(this);if(0===parseInt(total_grid_items%posts_number)){for($this.data("page",_page),fillers_added=0;fillers_added<4&&"0px"!==$this.css("marginRight");)fillers_added++,$this.before($('<div class="et_pb_gallery_filler"></div>'));_page++}else $this.data("page",_page)});$the_gallery_items.filter(function(){return 1==$(this).data("page")}).show();$the_gallery_items.filter(function(){return 1!=$(this).data("page")}).hide()},window.set_gallery_grid_pages=function($the_gallery,pages){if($pagination=$the_gallery.find(".et_pb_gallery_pagination"),$pagination.length)if($pagination.html("<ul></ul>"),pages<=1)$pagination.hide();else{$pagination_list=$pagination.children("ul"),$pagination_list.append('<li class="prev" style="display:none;"><a href="#" data-page="prev" class="page-prev">'+et_pb_custom.prev+"</a></li>");for(var page=1;page<=pages;page++){var first_page_class=1===page?" active":"",last_page_class=page===pages?" last-page":"",hidden_page_class=page>=5?' style="display:none;"':"";$pagination_list.append("<li"+hidden_page_class+' class="page page-'+page+'"><a href="#" data-page="'+page+'" class="page-'+page+first_page_class+last_page_class+'">'+page+"</a></li>")}$pagination_list.append('<li class="next"><a href="#" data-page="next" class="page-next">'+et_pb_custom.next+"</a></li>")}},window.set_gallery_hash=function($the_gallery){if($the_gallery.attr("id")){var this_gallery_state=[];this_gallery_state.push($the_gallery.attr("id")),$the_gallery.find(".et_pb_gallery_pagination a.active").length?this_gallery_state.push($the_gallery.find(".et_pb_gallery_pagination a.active").data("page")):this_gallery_state.push(1),et_set_hash(this_gallery_state=this_gallery_state.join(et_hash_module_param_seperator))}},window.et_pb_gallery_init=function($the_gallery){$the_gallery.hasClass("et_pb_gallery_grid")&&($the_gallery.show(),set_gallery_grid_items($the_gallery),$the_gallery.on("et_hashchange",function(event){var params=event.params;$the_gallery=$("#"+event.target.id),(page_to=params[0])&&($the_gallery.find(".et_pb_gallery_pagination a.page-"+page_to).hasClass("active")||$the_gallery.find(".et_pb_gallery_pagination a.page-"+page_to).addClass("active").click())}))},$et_pb_gallery.each(function(){var $the_gallery=$(this);et_pb_gallery_init($the_gallery)}),$et_pb_gallery.data("paginating",!1),window.et_pb_gallery_pagination_nav=function($the_gallery){$the_gallery.on("click",".et_pb_gallery_pagination a",function(e){e.preventDefault();var to_page=$(this).data("page"),$the_gallery=$(this).parents(".et_pb_gallery"),$the_gallery_items_container=$the_gallery.find(".et_pb_gallery_items"),$the_gallery_items=$the_gallery_items_container.find(".et_pb_gallery_item");if(!$the_gallery.data("paginating")){$the_gallery.data("paginating",!0),$(this).hasClass("page-prev")?to_page=parseInt($(this).parents("ul").find("a.active").data("page"))-1:$(this).hasClass("page-next")&&(to_page=parseInt($(this).parents("ul").find("a.active").data("page"))+1),$(this).parents("ul").find("a").removeClass("active"),$(this).parents("ul").find("a.page-"+to_page).addClass("active");var current_index=$(this).parents("ul").find("a.page-"+to_page).parent().index(),total_pages=$(this).parents("ul").find("li.page").length;$(this).parent().nextUntil(".page-"+(current_index+3)).show(),$(this).parent().prevUntil(".page-"+(current_index-3)).show(),$(this).parents("ul").find("li.page").each(function(i){$(this).hasClass("prev")||$(this).hasClass("next")||(i<current_index-3?$(this).hide():i>current_index+1?$(this).hide():$(this).show(),total_pages-current_index<=2&&total_pages-i<=5?$(this).show():current_index<=3&&i<=4&&$(this).show())}),to_page>1?$(this).parents("ul").find("li.prev").show():$(this).parents("ul").find("li.prev").hide(),$(this).parents("ul").find("a.active").hasClass("last-page")?$(this).parents("ul").find("li.next").hide():$(this).parents("ul").find("li.next").show(),$the_gallery_items.hide();$the_gallery_items.filter(function(index){return $(this).data("page")===to_page}).show();$the_gallery.data("paginating",!1),window.et_pb_set_responsive_grid($the_gallery_items_container,".et_pb_gallery_item"),setTimeout(function(){set_gallery_hash($the_gallery)},100),$("html, body").animate({scrollTop:$the_gallery.offset().top-200},200)}})},et_pb_gallery_pagination_nav($et_pb_gallery),is_frontend_builder&&et_pb_gallery_pagination_nav($("#et-fb-app"))),$et_pb_counter_amount.length&&$et_pb_counter_amount.each(function(){window.et_bar_counters_init($(this))}),window.et_countdown_timer=function(timer){var seconds_left=parseInt(timer.attr("data-end-timestamp"))-(new Date).getTime()/1e3;days=parseInt(seconds_left/86400),days=days>0?days:0,seconds_left%=86400,hours=parseInt(seconds_left/3600),hours=hours>0?hours:0,seconds_left%=3600,minutes=parseInt(seconds_left/60),minutes=minutes>0?minutes:0,seconds=parseInt(seconds_left%60),seconds=seconds>0?seconds:0;var $days_section=timer.find(".days > .value").parent(".section"),$hours_section=timer.find(".hours > .value").parent(".section"),$minutes_section=timer.find(".minutes > .value").parent(".section"),$seconds_section=timer.find(".seconds > .value").parent(".section");0==days?$days_section.hasClass("zero")||timer.find(".days > .value").html("000").parent(".section").addClass("zero").next().addClass("zero"):(days_slice=days.toString().length>=3?days.toString().length:3,timer.find(".days > .value").html(("000"+days).slice(-days_slice)),$days_section.hasClass("zero")&&$days_section.removeClass("zero").next().removeClass("zero")),0==days&&0==hours?$hours_section.hasClass("zero")||timer.find(".hours > .value").html("00").parent(".section").addClass("zero").next().addClass("zero"):(timer.find(".hours > .value").html(("0"+hours).slice(-2)),$hours_section.hasClass("zero")&&$hours_section.removeClass("zero").next().removeClass("zero")),0==days&&0==hours&&0==minutes?$minutes_section.hasClass("zero")||timer.find(".minutes > .value").html("00").parent(".section").addClass("zero").next().addClass("zero"):(timer.find(".minutes > .value").html(("0"+minutes).slice(-2)),$minutes_section.hasClass("zero")&&$minutes_section.removeClass("zero").next().removeClass("zero")),0==days&&0==hours&&0==minutes&&0==seconds?$seconds_section.hasClass("zero")||timer.find(".seconds > .value").html("00").parent(".section").addClass("zero"):(timer.find(".seconds > .value").html(("0"+seconds).slice(-2)),$seconds_section.hasClass("zero")&&$seconds_section.removeClass("zero").next().removeClass("zero"))},window.et_countdown_timer_labels=function(timer){timer.closest(".et_pb_column_3_8").length||timer.closest(".et_pb_column_1_4").length||timer.children(".et_pb_countdown_timer_container").width()<=400?(timer.find(".days .label").html(timer.find(".days").data("short")),timer.find(".hours .label").html(timer.find(".hours").data("short")),timer.find(".minutes .label").html(timer.find(".minutes").data("short")),timer.find(".seconds .label").html(timer.find(".seconds").data("short"))):(timer.find(".days .label").html(timer.find(".days").data("full")),timer.find(".hours .label").html(timer.find(".hours").data("full")),timer.find(".minutes .label").html(timer.find(".minutes").data("full")),timer.find(".seconds .label").html(timer.find(".seconds").data("full")))},($et_pb_countdown_timer.length||is_frontend_builder)&&(window.et_pb_countdown_timer_init=function($et_pb_countdown_timer){$et_pb_countdown_timer.each(function(){var timer=$(this);et_countdown_timer_labels(timer),et_countdown_timer(timer),setInterval(function(){et_countdown_timer(timer)},1e3)})},et_pb_countdown_timer_init($et_pb_countdown_timer)),($et_pb_tabs.length||is_frontend_builder)&&(window.et_pb_tabs_init=function($et_pb_tabs){var $et_pb_tabs_li=$et_pb_tabs.find(".et_pb_tabs_controls li");$et_pb_tabs.et_pb_simple_slider({use_controls:!1,use_arrows:!1,slide:".et_pb_all_tabs > div",tabs_animation:!0}).on("et_hashchange",function(event){var params=event.params,$the_tabs=$("#"+event.target.id),active_tab=params[0];$the_tabs.find(".et_pb_tabs_controls li").eq(active_tab).hasClass("et_pb_tab_active")||$the_tabs.find(".et_pb_tabs_controls li").eq(active_tab).click()}),$et_pb_tabs_li.click(function(){var $this_el=$(this),$tabs_container=$this_el.closest(".et_pb_tabs").data("et_pb_simple_slider");if($tabs_container.et_animation_running)return!1;if($this_el.addClass("et_pb_tab_active").siblings().removeClass("et_pb_tab_active"),$tabs_container.data("et_pb_simple_slider").et_slider_move_to($this_el.index()),$this_el.closest(".et_pb_tabs").attr("id")){var tab_state=[];tab_state.push($this_el.closest(".et_pb_tabs").attr("id")),tab_state.push($this_el.index()),et_set_hash(tab_state=tab_state.join(et_hash_module_param_seperator))}return!1}),window.et_pb_set_tabs_height()},window.et_pb_tabs_init($et_pb_tabs)),($et_pb_map.length||is_frontend_builder)&&(window.et_pb_map_init=function($this_map_container){if("undefined"!=typeof google&&void 0!==google.maps){var infowindow_active,$this_map=$this_map_container.children(".et_pb_map"),this_map_grayscale=$this_map_container.attr("data-grayscale")||0,is_draggable=et_is_mobile_device&&"off"!==$this_map.data("mobile-dragging")||!et_is_mobile_device;0!==this_map_grayscale&&(this_map_grayscale="-"+this_map_grayscale.toString()),$this_map_container.data("map",new google.maps.Map($this_map[0],{zoom:parseInt($this_map.attr("data-zoom")),center:new google.maps.LatLng(parseFloat($this_map.attr("data-center-lat")),parseFloat($this_map.attr("data-center-lng"))),mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:"on"==$this_map.attr("data-mouse-wheel"),draggable:is_draggable,panControlOptions:{position:$this_map_container.is(".et_beneath_transparent_nav")?google.maps.ControlPosition.LEFT_BOTTOM:google.maps.ControlPosition.LEFT_TOP},zoomControlOptions:{position:$this_map_container.is(".et_beneath_transparent_nav")?google.maps.ControlPosition.LEFT_BOTTOM:google.maps.ControlPosition.LEFT_TOP},styles:[{stylers:[{saturation:parseInt(this_map_grayscale)}]}]})),$this_map_container.find(".et_pb_map_pin").each(function(){var $this_marker=$(this),marker=new google.maps.Marker({position:new google.maps.LatLng(parseFloat($this_marker.attr("data-lat")),parseFloat($this_marker.attr("data-lng"))),map:$this_map_container.data("map"),title:$this_marker.attr("data-title"),icon:{url:et_pb_custom.builder_images_uri+"/marker.png",size:new google.maps.Size(46,43),anchor:new google.maps.Point(16,43)},shape:{coord:[1,1,46,43],type:"rect"},anchorPoint:new google.maps.Point(0,-45)});if($this_marker.find(".infowindow").length){var infowindow=new google.maps.InfoWindow({content:$this_marker.html()});google.maps.event.addListener($this_map_container.data("map"),"click",function(){infowindow.close()}),google.maps.event.addListener(marker,"click",function(){infowindow_active&&infowindow_active.close(),infowindow_active=infowindow,infowindow.open($this_map_container.data("map"),marker)})}})}},window.et_load_event_fired?et_pb_init_maps():"undefined"!=typeof google&&void 0!==google.maps&&google.maps.event.addDomListener(window,"load",function(){et_pb_init_maps()})),$et_pb_shop.length&&$et_pb_shop.each(function(){var $this_el=$(this),icon=$this_el.data("icon")||"";if(""===icon)return!0;$this_el.find(".et_overlay").attr("data-icon",icon).addClass("et_pb_inline_icon")}),$et_pb_background_layout_hoverable.each(function(){var $this_el=$(this),background_layout=$this_el.data("background-layout"),background_layout_hover=$this_el.data("background-layout-hover");$this_el.hasClass("et_pb_button_module_wrapper")&&($this_el=$this_el.find("> .et_pb_button")),$this_el.on("mouseenter",function(){$this_el.removeClass("et_pb_bg_layout_light et_pb_bg_layout_dark et_pb_text_color_dark"),$this_el.addClass("et_pb_bg_layout_"+background_layout_hover),$this_el.hasClass("et_pb_audio_module")&&"light"===background_layout_hover&&$this_el.addClass("et_pb_text_color_dark")}),$this_el.on("mouseleave",function(){$this_el.removeClass("et_pb_bg_layout_light et_pb_bg_layout_dark et_pb_text_color_dark"),$this_el.addClass("et_pb_bg_layout_"+background_layout),$this_el.hasClass("et_pb_audio_module")&&"light"===background_layout&&$this_el.addClass("et_pb_text_color_dark")})}),($et_pb_circle_counter.length||is_frontend_builder||$(".et_pb_ajax_pagination_container").length>0)&&(window.et_pb_circle_counter_init=function($the_counter,animate){$the_counter.width()<=0||$the_counter.easyPieChart({animate:{duration:1800,enabled:!0},size:0!==$the_counter.width()?$the_counter.width():10,barColor:$the_counter.data("bar-bg-color"),trackColor:$the_counter.data("color")||"#000000",trackAlpha:$the_counter.data("alpha")||"0.1",scaleColor:!1,lineWidth:5,onStart:function(){$(this.el).find(".percent p").css({visibility:"visible"})},onStep:function(from,to,percent){$(this.el).find(".percent-value").text(Math.round(parseInt(percent)))},onStop:function(from,to){$(this.el).find(".percent-value").text($(this.el).data("number-value"))}})},window.et_pb_reinit_circle_counters=function($et_pb_circle_counter){$et_pb_circle_counter.each(function(){var $the_counter=$(this).find(".et_pb_circle_counter_inner");window.et_pb_circle_counter_init($the_counter,!1),$the_counter.on("containerWidthChanged",function(event){($the_counter=$(event.target)).find("canvas").remove(),$the_counter.removeData("easyPieChart"),window.et_pb_circle_counter_init($the_counter,!0)})})},window.et_pb_reinit_circle_counters($et_pb_circle_counter)),($et_pb_number_counter.length||is_frontend_builder||$(".et_pb_ajax_pagination_container").length>0)&&(window.et_pb_reinit_number_counters=function($et_pb_number_counter){function et_format_number(number_value,separator){return number_value.toString().replace(/\B(?=(\d{3})+(?!\d))/g,separator)}var is_firefox=$("body").hasClass("gecko");$.fn.fitText&&$et_pb_number_counter.find(".percent p").fitText(.3),$et_pb_number_counter.each(function(){var $this_counter=$(this),separator=$this_counter.data("number-separator");$this_counter.easyPieChart({animate:{duration:1800,enabled:!0},size:is_firefox?1:0,trackColor:!1,scaleColor:!1,lineWidth:0,onStart:function(){$(this.el).addClass("active")},onStep:function(from,to,percent){percent!=to&&$(this.el).find(".percent-value").text(et_format_number(Math.round(parseInt(percent)),separator))},onStop:function(from,to){$(this.el).find(".percent-value").text(et_format_number($(this.el).data("number-value"),separator))}})})},window.et_pb_reinit_number_counters($et_pb_number_counter)),window.et_apply_parallax=function(){if($(this).length&&void 0!==$(this)&&void 0!==$(this).offset()){var main_position,$this=$(this),element_top=$this.offset().top;main_position="translate(0, "+.3*($et_window.scrollTop()+$et_window.height()-element_top)+"px)",$this.children(".et_parallax_bg").css({"-webkit-transform":main_position,"-moz-transform":main_position,"-ms-transform":main_position,transform:main_position})}},window.et_parallax_set_height=function(){var bg_height,$this=$(this);bg_height=.3*$et_window.height()+$this.innerHeight(),$this.find(".et_parallax_bg").css({height:bg_height})},$("body").on("click",".et_pb_toggle_title, .et_fb_toggle_overlay",function(){var $accordion_active_toggle,module_offset,$module=$(this).closest(".et_pb_toggle"),$section=$module.parents(".et_pb_section"),$content=$module.find(".et_pb_toggle_content"),$accordion=$module.closest(".et_pb_accordion"),is_accordion=$accordion.length,is_accordion_toggling=$accordion.hasClass("et_pb_accordion_toggling"),window_offset_top=$(window).scrollTop(),fixed_header_height=0,initial_toggle_state=$module.hasClass("et_pb_toggle_close")?"closed":"opened";if(is_accordion){if($module.hasClass("et_pb_toggle_open")||is_accordion_toggling)return!1;$accordion.addClass("et_pb_accordion_toggling"),$accordion_active_toggle=$module.siblings(".et_pb_toggle_open")}$content.is(":animated")||($content.slideToggle(700,function(){et_toggle_animation_callback(initial_toggle_state,$module,$section)}),is_accordion&&$accordion_active_toggle.find(".et_pb_toggle_content").slideToggle(700,function(){$accordion_active_toggle.removeClass("et_pb_toggle_open").addClass("et_pb_toggle_close"),$accordion.removeClass("et_pb_accordion_toggling"),module_offset=$module.offset(),$("#wpadminbar").length&&(fixed_header_height+=$("#wpadminbar").height()),$("#top-header").length&&(fixed_header_height+=$("#top-header").height()),$("#main-header").length&&!window.et_is_vertical_nav&&(fixed_header_height+=$("#main-header").height()),window_offset_top+fixed_header_height>module_offset.top&&$("html, body").animate({scrollTop:module_offset.top-fixed_header_height-50})}))});var et_email_reg_html5=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,$et_contact_container=$(".et_pb_contact_form_container");$et_contact_container.length&&$et_contact_container.each(function(){var $this_contact_container=$(this),$et_contact_form=$this_contact_container.find("form"),redirect_url=($this_contact_container.find("input.et_pb_contact_submit"),$et_contact_form.find("input[type=text], .et_pb_checkbox_handle, input[type=radio]:checked, textarea, .et_pb_contact_select"),void 0!==$this_contact_container.data("redirect_url")?$this_contact_container.data("redirect_url"):"");$et_contact_form.find("input[type=checkbox]").on("change",function(){var $checkbox=$(this),$checkbox_field=$checkbox.siblings("input[type=text]:first"),is_checked=$checkbox.prop("checked");$checkbox_field.val(is_checked?$checkbox_field.data("checked"):$checkbox_field.data("unchecked"))}),$et_contact_form.on("submit",function(event){var $this_contact_form=$(this),$this_inputs=$this_contact_form.find('input[type=text], .et_pb_checkbox_handle, .et_pb_contact_field[data-type="radio"], textarea, select'),this_et_contact_error=!1,$et_contact_message=$this_contact_form.closest(".et_pb_contact_form_container").find(".et-pb-contact-message"),et_message="",et_fields_message="",$this_contact_container=$this_contact_form.closest(".et_pb_contact_form_container"),$captcha_field=$this_contact_form.find(".et_pb_contact_captcha"),form_unique_id=void 0!==$this_contact_container.data("form_unique_num")?$this_contact_container.data("form_unique_num"):0,inputs_list=[];et_message="<ul>",$this_inputs.removeClass("et_contact_error");var hidden_fields=[];if($this_inputs.each(function(){var $this_el=$(this),$this_wrapper=!1;"checkbox"===$this_el.data("field_type")&&($this_wrapper=$this_el.parents(".et_pb_contact_field")).removeClass("et_contact_error"),"radio"===$this_el.data("type")&&($this_wrapper=($this_el=$this_el.find('input[type="radio"]')).parents(".et_pb_contact_field"));var default_value,this_id=$this_el.attr("id"),this_val=$this_el.val(),this_label=$this_el.siblings("label:first").text(),field_type=void 0!==$this_el.data("field_type")?$this_el.data("field_type"):"text",required_mark=void 0!==$this_el.data("required_mark")?$this_el.data("required_mark"):"not_required",original_id=void 0!==$this_el.data("original_id")?$this_el.data("original_id"):"",unchecked=!1;if("radio"===field_type){if(0!==$this_wrapper.find('input[type="radio"]').length){field_type="radio";var $firstRadio=$this_wrapper.find('input[type="radio"]:first');required_mark=void 0!==$firstRadio.data("required_mark")?$firstRadio.data("required_mark"):"not_required",this_val="",$this_wrapper.find('input[type="radio"]:checked')&&(this_val=$this_wrapper.find('input[type="radio"]:checked').val())}this_label=$this_wrapper.find(".et_pb_contact_form_label").text(),this_id=$this_wrapper.find('input[type="radio"]:first').attr("name"),original_id=$this_wrapper.attr("data-id"),0===$this_wrapper.find('input[type="radio"]:checked').length&&(unchecked=!0)}if("checkbox"===field_type){if(this_val="",0!==$this_wrapper.find('input[type="checkbox"]').length){field_type="checkbox";var $checkboxHandle=$this_wrapper.find(".et_pb_checkbox_handle");required_mark=void 0!==$checkboxHandle.data("required_mark")?$checkboxHandle.data("required_mark"):"not_required",$this_wrapper.find('input[type="checked"]:checked')&&(this_val=[],$this_wrapper.find('input[type="checkbox"]:checked').each(function(){this_val.push($(this).val())}),this_val=this_val.join(", "))}$this_wrapper.find(".et_pb_checkbox_handle").val(this_val),this_label=$this_wrapper.find(".et_pb_contact_form_label").text(),this_id=$this_wrapper.find(".et_pb_checkbox_handle").attr("name"),original_id=$this_wrapper.attr("data-id"),0===$this_wrapper.find('input[type="checkbox"]:checked').length&&(unchecked=!0)}if(this_label=this_label.replace(/"/g,"&quot;"),$this_el.is(":visible")||"hidden"===$this_el.attr("type")||"radio"===$this_el.attr("type"))if("hidden"!==$this_el.attr("type")&&"radio"!==$this_el.attr("type")||$this_el.parents(".et_pb_contact_field").is(":visible")){if(void 0!==this_id&&inputs_list.push({field_id:this_id,original_id:original_id,required_mark:required_mark,field_type:field_type,field_label:this_label}),"required"!==required_mark||""!==this_val&&!0!==unchecked||(!1===$this_wrapper?$this_el.addClass("et_contact_error"):$this_wrapper.addClass("et_contact_error"),this_et_contact_error=!0,""===(default_value=this_label)&&(default_value=et_pb_custom.captcha),et_fields_message+="<li>"+default_value+"</li>"),"email"===field_type){var processed_email=this_val.trim().toLowerCase(),is_valid_email=et_email_reg_html5.test(processed_email);""===processed_email||this_label===processed_email||is_valid_email||($this_el.addClass("et_contact_error"),this_et_contact_error=!0,is_valid_email||(et_message+="<li>"+et_pb_custom.invalid+"</li>"))}}else hidden_fields.push(original_id);else hidden_fields.push(original_id)}),$captcha_field.length&&""!==$captcha_field.val()){var first_digit=parseInt($captcha_field.data("first_digit")),second_digit=parseInt($captcha_field.data("second_digit"));parseInt($captcha_field.val())!==first_digit+second_digit&&(et_message+="<li>"+et_pb_custom.wrong_captcha+"</li>",this_et_contact_error=!0,first_digit=Math.floor(15*Math.random()+1),second_digit=Math.floor(15*Math.random()+1),$captcha_field.data("first_digit",first_digit),$captcha_field.data("second_digit",second_digit),$this_contact_form.find(".et_pb_contact_captcha_question").empty().append(first_digit+" + "+second_digit))}if(!this_et_contact_error){var $href=$(this).attr("action"),form_data=$(this).serializeArray();form_data.push({name:"et_pb_contact_email_fields_"+form_unique_id,value:JSON.stringify(inputs_list)}),hidden_fields.length>0&&form_data.push({name:"et_pb_contact_email_hidden_fields_"+form_unique_id,value:JSON.stringify(hidden_fields)}),$this_contact_container.removeClass("et_animated").removeAttr("style").fadeTo("fast",.2,function(){$this_contact_container.load($href+" #"+$this_contact_form.closest(".et_pb_contact_form_container").attr("id")+"> *",form_data,function(responseText){$(responseText).find(".et_pb_contact_error_text").length||(et_pb_maybe_log_event($this_contact_container,"con_goal"),""!==redirect_url&&(window.location.href=redirect_url)),$this_contact_container.fadeTo("fast",1)})})}et_message+="</ul>",""!==et_fields_message&&("<ul></ul>"!=et_message&&(et_message='<p class="et_normal_padding">'+et_pb_custom.contact_error_message+"</p>"+et_message),et_fields_message="<ul>"+et_fields_message+"</ul>",et_fields_message="<p>"+et_pb_custom.fill_message+"</p>"+et_fields_message,et_message=et_fields_message+et_message),"<ul></ul>"!=et_message&&($et_contact_message.html(et_message),$this_contact_container.parents(".et_pb_section_parallax").length&&$this_contact_container.parents(".et_pb_section_parallax").each(function(){!$(this).children(".et_parallax_bg").hasClass("et_pb_parallax_css")&&$et_window.trigger("resize")})),event.preventDefault()})}),window.et_pb_play_overlayed_video=function($play_video){var video_iframe_src,video_iframe_src_splitted,video_iframe_src_autoplay,$this=$play_video,$video_image=$this.closest(".et_pb_video_overlay"),$wrapper=$this.closest(".et_pb_video, .et_main_video_container, .et_pb_video_wrap"),$video_iframe=$wrapper.find("iframe"),is_embedded=$video_iframe.length>0,is_fb_video=$wrapper.find(".fb-video").length;if(is_embedded){if(is_fb_video&&void 0!==$video_iframe[2]&&($video_iframe=$($video_iframe[2])),video_iframe_src=$video_iframe.attr("src"),video_iframe_src_splitted=video_iframe_src.split("?"),-1!==video_iframe_src.indexOf("autoplay="))return;video_iframe_src_autoplay=void 0!==video_iframe_src_splitted[1]?video_iframe_src_splitted[0]+"?autoplay=1&amp;"+video_iframe_src_splitted[1]:video_iframe_src_splitted[0]+"?autoplay=1",$video_iframe.attr({src:video_iframe_src_autoplay})}else $wrapper.find("video").get(0).play();$video_image.fadeTo(500,0,function(){$(this).css("display","none")})},$(".et_pb_post .et_pb_video_overlay, .et_pb_video .et_pb_video_overlay, .et_pb_video_wrap .et_pb_video_overlay").click(function(){var $this=$(this);return et_pb_play_overlayed_video($this),!1}),window.et_pb_resize_section_video_bg=function($video){$element=void 0!==$video?$video.closest(".et_pb_section_video_bg"):$(".et_pb_section_video_bg"),$element.each(function(){var $this_el=$(this);is_frontend_builder&&($this_el.removeAttr("data-ratio"),$this_el.find("video").removeAttr("style"));var width,height,el_ratio=parseFloat($this_el.attr("data-ratio")),el_width=parseInt($this_el.find("video").attr("width")||$this_el.find("video").width()),el_height=parseInt($this_el.find("video").attr("height")||$this_el.find("video").height()),ratio=isNaN(el_ratio)?el_width/el_height:el_ratio,$video_elements=$this_el.find(".mejs-video, video, object").css("margin",0),$container=$this_el.closest(".et_pb_section_video").length?$this_el.closest(".et_pb_section_video"):$this_el.closest(".et_pb_slides"),body_width=$container.innerWidth(),container_height=$container.innerHeight();void 0!==$this_el.attr("data-ratio")||isNaN(ratio)||$this_el.attr("data-ratio",ratio),body_width/container_height<ratio?(width=container_height*ratio,height=container_height):(width=body_width,height=body_width/ratio),$video_elements.width(width).height(height),is_frontend_builder&&setTimeout(function(){$video_elements.width(width).height(height)},0)})},window.et_pb_center_video=function($video){$element=void 0!==$video?$video:$(".et_pb_section_video_bg .mejs-video"),$element.length&&$element.each(function(){var $this_el=$(this);if(et_pb_adjust_video_margin($this_el),is_frontend_builder&&setTimeout(function(){et_pb_adjust_video_margin($this_el)},0),void 0!==$video&&$video.closest(".et_pb_slider").length&&!$video.closest(".et_pb_first_video").length)return!1})},window.et_pb_adjust_video_margin=function($el){var $video_width_negative=0-$el.width()/2;$el.css("margin-left",$video_width_negative)};var debounced_et_fix_slider_height={};window.et_fix_slider_height=is_frontend_builder?function($slider){var $this_slider=$slider||$et_pb_slider;if($this_slider&&$this_slider.length){var address=$this_slider.data("address");debounced_et_fix_slider_height[address]||(debounced_et_fix_slider_height[address]=window.et_pb_debounce(et_fix_slider_height,100)),debounced_et_fix_slider_height[address]($slider)}}:et_fix_slider_height,et_fix_nav_direction(),et_pb_form_placeholders_init($(".et_pb_comments_module #commentform")),$(".et_pb_fullwidth_menu ul.nav").each(function(i){i++,et_duplicate_menu($(this),$(this).parents(".et_pb_row").find("div .mobile_nav"),"mobile_menu"+i,"et_mobile_menu")}),$(".et_pb_fullwidth_menu").each(function(){var this_menu=$(this),bg_color=this_menu.data("bg_color");bg_color&&this_menu.find("ul").css({"background-color":bg_color})}),$et_pb_newsletter_button.click(function(event){et_pb_submit_newsletter($(this),event)}),$et_pb_newsletter_button.closest(".et_pb_newsletter").find("input[type=checkbox]").on("change",function(){var $checkbox=$(this),$checkbox_field=$checkbox.siblings("input[type=text]:first"),is_checked=$checkbox.prop("checked");$checkbox_field.val(is_checked?$checkbox_field.data("checked"):$checkbox_field.data("unchecked"))}),window.et_pb_submit_newsletter=function($submit,event){function get_redirect_query(){var query={};return redirect_query?($name.length>0&&redirect_query.indexOf("name")>-1&&(query.first_name=$name.val()),$lastname.length>0&&redirect_query.indexOf("last_name")>-1&&(query.last_name=$lastname.val()),redirect_query.indexOf("email")>-1&&(query.email=$email.val()),redirect_query.indexOf("ip_address")>-1&&(query.ip_address=$newsletter_container.data("ip_address")),redirect_query.indexOf("css_id")>-1&&(query.form_id=$newsletter_container.attr("id")),decodeURIComponent($.param(query))):""}if($submit.closest(".et_pb_login_form").length)et_pb_maybe_log_event($submit.closest(".et_pb_newsletter"),"con_goal");else{if(void 0!==event&&event.preventDefault(),$(".et_pb_feedburner_form").length>0)return $feed_name=$(".et_pb_feedburner_form input[name=uri]").val(),window.open("https://feedburner.google.com/fb/a/mailverify?uri="+$feed_name,"et-feedburner-subscribe","scrollbars=yes,width=550,height=520"),!0;var $newsletter_container=$submit.closest(".et_pb_newsletter"),$name=$newsletter_container.find('input[name="et_pb_signup_firstname"]'),$lastname=$newsletter_container.find('input[name="et_pb_signup_lastname"]'),$email=$newsletter_container.find('input[name="et_pb_signup_email"]'),list_id=$newsletter_container.find('input[name="et_pb_signup_list_id"]').val(),$error_message=$newsletter_container.find(".et_pb_newsletter_error").hide(),provider=$newsletter_container.find('input[name="et_pb_signup_provider"]').val(),account=$newsletter_container.find('input[name="et_pb_signup_account_name"]').val(),ip_address=$newsletter_container.find('input[name="et_pb_signup_ip_address"]').val(),$fields_container=$newsletter_container.find(".et_pb_newsletter_fields"),$success_message=$newsletter_container.find(".et_pb_newsletter_success"),redirect_url=$newsletter_container.data("redirect_url"),redirect_query=$newsletter_container.data("redirect_query"),custom_fields={},hidden_fields=[],et_message="<ul>",et_fields_message="",$custom_fields=$fields_container.find('input[type=text], .et_pb_checkbox_handle, .et_pb_contact_field[data-type="radio"], textarea, select').filter(".et_pb_signup_custom_field, .et_pb_signup_custom_field *");$name.removeClass("et_pb_signup_error"),$lastname.removeClass("et_pb_signup_error"),$email.removeClass("et_pb_signup_error"),$custom_fields.removeClass("et_contact_error"),$error_message.html("");var is_valid=!0,form=$submit.closest(".et_pb_newsletter_form form");if(form.length>0&&"function"==typeof form[0].reportValidity&&(is_valid=form[0].reportValidity()),$name.length>0&&!$name.val()&&($name.addClass("et_pb_signup_error"),is_valid=!1),$lastname.length>0&&!$lastname.val()&&($lastname.addClass("et_pb_signup_error"),is_valid=!1),et_email_reg_html5.test($email.val())||($email.addClass("et_pb_signup_error"),is_valid=!1),is_valid){if($custom_fields.each(function(){var $this_el=$(this),$this_wrapper=!1;"checkbox"===$this_el.data("field_type")&&($this_wrapper=$this_el.parents(".et_pb_contact_field")).removeClass("et_contact_error"),"radio"===$this_el.data("type")&&($this_wrapper=($this_el=$this_el.find('input[type="radio"]')).parents(".et_pb_contact_field"));var default_value,this_id=$this_el.data("id"),this_val=$this_el.val(),this_label=$this_el.siblings("label:first").text(),field_type=void 0!==$this_el.data("field_type")?$this_el.data("field_type"):"text",required_mark=void 0!==$this_el.data("required_mark")?$this_el.data("required_mark"):"not_required",original_id=void 0!==$this_el.data("original_id")?$this_el.data("original_id"):"",unchecked=!1;if(this_id||(this_id=$this_el.data("original_id")),"radio"===field_type){if(0!==$this_wrapper.find('input[type="radio"]').length){var $firstRadio=$this_wrapper.find('input[type="radio"]:first');required_mark=void 0!==$firstRadio.data("required_mark")?$firstRadio.data("required_mark"):"not_required",this_val="",$this_wrapper.find('input[type="radio"]:checked')&&(this_val=$this_wrapper.find('input[type="radio"]:checked').val())}this_label=$this_wrapper.find(".et_pb_contact_form_label").text(),this_id=$this_el.data("original_id"),$.isEmptyObject(this_val)||(custom_fields[this_id]=this_val),0===$this_wrapper.find('input[type="radio"]:checked').length&&(unchecked=!0),this_val&&(custom_fields[this_id]=this_val)}else if("checkbox"===field_type){if(this_val={},0!==$this_wrapper.find('input[type="checkbox"]').length){var $checkboxHandle=$this_wrapper.find(".et_pb_checkbox_handle");required_mark=void 0!==$checkboxHandle.data("required_mark")?$checkboxHandle.data("required_mark"):"not_required",$this_wrapper.find('input[type="checked"]:checked')&&$this_wrapper.find('input[type="checkbox"]:checked').each(function(){var field_id=$(this).data("id");this_val[field_id]=$(this).val()})}this_label=$this_wrapper.find(".et_pb_contact_form_label").text(),this_id=$this_wrapper.attr("data-id"),$.isEmptyObject(this_val)||(custom_fields[this_id]=this_val),0===$this_wrapper.find('input[type="checkbox"]:checked').length&&(unchecked=!0)}else if("ontraport"===provider&&"select"===field_type){var $selected_option=$this_el.find(":selected");custom_fields[this_id]=$selected_option.length>0?$selected_option.data("id"):this_val}else custom_fields[this_id]=this_val;if(this_label=this_label.replace(/"/g,"&quot;"),$this_el.is(":visible")||"hidden"===$this_el.attr("type")||"radio"===$this_el.attr("type"))if("hidden"!==$this_el.attr("type")&&"radio"!==$this_el.attr("type")||$this_el.parents(".et_pb_contact_field").is(":visible")){if("required"!==required_mark||""!==this_val&&!0!==unchecked||(!1===$this_wrapper?$this_el.addClass("et_contact_error"):$this_wrapper.addClass("et_contact_error"),is_valid=!1,""===(default_value=this_label)&&(default_value=et_pb_custom.captcha),et_fields_message+="<li>"+default_value+"</li>"),"email"===field_type){var processed_email=this_val.trim().toLowerCase(),is_valid_email=et_email_reg_html5.test(processed_email);""===processed_email||this_label===processed_email||is_valid_email||($this_el.addClass("et_contact_error"),is_valid=!1,is_valid_email||(et_message+="<li>"+et_pb_custom.invalid+"</li>"))}}else hidden_fields.push(this_id);else hidden_fields.push(original_id)}),et_message+="</ul>",""!==et_fields_message&&("<ul></ul>"!==et_message&&(et_message='<p class="et_normal_padding">'+et_pb_custom.contact_error_message+"</p>"+et_message),et_fields_message="<ul>"+et_fields_message+"</ul>",et_fields_message="<p>"+et_pb_custom.fill_message+"</p>"+et_fields_message,et_message=et_fields_message+et_message),"<ul></ul>"!==et_message)return $error_message.html(et_message).show(),void($newsletter_container.parents(".et_pb_section_parallax").length&&$newsletter_container.parents(".et_pb_section_parallax").each(function(){!$(this).children(".et_parallax_bg").hasClass("et_pb_parallax_css")&&$et_window.trigger("resize")}));$.ajax({type:"POST",url:et_pb_custom.ajaxurl,dataType:"json",data:{action:"et_pb_submit_subscribe_form",et_frontend_nonce:et_pb_custom.et_frontend_nonce,et_list_id:list_id,et_firstname:$name.val(),et_lastname:$lastname.val(),et_email:$email.val(),et_provider:provider,et_account:account,et_ip_address:ip_address,et_custom_fields:custom_fields,et_hidden_fields:hidden_fields},beforeSend:function(){$newsletter_container.find(".et_pb_newsletter_button").addClass("et_pb_button_text_loading").find(".et_subscribe_loader").show()},complete:function(){$newsletter_container.find(".et_pb_newsletter_button").removeClass("et_pb_button_text_loading").find(".et_subscribe_loader").hide()},success:function(data){data?(data.error&&$error_message.show().append("<h2>").text(data.error),data.success&&(redirect_url?et_pb_maybe_log_event($newsletter_container,"con_goal",function(){var query=get_redirect_query();query.length&&(redirect_url.indexOf("?")>-1?redirect_url+="&":redirect_url+="?"),window.location=redirect_url+query}):(et_pb_maybe_log_event($newsletter_container,"con_goal"),$newsletter_container.find(".et_pb_newsletter_fields").hide(),$success_message.show()))):$error_message.html(et_pb_custom.subscription_failed).show()}})}}},window.et_fix_testimonial_inner_width=function(){var window_width=$(window).width();window_width>959?$(".et_pb_testimonial").each(function(){if($(this).is(":visible")){var $testimonial=$(this),$portrait=$testimonial.find(".et_pb_testimonial_portrait"),portrait_width=$portrait.outerWidth(!0),$testimonial_descr=$testimonial.find(".et_pb_testimonial_description"),$outer_column=$testimonial.closest(".et_pb_column");portrait_width>90&&($portrait.css("padding-bottom","0"),$portrait.width("90px"),$portrait.height("90px"));var testimonial_indent=$outer_column.hasClass("et_pb_column_1_3")||$outer_column.hasClass("et_pb_column_1_4")||$outer_column.hasClass("et_pb_column_1_5")||$outer_column.hasClass("et_pb_column_1_6")||$outer_column.hasClass("et_pb_column_2_5")||$outer_column.hasClass("et_pb_column_3_8")?0:portrait_width;$testimonial_descr.css("margin-left",testimonial_indent)}}):window_width>767?$(".et_pb_testimonial").each(function(){if($(this).is(":visible")){var $testimonial=$(this),portrait_width=$testimonial.find(".et_pb_testimonial_portrait").outerWidth(!0),$testimonial_descr=$testimonial.find(".et_pb_testimonial_description"),$outer_column=$testimonial.closest(".et_pb_column"),testimonial_indent=$outer_column.hasClass("et_pb_column_1_4")||$outer_column.hasClass("et_pb_column_1_5")||$outer_column.hasClass("et_pb_column_1_6")||$outer_column.hasClass("et_pb_column_2_5")||$outer_column.hasClass("et_pb_column_3_8")?0:portrait_width;$testimonial_descr.css("margin-left",testimonial_indent)}}):$(".et_pb_testimonial_description").removeAttr("style")},window.et_fix_testimonial_inner_width(),window.et_pb_video_background_init=function($this_video_background,this_video_background){var $video_background_wrapper=$this_video_background.closest(".et_pb_section_video_bg"),onplaying=!1,onpause=!0;this_video_background.onplaying=function(){onplaying=!0,onpause=!1},this_video_background.onpause=function(){onplaying=!1,onpause=!0},et_waypoint($video_background_wrapper,{offset:"100%",handler:function(direction){var is_play_outside_viewport=$video_background_wrapper.hasClass("et_pb_video_play_outside_viewport");$this_video_background.is(":visible")&&"down"===direction?this_video_background.paused&&!onplaying&&this_video_background.play():$this_video_background.is(":visible")&&"up"===direction&&(this_video_background.paused||onpause||is_play_outside_viewport||this_video_background.pause())}},2),et_waypoint($video_background_wrapper,{offset:function(){var video_height=this.element.clientHeight,toggle_offset=Math.ceil(window.innerHeight/2);return video_height>toggle_offset&&(toggle_offset=video_height),-1*toggle_offset},handler:function(direction){var is_play_outside_viewport=$video_background_wrapper.hasClass("et_pb_video_play_outside_viewport");$this_video_background.is(":visible")&&"up"===direction?this_video_background.paused&&!onplaying&&this_video_background.play():$this_video_background.is(":visible")&&"down"===direction&&(this_video_background.paused||onpause||is_play_outside_viewport||this_video_background.pause())}},2)},window.et_reinit_waypoint_modules=et_pb_debounce(function(){var $et_pb_circle_counter=$(".et_pb_circle_counter"),$et_pb_number_counter=$(".et_pb_number_counter"),$et_pb_video_background=$(".et_pb_section_video_bg video");if($.fn.waypoint&&"yes"!==et_pb_custom.ignore_waypoints)et_process_animation_data(!0),$(".et_pb_counter_container, .et-waypoint").each(function(){et_waypoint($(this),{offset:et_get_offset($(this),"100%"),handler:function(){$(this.element).addClass("et-animated")}},2)}),$et_pb_circle_counter.length&&$et_pb_circle_counter.each(function(){var $this_counter=$(this).find(".et_pb_circle_counter_inner");$this_counter.is(":visible")&&!et_has_animation_data($this_counter)&&et_waypoint($this_counter,{offset:et_get_offset($(this),"100%"),handler:function(){$this_counter.data("PieChartHasLoaded")||void 0===$this_counter.data("easyPieChart")||($this_counter.data("easyPieChart").update($this_counter.data("number-value")),$this_counter.data("PieChartHasLoaded",!0))}},2)}),$et_pb_number_counter.length&&$et_pb_number_counter.each(function(){var $this_counter=$(this);et_has_animation_data($this_counter)||et_waypoint($this_counter,{offset:et_get_offset($(this),"100%"),handler:function(){$this_counter.data("easyPieChart").update($this_counter.data("number-value"))}})}),$(".et_pb_ab_goal").length&&et_waypoint($et_pb_ab_goal=$(".et_pb_ab_goal"),{offset:et_get_offset($(this),"80%"),handler:function(){!et_pb_ab_logged_status.read_goal&&$et_pb_ab_goal.length&&$et_pb_ab_goal.visible(!0)&&(setTimeout(function(){$et_pb_ab_goal.length&&$et_pb_ab_goal.visible(!0)&&!et_pb_ab_logged_status.read_goal&&et_pb_ab_update_stats("read_goal")},3e3),et_pb_maybe_log_event($et_pb_ab_goal,"view_goal"))}});else if(et_process_animation_data(!1),$(".et_pb_counter_container, .et-waypoint").addClass("et-animated"),$et_pb_circle_counter.length&&$et_pb_circle_counter.each(function(){var $this_counter=$(this).find(".et_pb_circle_counter_inner");$this_counter.is(":visible")&&($this_counter.data("PieChartHasLoaded")||($this_counter.data("easyPieChart").update($this_counter.data("number-value")),$this_counter.data("PieChartHasLoaded",!0)))}),$et_pb_number_counter.length&&$et_pb_number_counter.each(function(){var $this_counter=$(this);$this_counter.data("easyPieChart").update($this_counter.data("number-value"))}),$(".et_pb_ab_goal").length){var $et_pb_ab_goal=$(".et_pb_ab_goal");if(et_pb_ab_logged_status.read_goal||!$et_pb_ab_goal.length||!$et_pb_ab_goal.visible(!0))return;setTimeout(function(){$et_pb_ab_goal.length&&$et_pb_ab_goal.visible(!0)&&!et_pb_ab_logged_status.read_goal&&et_pb_ab_update_stats("read_goal")},3e3),et_pb_maybe_log_event($et_pb_ab_goal,"view_goal")}$et_pb_video_background.length&&$et_pb_video_background.each(function(){var $this_video_background=$(this);et_pb_video_background_init($this_video_background,this)})},100),"undefined"!=typeof et_link_options_data&&et_link_options_data.length>0&&$.each(et_link_options_data,function(index,link_option_entry){if(link_option_entry.class&&link_option_entry.url&&link_option_entry.target){var $clickable=$("."+link_option_entry.class);$clickable.on("click",function(event){if(event.target!==event.currentTarget&&!et_is_click_exception($(event.target))||event.target===event.currentTarget){if(event.stopPropagation(),"_blank"===link_option_entry.target)return void window.open(link_option_entry.url);window.location=link_option_entry.url}}),$clickable.on("click","a, button",function(event){et_is_click_exception($(this))||event.stopPropagation()})}});var fullscreen_section_width={},fullscreen_section_timeout={};if(window.et_calc_fullscreen_section=function(event){var isResizing="object"==typeof event&&"resize"===event.type,$et_window=$(window),$this_section=$(this),section_index=$this_section.index(".et_pb_fullscreen"),timeout=isResizing&&void 0!==fullscreen_section_width[section_index]&&event.target.window_width>fullscreen_section_width[section_index]?800:0;fullscreen_section_width[section_index]=$et_window.width(),void 0!==fullscreen_section_timeout[section_index]&&clearTimeout(fullscreen_section_timeout[section_index]),fullscreen_section_timeout[section_index]=setTimeout(function(){var $body=$("body"),this_section_index=$this_section.index(".et_pb_fullwidth_header"),this_section_offset=$this_section.offset(),$header=$this_section.children(".et_pb_fullwidth_header_container"),$header_content=$header.children(".header-content-container"),$header_image=$header.children(".header-image-container"),sectionHeight=window.innerHeight||$et_window.height(),$wpadminbar=$("#wpadminbar"),has_wpadminbar=$wpadminbar.length,wpadminbar_height=has_wpadminbar?$wpadminbar.height():0,$top_header=$("#top-header"),has_top_header=$top_header.length,top_header_height=has_top_header?$top_header.height():0,$main_header=$("#main-header"),has_main_header=$main_header.length,main_header_height=has_main_header?$main_header.outerHeight():0,fixed_main_header_height=et_pb_get_fixed_main_header_height(),is_wp_relative_admin_bar=(this_section_offset.top,$et_window.width()<782),is_desktop_view=$et_window.width()>980,overall_header_height=($et_window.width()<=980&&$et_window.width(),$et_window.width(),window.et_is_vertical_nav&&is_desktop_view?wpadminbar_height+top_header_height:wpadminbar_height+top_header_height+main_header_height),is_first_module=this_section_offset.top<=overall_header_height;$main_header.attr("data-height-onload")&&(main_header_height=parseFloat($main_header.attr("data-height-onload"))),has_wpadminbar&&(is_wp_relative_admin_bar?is_first_module&&(sectionHeight-=wpadminbar_height):sectionHeight-=wpadminbar_height),has_top_header&&is_desktop_view&&(et_hide_nav&&!window.et_is_vertical_nav?is_first_module||(sectionHeight-=top_header_height):!window.et_is_fixed_nav||window.et_is_vertical_nav?is_first_module&&(sectionHeight-=top_header_height):sectionHeight-=top_header_height),has_main_header&&(is_desktop_view?et_hide_nav&&!window.et_is_vertical_nav?is_first_module||(sectionHeight-=fixed_main_header_height):window.et_is_fixed_nav&&!window.et_is_vertical_nav?sectionHeight-=is_first_module?main_header_height:fixed_main_header_height:window.et_is_fixed_nav||window.et_is_vertical_nav||is_first_module&&(sectionHeight-=main_header_height):is_first_module&&(sectionHeight-=main_header_height)),$body.hasClass("et_transparent_nav")&&$body.hasClass("et_hide_nav")&&0===this_section_index&&$this_section.css("padding-top","");var section_border_top_width=parseInt($this_section.css("borderTopWidth"));section_border_top_width&&(sectionHeight-=section_border_top_width);var section_border_bottom_width=parseInt($this_section.css("borderBottomWidth"));if(section_border_bottom_width&&(sectionHeight-=section_border_bottom_width),$this_section.css("min-height",sectionHeight+"px"),$header.css("min-height",sectionHeight+"px"),$header.hasClass("center")&&$header_content.hasClass("bottom")&&$header_image.hasClass("bottom")&&$header.addClass("bottom-bottom"),$header.hasClass("center")&&$header_content.hasClass("center")&&$header_image.hasClass("center")&&$header.addClass("center-center"),$header.hasClass("center")&&$header_content.hasClass("center")&&$header_image.hasClass("bottom")){$header.addClass("center-bottom");var contentHeight=sectionHeight-$header_image.outerHeight(!0);contentHeight>0&&$header_content.css("min-height",contentHeight+"px").css("height","10px")}if($header.hasClass("center")&&$header_content.hasClass("bottom")&&$header_image.hasClass("center")&&$header.addClass("bottom-center"),($header.hasClass("left")||$header.hasClass("right"))&&!$header_content.length&&$header_image.length&&$header.css("justify-content","flex-end"),$header.hasClass("center")&&$header_content.hasClass("bottom")&&!$header_image.length&&$header_content.find(".header-content").css("margin-bottom","80px"),$header_content.hasClass("bottom")&&$header_image.hasClass("center")&&($header_image.find(".header-image").css("margin-bottom","80px"),$header_image.css("align-self","flex-end")),et_is_mobile_device&&!et_is_ipad||$et_window.width()<768){var headerContentHeight=0;$header_content.length&&(headerContentHeight+=$header_content.outerHeight()),$header_image.length&&(headerContentHeight+=$header_image.outerHeight()),headerContentHeight>sectionHeight&&($this_section.css("min-height",headerContentHeight+"px"),$header.css("min-height",headerContentHeight+"px")),$header_image.hasClass("bottom")&&(headerContentHeight<sectionHeight&&($this_section.css("min-height",headerContentHeight+80+"px"),$header.css("min-height",headerContentHeight+80+"px")),$header.css("justify-content","flex-end"))}},timeout)},window.et_pb_parallax_init=function($this_parallax){if(!$this_parallax.hasClass("et_pb_parallax_css")){var $this_parent=$this_parallax.parent();$.proxy(et_parallax_set_height,$this_parent)(),$.proxy(et_apply_parallax,$this_parent)(),$et_window.on("scroll",$.proxy(et_apply_parallax,$this_parent)),$et_window.on("resize",$.proxy(et_parallax_set_height,$this_parent)),$et_window.on("resize",$.proxy(et_apply_parallax,$this_parent)),$this_parent.find(".et-learn-more .heading-more").click(function(){setTimeout(function(){$.proxy(et_parallax_set_height,$this_parent)()},300)})}},$(window).resize(function(){var window_width=$et_window.width(),et_container_css_width=$et_container.css("width"),et_container_actual_width=(void 0!==et_container_css_width?"%"!==et_container_css_width.substr(-1,1):"")?$et_container.width():$et_container.width()/100*window_width,containerWidthChanged=et_container_width!==et_container_actual_width;if(et_pb_resize_section_video_bg(),et_pb_center_video(),et_fix_slider_height(),et_fix_nav_direction(),$et_pb_fullwidth_portfolio.each(function(){set_container_height=!!$(this).hasClass("et_pb_fullwidth_portfolio_carousel"),set_fullwidth_portfolio_columns($(this),set_container_height)}),containerWidthChanged||window.et_force_width_container_change){$(".container-width-change-notify").trigger("containerWidthChanged"),setTimeout(function(){$et_pb_filterable_portfolio.each(function(){set_filterable_grid_items($(this))}),$et_pb_gallery.each(function(){$(this).hasClass("et_pb_gallery_grid")&&set_gallery_grid_items($(this))})},100),et_container_width=et_container_actual_width,etRecalculateOffset=!0;var $et_pb_circle_counter=$(".et_pb_circle_counter");$et_pb_circle_counter.length&&$et_pb_circle_counter.each(function(){var $this_counter=$(this).find(".et_pb_circle_counter_inner");$this_counter.is(":visible")&&void 0!==$this_counter.data("easyPieChart")&&$this_counter.data("easyPieChart").update($this_counter.data("number-value"))}),$et_pb_countdown_timer.length&&$et_pb_countdown_timer.each(function(){var timer=$(this);et_countdown_timer_labels(timer)}),window.et_force_width_container_change=!1}window.et_fix_testimonial_inner_width(),$et_pb_counter_amount.length&&$et_pb_counter_amount.each(function(){window.et_bar_counters_init($(this))})}),$(window).ready(function(){$.fn.fitVids&&($(".et_pb_slide_video").fitVids(),$(".et_pb_module").fitVids({customSelector:"iframe[src^='http://www.hulu.com'], iframe[src^='http://www.dailymotion.com'], iframe[src^='http://www.funnyordie.com'], iframe[src^='https://embed-ssl.ted.com'], iframe[src^='http://embed.revision3.com'], iframe[src^='https://flickr.com'], iframe[src^='http://blip.tv'], iframe[src^='http://www.collegehumor.com']"})),et_fix_slider_height(),$("section.et_pb_fullscreen").each(function(){var $this_section=$(this);$.proxy(et_calc_fullscreen_section,$this_section)(),$et_window.on("resize",$.proxy(et_calc_fullscreen_section,$this_section))})}),window.et_pb_fullwidth_header_scroll=function(event){event.preventDefault();var window_width=$et_window.width(),$body=$("body"),is_wp_relative_admin_bar=window_width<782,is_transparent_main_header=$body.hasClass("et_transparent_nav"),is_hide_nav=$body.hasClass("et_hide_nav"),is_desktop_view=window_width>980,$this_section=$(this).parents("section"),this_section_offset=$this_section.offset(),$wpadminbar=$("#wpadminbar"),$main_header=$("#main-header"),wpadminbar_height=$wpadminbar.length&&!is_wp_relative_admin_bar?$wpadminbar.height():0,top_header_height=window.et_is_fixed_nav&&is_desktop_view?$top_header.height():0,data_height_onload=void 0===$main_header.attr("data-height-onload")?0:$main_header.attr("data-height-onload");if(initial_fixed_difference=$main_header.height()===et_pb_get_fixed_main_header_height()||!is_desktop_view||!window.et_is_fixed_nav||is_transparent_main_header||is_hide_nav?0:et_pb_get_fixed_main_header_height()-parseFloat(data_height_onload),section_bottom=this_section_offset.top+$this_section.outerHeight(!0)+initial_fixed_difference-(wpadminbar_height+top_header_height+et_pb_get_fixed_main_header_height()),animate_modified=!1,$this_section.length){$("html, body").animate({scrollTop:section_bottom},{duration:800})}},window.et_load_event_fired?et_pb_window_load_scripts():$(window).load(function(){et_pb_window_load_scripts()}),$(".et_section_specialty").length&&$(".et_section_specialty").each(function(){$(this).find(".et_pb_row").find(">.et_pb_column:not(.et_pb_specialty_column)").addClass("et_pb_column_single")}),$(".et_pb_section_parallax").length&&$(".et_pb_map").length&&$("body").addClass("parallax-map-support"),$(".et_pb_widget_area "+et_pb_custom.widget_search_selector).each(function(){var $search_wrap=$(this),$search_input_submit=$search_wrap.find('input[type="submit"]'),search_input_submit_text=$search_input_submit.attr("value"),$search_button=$search_wrap.find("button"),search_button_text=$search_button.text(),has_submit_button=!(!$search_input_submit.length&&!$search_button.length);($search_wrap.find('input[type="text"]').length||$search_wrap.find('input[type="search"]').length)&&(has_submit_button||$search_wrap.addClass("et-no-submit-button"),$search_wrap.width()<150&&$search_wrap.addClass("et-narrow-wrapper"),!$search_input_submit.length||void 0!==search_input_submit_text&&""!==search_input_submit_text||($search_input_submit.remove(),$search_wrap.addClass("et-no-submit-button")),!$search_button.length||void 0!==search_button_text&&""!==search_button_text||($search_button.remove(),$search_wrap.addClass("et-no-submit-button")))}),$("body").on("click",".et_pb_ajax_pagination_container .wp-pagenavi a,.et_pb_ajax_pagination_container .pagination a",function(){var $current_module,this_link=$(this),href=this_link.attr("href"),current_href=window.location.href,module_classes=this_link.closest(".et_pb_module").attr("class").split(" "),module_class_processed="",animation_classes=et_get_animation_classes();return window.et_pb_ajax_pagination_cache=window.et_pb_ajax_pagination_cache||[],$.each(module_classes,function(index,value){-1===$.inArray(value,animation_classes)&&""!==value.trim()&&(module_class_processed+="."+value)}),$current_module=$(module_class_processed),et_remove_animation($current_module),void 0!==window.et_pb_ajax_pagination_cache[href+module_class_processed]?$current_module.fadeTo("slow",.2,function(){$current_module.find(".et_pb_ajax_pagination_container").replaceWith(window.et_pb_ajax_pagination_cache[href+module_class_processed]),et_pb_set_paginated_content($current_module,!0)}):(void 0===window.et_pb_ajax_pagination_cache[current_href+module_class_processed]&&(window.et_pb_ajax_pagination_cache[current_href+module_class_processed]=$current_module.find(".et_pb_ajax_pagination_container")),$current_module.fadeTo("slow",.2,function(){jQuery.get(href,function(page){var $page=jQuery(page),$style=$page.filter("#et-builder-module-design-cached-inline-styles"),$content=$page.find(module_class_processed+" .et_pb_ajax_pagination_container").prepend($style);et_remove_animation($content.find(".et_animated")),$current_module.find(".et_pb_ajax_pagination_container").replaceWith($content),window.et_pb_ajax_pagination_cache[href+module_class_processed]=$content,et_pb_set_paginated_content($current_module,!1)})})),!1}),window.et_pb_search_init=function($search){var $input_field=$search.find(".et_pb_s"),$button=$search.find(".et_pb_searchsubmit"),input_padding=$search.hasClass("et_pb_text_align_right")?"paddingLeft":"paddingRight",disabled_button=$search.hasClass("et_pb_hide_search_button"),buttonHeight=$button.outerHeight(),buttonWidth=$button.outerWidth(),inputHeight=$input_field.innerHeight();$button.css({position:"relative"}),buttonHeight>inputHeight&&$input_field.innerHeight(buttonHeight),disabled_button||$input_field.css(input_padding,buttonWidth+10),$button.css({position:""})},window.et_pb_search_percentage_custom_margin_fix=function($search){var inputMargin=$search.find(".et_pb_s").css("margin").split(" "),inputMarginObj={};switch(inputMargin.length){case 4:inputMarginObj={top:inputMargin[0],right:inputMargin[1],bottom:inputMargin[2],left:inputMargin[3]};break;case 2:inputMarginObj={top:inputMargin[0],right:inputMargin[1],bottom:inputMargin[0],left:inputMargin[1]};break;default:inputMarginObj={top:inputMargin[0],right:inputMargin[0],bottom:inputMargin[0],left:inputMargin[0]}}var inputRight=0-parseFloat(inputMarginObj.left)+"px";$search.find(".et_pb_searchsubmit").css({top:inputMarginObj.top,right:inputRight,bottom:inputMarginObj.bottom})},$(".et_pb_search").length&&$(".et_pb_search").each(function(){var $search=$(this);$search.is(".et_pb_search_percentage_custom_margin")&&et_pb_search_percentage_custom_margin_fix($search),et_pb_search_init($search)}),window.et_pb_comments_init=function($comments_module){var $comments_module_button=$comments_module.find(".comment-reply-link, .submit");$comments_module_button.length&&($comments_module_button.addClass("et_pb_button"),void 0!==$comments_module.attr("data-icon")&&""!==$comments_module.attr("data-icon")&&($comments_module_button.attr("data-icon",$comments_module.attr("data-icon")),$comments_module_button.addClass("et_pb_custom_button_icon")))},$(".et_pb_comments_module").length&&$(".et_pb_comments_module").each(function(){var $comments_module=$(this);et_pb_comments_init($comments_module)}),window.et_fix_pricing_currency_position(),$(".et_pb_contact_form_container, .et_pb_newsletter_custom_fields").each(function(){var $form=$(this),condition_check=function(){et_conditional_check($form)},debounced_condition_check=et_pb_debounce(condition_check,250);$form.on("change","input, textarea, select",condition_check),$form.on("keydown","input, textarea, select",debounced_condition_check),et_conditional_check($form)}),"undefined"!=typeof et_animation_data&&et_animation_data.length>0){for(var maxFullwidthMenuIndex=0,i=0;i<et_animation_data.length;i++){var animation_entry=et_animation_data[i];animation_entry.class&&($("."+animation_entry.class).hasClass("et_pb_fullwidth_menu")&&maxFullwidthMenuIndex++)}$(".et_pb_fullwidth_menu").each(function(){var $fullWidthMenu=$(this);$fullWidthMenu.on("webkitAnimationEnd oanimationend msAnimationEnd animationend",function(){$fullWidthMenu.css("z-index",maxFullwidthMenuIndex-$fullWidthMenu.index(".et_pb_fullwidth_menu"))})})}$(document).trigger("et_pb_after_init_modules")})},
window.et_pb_debounce=function(func,wait,immediate){var timeout,args,context,timestamp,result,now=Date.now||(new Date).getTime(),later=function(){var last=now-timestamp;last<wait&&last>=0?timeout=setTimeout(later,wait-last):(timeout=null,immediate||(result=func.apply(context,args),timeout||(context=args=null)))};return function(){context=this,args=arguments,timestamp=now;var callNow=immediate&&!timeout;return timeout||(timeout=setTimeout(later,wait)),callNow&&(result=func.apply(context,args),context=args=null),result}},et_pb_custom.is_ab_testing_active&&"yes"===et_pb_custom.is_cache_plugin_active?($(window).load(function(){window.et_load_event_fired=!0}),$.ajax({type:"POST",url:et_pb_custom.ajaxurl,dataType:"json",data:{action:"et_pb_ab_get_subject_id",et_frontend_nonce:et_pb_custom.et_frontend_nonce,et_pb_ab_test_id:et_pb_custom.page_id},success:function(subject_data){subject_data&&($(".et_pb_subject_placeholder_id_"+subject_data.id).after(subject_data.content),$(".et_pb_subject_placeholder").remove(),window.et_pb_init_modules(),$("body").trigger("et_pb_ab_subject_ready"))}})):window.et_pb_init_modules(),$(document).ready(function(){$(".et_pb_top_inside_divider.et-no-transition, .et_pb_bottom_inside_divider.et-no-transition").removeClass("et-no-transition"),(et_pb_box_shadow_elements||[]).map(et_pb_box_shadow_apply_overlay)}),$(window).load(function(){var $body=$("body");if($body.hasClass("safari")){var original_display_value=$body.css("display"),different_display_value="initial"===original_display_value?"block":"initial";if($body.css({display:different_display_value}),setTimeout(function(){$body.css({display:original_display_value})},0),$body.hasClass("woocommerce-page")&&$body.hasClass("single-product")){var $wc=$(".woocommerce div.product div.images.woocommerce-product-gallery");if(0===$wc.length)return;var opacity=parseInt($wc[0].style.opacity);if(!opacity)return;$wc.css({opacity:opacity-.09}),setTimeout(function(){$wc.css({opacity:opacity})},0)}}}),$(document).ready(function(){if(void 0!==MutationObserver)for(var getInvisibleNodes=function($sections){return $sections.filter(function(){return!$(this).is(":visible")}).length},$sections=$(".et_pb_section"),sectionParents=function($sections){var filterMethod=void 0!==$.uniqueSort?$.uniqueSort:$.unique,$sectionParents=$([]);return $sections.each(function(){$sectionParents=$sectionParents.add($(this).parents())}),filterMethod($sectionParents.get())}($sections),invisibleSections=getInvisibleNodes($sections),observer=new MutationObserver(window.et_pb_debounce(function(){var newInvisibleSections=getInvisibleNodes($sections);newInvisibleSections<invisibleSections&&$(window).trigger("resize"),invisibleSections=newInvisibleSections},200)),i=0;i<sectionParents.length;i++)observer.observe(sectionParents[i],{childList:!0,attributes:!0,attributeFilter:["class","style"],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,subtree:!1})})}(jQuery);
/*!
* jQuery Mobile v1.4.5
* Copyright 2010, 2014 jQuery Foundation, Inc.
* jquery.org/license
*/
!function(e,t,n){"function"==typeof define&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)}(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function N(t,n){var s,o,a,l,c,h,p,d,v,i=t.type;if(t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f),s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];if(i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==i.search(/^touch/)&&(a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r))for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l];return t}function C(t){for(var r,s,n={};t;){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){for(var r;t;){if((r=e.data(t,i))&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;return(r&&r[t]||!r&&k(n.target,t))&&(i=N(n,t),e(n.target).trigger(i)),i}function H(t){var r,n=e.data(t.target,s);!m&&(!E||E!==n)&&(r=P("v"+t.type,t))&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation())}function B(t){var r,i,o,n=T(t).touches;n&&1===n.length&&(r=t.target,(i=C(r)).hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){g||(d||P("vmousecancel",e,C(e.target)),d=!0,_())}function F(t){if(!g){var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);(d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i)&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}}function I(e){if(!g){A();var n,r,t=C(e.target);P("vmouseup",e,t),d||(n=P("vclick",e,t))&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0),P("vmouseout",e,t),d=!1,_()}}function q(t){var r,n=e.data(t,i);if(n)for(r in n)if(n[r])return!0;return!1}function R(){}var S,x,i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},x=0;x<o.length;x++)e.event.special[o[x]]=function(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{}),e.data(this,i)[t]=!0,l[t]=(l[t]||0)+1,1===l[t]&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,1===l.touchstart&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}(o[x]);y&&n.addEventListener("click",function(t){var i,o,u,a,f,n=v.length,r=t.target;if(n)for(i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;u;){for(a=0;a<n;a++)if(f=v[a],0,u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID)return t.preventDefault(),void t.stopPropagation();u=u.parentNode}},!0)})(e,0,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){l(t,(r=n)?"scrollstart":"scrollstop",e)}var r,i,t=this;e(t).bind(o,function(t){e.event.special.scrollstart.enabled&&(r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50))})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),r||o!==e.target?r&&e.preventDefault():l(t,"tap",e)}if(r=!1,s.which&&1!==s.which)return!1;var u,o=s.target;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;return 0===e.pageY&&Math.floor(s)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(i)>Math.floor(e.pageX)?(i-=n,s-=r):(s<e.pageY-r||i<e.pageX-n)&&(i=e.pageX-n,s=e.pageY-r),{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};(t=e.data(this,"mobile-events"))||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){o&&!t.isDefaultPrevented()&&(r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)}},r.on(u,s.start)},teardown:function(){var t,n;(t=e.data(this,"mobile-events"))&&(n=t.swipe,delete t.swipe,t.length--,0===t.length&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
/*! ET frontend-builder-global-functions.js */
!function($){window.et_pb_smooth_scroll=function($target,$top_section,speed,easing){var $window_width=$(window).width();$("body").hasClass("et_fixed_nav")&&$window_width>980?$menu_offset=$("#top-header").outerHeight()+$("#main-header").outerHeight()-1:$menu_offset=-1,$("#wpadminbar").length&&$window_width>600&&($menu_offset+=$("#wpadminbar").outerHeight()),$scroll_position=$top_section?0:$target.offset().top-$menu_offset,void 0===easing&&(easing="swing"),$("html, body").animate({scrollTop:$scroll_position},speed,easing)},window.et_pb_form_placeholders_init=function($form){$form.find('input:text, input[type="email"], input[type="url"], textarea').each(function(index,domEle){var $et_current_input=jQuery(domEle),$et_comment_label=$et_current_input.siblings("label"),et_comment_label_value=$et_current_input.siblings("label").text();$et_comment_label.length&&($et_comment_label.hide(),$et_current_input.siblings("span.required")&&(et_comment_label_value+=$et_current_input.siblings("span.required").text(),$et_current_input.siblings("span.required").hide()),$et_current_input.val(et_comment_label_value))}).bind("focus",function(){var et_label_text=jQuery(this).siblings("label").text();jQuery(this).siblings("span.required").length&&(et_label_text+=jQuery(this).siblings("span.required").text()),jQuery(this).val()===et_label_text&&jQuery(this).val("")}).bind("blur",function(){var et_label_text=jQuery(this).siblings("label").text();jQuery(this).siblings("span.required").length&&(et_label_text+=jQuery(this).siblings("span.required").text()),""===jQuery(this).val()&&jQuery(this).val(et_label_text)})},window.et_duplicate_menu=function(menu,append_to,menu_id,menu_class,menu_click_event){append_to.each(function(){var $cloned_nav,$this_menu=$(this);""!==menu&&menu.clone().attr("id",menu_id).removeClass().attr("class",menu_class).appendTo($this_menu),($cloned_nav=$this_menu.find("> ul")).find(".menu_slide").remove(),$cloned_nav.find("li:first").addClass("et_first_mobile_item"),$cloned_nav.find("a").on("click",function(){$(this).parents(".et_mobile_menu").siblings(".mobile_menu_bar").trigger("click")}),"no_click_event"!==menu_click_event&&$this_menu.on("click",".mobile_menu_bar",function(){return $this_menu.hasClass("closed")?($this_menu.removeClass("closed").addClass("opened"),$cloned_nav.stop().slideDown(500)):($this_menu.removeClass("opened").addClass("closed"),$cloned_nav.stop().slideUp(500)),!1})}),$("#mobile_menu .centered-inline-logo-wrap").remove()},window.et_pb_remove_placeholder_text=function($form){$form.find("input:text, textarea").each(function(index,domEle){var $et_current_input=jQuery(domEle),$et_label=$et_current_input.siblings("label");$et_current_input.siblings("label").text();$et_label.length&&$et_label.is(":hidden")&&$et_label.text()==$et_current_input.val()&&$et_current_input.val("")})},window.et_fix_fullscreen_section=function(){var $et_window=$(window);$("section.et_pb_fullscreen").each(function(){var $this_section=$(this);$.proxy(et_calc_fullscreen_section,$this_section)(),$et_window.on("resize",$.proxy(et_calc_fullscreen_section,$this_section))})},window.et_bar_counters_init=function($bar_item){$bar_item.length&&$bar_item.css({width:parseFloat($bar_item.attr("data-width"))+"%"})},window.et_fix_pricing_currency_position=function($pricing_table){var $all_pricing_tables=void 0!==$pricing_table?$pricing_table:$(".et_pb_pricing_table");$all_pricing_tables.length&&$all_pricing_tables.each(function(){var $price_container=$(this).find(".et_pb_et_price"),$currency=!!$price_container.length&&$price_container.find(".et_pb_dollar_sign"),$price=!!$price_container.length&&$price_container.find(".et_pb_sum");$currency&&$price&&$currency.css({marginLeft:-$currency.width()+"px"})})},window.et_pb_set_responsive_grid=function($grid_items_container,single_item_selector){setTimeout(function(){var container_width=$grid_items_container.innerWidth(),$grid_items=$grid_items_container.find(single_item_selector),item_width=$grid_items.outerWidth(!0),last_item_margin=item_width-$grid_items.outerWidth(),columns_count=Math.round((container_width+last_item_margin)/item_width),counter=1,first_in_row=1;$grid_items.removeClass("last_in_row first_in_row"),$grid_items.filter(":visible").each(function(){var $this_el=$(this);$this_el.hasClass("inactive")||(first_in_row===counter&&$this_el.addClass("first_in_row"),0==counter%columns_count&&($this_el.addClass("last_in_row"),first_in_row=counter+1),counter++)})},1)},window.et_pb_set_tabs_height=function($tabs_module){void 0===$tabs_module&&($tabs_module=$(".et_pb_tabs")),$tabs_module.length&&$tabs_module.each(function(){var $tab_controls=$(this).find(".et_pb_tabs_controls"),$all_tabs=$tab_controls.find("li"),max_height=0,in_small_column=$(this).parents(".et_pb_column_1_3, .et_pb_column_1_4, .et_pb_column_3_8").length>0,on_small_screen=parseFloat($(window).width())<768,vertically_stacked=in_small_column||on_small_screen;vertically_stacked&&$(this).addClass("et_pb_tabs_vertically_stacked"),$all_tabs.length&&($tab_controls.removeAttr("style"),$all_tabs.each(function(){var tab_height=$(this).outerHeight();vertically_stacked||tab_height>max_height&&(max_height=tab_height)})),0!==max_height&&$tab_controls.css("min-height",max_height)})},window.et_pb_box_shadow_apply_overlay=function(el){void 0!==document.body.style.pointerEvents&&(void 0===document.documentMode||document.documentMode>=11)?$(el).each(function(){$(this).children(".box-shadow-overlay").length||$(this).addClass("has-box-shadow-overlay").prepend('<div class="box-shadow-overlay"></div>')}):$(el).addClass(".et-box-shadow-no-overlay")},window.et_pb_init_nav_menu=function($et_menus){$et_menus.each(function(){var $et_menu=$(this);$et_menu.data("et-is-menu-ready")||($et_menu.find("li").hover(function(){window.et_pb_toggle_nav_menu($(this),"open")},function(){window.et_pb_toggle_nav_menu($(this),"close")}),$("body").on("touchend",function(event){$(event.target).closest("ul.nav, ul.menu").length<1&&$(".et-hover").length>0&&window.et_pb_toggle_nav_menu($(".et-hover"),"close")}),$et_menu.find("li.menu-item-has-children").on("touchend",function(event){var $closest_li=$(event.target).closest(".menu-item");if($closest_li.hasClass("menu-item-has-children")){var $this_el=$(this),is_mega_menu_opened=$closest_li.closest(".mega-menu-parent.et-touch-hover").length>0;if($this_el.hasClass("et-touch-hover")||is_mega_menu_opened)void 0!==$this_el.find(">a").attr("href")&&(window.location=$this_el.find(">a").attr("href"));else{var $opened_menu=$(event.target),$already_opened_menus=$opened_menu.closest(".menu-item").siblings(".et-touch-hover");if($opened_menu.closest(".et-touch-hover").length<1&&window.et_pb_toggle_nav_menu($(".et-hover"),"close",0),$this_el.addClass("et-touch-hover"),$already_opened_menus.length>0){var $submenus_in_already_opened=$already_opened_menus.find(".et-touch-hover");window.et_pb_toggle_nav_menu($already_opened_menus,"close"),window.et_pb_toggle_nav_menu($submenus_in_already_opened,"close")}window.et_pb_toggle_nav_menu($this_el,"open")}event.preventDefault(),event.stopPropagation()}}),$et_menu.find("li.mega-menu").each(function(){var $li_mega_menu=$(this),li_mega_menu_item_count=$li_mega_menu.children("ul").children("li").length;li_mega_menu_item_count<4&&$li_mega_menu.addClass("mega-menu-parent mega-menu-parent-"+li_mega_menu_item_count)}),$et_menu.data("et-is-menu-ready","ready"))})},window.et_pb_toggle_nav_menu=function($element,state,delay){if("open"===state)$element.closest("li.mega-menu").length&&!$element.hasClass("mega-menu")||($element.addClass("et-show-dropdown"),$element.removeClass("et-hover").addClass("et-hover"));else{var closeDelay=void 0!==delay?delay:200;$element.removeClass("et-show-dropdown"),$element.removeClass("et-touch-hover"),setTimeout(function(){$element.hasClass("et-show-dropdown")||$element.removeClass("et-hover")},closeDelay)}},window.et_pb_apply_sticky_image_effect=function($sticky_image_el){var $row=$sticky_image_el.closest(".et_pb_row"),$section=$row.closest(".et_pb_section"),$column=$sticky_image_el.closest(".et_pb_column"),$lastRowInSection=$section.children(".et_pb_row").last(),$lastColumnInRow=$row.children(".et_pb_column").last(),$lastModuleInColumn=$column.children(".et_pb_module").last();return!$row.is($lastRowInSection)||($lastRowInSection.addClass("et-last-child"),!$sticky_image_el.is($lastModuleInColumn)||($section.hasClass("et_pb_section_sticky")||$section.addClass("et_pb_section_sticky"),$column.addClass("et_pb_row_sticky"),void(!$section.hasClass("et_pb_section_sticky_mobile")&&$column.is($lastColumnInRow)&&$section.addClass("et_pb_section_sticky_mobile"))))}}(jQuery);
/*!
* easyPieChart
* Lightweight plugin to render simple, animated and retina optimized pie charts
*
* @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
* @version 2.1.5
*/
!function(root,factory){"object"==typeof exports?module.exports=factory(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],factory):factory(root.jQuery)}(this,function($){var CanvasRenderer=function(el,options){var cachedBackground,canvas=document.createElement("canvas");el.appendChild(canvas),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(canvas);var ctx=canvas.getContext("2d");canvas.width=canvas.height=options.size;var scaleBy=1;window.devicePixelRatio>1&&(scaleBy=window.devicePixelRatio,canvas.style.width=canvas.style.height=[options.size,"px"].join(""),canvas.width=canvas.height=options.size*scaleBy,ctx.scale(scaleBy,scaleBy)),ctx.translate(options.size/2,options.size/2),ctx.rotate((options.rotate/180-.5)*Math.PI);var radius=(options.size-options.lineWidth)/2;options.scaleColor&&options.scaleLength&&(radius-=options.scaleLength+2),Date.now=Date.now||function(){return+new Date};var drawCircle=function(color,lineWidth,percent,alpha){var isNegative=(percent=Math.min(Math.max(-1,percent||0),1))<=0;ctx.beginPath(),ctx.arc(0,0,radius,0,2*Math.PI*percent,isNegative),ctx.strokeStyle=color,ctx.globalAlpha=alpha,ctx.lineWidth=lineWidth,ctx.stroke()},drawScale=function(){var offset,length;ctx.lineWidth=1,ctx.fillStyle=options.scaleColor,ctx.save();for(var i=24;i>0;--i)i%6==0?(length=options.scaleLength,offset=0):(length=.6*options.scaleLength,offset=options.scaleLength-length),ctx.fillRect(-options.size/2+offset,0,length,1),ctx.rotate(Math.PI/12);ctx.restore()},reqAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/60)},drawBackground=function(){options.scaleColor&&drawScale(),options.trackColor&&drawCircle(options.trackColor,options.lineWidth,1,options.trackAlpha)};this.getCanvas=function(){return canvas},this.getCtx=function(){return ctx},this.clear=function(){ctx.clearRect(options.size/-2,options.size/-2,options.size,options.size)},this.draw=function(percent){options.scaleColor||options.trackColor?ctx.getImageData&&ctx.putImageData?cachedBackground?ctx.putImageData(cachedBackground,0,0):(drawBackground(),cachedBackground=ctx.getImageData(0,0,options.size*scaleBy,options.size*scaleBy)):(this.clear(),drawBackground()):this.clear(),ctx.lineCap=options.lineCap;var color;color="function"==typeof options.barColor?options.barColor(percent):options.barColor,drawCircle(color,options.lineWidth,percent/100,options.barAlpha)}.bind(this),this.animate=function(from,to){var startTime=Date.now();options.onStart(from,to);var animation=function(){var process=Math.min(Date.now()-startTime,options.animate.duration),currentValue=options.easing(this,process,from,to-from,options.animate.duration);this.draw(currentValue),options.onStep(from,to,currentValue),process>=options.animate.duration?options.onStop(from,to):reqAnimationFrame(animation)}.bind(this);reqAnimationFrame(animation)}.bind(this)},EasyPieChart=function(el,opts){var defaultOptions={barColor:"#ef1e25",barAlpha:1,trackColor:"#f9f9f9",trackAlpha:1,scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,render:!0,animate:{duration:1e3,enabled:!0},easing:function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t+b:-c/2*(--t*(t-2)-1)+b},onStart:function(from,to){},onStep:function(from,to,currentValue){},onStop:function(from,to){}};if(void 0!==CanvasRenderer)defaultOptions.renderer=CanvasRenderer;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");defaultOptions.renderer=SVGRenderer}var options={},currentValue=0,init=function(){this.el=el,this.options=options;for(var i in defaultOptions)defaultOptions.hasOwnProperty(i)&&(options[i]=opts&&void 0!==opts[i]?opts[i]:defaultOptions[i],"function"==typeof options[i]&&(options[i]=options[i].bind(this)));"string"==typeof options.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[options.easing])?options.easing=jQuery.easing[options.easing]:options.easing=defaultOptions.easing,"number"==typeof options.animate&&(options.animate={duration:options.animate,enabled:!0}),"boolean"!=typeof options.animate||options.animate||(options.animate={duration:1e3,enabled:options.animate}),this.renderer=new options.renderer(el,options),this.renderer.draw(currentValue),el.dataset&&el.dataset.percent?this.update(parseFloat(el.dataset.percent)):el.getAttribute&&el.getAttribute("data-percent")&&this.update(parseFloat(el.getAttribute("data-percent")))}.bind(this);this.update=function(newValue){return newValue=parseFloat(newValue),options.animate.enabled?this.renderer.animate(currentValue,newValue):this.renderer.draw(newValue),currentValue=newValue,this}.bind(this),this.disableAnimation=function(){return options.animate.enabled=!1,this},this.enableAnimation=function(){return options.animate.enabled=!0,this},init()};$.fn.easyPieChart=function(options){return this.each(function(){var instanceOptions;$.data(this,"easyPieChart")||(instanceOptions=$.extend({},options,$(this).data()),$.data(this,"easyPieChart",new EasyPieChart(this,instanceOptions)))})}});
/*!
 * Salvattore 1.0.5 by @rnmp and @ppold
* https://github.com/rnmp/salvattore
* Licensed under the MIT license.
* Copyright (c) 2013-2014 Rolando Murillo and Giorgio Leveroni
*/
/*
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.salvattore=t()}(this,function(){/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ /*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */return window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],r=null;t.type="text/css",t.id="matchmediajs-test",n.parentNode.insertBefore(t,n),r="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=n:t.textContent=n,"1px"===r.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}()),function(){"use strict";if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var e=window.matchMedia,t=e("only all").matches,n=!1,r=0,a=[],i=function(){clearTimeout(r),r=setTimeout(function(){for(var t=0,n=a.length;n>t;t++){var r=a[t].mql,i=a[t].listeners||[],o=e(r.media).matches;if(o!==r.matches){r.matches=o;for(var c=0,l=i.length;l>c;c++)i[c].call(window,r)}}},30)};window.matchMedia=function(r){var o=e(r),c=[],l=0;return o.addListener=function(e){t&&(n||(n=!0,window.addEventListener("resize",i,!0)),0===l&&(l=a.push({mql:o,listeners:c})),c.push(e))},o.removeListener=function(e){for(var t=0,n=c.length;n>t;t++)c[t]===e&&c.splice(t,1)},o}}(),function(){"use strict";for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-e)),a=window.setTimeout(function(){t(n+r)},r);return e=n+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),"function"!=typeof window.CustomEvent&&function(){"use strict";function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(e,t){"use strict";var n={},r=[],a=[],i=[],o=function(e,t,n){e.dataset?e.dataset[t]=n:e.setAttribute("data-"+t,n)};return n.obtainGridSettings=function(t){var r=e.getComputedStyle(t,":before").getPropertyValue("content").slice(1,-1),a=r.match(/^\s*(\d+)(?:\s?\.(.+))?\s*$/),i=1,o=[];return a?(i=a[1],o=a[2],o=o?o.split("."):["column"]):(a=r.match(/^\s*\.(.+)\s+(\d+)\s*$/))&&(o=a[1],(i=a[2])&&(i=i.split("."))),{numberOfColumns:i,columnClasses:o}},n.addColumns=function(e,r){for(var a,i=n.obtainGridSettings(e),c=i.numberOfColumns,l=i.columnClasses,s=new Array(+c),u=t.createDocumentFragment(),d=c;0!=d--;)a="[data-columns] > *:nth-child("+c+"n-"+d+")",s.push(r.querySelectorAll(a));s.forEach(function(e){var n=t.createElement("div"),r=t.createDocumentFragment();n.className=l.join(" "),Array.prototype.forEach.call(e,function(e){r.appendChild(e)}),n.appendChild(r),u.appendChild(n)}),e.appendChild(u),o(e,"columns",c)},n.removeColumns=function(n){var r=t.createRange();r.selectNodeContents(n);var a=Array.prototype.filter.call(r.extractContents().childNodes,function(t){return t instanceof e.HTMLElement}),i=a.length,c=a[0].childNodes.length,l=new Array(c*i);Array.prototype.forEach.call(a,function(e,t){Array.prototype.forEach.call(e.children,function(e,n){l[n*i+t]=e})});var s=t.createElement("div");return o(s,"columns",0),l.filter(function(e){return!!e}).forEach(function(e){s.appendChild(e)}),s},n.recreateColumns=function(t){e.requestAnimationFrame(function(){n.addColumns(t,n.removeColumns(t));var e=new CustomEvent("columnsChange");t.dispatchEvent(e)})},n.mediaQueryChange=function(e){e.matches&&Array.prototype.forEach.call(r,n.recreateColumns)},n.getCSSRules=function(e){var t;try{t=e.sheet.cssRules||e.sheet.rules}catch(n){return[]}return t||[]},n.getStylesheets=function(){return Array.prototype.concat.call(Array.prototype.slice.call(t.querySelectorAll("style[type='text/css']")),Array.prototype.slice.call(t.querySelectorAll("link[rel='stylesheet']")))},n.mediaRuleHasColumnsSelector=function(e){var t,n;try{t=e.length}catch(r){t=0}for(;t--;)if((n=e[t]).selectorText&&n.selectorText.match(/\[data-columns\](.*)::?before$/))return!0;return!1},n.scanMediaQueries=function(){var t=[];if(e.matchMedia){n.getStylesheets().forEach(function(e){Array.prototype.forEach.call(n.getCSSRules(e),function(e){e.media&&e.cssRules&&n.mediaRuleHasColumnsSelector(e.cssRules)&&t.push(e)})});var r=a.filter(function(e){return-1===t.indexOf(e)});i.filter(function(e){return-1!==r.indexOf(e.rule)}).forEach(function(e){e.mql.removeListener(n.mediaQueryChange)}),i=i.filter(function(e){return-1===r.indexOf(e.rule)}),t.filter(function(e){return-1==a.indexOf(e)}).forEach(function(t){var r=e.matchMedia(t.media.mediaText);r.addListener(n.mediaQueryChange),i.push({rule:t,mql:r})}),a.length=0,a=t}},n.rescanMediaQueries=function(){n.scanMediaQueries(),Array.prototype.forEach.call(r,n.recreateColumns)},n.nextElementColumnIndex=function(e,t){var n,r,a,i=e.children,o=i.length,c=0,l=0;for(a=0;o>a;a++)n=i[a],r=n.children.length+(t[a].children||t[a].childNodes).length,0===c&&(c=r),c>r&&(l=a,c=r);return l},n.createFragmentsList=function(e){for(var n=new Array(e),r=0;r!==e;)n[r]=t.createDocumentFragment(),r++;return n},n.appendElements=function(e,t){var r=e.children,a=r.length,i=n.createFragmentsList(a);Array.prototype.forEach.call(t,function(t){var r=n.nextElementColumnIndex(e,i);i[r].appendChild(t)}),Array.prototype.forEach.call(r,function(e,t){e.appendChild(i[t])})},n.prependElements=function(e,r){var a=e.children,i=a.length,o=n.createFragmentsList(i),c=i-1;r.forEach(function(e){var t=o[c];t.insertBefore(e,t.firstChild),0===c?c=i-1:c--}),Array.prototype.forEach.call(a,function(e,t){e.insertBefore(o[t],e.firstChild)});for(var l=t.createDocumentFragment(),s=r.length%i;0!=s--;)l.appendChild(e.lastChild);e.insertBefore(l,e.firstChild)},n.registerGrid=function(a){if("none"!==e.getComputedStyle(a).display){var i=t.createRange();i.selectNodeContents(a);var c=t.createElement("div");c.appendChild(i.extractContents()),o(c,"columns",0),n.addColumns(a,c),r.push(a)}},n.init=function(){var e=t.createElement("style");e.innerHTML="[data-columns]::before{visibility:hidden;position:absolute;font-size:1px;}",t.head.appendChild(e);var r=t.querySelectorAll("[data-columns]");Array.prototype.forEach.call(r,n.registerGrid),n.scanMediaQueries()},n.init(),{appendElements:n.appendElements,prependElements:n.prependElements,registerGrid:n.registerGrid,recreateColumns:n.recreateColumns,rescanMediaQueries:n.rescanMediaQueries,append_elements:n.appendElements,prepend_elements:n.prependElements,register_grid:n.registerGrid,recreate_columns:n.recreateColumns,rescan_media_queries:n.rescanMediaQueries}}(window,window.document)});
/*!
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
!function($,window,undefined){"$:nomunge";function get_fragment(url){return"#"+(url=url||location.href).replace(/^[^#]*#?(.*)$/,"$1")}var fake_onhashchange,str_hashchange="hashchange",doc=document,special=$.event.special,doc_mode=doc.documentMode,supports_onhashchange="on"+str_hashchange in window&&(void 0===doc_mode||doc_mode>7);$.fn[str_hashchange]=function(fn){return fn?this.bind(str_hashchange,fn):this.trigger(str_hashchange)},$.fn[str_hashchange].delay=50,special[str_hashchange]=$.extend(special[str_hashchange],{setup:function(){if(supports_onhashchange)return!1;$(fake_onhashchange.start)},teardown:function(){if(supports_onhashchange)return!1;$(fake_onhashchange.stop)}}),fake_onhashchange=function(){function poll(){var hash=get_fragment(),history_hash=history_get(last_hash);hash!==last_hash?(history_set(last_hash=hash,history_hash),$(window).trigger(str_hashchange)):history_hash!==last_hash&&(location.href=location.href.replace(/#.*/,"")+history_hash),timeout_id=setTimeout(poll,$.fn[str_hashchange].delay)}var timeout_id,self={},last_hash=get_fragment(),fn_retval=function(val){return val},history_set=fn_retval,history_get=fn_retval;return self.start=function(){timeout_id||poll()},self.stop=function(){timeout_id&&clearTimeout(timeout_id),timeout_id=void 0},void 0!==$.browser&&$.browser.msie&&!supports_onhashchange&&function(){var iframe,iframe_src;self.start=function(){iframe||(iframe_src=$.fn[str_hashchange].src,iframe_src=iframe_src&&iframe_src+get_fragment(),iframe=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){iframe_src||history_set(get_fragment()),poll()}).attr("src",iframe_src||"javascript:0").insertAfter("body")[0].contentWindow,doc.onpropertychange=function(){try{"title"===event.propertyName&&(iframe.document.title=doc.title)}catch(e){}})},self.stop=fn_retval,history_get=function(){return get_fragment(iframe.location.href)},history_set=function(hash,history_hash){var iframe_doc=iframe.document,domain=$.fn[str_hashchange].domain;hash!==history_hash&&(iframe_doc.title=doc.title,iframe_doc.open(),domain&&iframe_doc.write('<script>document.domain="'+domain+'"<\/script>'),iframe_doc.close(),iframe.location.hash=hash)}}(),self}()}(jQuery,this);
/*!
* Magnific Popup v1.0.1 by Dmitry Semenov
* The MIT License (MIT)
* Copyright (c) 2014-2015 Dmitry Semenov, http://dimsemenov.com
* http://bit.ly/magnific-popup#build=inline+image+ajax+iframe+gallery+retina+imagezoom+fastclick
*/
/*
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},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(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||((b=new t).init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(!1===c.isObj){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if((g=h[e]).parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;{if(!b.isOpen){b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(!1===b.st.fixedBgPos||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c}b.updateItemHTML()}},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup.mfp focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&!0!==b.currTemplate[b.currItem.type]||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y("AfterClose")},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=!!b.st[d]&&b.st[d].markup;y("FirstMarkupParse",f),b.currTemplate[d]=!f||a(f)}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&!0===b.currTemplate[c]?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y("BeforeAppend"),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){if((void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick)||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||!1===c)return!0;if((e=a.split("_")).length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},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(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}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=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),void(3===++c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):200>++e?setTimeout(f,100):g())},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),(j=c.img[0]).naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),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,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.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,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),!(a=b._getItemToZoom()))return void k();(f=j(a)).css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(!(a=b._getItemToZoom()))return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return!!b.currItem.hasSize&&b.currItem.img},_getOffset:function(c){var d,e=(d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem)).offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src="//about:blank"),b.isIE8&&c.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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+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=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,!(!c||!c.enabled)&&(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null}))},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.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=b.st.retina,c=a.ratio;(c=isNaN(c)?c():c)>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},f=".mfpFastClick";a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},1e3),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
/*!
* Waypoints - 4.0.0
* Copyright © 2011-2015 Caleb Troughton
* Licensed under the MIT license.
* https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
*/
!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],r=o.newScroll>o.oldScroll?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i===this.waypoints.length-1?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
/*!
* FitVids 1.1
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/
!function($){"use strict";$.fn.fitVids=function(options){var settings={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var head=document.head||document.getElementsByTagName("head")[0],div=document.createElement("div");div.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',head.appendChild(div.childNodes[1])}return options&&$.extend(settings,options),this.each(function(){var selectors=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];settings.customSelector&&selectors.push(settings.customSelector);var ignoreList=".fitvidsignore";settings.ignore&&(ignoreList=ignoreList+", "+settings.ignore);var $allVideos=$(this).find(selectors.join(","));($allVideos=($allVideos=$allVideos.not("object object")).not(ignoreList)).each(function(count){var $this=$(this);if(!($this.parents(ignoreList).length>0||"embed"===this.tagName.toLowerCase()&&$this.parent("object").length||$this.parent(".fluid-width-video-wrapper").length)){$this.css("height")||$this.css("width")||!isNaN($this.attr("height"))&&!isNaN($this.attr("width"))||($this.attr("height",9),$this.attr("width",16));var aspectRatio=("object"===this.tagName.toLowerCase()||$this.attr("height")&&!isNaN(parseInt($this.attr("height"),10))?parseInt($this.attr("height"),10):$this.height())/(isNaN(parseInt($this.attr("width"),10))?$this.width():parseInt($this.attr("width"),10));if(!$this.attr("id")){var videoID="fitvid"+count;$this.attr("id",videoID)}$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*aspectRatio+"%"),$this.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto);
/*!
* SmoothScroll for websites v1.2.1
* Licensed under the terms of the MIT license.
*
* People involved
* - Balazs Galambosi (maintainer)
* - Michael Herf     (Pulse Algorithm)
*/
!function(){function initTest(){options.keyboardSupport&&addEvent("keydown",keydown)}function init(){if(document.body){var body=document.body,html=document.documentElement,windowHeight=window.innerHeight,scrollHeight=body.scrollHeight;if(root=document.compatMode.indexOf("CSS")>=0?html:body,activeElement=body,initTest(),initDone=!0,top!=self)isFrame=!0;else if(scrollHeight>windowHeight&&(body.offsetHeight<=windowHeight||html.offsetHeight<=windowHeight)){var pending=!1;if(html.style.height="auto",setTimeout(function(){pending||html.scrollHeight==document.height||(pending=!0,setTimeout(function(){html.style.height=document.height+"px",pending=!1},500))},10),root.offsetHeight<=windowHeight){var underlay=document.createElement("div");underlay.style.clear="both",body.appendChild(underlay)}}options.fixedBackground||isExcluded||(body.style.backgroundAttachment="scroll",html.style.backgroundAttachment="scroll")}}function scrollArray(elem,left,top,delay){if(delay||(delay=1e3),directionCheck(left,top),1!=options.accelerationMax){var elapsed=+new Date-lastScroll;if(elapsed<options.accelerationDelta){var factor=(1+30/elapsed)/2;factor>1&&(factor=Math.min(factor,options.accelerationMax),left*=factor,top*=factor)}lastScroll=+new Date}if(que.push({x:left,y:top,lastX:left<0?.99:-.99,lastY:top<0?.99:-.99,start:+new Date}),!pending){var scrollWindow=elem===document.body,step=function(time){for(var now=+new Date,scrollX=0,scrollY=0,i=0;i<que.length;i++){var item=que[i],elapsed=now-item.start,finished=elapsed>=options.animationTime,position=finished?1:elapsed/options.animationTime;options.pulseAlgorithm&&(position=pulse(position));var x=item.x*position-item.lastX>>0,y=item.y*position-item.lastY>>0;scrollX+=x,scrollY+=y,item.lastX+=x,item.lastY+=y,finished&&(que.splice(i,1),i--)}scrollWindow?window.scrollBy(scrollX,scrollY):(scrollX&&(elem.scrollLeft+=scrollX),scrollY&&(elem.scrollTop+=scrollY)),left||top||(que=[]),que.length?requestFrame(step,elem,delay/options.frameRate+1):pending=!1};requestFrame(step,elem,0),pending=!0}}function keydown(event){var target=event.target,modifier=event.ctrlKey||event.altKey||event.metaKey||event.shiftKey&&event.keyCode!==key.spacebar;if(/input|textarea|select|embed/i.test(target.nodeName)||target.isContentEditable||event.defaultPrevented||modifier)return!0;if(isNodeName(target,"button")&&event.keyCode===key.spacebar)return!0;var x=0,y=0,elem=overflowingAncestor(activeElement),clientHeight=elem.clientHeight;switch(elem==document.body&&(clientHeight=window.innerHeight),event.keyCode){case key.up:y=-options.arrowScroll;break;case key.down:y=options.arrowScroll;break;case key.spacebar:y=-(event.shiftKey?1:-1)*clientHeight*.9;break;case key.pageup:y=.9*-clientHeight;break;case key.pagedown:y=.9*clientHeight;break;case key.home:y=-elem.scrollTop;break;case key.end:var damt=elem.scrollHeight-elem.scrollTop-clientHeight;y=damt>0?damt+10:0;break;case key.left:x=-options.arrowScroll;break;case key.right:x=options.arrowScroll;break;default:return!0}scrollArray(elem,x,y),event.preventDefault()}function setCache(elems,overflowing){for(var i=elems.length;i--;)cache[uniqueID(elems[i])]=overflowing;return overflowing}function overflowingAncestor(el){var elems=[],rootScrollHeight=root.scrollHeight;do{var cached=cache[uniqueID(el)];if(cached)return setCache(elems,cached);if(elems.push(el),rootScrollHeight===el.scrollHeight){if(!isFrame||root.clientHeight+10<rootScrollHeight)return setCache(elems,document.body)}else if(el.clientHeight+10<el.scrollHeight&&(overflow=getComputedStyle(el,"").getPropertyValue("overflow-y"),"scroll"===overflow||"auto"===overflow))return setCache(elems,el)}while(el=el.parentNode)}function addEvent(type,fn,bubble){window.addEventListener(type,fn,bubble||!1)}function removeEvent(type,fn,bubble){window.removeEventListener(type,fn,bubble||!1)}function isNodeName(el,tag){return(el.nodeName||"").toLowerCase()===tag.toLowerCase()}function directionCheck(x,y){x=x>0?1:-1,y=y>0?1:-1,direction.x===x&&direction.y===y||(direction.x=x,direction.y=y,que=[],lastScroll=0)}function isTouchpad(deltaY){if(deltaY)return deltaY=Math.abs(deltaY),deltaBuffer.push(deltaY),deltaBuffer.shift(),clearTimeout(deltaBufferTimer),!(isDivisible(deltaBuffer[0],120)&&isDivisible(deltaBuffer[1],120)&&isDivisible(deltaBuffer[2],120))}function isDivisible(n,divisor){return Math.floor(n/divisor)==n/divisor}function pulse_(x){var val,start;return(x*=options.pulseScale)<1?val=x-(1-Math.exp(-x)):(x-=1,val=(start=Math.exp(-1))+(1-Math.exp(-x))*(1-start)),val*options.pulseNormalize}function pulse(x){return x>=1?1:x<=0?0:(1==options.pulseNormalize&&(options.pulseNormalize/=pulse_(1)),pulse_(x))}var activeElement,defaultOptions={frameRate:150,animationTime:400,stepSize:80,pulseAlgorithm:!0,pulseScale:8,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!0,fixedBackground:!0,excluded:""},options=defaultOptions,isExcluded=!1,isFrame=!1,direction={x:0,y:0},initDone=!1,root=document.documentElement,deltaBuffer=[120,120,120],key={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},options=defaultOptions,que=[],pending=!1,lastScroll=+new Date,cache={};setInterval(function(){cache={}},1e4);var deltaBufferTimer,uniqueID=function(){var i=0;return function(el){return el.uniqueID||(el.uniqueID=i++)}}(),requestFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(callback,element,delay){window.setTimeout(callback,delay||1e3/60)},isChrome=/chrome/i.test(window.navigator.userAgent),wheelEvent=null;"onwheel"in document.createElement("div")?wheelEvent="wheel":"onmousewheel"in document.createElement("div")&&(wheelEvent="mousewheel");var isSmoothScrollActive=document.body.className.split(" ").filter(function(className){return"et_smooth_scroll"===className}).length>0;wheelEvent&&isChrome&&isSmoothScrollActive&&(addEvent(wheelEvent,function(event){initDone||init();var target=event.target,overflowing=overflowingAncestor(target);if(!overflowing||event.defaultPrevented||isNodeName(activeElement,"embed")||isNodeName(target,"embed")&&/\.pdf/i.test(target.src))return!0;var deltaX=event.wheelDeltaX||0,deltaY=event.wheelDeltaY||0;if(deltaX||deltaY||(deltaY=event.wheelDelta||0),!options.touchpadSupport&&isTouchpad(deltaY))return!0;Math.abs(deltaX)>1.2&&(deltaX*=options.stepSize/120),Math.abs(deltaY)>1.2&&(deltaY*=options.stepSize/120),scrollArray(overflowing,-deltaX,-deltaY),event.preventDefault()}),addEvent("mousedown",function(event){activeElement=event.target}),addEvent("load",init)),window.ET_SmoothScroll={toggleKeydown:function(enable){enable?addEvent("keydown",keydown):removeEvent("keydown",keydown)}}}();
/*! ET custom.js */
!function($){function et_preload_image(src,callback){var img=new Image;img.onLoad=callback,img.onload=callback,img.src=src}function et_fix_logo_transition(is_onload){var logo_wrapper_width,$body=$("body"),$logo=$("#logo"),logo_actual_width=parseInt($logo.attr("data-actual-width")),logo_actual_height=parseInt($logo.attr("data-actual-height")),logo_height_percentage=parseInt($logo.attr("data-height-percentage")),$top_nav=$("#et-top-navigation"),top_nav_height=parseInt($top_nav.attr("data-height")),top_nav_fixed_height=parseInt($top_nav.attr("data-fixed-height")),$main_header=$("#main-header"),is_header_split=$body.hasClass("et_header_style_split"),is_fixed_nav=$main_header.hasClass("et-fixed-header"),is_hide_primary_logo=$body.hasClass("et_hide_primary_logo"),is_hide_fixed_logo=$body.hasClass("et_hide_fixed_logo"),logo_height_base=is_fixed_nav?top_nav_height:top_nav_fixed_height;is_onload=void 0!==is_onload&&is_onload,is_header_split&&!window.et_is_vertical_nav&&(is_onload&&(logo_height_base=top_nav_height),logo_wrapper_width=logo_actual_width*((logo_height_base*(logo_height_percentage/100)+22)/logo_actual_height),is_hide_primary_logo&&(is_fixed_nav||is_onload)&&(logo_wrapper_width=0),!is_hide_fixed_logo||is_fixed_nav||is_onload||(logo_wrapper_width=0),$(".et_header_style_split .centered-inline-logo-wrap").css({width:logo_wrapper_width}))}function et_toggle_slide_menu(force_state){var $slide_menu_container=$(".et_header_style_slide .et_slide_in_menu_container"),$page_container=$(".et_header_style_slide #page-container, .et_header_style_slide.et_fixed_nav #main-header"),$header_container=$(".et_header_style_slide #main-header"),is_menu_opened=$slide_menu_container.hasClass("et_pb_slide_menu_opened"),set_to=void 0!==force_state?force_state:"auto",is_boxed_layout=$("body").hasClass("et_boxed_layout"),page_container_margin=is_boxed_layout?parseFloat($("#page-container").css("margin-left")):0,slide_container_width=$slide_menu_container.innerWidth();"auto"!==set_to&&(is_menu_opened&&"open"===set_to||!is_menu_opened&&"close"===set_to)||(is_menu_opened?($slide_menu_container.css({right:"-"+slide_container_width+"px"}),$page_container.css({left:"0"}),is_boxed_layout&&et_is_fixed_nav&&$header_container.css({left:page_container_margin+"px"}),setTimeout(function(){$slide_menu_container.css({display:"none"})},700)):($slide_menu_container.css({display:"block"}),setTimeout(function(){if($slide_menu_container.css({right:"0"}),$page_container.css({left:"-"+(slide_container_width-page_container_margin)+"px"}),is_boxed_layout&&et_is_fixed_nav){var left_position=0>slide_container_width-2*page_container_margin?Math.abs(slide_container_width-2*page_container_margin):"-"+(slide_container_width-2*page_container_margin);left_position<slide_container_width&&$header_container.css({left:left_position+"px"})}},50)),$("body").toggleClass("et_pb_slide_menu_active"),$slide_menu_container.toggleClass("et_pb_slide_menu_opened"))}function et_adjust_woocommerce_checkout_scroll(){if(et_is_fixed_nav&&!(980>=parseInt($et_window.width()))){var headerHeight=parseInt($("#main-header").innerHeight());$("html, body").animate({scrollTop:$("form.checkout").offset().top-100-headerHeight},1e3)}}function et_pb_toggle_fullscreen_menu(){var $menu_container=$(".et_header_style_fullscreen .et_slide_in_menu_container"),top_bar_height=$menu_container.find(".et_slide_menu_top").innerHeight();$menu_container.toggleClass("et_pb_fullscreen_menu_opened"),$("body").toggleClass("et_pb_fullscreen_menu_active"),$menu_container.hasClass("et_pb_fullscreen_menu_opened")?($menu_container.addClass("et_pb_fullscreen_menu_animated"),$menu_container.css({"padding-top":top_bar_height+20})):setTimeout(function(){$menu_container.removeClass("et_pb_fullscreen_menu_animated")},1e3)}window.et_calculating_scroll_position=!1,window.et_side_nav_links_initialized=!1;var et_header_height,et_header_modifier,et_header_offset,et_primary_header_top,$et_pb_post_fullwidth=$(".single.et_pb_pagebuilder_layout.et_full_width_page"),$et_container=(navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/),navigator.userAgent.match(/iPad/),$(".container")),et_is_fixed_nav=($et_container.width(),$("body").hasClass("et_fixed_nav")||$("body").hasClass("et_vertical_fixed")),et_is_vertical_fixed_nav=$("body").hasClass("et_vertical_fixed"),et_is_rtl=$("body").hasClass("rtl"),et_hide_nav=$("body").hasClass("et_hide_nav"),et_header_style_left=$("body").hasClass("et_header_style_left"),$top_header=$("#top-header"),$main_header=$("#main-header"),$main_container_wrapper=$("#page-container"),$et_main_content_first_row=$("#main-content .container:first-child"),$et_main_content_first_row_meta_wrapper=$et_main_content_first_row.find(".et_post_meta_wrapper:first"),$et_main_content_first_row_meta_wrapper_title=$et_main_content_first_row_meta_wrapper.find("h1.entry-title"),$et_single_post=($et_main_content_first_row.find(".entry-content:first"),$("body.single")),$et_window=$(window),etRecalculateOffset=!1,$et_header_style_split=$(".et_header_style_split"),$et_top_navigation=$("#et-top-navigation"),$et_pb_first_row=($("#logo"),$("body.et_pb_pagebuilder_layout .et_pb_section:visible:first")),et_is_touch_device="ontouchstart"in window||navigator.maxTouchPoints,$et_top_cart=$("#et-secondary-menu a.et-cart-info");if($(".woocommerce .woocommerce-product-gallery").length>0){var gal=$(".woocommerce-product-gallery")[0],newstr=gal.outerHTML.replace("data-columns","data-cols");gal.outerHTML=newstr}if($et_top_cart.length>0&&$(".shop_table.cart").length>0&&$(document.body).on("updated_wc_div",function(){var new_text,new_total=0;$(".shop_table.cart").find(".product-quantity input").each(function(){new_total+=parseInt($(this).val())}),new_text=(new_text=1===new_total?DIVI.item_count:DIVI.items_count).replace("%d",new_total),$et_top_cart.find("span").text(new_text)}),$(document).ready(function(){function et_header_menu_split(){var $logo_container=$("#main-header > .container > .logo_container"),$logo_container_splitted=$(".centered-inline-logo-wrap > .logo_container"),et_top_navigation_li_size=$et_top_navigation.children("nav").children("ul").children("li").size(),et_top_navigation_li_break_index=Math.round(et_top_navigation_li_size/2)-1,window_width=window.innerWidth||$et_window.width();window_width>980&&$logo_container.length&&$("body").hasClass("et_header_style_split")&&($('<li class="centered-inline-logo-wrap"></li>').insertAfter($et_top_navigation.find("nav > ul >li:nth("+et_top_navigation_li_break_index+")")),$logo_container.appendTo($et_top_navigation.find(".centered-inline-logo-wrap"))),window_width<=980&&$logo_container_splitted.length&&($logo_container_splitted.prependTo("#main-header > .container"),$("#main-header .centered-inline-logo-wrap").remove())}function et_set_right_vertical_menu(){var $body=$("body");if($body.hasClass("et_boxed_layout")&&$body.hasClass("et_vertical_fixed")&&$body.hasClass("et_vertical_right")){var header_offset=parseFloat($("#page-container").css("margin-right"));header_offset=0>(header_offset+=parseFloat($("#et-main-area").css("margin-right"))-225)?0:header_offset,$("#main-header").addClass("et_vertical_menu_set").css({left:"",right:header_offset})}}function et_change_primary_nav_position(delay){setTimeout(function(){var $body=$("body"),$wpadminbar=$("#wpadminbar"),$top_header=$("#top-header"),et_primary_header_top=0;$wpadminbar.length&&(et_primary_header_top+=$wpadminbar.innerHeight()),$top_header.length&&$top_header.is(":visible")&&(et_primary_header_top+=$top_header.innerHeight()),!window.et_is_vertical_nav&&$body.hasClass("et_fixed_nav")&&$("#main-header").css("top",et_primary_header_top)},delay)}function et_hide_nav_transform(){var $body=$("body"),$body_height=$(document).height(),$viewport_height=$(window).height()+et_header_height+200;$body.hasClass("et_vertical_nav")||($body.hasClass("et_hide_nav")||$body.hasClass("et_hide_nav_disabled")&&$body.hasClass("et_fixed_nav"))&&($body_height>$viewport_height?($body.hasClass("et_hide_nav_disabled")&&($body.addClass("et_hide_nav"),$body.removeClass("et_hide_nav_disabled")),$("#main-header").css("transform","translateY(-"+et_header_height+"px)"),$("#top-header").css("transform","translateY(-"+et_header_height+"px)")):($("#main-header").css({transform:"translateY(0)",opacity:"1"}),$("#top-header").css({transform:"translateY(0)",opacity:"1"}),$body.removeClass("et_hide_nav"),$body.addClass("et_hide_nav_disabled")),et_fix_page_container_position())}function et_save_initial_page_container_style($selector,property){var styling={};styling[property]=$selector.css(property),$selector.attr({"data-fix-page-container":"on"}).data({fix_page_container_style:styling})}function et_page_load_scroll_to_anchor(){var location_hash=window.et_location_hash.replace(/(\|)/g,"\\$1");if(0!==$(location_hash).length){var $map_container=$(location_hash+" .et_pb_map_container"),$map=$map_container.children(".et_pb_map"),$target=$(location_hash);$target.css("display",window.et_location_hash_style);var speed=(void 0!==$target.offset().top?$target.offset().top:0)>4e3?1600:800;$map_container.length&&google.maps.event.trigger($map[0],"resize"),setTimeout(function(){et_pb_smooth_scroll($target,!1,speed,"swing"),setTimeout(function(){et_pb_smooth_scroll($target,!1,150,"linear")},speed+25)},700)}}function et_get_saved_padding_margin_value(saved_value,order){if(void 0===saved_value)return!1;var values=saved_value.split("|");return void 0!==values[order]&&values[order]}function et_fix_page_container_position(){var header_height,et_pb_first_row_padding_top,et_window_width=parseInt($et_window.width()),$top_header=$("#top-header"),$et_pb_first_row=$("body.et_pb_pagebuilder_layout .et_pb_section:visible:first"),secondary_nav_height=$top_header.length&&$top_header.is(":visible")?parseInt($top_header.innerHeight()):0,main_header_fixed_height=0;if($('*[data-fix-page-container="on"]').each(function(){var $adjusted_element=$(this),styling=$adjusted_element.data();$adjusted_element.css(styling.fix_page_container_style)}),et_window_width>980&&!$main_header.attr("data-height-loaded")&&$main_header.attr({"data-height-onload":parseInt($main_header.height()),"data-height-loaded":!0}),et_window_width<=980?(header_height=parseInt($main_header.innerHeight())+secondary_nav_height-1,window.et_is_transparent_nav&&!$et_pb_first_row.length&&(header_height+=58)):(header_height=parseInt($main_header.attr("data-height-onload"))+secondary_nav_height,window.et_is_transparent_nav&&!window.et_is_vertical_nav&&$et_main_content_first_row.length&&(header_height+=58),$main_header.clone().addClass("main-header-clone et-fixed-header").css({opacity:0,position:"fixed",top:"auto",right:0,bottom:0,left:0}).appendTo($("body")),main_header_fixed_height=$(".main-header-clone").height(),$(".main-header-clone").remove()),$main_header.attr({"data-fixed-height-onload":main_header_fixed_height}),window.et_is_transparent_nav&&!window.et_is_vertical_nav){$et_pb_first_row.addClass("et_pb_section_first");var is_pb=$et_pb_first_row.length,is_post_pb=is_pb&&$et_single_post.length,is_post_pb_full_layout_has_title=$et_pb_post_fullwidth.length&&$et_main_content_first_row_meta_wrapper_title.length,is_post_pb_full_layout_no_title=$et_pb_post_fullwidth.length&&0===$et_main_content_first_row_meta_wrapper_title.length,is_pb_fullwidth_section_first=$et_pb_first_row.is(".et_pb_fullwidth_section"),is_no_pb_mobile=et_window_width<=980&&$et_main_content_first_row.length,isProject=$("body").hasClass("single-project");if(!is_post_pb||is_post_pb_full_layout_no_title&&is_pb_fullwidth_section_first||isProject)if(is_pb_fullwidth_section_first){var $et_pb_first_row_first_module=$et_pb_first_row.children(".et_pb_module:visible:first");if(is_post_pb_full_layout_no_title&&is_pb_fullwidth_section_first&&et_window_width>980&&(header_height-=58),$et_pb_first_row_first_module.is(".et_pb_slider")){var $et_pb_first_row_first_module_slide_image=$et_pb_first_row_first_module.find(".et_pb_slide_image"),$et_pb_first_row_first_module_slide=$et_pb_first_row_first_module.find(".et_pb_slide"),$et_pb_first_row_first_module_slide_container=$et_pb_first_row_first_module.find(".et_pb_slide .et_pb_container"),et_pb_slide_image_margin_top=0-parseInt($et_pb_first_row_first_module_slide_image.height())/2,$et_pb_first_row_first_module_slider_arrow=$et_pb_first_row_first_module.find(".et-pb-slider-arrows a"),et_pb_first_row_slider_arrow_height=$et_pb_first_row_first_module_slider_arrow.height();et_save_initial_page_container_style($et_pb_first_row_first_module_slide,"paddingTop"),$et_pb_first_row_first_module_slide.css({paddingTop:header_height}),$et_pb_first_row_first_module_slide_container.css({"min-height":""}),et_save_initial_page_container_style($et_pb_first_row_first_module_slide_image,"marginTop"),$et_pb_first_row_first_module_slide_image.css({marginTop:et_pb_slide_image_margin_top}),et_save_initial_page_container_style($et_pb_first_row_first_module_slider_arrow,"marginTop"),$et_pb_first_row_first_module_slider_arrow.css({marginTop:header_height/2-et_pb_first_row_slider_arrow_height/2});var et_pb_first_row_slide_container_height_new=0;$et_pb_first_row_first_module.find(".et_pb_slide").each(function(){var $et_pb_first_row_first_module_slide_item=$(this),$et_pb_first_row_first_module_slide_container=$et_pb_first_row_first_module_slide_item.find(".et_pb_container");$et_pb_first_row_first_module_slide_item.show(),$et_pb_first_row_first_module_slide_container.css({"min-height":""});var et_pb_first_row_slide_container_height=$et_pb_first_row_first_module_slide_container.innerHeight();et_pb_first_row_slide_container_height_new<et_pb_first_row_slide_container_height&&(et_pb_first_row_slide_container_height_new=et_pb_first_row_slide_container_height),$et_pb_first_row_first_module_slide_item.is(':not(".et-pb-active-slide")')&&$et_pb_first_row_first_module_slide_item.hide()}),et_save_initial_page_container_style($et_pb_first_row_first_module_slide_container,"min-height"),$et_pb_first_row_first_module_slide_container.css({"min-height":et_pb_first_row_slide_container_height_new})}else if($et_pb_first_row_first_module.is(".et_pb_fullwidth_header")){$et_pb_first_row_first_module.removeAttr("style");var et_pb_first_row_first_module_fullwidth_header_padding_top=parseInt($et_pb_first_row_first_module.css("paddingTop"));et_save_initial_page_container_style($et_pb_first_row_first_module,"paddingTop"),$et_pb_first_row_first_module.css({paddingTop:header_height+et_pb_first_row_first_module_fullwidth_header_padding_top})}else if($et_pb_first_row_first_module.is(".et_pb_fullwidth_portfolio"))et_save_initial_page_container_style($et_pb_first_row_first_module,"paddingTop"),$et_pb_first_row_first_module.css({paddingTop:header_height});else if($et_pb_first_row_first_module.is(".et_pb_map_container")){var $et_pb_first_row_map=$et_pb_first_row_first_module.find(".et_pb_map");$et_pb_first_row_map.css({height:""}),$et_pb_first_row_first_module.find(".et_pb_map").css({height:header_height+parseInt($et_pb_first_row_map.css("height"))}),$et_pb_first_row_first_module.addClass("et_beneath_transparent_nav")}else if($et_pb_first_row_first_module.is(".et_pb_fullwidth_menu"))et_save_initial_page_container_style($et_pb_first_row_first_module,"marginTop"),$et_pb_first_row_first_module.css({marginTop:header_height});else if($et_pb_first_row_first_module.is(".et_pb_fullwidth_code")){var $et_pb_first_row_first_module_code=$et_pb_first_row_first_module;$et_pb_first_row_first_module_code.css({paddingTop:""});var et_pb_first_row_first_module_code_padding_top=parseInt($et_pb_first_row_first_module_code.css("paddingTop"));et_save_initial_page_container_style($et_pb_first_row_first_module_code,"paddingTop"),$et_pb_first_row_first_module_code.css({paddingTop:header_height+et_pb_first_row_first_module_code_padding_top})}else $et_pb_first_row_first_module.is(".et_pb_post_title")?(et_save_initial_page_container_style($et_pb_first_row_first_module,"paddingTop"),$et_pb_first_row_first_module.css({paddingTop:header_height+50})):$et_pb_first_row_first_module.length||(et_pb_first_row_padding_top=parseFloat($et_pb_first_row.css("paddingTop")),et_save_initial_page_container_style($et_pb_first_row,"paddingTop"),$et_pb_first_row.data("is_hide_nav")||$et_pb_first_row.css({paddingTop:et_pb_first_row_padding_top+header_height}),clearTimeout(window.et_fallback_transparent_adjustment_timeout),window.et_fallback_transparent_adjustment_timeout=setTimeout(function(){var is_hide_nav=$("body").hasClass("et_hide_nav")&&"matrix(1, 0, 0, 1, 0, 0)"!==$("#main-header").css("transform");is_hide_nav?$et_pb_first_row.css({paddingTop:""}):$et_pb_first_row.css({paddingTop:et_pb_first_row_padding_top+header_height}),$et_pb_first_row.data("is_hide_nav",is_hide_nav)},300))}else if(is_pb){$et_pb_first_row.css({paddingTop:""});var applied_saved_custom_padding,saved_custom_padding_top=et_get_saved_padding_margin_value($et_pb_first_row.attr("data-padding"),0),saved_custom_padding_tablet_top=et_get_saved_padding_margin_value($et_pb_first_row.attr("data-padding-tablet"),0),saved_custom_padding_phone_top=et_get_saved_padding_margin_value($et_pb_first_row.attr("data-padding-phone"),0);saved_custom_padding_top||saved_custom_padding_tablet_top||saved_custom_padding_phone_top?(et_window_width>980&&saved_custom_padding_top?$et_pb_first_row.css({paddingTop:saved_custom_padding_top}):et_window_width>767&&saved_custom_padding_tablet_top?$et_pb_first_row.css({paddingTop:saved_custom_padding_tablet_top}):saved_custom_padding_phone_top&&$et_pb_first_row.css({paddingTop:saved_custom_padding_phone_top}),applied_saved_custom_padding=parseInt($et_pb_first_row.css("paddingTop")),$et_pb_first_row.css({paddingTop:header_height+applied_saved_custom_padding})):(et_pb_first_row_padding_top=header_height+parseInt($et_pb_first_row.css("paddingBottom")),et_save_initial_page_container_style($et_pb_first_row,"paddingTop"),$et_pb_first_row.css({paddingTop:et_pb_first_row_padding_top}))}else is_no_pb_mobile?$et_main_content_first_row.css({paddingTop:header_height}):$("#main-content .container:first-child").css({paddingTop:header_height});else $et_main_content_first_row.css({paddingTop:""}),et_window_width<980&&(header_height+=40),is_pb_fullwidth_section_first&&$et_pb_first_row.css({paddingTop:"0"}),is_post_pb_full_layout_has_title?$et_main_content_first_row_meta_wrapper.css({paddingTop:header_height}):is_post_pb_full_layout_no_title?(et_save_initial_page_container_style($et_pb_first_row,"paddingTop"),$et_pb_first_row.css({paddingTop:header_height})):(et_save_initial_page_container_style($et_main_content_first_row,"paddingTop"),$et_main_content_first_row.css({paddingTop:header_height}));$("#et_fix_page_container_position").length||$("<style />",{id:"et_fix_page_container_position",text:"#page-container{ padding-top: 0 !important;}"}).appendTo("head")}else et_is_fixed_nav&&$main_container_wrapper.css("paddingTop",header_height);et_change_primary_nav_position(0)}function et_all_elements_loaded(){if(et_is_fixed_nav&&et_calculate_header_values(),et_fix_page_container_position(),window.et_is_minified_js&&window.et_is_transparent_nav&&!window.et_is_vertical_nav&&$(window).trigger("resize"),window.hasOwnProperty("et_location_hash")&&""!==window.et_location_hash&&et_page_load_scroll_to_anchor(),et_header_style_left&&!window.et_is_vertical_nav&&($logo_width=parseInt($("#logo").width()),et_is_rtl?$et_top_navigation.css("padding-right",$logo_width+30):$et_top_navigation.css("padding-left",$logo_width+30)),$("p.demo_store").length&&$("#footer-bottom").css("margin-bottom",$("p.demo_store").innerHeight()),$.fn.waypoint){var $waypoint_selector;if(et_is_vertical_fixed_nav&&($waypoint_selector=$("#main-content")).waypoint({handler:function(direction){et_fix_logo_transition(),"down"===direction?$("#main-header").addClass("et-fixed-header"):$("#main-header").removeClass("et-fixed-header")}}),et_is_fixed_nav){window.et_is_transparent_nav&&!window.et_is_vertical_nav&&!$("body.woocommerce.single-product").length&&$et_pb_first_row.length?($waypoint_selector=$et_pb_first_row.is(".et_pb_fullwidth_section")?$et_pb_first_row.children(".et_pb_module:visible:first"):$et_pb_first_row.find(".et_pb_row:visible:first")).length||($waypoint_selector=$("body.et_pb_pagebuilder_layout .et_pb_module:visible:first")):$waypoint_selector=$(window.et_is_transparent_nav&&!window.et_is_vertical_nav&&$et_main_content_first_row.length?"#content-area":"#main-content");var checkIfScrolled=!0;setTimeout(function(){checkIfScrolled=!1},0),$waypoint_selector.waypoint({offset:function(){if(etRecalculateOffset&&(setTimeout(function(){et_calculate_header_values()},200),etRecalculateOffset=!1),et_hide_nav)return et_header_offset-et_header_height-200;var waypoint_selector_offset=$waypoint_selector.offset();return waypoint_selector_offset.top<et_header_offset&&(et_header_offset=0-(et_header_offset-waypoint_selector_offset.top)),et_header_offset},handler:function(direction){if(et_fix_logo_transition(),"down"===direction){if(checkIfScrolled&&0===$et_window.scrollTop())return;if($main_header.addClass("et-fixed-header"),$main_container_wrapper.addClass("et-animated-content"),$top_header.addClass("et-fixed-header"),!et_hide_nav&&!window.et_is_transparent_nav&&!$(".mobile_menu_bar_toggle").is(":visible")){var $clone_header,clone_header_height,fix_padding,secondary_nav_height=$top_header.length?parseInt($top_header.height()):0;$clone_header=$main_header.clone().addClass("et-fixed-header, et_header_clone").css({transition:"none",display:"none"}),clone_header_height=parseInt($clone_header.prependTo("body").height()),window.et_is_vertical_nav||(fix_padding=parseInt($main_container_wrapper.css("padding-top"))-clone_header_height-secondary_nav_height+1,$main_container_wrapper.css("margin-top",-fix_padding)),$(".et_header_clone").remove()}}else $main_header.removeClass("et-fixed-header"),$top_header.removeClass("et-fixed-header"),$main_container_wrapper.css("margin-top","-1px");setTimeout(function(){et_set_search_form_css()},400)}})}et_hide_nav&&et_hide_nav_transform()}}function et_hide_search(){$(".et_search_form_container").hasClass("et_pb_is_animating")||($(".et_menu_container").removeClass("et_pb_menu_hidden et_pb_no_animation").addClass("et_pb_menu_visible"),$(".et_search_form_container").removeClass("et_pb_search_visible et_pb_no_animation").addClass("et_pb_search_form_hidden et_pb_is_animating"),setTimeout(function(){$(".et_menu_container").addClass("et_pb_no_animation"),$(".et_search_form_container").addClass("et_pb_no_animation").removeClass("et_pb_is_animating")},1e3))}function et_set_search_form_css(){var $search_container=$(".et_search_form_container"),$body=$("body");if($search_container.hasClass("et_pb_search_visible")){var header_height=$("#main-header").innerHeight(),menu_width=$("#top-menu").width(),font_size=$("#top-menu li a").css("font-size");$search_container.css({height:header_height+"px"}),$search_container.find("input").css("font-size",font_size),$body.hasClass("et_header_style_left")?$search_container.find("form").css("max-width",menu_width+60):$search_container.css("max-width",menu_width+60)}}function et_fb_side_nav_page_init(){$(window).off("scroll",window.et_pb_window_side_nav_scroll_init),$("#main-content .et_pb_side_nav").off("click",".et_pb_side_nav a"),$("#main-content .et_pb_side_nav").remove(),et_pb_side_nav_page_init()}var $et_top_menu=$("ul.nav, ul.menu"),is_customize_preview=($("#et_search_icon"),$("body").hasClass("et_is_customize_preview"));window.et_pb_init_nav_menu($et_top_menu),($et_header_style_split.length&&!window.et_is_vertical_nav||is_customize_preview)&&(et_header_menu_split(),$(window).resize(function(){et_header_menu_split()})),$("ul.et_disable_top_tier").length&&$("ul.et_disable_top_tier > li > ul").prev("a").attr("href","#"),window.et_is_vertical_nav&&($("#main-header").height()<$("#et-top-navigation").height()&&$("#main-header").height($("#et-top-navigation").height()+$("#logo").height()+100),et_set_right_vertical_menu()),window.et_calculate_header_values=function(){var $top_header=$("#top-header"),secondary_nav_height=$top_header.length&&$top_header.is(":visible")?parseInt($top_header.innerHeight()):0,admin_bar_height=$("#wpadminbar").length?parseInt($("#wpadminbar").innerHeight()):0,$slide_menu_container=$(".et_header_style_slide .et_slide_in_menu_container");if(et_header_height=parseInt($("#main-header").innerHeight())+secondary_nav_height,et_header_modifier=et_header_height<=90?et_header_height-29:et_header_height-56,et_header_offset=et_header_modifier+admin_bar_height,et_primary_header_top=secondary_nav_height+admin_bar_height,$slide_menu_container.length&&!$("body").hasClass("et_pb_slide_menu_active")&&($slide_menu_container.css({right:"-"+parseInt($slide_menu_container.innerWidth())+"px",display:"none"}),$("body").hasClass("et_boxed_layout"))){var page_container_margin=$main_container_wrapper.css("margin-left");$main_header.css({left:page_container_margin})}};var $comment_form=$("#commentform");if(et_pb_form_placeholders_init($comment_form),$comment_form.submit(function(){et_pb_remove_placeholder_text($comment_form)}),et_duplicate_menu($("#et-top-navigation ul.nav"),$("#et-top-navigation .mobile_nav"),"mobile_menu","et_mobile_menu"),et_duplicate_menu("",$(".et_pb_fullscreen_nav_container"),"mobile_menu_slide","et_mobile_menu","no_click_event"),$("#et-secondary-nav").length&&$("#et-top-navigation #mobile_menu").append($("#et-secondary-nav").clone().html()),$(".et_slide_in_menu_container").length){var $item_with_sub=$(".et_slide_in_menu_container").find(".menu-item-has-children > a");$item_with_sub.length&&$item_with_sub.append('<span class="et_mobile_menu_arrow"></span>')}$et_container.data("previous-width",$et_container.width()),$(window).resize(function(){var page_container_margin,window_width=parseInt($et_window.width()),et_container_previous_width=parseInt($et_container.data("previous-width")),et_container_css_width=$et_container.css("width"),et_container_actual_width=(void 0!==et_container_css_width?"%"!==et_container_css_width.substr(-1,1):"")?parseInt($et_container.width()):parseInt($et_container.width())/100*window_width,containerWidthChanged=et_container_previous_width!==et_container_actual_width,$slide_menu_container=$(".et_slide_in_menu_container");if(et_is_fixed_nav&&containerWidthChanged){void 0!==update_page_container_position&&clearTimeout(update_page_container_position);var update_page_container_position=setTimeout(function(){et_fix_page_container_position(),"function"==typeof et_fix_fullscreen_section&&et_fix_fullscreen_section()},200);$et_container.data("previous-width",et_container_actual_width)}if(et_hide_nav&&et_hide_nav_transform(),$("#wpadminbar").length&&et_is_fixed_nav&&window_width>=740&&window_width<=782&&(et_calculate_header_values(),et_change_primary_nav_position(0)),et_set_search_form_css(),$slide_menu_container.length&&!$("body").hasClass("et_pb_slide_menu_active")&&($slide_menu_container.css({right:"-"+parseInt($slide_menu_container.innerWidth())+"px"}),$("body").hasClass("et_boxed_layout")&&et_is_fixed_nav&&(page_container_margin=$main_container_wrapper.css("margin-left"),$main_header.css({left:page_container_margin}))),$slide_menu_container.length&&$("body").hasClass("et_pb_slide_menu_active"))if($("body").hasClass("et_boxed_layout")){var left_position;page_container_margin=parseFloat($main_container_wrapper.css("margin-left")),$main_container_wrapper.css({left:"-"+(parseInt($slide_menu_container.innerWidth())-page_container_margin)+"px"}),et_is_fixed_nav&&(left_position=0>parseInt($slide_menu_container.innerWidth())-2*page_container_margin?Math.abs($slide_menu_container.innerWidth()-2*page_container_margin):"-"+($slide_menu_container.innerWidth()-2*page_container_margin))<parseInt($slide_menu_container.innerWidth())&&$main_header.css({left:left_position+"px"})}else $("#page-container, .et_fixed_nav #main-header").css({left:"-"+parseInt($slide_menu_container.innerWidth())+"px"});if($slide_menu_container.length&&$("body").hasClass("et_header_style_fullscreen")){var top_bar_height=parseInt($slide_menu_container.find(".et_slide_menu_top").innerHeight());$slide_menu_container.css({"padding-top":top_bar_height+20})}et_set_right_vertical_menu()}),$(window).ready(function(){$.fn.fitVids&&$("#main-content").fitVids({customSelector:"iframe[src^='http://www.hulu.com'], iframe[src^='http://www.dailymotion.com'], iframe[src^='http://www.funnyordie.com'], iframe[src^='https://embed-ssl.ted.com'], iframe[src^='http://embed.revision3.com'], iframe[src^='https://flickr.com'], iframe[src^='http://blip.tv'], iframe[src^='http://www.collegehumor.com']"})}),$('a[href*="#"]:not([href="#"])').click(function(){var $this_link=$(this),has_closest_smooth_scroll_disabled=$this_link.closest(".et_smooth_scroll_disabled").length,has_closest_woocommerce_tabs=$this_link.closest(".woocommerce-tabs").length&&$this_link.closest(".tabs").length,has_closest_timetable_tab=$this_link.closest(".tt_tabs_navigation").length,has_closest_eab_cal_link=$this_link.closest(".eab-shortcode_calendar-navigation-link").length,has_closest_ee_cart_link=$this_link.closest(".view-cart-lnk").length,has_acomment_reply=$this_link.hasClass("acomment-reply"),is_woocommerce_review_link=$this_link.hasClass("woocommerce-review-link"),disable_scroll=has_closest_smooth_scroll_disabled||has_closest_ee_cart_link||has_closest_woocommerce_tabs||has_closest_eab_cal_link||has_acomment_reply||is_woocommerce_review_link||has_closest_timetable_tab;if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname&&!disable_scroll){var target=$(this.hash);if((target=target.length?target:$("[name="+this.hash.slice(1)+"]")).length)return $this_link.closest(".et_pb_fullscreen_menu_opened").length>0&&et_pb_toggle_fullscreen_menu(),et_pb_smooth_scroll(target,!1,800),!$("#main-header").hasClass("et-fixed-header")&&$("body").hasClass("et_fixed_nav")&&$(window).width()>980&&setTimeout(function(){et_pb_smooth_scroll(target,!1,40,"linear")},780),!1}}),window.et_pb_window_side_nav_scroll_init=function(){if(!0!==window.et_calculating_scroll_position&&!1!==window.et_side_nav_links_initialized){window.et_calculating_scroll_position=!0;var side_offset,add_offset=$("body").hasClass("et_fixed_nav")?20:-90,top_header_height=$("#top-header").length>0?parseInt($("#top-header").height()):0,main_header_height=$("#main-header").length>0?parseInt($("#main-header").height()):0;$("#wpadminbar").length>0&&parseInt($(window).width())>600&&(add_offset+=parseInt($("#wpadminbar").outerHeight())),side_offset=window.et_is_vertical_nav?top_header_height+add_offset+60:top_header_height+main_header_height+add_offset;for(var window_height=parseInt($(window).height()),scroll_position=parseInt($(window).scrollTop()),at_bottom_of_page=window_height+scroll_position===parseInt($(document).height()),total_links=$(".side_nav_item a").length-1,link=0;link<=total_links;link++){var $target_section=$(".et_pb_section:visible:not(.et_pb_section div)").eq(link),at_top_of_page=void 0===$target_section.offset(),current_active=$(".side_nav_item a.active").parent().index(),next_active=null,target_offset=!1===at_top_of_page?$target_section.offset().top-side_offset:0;at_top_of_page?next_active=0:at_bottom_of_page?next_active=total_links:scroll_position>=target_offset&&(next_active=link),null!==next_active&&next_active!==current_active&&($(".side_nav_item a").removeClass("active"),$("a#side_nav_item_id_"+next_active).addClass("active"))}window.et_calculating_scroll_position=!1}},window.et_pb_side_nav_page_init=function(){var $sections=$(".et_pb_section:visible:not(.et_pb_section div)"),total_sections=$sections.length,side_nav_offset=parseInt((20*total_sections+40)/2);window.et_side_nav_links_initialized=!1,window.et_calculating_scroll_position=!1,total_sections>1&&$(".et_pb_side_nav_page").length&&($("#main-content").append('<ul class="et_pb_side_nav"></ul>'),$sections.each(function(index,element){var active_class=0===index?"active":"";$(".et_pb_side_nav").append('<li class="side_nav_item"><a href="#" id="side_nav_item_id_'+index+'" class= "'+active_class+'">'+index+"</a></li>"),total_sections-1===index&&(window.et_side_nav_links_initialized=!0)}),$("ul.et_pb_side_nav").css("marginTop","-"+side_nav_offset+"px"),$(".et_pb_side_nav").addClass("et-visible"),$(".et_pb_side_nav a").click(function(){var index=parseInt($(this).text()),$target=$(".et_pb_section:visible:not(.et_pb_section div)").eq(index),top_section="0"==$(this).text();return et_pb_smooth_scroll($target,top_section,800),!$("#main-header").hasClass("et-fixed-header")&&$("body").hasClass("et_fixed_nav")&&parseInt($(window).width())>980&&setTimeout(function(){et_pb_smooth_scroll($target,top_section,200)},500),!1}),$(window).on("scroll",et_pb_window_side_nav_scroll_init))},et_pb_side_nav_page_init(),$(".et_pb_scroll_top").length&&($(window).scroll(function(){$(this).scrollTop()>800?$(".et_pb_scroll_top").show().removeClass("et-hidden").addClass("et-visible"):$(".et_pb_scroll_top").removeClass("et-visible").addClass("et-hidden")}),$(".et_pb_scroll_top").click(function(){$("html, body").animate({scrollTop:0},800)})),$(".comment-reply-link").length&&$(".comment-reply-link").addClass("et_pb_button"),$("#et_top_search").click(function(){var $search_container=$(".et_search_form_container");$search_container.hasClass("et_pb_is_animating")||($(".et_menu_container").removeClass("et_pb_menu_visible et_pb_no_animation").addClass("et_pb_menu_hidden"),$search_container.removeClass("et_pb_search_form_hidden et_pb_no_animation").addClass("et_pb_search_visible et_pb_is_animating"),setTimeout(function(){$(".et_menu_container").addClass("et_pb_no_animation"),$search_container.addClass("et_pb_no_animation").removeClass("et_pb_is_animating")},1e3),$search_container.find("input").focus(),et_set_search_form_css())}),$(".et_close_search_field").click(function(){et_hide_search()}),$(document).mouseup(function(e){var $header=$("#main-header");$(".et_menu_container").hasClass("et_pb_menu_hidden")&&($header.is(e.target)||0!==$header.has(e.target).length||et_hide_search())}),$("#logo").length&&et_preload_image($("#logo").attr("src"),function(){var $logo_wrap,logo_width,logo_height,$logo=$("#logo"),is_svg="svg"===$logo.attr("src").substr(-3,3);$("body").append($("<div />",{id:"et-define-logo-wrap",style:"position: fixed; bottom: 0; opacity: 0;"})),$logo_wrap=$("#et-define-logo-wrap"),is_svg&&$logo_wrap.addClass("svg-logo"),$logo_wrap.html($logo.clone().css({display:"block"}).removeAttr("id")),logo_width=$logo_wrap.find("img").width(),logo_height=$logo_wrap.find("img").height(),$logo.attr({"data-actual-width":logo_width,"data-actual-height":logo_height}),$logo_wrap.remove(),et_fix_logo_transition(!0)}),$(".footer-widget").each(function(){var $footer_widget=$(this),footer_widget_width=$footer_widget.width(),$adsense_ins=$footer_widget.find(".widget_adsensewidget ins");$adsense_ins.length&&$adsense_ins.width(footer_widget_width)}),$("body").is(".et-fb")?($(window).on("et_fb_root_did_mount",function(){et_fb_side_nav_page_init(),et_all_elements_loaded()}),$(window).on("et_fb_section_content_change",et_fb_side_nav_page_init)):$(window).load(et_all_elements_loaded)}),$("#main-header").on("click",".et_toggle_slide_menu",function(){et_toggle_slide_menu()}),et_is_touch_device&&($et_window.on("swipeleft",function(event){30>=parseInt($et_window.width())-parseInt(event.swipestart.coords[0])&&et_toggle_slide_menu("open")}),$et_window.on("swiperight",function(event){$("body").hasClass("et_pb_slide_menu_active")&&et_toggle_slide_menu("close")})),$("#page-container").on("click",".et_toggle_fullscreen_menu",function(){et_pb_toggle_fullscreen_menu()}),$(window).unload(function(){$("body").hasClass("et_pb_fullscreen_menu_active")&&$(".et_toggle_fullscreen_menu").trigger("click")}),$(".et_pb_fullscreen_nav_container").on("click","li.menu-item-has-children > a",function(){var $this_parent=$(this).closest("li"),$this_arrow=$this_parent.find(">a .et_mobile_menu_arrow"),$closest_submenu=$this_parent.find(">ul"),is_opened_submenu=$this_arrow.hasClass("et_pb_submenu_opened");return $this_arrow.toggleClass("et_pb_submenu_opened"),is_opened_submenu?($closest_submenu.removeClass("et_pb_slide_dropdown_opened"),$closest_submenu.slideToggle(700,"easeInOutCubic")):($closest_submenu.slideToggle(700,"easeInOutCubic"),$closest_submenu.addClass("et_pb_slide_dropdown_opened")),!1}),$("body").hasClass("et_header_style_fullscreen")){var $menu_container=$(".et_header_style_fullscreen .et_slide_in_menu_container");if($menu_container.length){var top_bar_height=$menu_container.find(".et_slide_menu_top").innerHeight();$menu_container.css({"padding-top":top_bar_height+20})}}$(document.body).on("checkout_error",function(){et_adjust_woocommerce_checkout_scroll()}),$(document.body).on("updated_checkout",function(data){"failure"===data.result&&et_adjust_woocommerce_checkout_scroll()})}(jQuery);
(function($){$(document).ready(function(){var user_agent=navigator.userAgent;var is_opera_edge;var browser=user_agent.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))/i)||[];var browser_name='';var browser_class='';if(/trident/i.test(browser[0])){browser_name='ie';}else if(browser[0]==='Chrome'){is_opera_edge=user_agent.match(/\b(OPR|Edge)/);if(is_opera_edge!==null){browser_name=is_opera_edge[0].replace('OPR','opera');}}
if(''===browser_name){if('standalone'in window.navigator&&!window.navigator.standalone){browser_name='uiwebview';}else{browser_name=''!==browser[0]?browser[0]:navigator.appName;}}
browser_name=browser_name.toLowerCase();switch(browser_name){case'msie':browser_class='ie';break;case'firefox':browser_class='gecko';break;default:browser_class=browser_name;break;}
if(user_agent.match(/iPhone/)){browser_class+=' iphone';}
$('body').addClass(browser_class);});})(jQuery);
jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Juin","Juil","Aou","Sep","Oct","Nov","Dec"],weekdaysFull:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],today:"Aujourd'hui",clear:"Effacer",firstDay:1,format:"dd mmmm yyyy",formatSubmit:"yyyy/mm/dd"});
!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);

;(function(){function E(){var b=r(this),a=b.data("bubbleaddon");a&&(a.destroy(),b.removeData("bubbleaddon"))}function n(b,a){if(!b)return!1;if(0===a)return b[a];for(var f=a,e=b[a];"inherit"===e;)f--,e=-1<f?b[f]:b[0];return e}function q(){var b=r(this);b.data("bubbleaddon")&&E.call(this);var a=b.data("bubbleObj");if(a){var f=a.levels,e=f.length,k=B.width(),c=0;if(f)for(var h=0;h<e;h++){var p=f[h];if(x!==p){k<p&&(c=h);var x=p}}f=a.layerW[c];e=a.layerH[c];e="100%"===e||"full"===e;"100%"!==f&&"full"!==
f?f=parseInt(a.layr.css("min-width"),10):(f=!a.carousel||a.isStatic?a.slider:a.slotholder,a.fullAlign?(f=f.width(),a.wrapper[0].style.left=0):(f=Math.min(a.slider.width()/a.grids[c],1),f*=a.grids[c]));e?(e=a.isStatic?a.slider.height():a.slotholder.height(),a.wrapper[0].style.top=0):e=parseInt(a.layr.css("min-height"),10);k=n(a.blurStrength,c);x=n(a.borderSize,c);p=n(a.borderColor,c);h=n(a.blurColor,c);var u=n(a.blurX,c),G=n(a.blurY,c),v=n(a.bufferX,c),l=n(a.bufferY,c),g=n(a.numBubbles,c),q=n(a.velX,
c);c=n(a.velY,c);a=I(f,e,a.slider,a.canvas,parseInt(g,10),a.color,parseInt(k,10),h,parseInt(u,10),parseInt(G,10),p,parseInt(x,10),parseInt(v,10),parseInt(l,10),parseFloat(q),parseFloat(c));b.data("bubbleaddon",a);b.data("bubblesplaying")&&C(a,b)}}function C(b,a){b.pause=!1;b.screen.resize();b.started||(b.started=!0,b.inited());a.data("bubblesplaying",!0);b.play()}function H(b,a){this.slider=b;this.carousel=a;b.one("revolution.slide.onloaded",this.onLoaded.bind(this)).one("rsBubbleMorphDestroyed",
this.destroy.bind(this))}function J(b){if("transparent"===b.trim())return["#FFFFFF",!1];if(-1!==b.search(/\[\{/))try{b=JSON.parse(b.replace(/&/g,'"'));for(var a=b.colors,f=a.length,e=[],k,c=0;c<f;c++){var h=a[c];delete h.align;k?JSON.stringify(h)!==JSON.stringify(k)&&(e[e.length]=h):e[e.length]=h;k=h}b.colors=e;return[b,!0]}catch(p){return["#FFFFFF",!1]}else return-1!==b.search("#")?[b,!1]:-1!==b.search("rgba")?[b.replace(/\s/g,"").replace(/false/g,"1"),!1]:-1!==b.search("rgb")?[b.replace(/\s/g,""),
!1]:/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(b)?[b,!1]:["#FFFFFF",!1]}function I(b,a,f,e,k,c,h,p,n,r,G,v,l,g,q,E){var w,x={screen:{elem:null,callback:null,ctx:null,width:0,height:0,left:0,top:0,init:function(d,a){this.elem=e;this.callback=d||null;"CANVAS"==this.elem.tagName&&(this.ctx=this.elem.getContext("2d"));this.elem.onselectstart=function(){return!1};this.elem.ondrag=function(){return!1};a&&this.resize();return this},resize:function(){var d=this.elem;this.width=b;this.height=a;for(this.top=
this.left=0;null!=d;d=d.offsetParent)this.left+=d.offsetLeft,this.top+=d.offsetTop;this.ctx&&(this.elem.width=this.width,this.elem.height=this.height);w&&(w.width=this.width,w.height=this.height);this.callback&&this.callback()},destroy:function(){for(var d in this)this.hasOwnProperty(d)&&delete this[d]}}},y=function(d,a){this.x=d;this.y=a;this.magnitude=d*d+a*a;this.force=this.computed=0};y.prototype.add=function(d){return new y(this.x+d.x,this.y+d.y)};var u=function(d){this.vel=new y((.5<Math.random()?
1:-1)*(.2+Math.random()*q),(.5<Math.random()?1:-1)*(.2+Math.random()*E));this.pos=new y(.2*d.width+Math.random()*d.width*.6,.2*d.height+Math.random()*d.height*.6);this.size=d.wh/15+d.wh/15*(1.4*Math.random()+.1);this.width=d.width;this.height=d.height};u.prototype.move=function(){this.pos.x>=this.width-this.size-l?(0<this.vel.x&&(this.vel.x=-this.vel.x),this.pos.x=this.width-this.size-l):this.pos.x<=this.size+l&&(0>this.vel.x&&(this.vel.x=-this.vel.x),this.pos.x=this.size+l);this.pos.y>=this.height-
this.size-g?(0<this.vel.y&&(this.vel.y=-this.vel.y),this.pos.y=this.height-this.size-g):this.pos.y<=this.size+g&&(0>this.vel.y&&(this.vel.y=-this.vel.y),this.pos.y=this.size+g);this.pos=this.pos.add(this.vel)};var A=function(d,a,b,e){this.step=5;this.width=d;this.height=a;this.wh=Math.min(d,a);this.sx=Math.floor(this.width/this.step);this.sy=Math.floor(this.height/this.step);this.paint=!1;this.metaFill=B(d,a,e);this.plx=[0,0,1,0,1,1,1,1,1,1,0,1,0,0,0,0];this.ply=[0,0,0,0,0,0,1,0,0,1,1,1,0,1,0,1];
this.mscases=[0,3,0,3,1,3,0,3,2,2,0,2,1,1,0];this.ix=[1,0,-1,0,0,1,0,-1,-1,0,1,0,0,1,1,0,0,0,1,1];this.grid=[];this.balls=[];this.iter=0;this.sign=1;for(d=0;d<(this.sx+2)*(this.sy+2);d++)this.grid[d]=new y(d%(this.sx+2)*this.step,Math.floor(d/(this.sx+2))*this.step);for(d=0;d<b;d++)this.balls[d]=new u(this)};A.prototype.destroy=function(){for(var d in this.balls)this.balls.hasOwnProperty(d)&&delete this.balls[d];for(d in this)this.hasOwnProperty(d)&&delete this[d]};A.prototype.computeForce=function(d,
a,b){b=b||d+a*(this.sx+2);if(0===d||0===a||d===this.sx||a===this.sy)d=.6*this.sign;else{d=0;a=this.grid[b];if(!a)return;for(var e=0,z;z=this.balls[e++];)d+=z.size*z.size/(-2*a.x*z.pos.x-2*a.y*z.pos.y+z.pos.magnitude+a.magnitude);d*=this.sign}if(this.grid[b])return this.grid[b].force=d};A.prototype.marchingSquares=function(a){var d=a[0],b=a[1],e=a[2];a=d+b*(this.sx+2);if(this.grid[a]){if(this.grid[a].computed===this.iter)return!1;for(var c,f=0,h=0;4>h;h++){var g=d+this.ix[h+12]+(b+this.ix[h+16])*(this.sx+
2);if(!this.grid[g]){c=!0;break}var k=this.grid[g].force;if(0<k&&0>this.sign||0>k&&0<this.sign||!k)k=this.computeForce(d+this.ix[h+12],b+this.ix[h+16],g);1<Math.abs(k)&&(f+=Math.pow(2,h))}if(!c){if(15===f)return[d,b-1,!1];if(5===f)c=2===e?3:1;else if(10===f)c=3===e?0:2;else{c=this.mscases[f];if(!this.grid[a])return;this.grid[a].computed=this.iter}a=this.step/(Math.abs(Math.abs(this.grid[d+this.plx[4*c+2]+(b+this.ply[4*c+2])*(this.sx+2)].force)-1)/Math.abs(Math.abs(this.grid[d+this.plx[4*c+3]+(b+this.ply[4*
c+3])*(this.sx+2)].force)-1)+1);m.lineTo(this.grid[d+this.plx[4*c]+(b+this.ply[4*c])*(this.sx+2)].x+this.ix[c]*a,this.grid[d+this.plx[4*c+1]+(b+this.ply[4*c+1])*(this.sx+2)].y+this.ix[c+4]*a);this.paint=!0;return[d+this.ix[c+4],b+this.ix[c+8],c]}}};A.prototype.renderMetaballs=function(){for(var a=0,b;b=this.balls[a++];)b.move();this.iter++;this.sign=-this.sign;this.paint=!1;m.fillStyle=this.metaFill;h&&(m.shadowBlur=h,m.shadowColor=p,m.shadowOffsetX=n,m.shadowOffsetY=r);v&&(m.strokeStyle=G,m.lineWidth=
v);m.beginPath();for(a=0;b=this.balls[a++];){b=[Math.round(b.pos.x/this.step),Math.round(b.pos.y/this.step),!1];do b=this.marchingSquares(b);while(b);this.paint&&(m.fill(),m.closePath(),v&&m.stroke(),m.beginPath(),this.paint=!1)}};var B=function(a,b,c){if(c[1]){c=c[0];if("radial"===c.type){var d=c.colors;var e=.5*a;a=.5*b;e=m.createRadialGradient(e,a,0,e,a,e);a=d.length;for(c=0;c<a;c++)b=d[c],e.addColorStop(.01*b.position,"rgba("+b.r+", "+b.g+", "+b.b+", "+b.a+")");return e}e=m;d=c.colors;c=c.angle;
var f=0,h=0,k=0,g=0;c=parseInt(c,10);if(/0|90|180|270|360/.test(c))switch(c){case 0:case 360:h=b;break;case 90:k=a;break;case 180:g=b;break;case 270:f=a}else a*=.5,b*=.5,g=Math.PI/180*(c-180),c=b/Math.cos(g),c+=Math.sin(g)*(a-Math.sqrt(c*c-b*b)),f=a+Math.cos(-Math.PI/2+g)*c,h=b+Math.sin(-Math.PI/2+g)*c,k=a+Math.cos(Math.PI/2+g)*c,g=b+Math.sin(Math.PI/2+g)*c;e=e.createLinearGradient(Math.round(f),Math.round(h),Math.round(k),Math.round(g));c=d.length;for(f=0;f<c;f++)a=d[f],b=parseInt(a.position,10),
e.addColorStop(.01*b,"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")");return e}return c[0]},F=function(){D&&!D.pause&&(m.clearRect(0,0,t.width,t.height),w.renderMetaballs(),requestAnimationFrame(F))},t=x.screen.init(null,!0),m=t.ctx,C=function(){w=new A(t.width,t.height,k,c)},D={play:F,pause:!1,screen:t,inited:C,started:!1,destroy:function(){D.pause=!0;cancelAnimationFrame(F);m.clearRect(0,0,t.width,t.height);w&&w.destroy();t.destroy();m=B=C=D=t=F=A=u=y=x=w=null}};return D}var r,B;window.BubbleMorphAddOn=
function(b,a,f){if(b&&a)return r=b,B=r(window),r.event.special.rsBubbleMorphDestroyed={remove:function(a){a.handler()}},new H(a,f)};H.prototype={onLoaded:function(){var b,a=this.slider,f=this.carousel,e=a[0].opt.gridwidth,k=a[0].opt.responsiveLevels;for(Array.isArray(e)||(e=[e]);4>e.length;)e[e.length]=e[e.length-1];for(b=0;4>b;b++)e[b]=parseInt(e[b],10);if(k){for(Array.isArray(k)||(k=[k]);4>k.length;)k[k.length]=k[k.length-1];for(b=0;4>b;b++)k[b]=parseInt(k[b],10)}this.morph=a.find(".tp-bubblemorph").each(function(){var b=
r(this),h=r("<canvas />").appendTo(b),p=this.getAttribute("data-numbubbles"),n=this.getAttribute("data-bubblesspeedx"),u=this.getAttribute("data-bubblesspeedy"),q=this.getAttribute("data-bubblesbufferx"),v=this.getAttribute("data-bubblesbuffery"),l=b.attr("data-width").replace(/[[\]]/g,"").replace(/'/g,"").split(","),g=b.attr("data-height").replace(/[[\]]/g,"").replace(/'/g,"").split(",");Array.isArray(l)||(l=[l]);for(Array.isArray(g)||(g=[g]);4>l.length;)l[l.length]=l[l.length-1];for(;4>g.length;)g[g.length]=
g[g.length-1];for(;g.length<l.length;)g[g.length]=g[g.length-1];for(;l.length<g.length;)g[l.length]=l[l.length-1];p=p.split("|");q=q.split("|");v=v.split("|");n=n.split("|");u=u.split("|");h={velX:n,velY:u,layr:b,grids:e,layerW:l,layerH:g,slider:a,levels:k,bufferX:q,bufferY:v,canvas:h[0],carousel:f,numBubbles:p,wrapper:b.closest(".tp-parallax-wrap"),isStatic:b.hasClass("tp-static-layer"),color:J(this.getAttribute("data-bubblesbg")),fullAlign:"slide"===this.getAttribute("data-basealign"),slotholder:b.closest(".tp-revslider-slidesli").find(".slotholder")};
if(p=this.getAttribute("data-bubblesblur"))h.blurStrength=p.split("|"),h.blurColor=b.attr("data-bubblesblurcolor").split("|"),h.blurX=b.attr("data-bubblesblurx").split("|"),h.blurY=b.attr("data-bubblesblury").split("|");if(p=this.getAttribute("data-bubblesbordersize"))h.borderSize=p.split("|"),h.borderColor=b.attr("data-bubblesbordercolor").split("|");b.data("bubbleObj",h)});if(this.morph.length)a.on("revolution.slide.afterdraw",this.onResize.bind(this)).on("revolution.slide.layeraction",this.layerAction.bind(this));
else this.destroy()},createBubbles:function(){this.morph.each(q)},onResize:function(b){clearTimeout(this.resizeTimer);this.morph.each(E);this.resizeTimer=setTimeout(this.resize.bind(this),250)},resize:function(){this.morph.each(q)},layerAction:function(b,a){var f=a.layer.data("bubbleaddon");if(!f)if(a.layer.hasClass("tp-bubblemorph"))this.createBubbles();else return;f=a.layer.data("bubbleaddon");f.screen&&f.screen.width&&f.screen.height||(q.call(a.layer),f=a.layer.data("bubbleaddon"));switch(a.eventtype){case "enterstage":C(f,
a.layer);break;case "leftstage":var e=a.layer;f.pause=!0;e.data("bubblesplaying",!1)}},checkRemoved:function(){return this.slider&&document.body.contains(this.slider[0])?!1:(this.destroy(),!0)},destroy:function(){this.slider.find(".tp-bubblemorph").each(function(){var a=r(this);a.data("bubbleaddon").pause=!0;a.removeData("bubbleaddon bubbleObj")});for(var b in this)this.hasOwnProperty(b)&&delete this[b]}}})();

!function(jQuery,undefined){var esgAnimmatrix,esgItemAnimations,supressFocus,startAnimations,mergedTransitions,vhandlers={};function punchgsReady(){esgAnimmatrix={"esg-none":[0,{autoAlpha:1,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},{autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},0,{autoAlpha:1,overwrite:"all"}],"esg-fade":[.3,{autoAlpha:0,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},{autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{autoAlpha:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-fadeout":[.3,{autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},{autoAlpha:0,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},.3,{autoAlpha:1,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-covergrowup":[.3,{autoAlpha:1,top:"100%",marginTop:-10,rotationZ:0,x:0,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0},{autoAlpha:1,top:"0%",marginTop:0,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{autoAlpha:1,top:"100%",marginTop:-10,bottom:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"},!0],"esg-flipvertical":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationY:0,skewX:0,skewY:0,rotationX:180,autoAlpha:0,z:-.001,transformOrigin:"50% 50%"},{rotationX:0,autoAlpha:1,scale:1,z:.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationX:180,autoAlpha:0,scale:1,z:-.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},!0],"esg-flipverticalout":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationY:0,skewX:0,skewY:0,rotationX:0,autoAlpha:1,z:.001,transformOrigin:"50% 50%"},{rotationX:-180,scale:1,autoAlpha:0,z:-150,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationX:0,autoAlpha:1,scale:1,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],"esg-fliphorizontal":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,skewX:0,skewY:0,rotationY:180,autoAlpha:0,z:-.001,transformOrigin:"50% 50%"},{rotationY:0,autoAlpha:1,scale:1,z:.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationY:180,autoAlpha:0,scale:1,z:-.001,ease:punchgs.Power3.easeInOut,overwrite:"all"},!0],"esg-fliphorizontalout":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,z:.001,transformOrigin:"50% 50%"},{rotationY:-180,scale:1,autoAlpha:0,z:-150,ease:punchgs.Power3.easeInOut,overwrite:"all"},.5,{rotationY:0,autoAlpha:1,scale:1,z:.001,ease:punchgs.Power3.easeInOut,overwrite:"all"}],"esg-flipup":[.5,{x:0,y:0,scale:.8,rotationZ:0,rotationX:90,rotationY:0,skewX:0,skewY:0,autoAlpha:0,z:.001,transformOrigin:"50% 100%"},{scale:1,rotationX:0,autoAlpha:1,z:.001,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{scale:.8,rotationX:90,autoAlpha:0,z:.001,ease:punchgs.Power2.easeOut,overwrite:"all"},!0],"esg-flipupout":[.5,{rotationX:0,autoAlpha:1,y:0,ease:punchgs.Bounce.easeOut,overwrite:"all"},{x:0,y:0,scale:1,rotationZ:0,rotationX:-90,rotationY:0,skewX:0,skewY:0,autoAlpha:1,z:.001,transformOrigin:"50% 0%"},.3,{rotationX:0,autoAlpha:1,y:0,ease:punchgs.Bounce.easeOut,overwrite:"all"}],"esg-flipdown":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:-90,rotationY:0,skewX:0,skewY:0,autoAlpha:0,z:.001,transformOrigin:"50% 0%"},{rotationX:0,autoAlpha:1,y:0,ease:punchgs.Bounce.easeOut,overwrite:"all"},.3,{rotationX:-90,z:0,ease:punchgs.Power2.easeOut,autoAlpha:0,overwrite:"all"},!0],"esg-flipdownout":[.5,{scale:1,rotationX:0,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"},{x:0,y:0,scale:.8,rotationZ:0,rotationX:90,rotationY:0,skewX:0,skewY:0,autoAlpha:0,z:.001,transformOrigin:"50% 100%"},.3,{scale:1,rotationX:0,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-flipright":[.5,{x:0,y:0,scale:.8,rotationZ:0,rotationX:0,rotationY:90,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"0% 50%"},{scale:1,rotationY:0,autoAlpha:1,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{autoAlpha:0,scale:.8,rotationY:90,ease:punchgs.Power3.easeOut,overwrite:"all"},!0],"esg-fliprightout":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,skewX:0,skewY:0,rotationY:0,autoAlpha:1,transformOrigin:"100% 50%"},{scale:1,rotationY:-90,autoAlpha:0,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{scale:1,z:0,rotationY:0,autoAlpha:1,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-flipleft":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:-90,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"100% 50%"},{rotationY:0,autoAlpha:1,z:.001,scale:1,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,rotationY:-90,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"},!0],"esg-flipleftout":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,skewX:0,skewY:0,rotationY:0,autoAlpha:1,transformOrigin:"0% 50%"},{scale:1,rotationY:90,autoAlpha:0,ease:punchgs.Power2.easeOut,overwrite:"all"},.3,{scale:1,z:0,rotationY:0,autoAlpha:1,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-turn":[.5,{x:50,y:0,scale:0,rotationZ:0,rotationX:0,rotationY:-40,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{scale:1,x:0,rotationY:0,autoAlpha:1,ease:punchgs.Power3.easeInOut,overwrite:"all"},.3,{scale:0,rotationY:-40,autoAlpha:1,z:0,x:50,ease:punchgs.Power3.easeInOut,overwrite:"all"},!0],"esg-turnout":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{rotationY:40,scale:.6,autoAlpha:0,x:-50,ease:punchgs.Power3.easeInOut,overwrite:"all"},.3,{scale:1,rotationY:0,z:0,autoAlpha:1,x:0,rotationX:0,rotationZ:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],"esg-slide":[.5,{x:-1e4,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:-1e4,y:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideout":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,y:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideright":[.5,{xPercent:-50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:-50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-sliderightout":[.5,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-scaleleft":[.5,{x:0,y:0,scaleX:0,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"100% 50%"},{autoAlpha:1,x:0,scaleX:1,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,z:0,scaleX:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-scaleright":[.5,{x:0,y:0,scaleX:0,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"0% 50%"},{autoAlpha:1,x:0,scaleX:1,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,z:0,scaleX:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideleft":[.5,{xPercent:50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideleftout":[.5,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:-50,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-slideup":[.5,{x:0,yPercent:50,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,yPercent:50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideupout":[.5,{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,yPercent:-50,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-slidedown":[.5,{x:0,yPercent:-50,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,yPercent:-50,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slidedownout":[.5,{autoAlpha:1,yPercent:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,yPercent:50,scale:1,rotationZ:0,rotationX:0,z:10,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,yPercent:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-slideshortright":[.5,{x:-30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,x:-30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideshortrightout":[.5,{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,x:30,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-slideshortleft":[.5,{x:30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,x:30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideshortleftout":[.5,{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:-30,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,x:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-slideshortup":[.5,{x:0,y:30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,y:30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideshortupout":[.5,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,y:-30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],".esg-slideshortdown":[.5,{x:0,y:-30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,y:-30,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-slideshortdownout":[.5,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{x:0,y:30,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-skewright":[.5,{xPercent:-100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,skewX:-60,xPercent:-100,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-skewrightout":[.5,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:-60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-skewleft":[.5,{xPercent:100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:-60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:100,z:0,skewX:60,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-skewleftout":[.5,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:-100,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:60,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,skewX:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-shifttotop":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:1,y:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-rollleft":[.5,{xPercent:50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:90,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:50,z:0,rotationZ:90,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-rollleftout":[.5,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:90,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-rollright":[.5,{xPercent:-50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:-90,transformOrigin:"50% 50%"},{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{autoAlpha:0,xPercent:-50,rotationZ:-90,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-rollrightout":[.5,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"},{xPercent:-50,y:0,scale:1,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:-90,transformOrigin:"50% 50%"},.3,{autoAlpha:1,xPercent:0,rotationZ:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-falldown":[.4,{x:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,yPercent:-100},{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.4,{yPercent:-100,autoAlpha:0,z:0,ease:punchgs.Power2.easeOut,delay:.2,overwrite:"all"}],"esg-falldownout":[.4,{autoAlpha:1,yPercent:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,yPercent:100},.4,{autoAlpha:1,yPercent:0,ease:punchgs.Power3.easeOut,overwrite:"all"}],"esg-zoomin":[.3,{x:0,y:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:80,scale:.6,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,rotationZ:0,ease:punchgs.Back.easeOut,overwrite:"all"},.3,{autoAlpha:0,scale:.6,z:0,rotationZ:80,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-rotatescaleout":[.3,{autoAlpha:1,scale:1,rotationZ:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,y:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,rotationZ:80,scale:.6,transformOrigin:"50% 50%"},.3,{autoAlpha:1,scale:1,rotationZ:0,ease:punchgs.Back.easeOut,overwrite:"all"}],"esg-zoomintocorner":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"20% 50%"},{autoAlpha:1,scale:1.2,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{x:0,y:0,scale:1,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-zoomouttocorner":[.5,{x:0,y:0,scale:1.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"80% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{x:0,y:0,scale:1.2,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-zoomtodefault":[.5,{x:0,y:0,scale:1.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{x:0,y:0,scale:1.2,autoAlpha:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-zoomback":[.5,{x:0,y:0,scale:.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},.5,{x:0,y:0,scale:.2,autoAlpha:0,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-zoombackout":[.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,y:0,scale:.2,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"}],"esg-zoomfront":[.5,{x:0,y:0,scale:1.5,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Power3.easeOut,overwrite:"all"},.5,{autoAlpha:0,x:0,y:0,scale:1.5,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-zoomfrontout":[.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},{x:0,y:0,scale:1.5,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:0,transformOrigin:"50% 50%"},.5,{autoAlpha:1,scale:1,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"}],"esg-flyleft":[.8,{x:-80,y:0,z:0,scale:.3,rotationZ:0,rotationY:75,rotationX:10,skewX:0,skewY:0,autoAlpha:.01,transformOrigin:"30% 10%"},{rotationY:0,rotationX:0,rotationZ:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},.8,{autoAlpha:.01,x:-40,y:0,z:300,rotationY:60,rotationX:20,overwrite:"all"}],"esg-flyleftout":[.8,{rotationY:0,rotationX:0,rotationZ:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},{x:-80,y:0,z:0,scale:.3,rotationZ:0,rotationY:75,rotationX:10,skewX:0,skewY:0,autoAlpha:.01,transformOrigin:"30% 10%"},.8,{rotationY:0,rotationX:0,rotationZ:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],"esg-flyright":[.8,{skewX:0,skewY:0,autoAlpha:0,x:80,y:0,z:0,scale:.3,rotationZ:0,rotationY:-75,rotationX:10,transformOrigin:"70% 20%"},{rotationY:0,rotationX:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},.8,{autoAlpha:0,x:40,y:-40,z:300,rotationY:-60,rotationX:-40,overwrite:"all"}],"esg-flyrightout":[.8,{rotationY:0,rotationX:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"},{skewX:0,skewY:0,autoAlpha:0,x:80,y:0,z:0,scale:.3,rotationZ:0,rotationY:-75,rotationX:10,transformOrigin:"70% 20%"},.8,{rotationY:0,rotationX:0,autoAlpha:1,scale:1,x:0,y:0,z:0,ease:punchgs.Power3.easeInOut,overwrite:"all"}],"esg-mediazoom":[.3,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1.4,x:0,y:0,ease:punchgs.Back.easeOut,overwrite:"all"},.3,{autoAlpha:1,x:0,y:0,scale:1,z:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-zoomandrotate":[.6,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{autoAlpha:1,scale:1.4,x:0,y:0,rotationZ:30,ease:punchgs.Power2.easeOut,overwrite:"all"},.4,{x:0,y:0,scale:1,z:0,rotationZ:0,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-pressback":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"50% 50%"},{rotationY:0,autoAlpha:1,scale:.8,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{rotationY:0,autoAlpha:1,z:0,scale:1,ease:punchgs.Power2.easeOut,overwrite:"all"}],"esg-3dturnright":[.5,{x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,transformPerspective:600},{x:-40,y:0,scale:.8,rotationZ:2,rotationX:5,rotationY:-28,skewX:0,skewY:0,autoAlpha:1,transformOrigin:"100% 50% 40%",transformPerspective:600,ease:punchgs.Power3.easeOut,overwrite:"all"},.3,{z:0,x:0,y:0,scale:1,rotationZ:0,rotationX:0,rotationY:0,skewX:0,skewY:0,autoAlpha:1,force3D:"auto",ease:punchgs.Power2.easeOut,overwrite:"all"},!0]},esgItemAnimations={"esg-item-zoomin":{enter:{time:.3,obj:{transformOrigin:"50% 50%",overwrite:"all",force3D:"auto",ease:punchgs.Power3.easeOut}},leave:{time:.3,obj:{transformOrigin:"50% 50%",scale:1,overwrite:"all",force3D:"auto",ease:punchgs.Power3.easeOut}}},"esg-item-zoomout":{enter:{time:.3,obj:{transformOrigin:"50% 50%",overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}},leave:{time:.3,obj:{transformOrigin:"50% 50%",scale:1,overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}}},"esg-item-fade":{enter:{time:.3,obj:{overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}},leave:{time:.3,obj:{opacity:1,overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}}},"esg-item-blur":{enter:{time:.3,obj:{overwrite:"all",force3D:"auto",ease:punchgs.Power2.easeOut}},leave:{time:.3,obj:{blur:0,overwrite:"all",force3D:"auto",ease:punchgs.Power2.easeOut}}},"esg-item-shift":{enter:{time:.3,obj:{overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}},leave:{time:.3,obj:{x:0,y:0,overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}}},"esg-item-rotate":{enter:{time:.3,obj:{transformOrigin:"50% 50%",overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}},leave:{time:.3,obj:{transformOrigin:"50% 50%",rotation:0,overwrite:"all",force3D:"auto",ease:punchgs.Sine.easeOut}}}},startAnimations=jQuery.extend(!0,{},esgAnimmatrix),mergedTransitions=["slideup","covergrowup","slideleft","slidedown","flipvertical","fliphorizontal","flipup","flipdown","flipright","flipleft","skewleft","flipleft","zoomin","flyleft","flyright"]}if("undefined"!=typeof punchgs)punchgsReady();else var punchgsTimer=setInterval(function(){"undefined"!=typeof punchgs&&(clearInterval(punchgsTimer),punchgsReady())},100);function checkBottomPos(e,t){var a=e.container.offset().top+e.container.height()+(e.contPadTop+e.contPadBottom)-jQuery(document).scrollTop(),o=jQuery(window).height(),i=jQuery(document).height();(e.lastBottomCompare!=a&&a<=o||t&&a<=o||i===o&&a<o)&&(e.lastBottomCompare=a,e.lmbut&&1!=e.lmbut.data("loading")&&(e.lmbut.data("loading",1),loadMoreItems(e)))}function createCookie(e,t,a){var o;if(a){var i=new Date;i.setTime(i.getTime()+24*a*60*60*1e3),o="; expires="+i.toGMTString()}else o="";document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+o+"; path=/"}function readCookie(e){for(var t=encodeURIComponent(e)+"=",a=document.cookie.split(";"),o=0;o<a.length;o++){for(var i=a[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null}jQuery.fn.extend({tpessential:function(A){function e(){var o,w=A,i=jQuery(this),e=i.attr("id");function t(e,t){mainPreparing(e,t),t.initialised="ready",jQuery("body").trigger("essentialready",e.attr("id"))}if(w.contPadTop=parseInt(i.css("paddingTop"),0),w.contPadBottom=parseInt(i.css("paddingBottom"),0),w.viewportBuffer=w.hasOwnProperty("viewportBuffer")?.01*w.viewportBuffer:0,w.hasOwnProperty("inViewport")||(w.inViewport=!0),i.parent().css("position","relative"),"cobbles"==w.layout?(w.layout="even",w.evenCobbles="on"):w.evenCobbles="off","true"!=w.get&&1!=w.get){if(w.get=!0,w.filterGroupClass==undefined||0==w.filterGroupClass.length?w.filterGroupClass="#"+i.attr("id"):w.filterGroupClass="."+w.filterGroupClass,1==window.tplogs)try{console.groupCollapsed("Essential Grid  2.0.5 Initialisation on "+i.attr("id")),console.groupCollapsed("Used Options:"),console.info(A),console.groupEnd(),console.groupCollapsed("Tween Engine:")}catch(e){}if(punchgs.TweenLite==undefined){if(1==window.tplogs)try{console.error("GreenSock Engine Does not Exist!")}catch(e){}return!1}if(punchgs.force3D=!0,1==window.tplogs)try{console.info("GreenSock Engine Version in Essential Grid:"+punchgs.TweenLite.version)}catch(e){}if(punchgs.TweenLite.lagSmoothing(2e3,16),punchgs.force3D="auto",1==window.tplogs)try{console.groupEnd(),console.groupEnd()}catch(e){}jQuery("body").data("fullScreenMode",!1),jQuery(window).on("mozfullscreenchange webkitfullscreenchange fullscreenchange",function(){jQuery("body").data("fullScreenMode",!jQuery("body").data("fullScreenMode"))}),w.esgloader=buildLoader(i.parent(),w),w.firstshowever==undefined&&jQuery(w.filterGroupClass+".esg-navigationbutton,"+w.filterGroupClass+" .esg-navigationbutton").css({visibility:"hidden"}),i.parent().append('<div class="esg-relative-placeholder" style="width:100%;height:auto"></div>'),i.wrap('<div class="esg-container-fullscreen-forcer" style="position:relative;left:0px;top:0px;width:100%;height:auto;"></div>');var a=i.parent().parent().find(".esg-relative-placeholder").offset().left;"on"!=w.forceFullWidth&&"on"!=w.forceFullScreen||i.closest(".esg-container-fullscreen-forcer").css({left:0-a,width:jQuery(window).width()}),w.animDelay=0==w.delayBasic?"off":"on",w.container=i,w.mainul=i.find("ul").first(),w.mainul.addClass("mainul").wrap('<div class="esg-overflowtrick"></div>');var r=jQuery(w.filterGroupClass+".esg-navbutton-solo-left,"+w.filterGroupClass+" .esg-navbutton-solo-left"),s=jQuery(w.filterGroupClass+".esg-navbutton-solo-right,"+w.filterGroupClass+" .esg-navbutton-solo-right");if(0<r.length&&(r.css({marginTop:0-r.height()/2}),r.appendTo(i.find(".esg-overflowtrick"))),0<s.length&&(s.css({marginTop:0-s.height()/2}),s.appendTo(i.find(".esg-overflowtrick"))),punchgs.CSSPlugin.defaultTransformPerspective=1200,w.animSpeed=w.animSpeed/1e3,w.delayBasic=w.delayBasic/100,setOptions(i,w),w.filter=w.statfilter,w.origcolumn=w.column,w.currentpage=0,i.addClass("esg-layout-"+w.layout),loadVideoApis(i,w),"even"==w.layout&&"on"==w.forceFullScreen){var n=jQuery(window).height();if(w.fullScreenOffsetContainer!=undefined)try{var l=w.fullScreenOffsetContainer.split(",");l&&jQuery.each(l,function(e,t){(n-=jQuery(t).outerHeight(!0))<w.minFullScreenHeight&&(n=w.minFullScreenHeight)})}catch(e){}var d=i.find(".esg-overflowtrick").first(),u=i.find("ul").first();d.css({display:"block",height:n+"px"}),u.css({display:"block",height:n+"px"}),i.closest(".eg-grid-wrapper, .myportfolio-container").css({height:"auto"}).removeClass("eg-startheight")}if(0!=w.googleFonts.length&&"masonry"==w.layout){var c=!0;if(jQuery("head").find("*").each(function(){jQuery(this).attr("src")!=undefined&&0<jQuery(this).attr("src").indexOf("webfont.js")&&(c=!1)}),WebFontConfig.active==undefined&&c){WebFontConfig={google:{families:w.googleFonts},active:function(){t(i,w)},inactive:function(){t(i,w)},timeout:1500};var p=document.createElement("script");p.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",p.type="text/javascript",p.async="true";var h=document.getElementsByTagName("script")[0];h.parentNode.insertBefore(p,h)}else t(i,w)}else t(i,w);"button"==w.loadMoreType?(i.append('<div class="esg-loadmore-wrapper" style="text-align:center"><div class="esg-navigationbutton esg-loadmore">LOAD MORE</div></div>'),w.lmbut=w.container.find(".esg-loadmore"),w.lmtxt=w.loadMoreTxt+" ("+checkMoreToLoad(w).length+")","off"==w.loadMoreNr&&(w.lmtxt=w.loadMoreTxt),w.lmbut.html(w.lmtxt),w.lmbut.click(function(){1!=w.lmbut.data("loading")&&loadMoreItems(w)}),0==checkMoreToLoad(w).length&&w.lmbut.remove()):"scroll"==w.loadMoreType&&(i.append('<div style="display:inline-block" class="esg-navigationbutton esg-loadmore">LOAD MORE</div>'),w.lmbut=w.container.find(".esg-loadmore"),w.lmtxt=w.loadMoreTxt+" ("+checkMoreToLoad(w).length+")","off"==w.loadMoreNr&&(w.lmtxt=w.loadMoreTxt),w.lmbut.html(w.lmtxt),jQuery(document,window).scroll(function(){checkBottomPos(w,!0)}),0==checkMoreToLoad(w).length&&w.lmbut.remove()),tabBlurringCheck(i,w)}if(jQuery("body").on("click."+e,".esg-filterbutton",function(){var e=jQuery(this).closest(".esg-grid");e.find(".tp-esg-item").length===e.find(".tp-esg-item.itemishidden").length?(e.append('<span class="no-filter-message">'+w.filterNoMatch+"</span>"),e.addClass("show-message")):e.removeClass("show-message")}).on("mouseenter."+e+" mouseover."+e,function(){jQuery(".esgbox-container").addClass("esgbox-show-toolbar esgbox-show-nav")}).on("click."+e,".esgbox",function(){stopAllVideos(!0)}).on("click."+e,".esgbox-clone",function(){return jQuery(this).closest(".tp-esg-item").find(".esgbox").eq(0).click(),!1}).on("mouseenter."+e+" mouseleave."+e,".esg-anime-item",function(e){var t=jQuery(this).find(".esg-item-anime");if(t.length){var a,o,i,r,s,n,l,d=e.type.replace("mouse",""),u=t.data(),c=u.anime_itm,p=u.anime_itm_other;if(p){var h=esgItemAnimations[p][d],g=jQuery.extend({},h.obj);if("enter"===d)switch(p){case"esg-item-zoomin":s=u.anime_itm_other_zoomin,isNaN(s)&&(s="100"),s=.01*parseInt(s,10),g.scale=Math.max(Math.min(s,2),0);break;case"esg-item-zoomout":s=u.anime_itm_other_zoomout,isNaN(s)&&(s="100"),s=.01*parseInt(s,10),g.scale=Math.max(Math.min(s,2),0);break;case"esg-item-fade":s=u.anime_itm_other_fade,isNaN(s)&&(s="100"),s=.01*parseInt(s,10),g.opacity=Math.max(Math.min(s,1),0);break;case"esg-item-blur":s=u.anime_itm_other_blur,isNaN(s)&&(s="5"),s=parseInt(s,10),s=Math.max(Math.min(s,30),0),g.blur=Math.max(Math.min(s,30),0),w.container.find(".isvisiblenow .esg-item-anime").not(t).each(function(){var e=jQuery(this);n=e.data("anime_blur_amount")||0,(a=e.data("anime_blur"))&&(a.eventCallback("onUpdate",null),a.kill()),o={blur:n},r=jQuery.extend({},g),l=new punchgs.TweenLite(o,h.time,r),e.data("anime_blur",l),l.eventCallback("onUpdate",function(){e.data("anime_blur_amount",o.blur),punchgs.TweenLite.set(e.find(".esg-entry-media"),{msFilter:"blur("+o.blur+"px)",filter:"blur("+o.blur+"px)",webkitFilter:"blur("+o.blur+"px)"})})});break;case"esg-item-shift":i=u.anime_itm_other_shift,s=u.anime_itm_shift_other_amount,isNaN(s)&&(s="10"),s=parseInt(s,10),"up"!==i&&"right"!==i||(s*=-1),g[i="up"===i||"down"===i?"y":"x"]=Math.max(Math.min(s,200),-200);break;case"esg-item-rotate":s=u.anime_itm_other_rotate,isNaN(s)&&(s="100"),s=parseInt(s,10),g.rotation=Math.max(Math.min(s,359),-359)}g.hasOwnProperty("blur")?"leave"===d&&w.container.find(".isvisiblenow .esg-item-anime").not(t).each(function(){var e=jQuery(this);(n=e.data("anime_blur_amount"))&&((a=e.data("anime_blur"))&&(a.eventCallback("onUpdate",null),a.kill()),o={blur:n},r=jQuery.extend({},g),l=new punchgs.TweenLite(o,h.time,r),e.data("anime_blur",l),l.eventCallback("onUpdate",function(){e.data("anime_blur_amount",o.blur),punchgs.TweenLite.set(e.find(".esg-entry-media"),{msFilter:"blur("+o.blur+"px)",filter:"blur("+o.blur+"px)",webkitFilter:"blur("+o.blur+"px)"})}))}):punchgs.TweenLite.to(w.container.find(".isvisiblenow .esg-item-anime").not(t),h.time,g)}if(c){var f=esgItemAnimations[c][d],m=jQuery.extend({},f.obj);if("enter"===d)switch(c){case"esg-item-zoomin":s=u.anime_itm_zoomin,isNaN(s)&&(s="100"),s=.01*parseInt(s,10),m.scale=Math.max(Math.min(s,2),0);break;case"esg-item-zoomout":s=u.anime_itm_zoomout,isNaN(s)&&(s="100"),s=.01*parseInt(s,10),m.scale=Math.max(Math.min(s,2),0);break;case"esg-item-fade":s=u.anime_itm_fade,isNaN(s)&&(s="100"),s=.01*parseInt(s,10),m.opacity=Math.max(Math.min(s,1),0);break;case"esg-item-blur":s=u.anime_itm_blur,isNaN(s)&&(s="5"),s=parseInt(s,10),m.blur=Math.max(Math.min(s,30),0),n=t.data("anime_blur_amount")||0,(a=t.data("anime_blur"))&&(a.eventCallback("onUpdate",null),a.kill()),o={blur:n},l=new punchgs.TweenLite(o,f.time,m),t.data("anime_blur",l),l.eventCallback("onUpdate",function(){t.data("anime_blur_amount",o.blur),punchgs.TweenLite.set(t.find(".esg-entry-media"),{msFilter:"blur("+o.blur+"px)",filter:"blur("+o.blur+"px)",webkitFilter:"blur("+o.blur+"px)"})});break;case"esg-item-shift":i=u.anime_itm_shift,s=u.anime_itm_shift_amount,isNaN(s)&&(s="10"),s=parseInt(s,10),"up"!==i&&"right"!==i||(s*=-1),m[i="up"===i||"down"===i?"y":"x"]=Math.max(Math.min(s,200),-200);break;case"esg-item-rotate":s=u.anime_itm_rotate,isNaN(s)&&(s="30"),s=parseInt(s,10),m.rotation=Math.max(Math.min(s,359),-359)}if(m.hasOwnProperty("blur")){if(!(n=t.data("anime_blur_amount")))return;(a=t.data("anime_blur"))&&(a.eventCallback("onUpdate",null),a.kill()),o={blur:n},l=new punchgs.TweenLite(o,f.time,m),t.data("anime_blur",l),l.eventCallback("onUpdate",function(){t.data("anime_blur_amount",o.blur),punchgs.TweenLite.set(t.find(".esg-entry-media"),{msFilter:"blur("+o.blur+"px)",filter:"blur("+o.blur+"px)",webkitFilter:"blur("+o.blur+"px)"})})}else punchgs.TweenLite.to(t,f.time,m)}}}),"on"===w.paginationAutoplay){var g,f,m;function v(){g=!1,clearInterval(f),m&&(f=setInterval(y,w.paginationAutoplayDelay))}function y(){onRightNavClick(i)}i.on("mouseenter.esgpagination",function(){g=!0,clearInterval(f)}).on("mouseleave.esgpagination",v),i.on("essential_grid_ready_to_use",function(){i.find(".esg-pagination").length?(m=!0,g||v()):i.off(".esgpagination")})}if("on"==w.filterDeepLink){jQuery(".esg-filterbutton").click(function(){var e=window.location.href.split("#");if(e=e[0],filter=jQuery(this).data("filter"),0!=filter.indexOf("filter-"))history.pushState({},null,e);else{var t=filter.replace("filter-","#");history.pushState({},null,e+t)}});var b=jQuery(".esg-grid"),x=window.location.href;if(!b.length||-1===x.search("#"))return;var j=x.split("#");if(!(j=j[j.length-1]))return;j=j.toLowerCase().split(" ").join("").split("/").join("");var C=setInterval(function(){b.is(":visible")&&(clearInterval(C),jQuery('div[data-filter="filter-'+j+'"]').trigger("click"))},500)}function k(){var e=i[0].getBoundingClientRect(),t=o.height(),a=t*w.viewportBuffer;e.top<t-a&&e.bottom>a&&(o.off("scroll.esgviewport resize.esgviewport",k),w.inViewport=!0,i.find(".tp-esg-item").each(function(){var e=jQuery(this),t=e.data("viewportanime");t&&punchgs.TweenLite.to(e,t[0],t[1])}))}if(!w.inViewport){i[0].id;o=jQuery(window).on("scroll.esgviewport resize.esgviewport",k),k()}}if(jQuery.fn.tpessential.defaults={forceFullWidth:"off",forceFullScreen:"off",fullScreenOffsetContainer:"",row:3,column:4,space:10,pageAnimation:"fade",animSpeed:600,delayBasic:.08,smartPagination:"on",paginationScrollToTop:"off",paginationScrollToTopOffset:200,layout:"even",rtl:"off",aspectratio:"auto",bgPosition:"center center",bgSize:"cover",videoJsPath:"",overflowoffset:0,mainhoverdelay:0,rowItemMultiplier:[],filterGroupClass:"",filterType:"",filterLogic:"or",filterDeepLink:"off",showDropFilter:"hover",filterNoMatch:"No Items for the Selected Filter",evenGridMasonrySkinPusher:"on",loadMoreType:"none",loadMoreItems:[],loadMoreAmount:5,loadMoreTxt:"Load More",loadMoreNr:"on",loadMoreEndTxt:"No More Items for the Selected Filter",loadMoreAjaxUrl:"",loadMoreAjaxToken:"",loadMoreAjaxAction:"",lazyLoad:"off",lazyLoadColor:"#ff0000",gridID:0,mediaFilter:"",spinner:"",spinnerColor:"",lightBoxMode:"single",cobblesPattern:"",searchInput:".faqsearch",googleFonts:"",googleFontJS:"//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",ajaxContentTarget:"",ajaxScrollToOnLoad:"off",ajaxScrollToOffset:100,ajaxCallback:"",ajaxCallbackArgument:"on",ajaxCssUrl:"",ajaxJsUrl:"",ajaxCloseButton:"on",ajaxNavButton:"on",ajaxCloseTxt:"Close",ajaxCloseType:"type1",ajaxClosePosition:"tr",ajaxCloseInner:"true",ajaxCloseStyle:"light",ajaxTypes:[],youtubeNoCookie:"false",cookies:{search:"off",filter:"off",pagination:"off",loadmore:"off",timetosave:"30"}},A=jQuery.extend({},jQuery.fn.tpessential.defaults,A),"undefined"==typeof WebFontConfig&&(WebFontConfig={}),esgAnimmatrix)return this.each(e);var t=this,a=setInterval(function(){esgAnimmatrix&&(clearInterval(a),t.each(e))},100);return this},esappend:function(e){var t=jQuery(this);return prepareItemsInGrid(opt,!0),organiseGrid(opt,"esappend"),prepareSortingAndOrders(t),opt.lastslide},esskill:function(){var e=jQuery(this),t=e.attr("id");jQuery("body").off("."+t),jQuery(window).off(".resize.essg"+t+" resize.esglb"+t),e.find("*").each(function(){jQuery(this).off(),jQuery(this).remove()}),e.remove(),e.html(),e=null},esreadsettings:function(e){return e=e==undefined?{}:e,getOptions(jQuery(this))},esredraw:function(e){e=e==undefined?{}:e;var t=jQuery(this),a=getOptions(t);if(a!==undefined){if(e!=undefined){if(e.space!=undefined&&(a.space=parseInt(e.space,0)),e.row!=undefined&&(a.row=parseInt(e.row,0)),e.rtl!=undefined&&(a.rtl=e.rtl),e.aspectratio!=undefined&&(a.aspectratio=e.aspectratio),e.forceFullWidth!=undefined)if(a.forceFullWidth=e.forceFullWidth,"on"==a.forceFullWidth){var o=t.parent().parent().find(".esg-relative-placeholder").offset().left;t.closest(".esg-container-fullscreen-forcer").css({left:0-o,width:jQuery(window).width()})}else t.closest(".esg-container-fullscreen-forcer").css({left:0,width:"auto"});if(e.rowItemMultiplier!=undefined&&(a.rowItemMultiplier=e.rowItemMultiplier),e.responsiveEntries!=undefined&&(a.responsiveEntries=e.responsiveEntries),e.column!=undefined){if(e.column<=0||20<=e.column){var i=getBestFitColumn(a,jQuery(window).width(),"id");a.column=i.column,a.columnindex=i.index,a.mmHeight=i.mmHeight}else a.column=parseInt(e.column,0);a.origcolumn=a.column}e.animSpeed!=undefined&&(a.animSpeed=e.animSpeed/1e3),e.delayBasic!=undefined&&(a.delayBasic=e.delayBasic/100),e.pageAnimation!=undefined&&(a.pageAnimation=e.pageAnimation),e.changedAnim!=undefined&&(a.changedAnim=e.changedAnim),1==e.silent&&(a.silent=!0)}a.started=!0,setOptions(t,a),setItemsOnPages(a),organiseGrid(a,"esredraw")}},esquickdraw:function(e){var t=jQuery(this),a=getOptions(t);a.silent=!0,setOptions(t,a),setItemsOnPages(a),organiseGrid(a,"esquickdraw"),stopAllVideos(!0)},esreinit:function(e){var t=jQuery(this);return prepareItemsInGrid(opt,!0),organiseGrid(opt,"esreinit"),prepareSortingAndOrders(t),opt.lastslide}}),function(){var e,t,a={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(e in a)if(e in document){t=a[e];break}}();var tabBlurringCheck=function(){var e=document.documentMode===undefined,t=window.chrome;jQuery("body").hasClass("esg-blurlistenerexists")||(jQuery("body").addClass("esg-blurlistenerexists"),e&&!t?jQuery(window).on("focusin",function(){supressFocus||setTimeout(function(){jQuery("body").find(".esg-grid.esg-container").each(function(){jQuery(this).esquickdraw()})},300)}).on("focusout",function(){}):window.addEventListener?window.addEventListener("focus",function(e){supressFocus||setTimeout(function(){jQuery("body").find(".esg-grid.esg-container").each(function(){jQuery(this).esquickdraw()})},300)},!1):window.attachEvent("focus",function(e){supressFocus||setTimeout(function(){jQuery("body").find(".esg-grid.esg-container").each(function(){jQuery(this).esquickdraw()})},300)}))};function checkMoreToLoad(o){var e=o.container,t=[],a=[],i=jQuery(o.filterGroupClass+".esg-filter-wrapper.eg-search-wrapper .eg-forcefilter").length;jQuery(o.filterGroupClass+".esg-filter-wrapper .esg-filterbutton.selected, "+o.filterGroupClass+" .esg-filter-wrapper .esg-filterbutton.selected").each(function(){var e=jQuery(this).data("fid");-1==jQuery.inArray(e,a)&&(t.push(e),a.push(e))}),0==jQuery(o.filterGroupClass+".esg-filter-wrapper .esg-filterbutton.selected, "+o.filterGroupClass+" .esg-filter-wrapper .esg-filterbutton.selected").length&&t.push(-1);for(var r=[],s=0;s<o.loadMoreItems.length;s++)jQuery.each(o.loadMoreItems[s][1],function(e,a){jQuery.each(t,function(e,t){t==a&&-1!=o.loadMoreItems[s][0]&&(0==i||1==i&&"cat-searchresult"===o.loadMoreItems[s][2])&&r.push(o.loadMoreItems[s])})});return addCountSuffix(e,o),r}function addCountSuffix(r,s){var n=jQuery(s.filterGroupClass+".esg-filter-wrapper.eg-search-wrapper .eg-justfilteredtosearch").length,l=jQuery(s.filterGroupClass+".esg-filter-wrapper.eg-search-wrapper .eg-forcefilter").length;jQuery(s.filterGroupClass+".esg-filter-wrapper.eg-show-amount .esg-filterbutton").each(function(){var e=jQuery(this);if(0==e.find(".eg-el-amount").length||0<n){var a=e.data("fid"),t=e.data("filter");0<l&&(t+=".cat-searchresult");for(var o=r.find("."+t).length,i=0;i<s.loadMoreItems.length;i++)0==l?jQuery.each(s.loadMoreItems[i][1],function(e,t){t===a&&-1!=s.loadMoreItems[i][0]&&o++}):-1!=jQuery.inArray(a,s.loadMoreItems[i][1])&&"cat-searchresult"===s.loadMoreItems[i][2]&&o++;0==e.find(".eg-el-amount").length&&e.append('<span class="eg-el-amount">0</span>'),countToTop(e,o)}}),jQuery(s.filterGroupClass+".esg-filter-wrapper.eg-search-wrapper .eg-justfilteredtosearch").removeClass("eg-justfilteredtosearch")}function countToTop(e,t){var a=e.find(".eg-el-amount"),o={value:parseInt(a.text(),0)};punchgs.TweenLite.to(o,2,{value:t,onUpdate:function(e,t){a.html(Math.round(e.target[t]))},onUpdateParams:["{self}","value"],ease:punchgs.Power3.easeInOut})}function buildLoader(e,t,a){return!(t.esgloader!=undefined&&0<t.esgloader.length)&&(e.append('<div class="esg-loader '+t.spinner+'"><div class="dot1"></div><div class="dot2"></div><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>'),esgloader=e.find(".esg-loader"),"spinner1"!=t.spinner&&"spinner2"!=t.spinner||esgloader.css("background",t.spinnerColor),"spinner3"!=t.spinner&&"spinner4"!=t.spinner||e.find(".bounce1, .bounce2, .bounce3, .dot1, .dot2").css("background",t.spinnerColor),a||punchgs.TweenLite.to(e,.3,{minHeight:"100px",zIndex:0}),esgloader)}function setKeyToNull(a,o){jQuery.each(a.loadMoreItems,function(e,t){t[0]==o&&(a.loadMoreItems[e][0]=-1,a.loadMoreItems[e][2]="already loaded")})}function loadMoreEmpty(e){for(var t=!0,a=0;a<e.loadMoreItems.length;a++)-1!=e.loadMoreItems[a][0]&&(t=!1);return t}function loadMoreItems(i){var r=i.container,e=checkMoreToLoad(i),a=[];jQuery.each(e,function(e,t){a.length<i.loadMoreAmount&&(a.push(t[0]),setKeyToNull(i,t[0]))});var s=checkMoreToLoad(i).length;if("scroll"===i.loadMoreType&&(i.esgloader.addClass("infinityscollavailable"),"add"!=i.esgloaderprocess&&(i.esgloaderprocess="add",punchgs.TweenLite.to(i.esgloader,.5,{autoAlpha:1,overwrite:"all"}))),0<a.length){0<i.lmbut.length&&(punchgs.TweenLite.to(i.lmbut,.4,{autoAlpha:.2}),i.lmbut.data("loading",1));var t={action:i.loadMoreAjaxAction,client_action:"load_more_items",token:i.loadMoreAjaxToken,data:a,gridid:i.gridID};i.customGallery&&(t.customgallery=!0),jQuery.ajax({type:"post",url:i.loadMoreAjaxUrl,dataType:"json",data:t}).success(function(e,t,a){if(e.success){var o=jQuery(e.data).filter(function(e){if(1===this.nodeType)return jQuery(this).data("eg-load-more-new",e),!0});i.customGallery&&o.addClass("eg-newli"),0<jQuery(i.filterGroupClass+".esg-filter-wrapper.eg-search-wrapper .eg-forcefilter").length&&o.addClass("cat-searchresult"),i.container.find("ul").first().append(o),prepareItemsInGrid(i,!0),setItemsOnPages(i),stopAllVideos(!0),setTimeout(function(){organiseGrid(i,"Ajax Loaded"),prepareSortingAndOrders(r),loadMoreEmpty(i)?i.lmbut.remove():(i.lmtxt=i.loadMoreTxt+" ("+s+")","off"==i.loadMoreNr&&(i.lmtxt=i.loadMoreTxt),0==s?i.lmbut.html(i.loadMoreEndTxt):i.lmbut.html(i.lmtxt),0<i.lmbut.length&&(punchgs.TweenLite.to(i.lmbut,.4,{autoAlpha:1,overwrite:"all"}),i.lmbut.data("loading",0))),setTimeout(function(){i.animDelay="on"},500)},10)}}).error(function(e,t,a){i.lmbut.html("FAILURE: "+t)})}else loadMoreEmpty(i)?(i.lmbut.remove(),"scroll"===i.loadMoreType&&i.esgloader.remove()):i.lmbut.data("loading",0).html(i.loadMoreEndTxt)}function killOldCustomAjaxContent(a){var o=a.data("lastposttype"),i=a.data("oldajaxsource"),r=a.data("oldajaxtype"),s=a.data("oldajaxvideoaspect"),n=a.data("oldselector");if(o!=undefined&&""!=o)try{jQuery.each(jQuery.fn.tpessential.defaults.ajaxTypes,function(e,t){t!=undefined&&t.type!=undefined&&t.type==o&&t.killfunc!=undefined&&setTimeout(function(){t.killfunc.call(this,{id:i,type:r,aspectratio:s,selector:n})&&a.empty()},250)})}catch(e){console.log(e)}a.data("lastposttype","")}function addAjaxNavigagtion(e,o){var t=" eg-acp-"+e.ajaxClosePosition;t=(t=t+" eg-acp-"+e.ajaxCloseStyle)+" eg-acp-"+e.ajaxCloseType;var a="eg-icon-left-open-1",i="eg-icon-right-open-1",r='<i class="eg-icon-cancel"></i>';"type1"==e.ajaxCloseType&&(a="eg-icon-left-open-big",i="eg-icon-right-open-big",e.ajaxCloseTxt="",r="X"),"true"!=e.ajaxCloseInner&&1!=e.ajaxCloseInner||(t+=" eg-acp-inner");var s='<div class="eg-ajax-closer-wrapper'+t+'">';switch("tr"==e.ajaxClosePosition||"br"==e.ajaxClosePosition?("on"==e.ajaxNavButton&&(s=s+'<div class="eg-ajax-left eg-ajax-navbt"><i class="'+a+'"></i></div><div class="eg-ajax-right eg-ajax-navbt"><i class="'+i+'"></i></div>'),"on"==e.ajaxCloseButton&&(s=s+'<div class="eg-ajax-closer eg-ajax-navbt">'+r+e.ajaxCloseTxt+"</div>")):("on"==e.ajaxCloseButton&&(s=s+'<div class="eg-ajax-closer eg-ajax-navbt">'+r+e.ajaxCloseTxt+"</div>"),"on"==e.ajaxNavButton&&(s=s+'<div class="eg-ajax-left eg-ajax-navbt"><i class="'+a+'"></i></div><div class="eg-ajax-right eg-ajax-navbt"><i class="'+i+'"></i></div>')),s+="</div>",e.ajaxClosePosition){case"tl":case"tr":case"t":o.prepend(s);break;case"bl":case"br":case"b":o.append(s)}function n(e){var a=[];return jQuery.each(e,function(e,t){0<jQuery(t).closest(".itemtoshow.isvisiblenow").length&&a.push(t)}),a}o.find(".eg-ajax-closer").click(function(){showHideAjaxContainer(o,!1,null,null,.25,!0)}),o.find(".eg-ajax-right").click(function(){var e=o.data("container").find(".lastclickedajax").closest("li"),t=e.nextAll().find(".eg-ajax-a-button"),a=e.prevAll().find(".eg-ajax-a-button");t=n(t),a=n(a),0<t.length?t[0].click():a[0].click()}),o.find(".eg-ajax-left").click(function(){var e=o.data("container").find(".lastclickedajax").closest("li"),t=e.nextAll().find(".eg-ajax-a-button"),a=e.prevAll().find(".eg-ajax-a-button");t=n(t),0<(a=n(a)).length?a[a.length-1].click():t[t.length-1].click()})}function showHideAjaxContainer(e,t,a,o,i,r){i=i==undefined?.25:i;var s=e.data("container").data("opt"),n=e.data("lastheight")!=undefined?e.data("lastheight"):"100px";t?(i+=1.2,addAjaxNavigagtion(s,e),punchgs.TweenLite.set(e,{height:"auto"}),punchgs.TweenLite.set(e.parent(),{minHeight:0,maxHeight:"none",height:"auto",overwrite:"all"}),punchgs.TweenLite.from(e,i,{height:n,ease:punchgs.Power3.easeInOut,onStart:function(){punchgs.TweenLite.to(e,i,{autoAlpha:1,ease:punchgs.Power3.easeOut})},onComplete:function(){e.data("lastheight",e.height()),jQuery(window).trigger("resize.essg"+e.data("container").attr("id")),0==e.find(".eg-ajax-closer-wrapper").length&&addAjaxNavigagtion(s,e)}}),"off"!=s.ajaxScrollToOnLoad&&jQuery("html, body").animate({scrollTop:e.offset().top-o},{queue:!1,speed:.5})):(r&&(killOldCustomAjaxContent(e),n="0px"),punchgs.TweenLite.to(e.parent(),i,{height:n,ease:punchgs.Power2.easeInOut,onStart:function(){punchgs.TweenLite.to(e,i,{autoAlpha:0,ease:punchgs.Power3.easeOut})},onComplete:function(){setTimeout(function(){r&&e.html("")},300)}}))}function removeLoader(e){e.closest(".eg-ajaxanimwrapper").find(".esg-loader").remove()}function ajaxCallBack(opt,a){if(opt.ajaxCallback==undefined||""==opt.ajaxCallback||opt.ajaxCallback.length<3)return!1;var splitter=opt.ajaxCallback.split(")");splitter=splitter[0].split("(");var callback=splitter[0],args=1<splitter.length&&""!=splitter[1]?splitter[1]+",":"",obj={};try{obj.containerid="#"+opt.ajaxContentTarget,obj.postsource=a.data("ajaxsource"),obj.posttype=a.data("ajaxtype"),"on"==opt.ajaxCallbackArgument?eval(callback+"("+args+"obj)"):eval(callback+"("+args+")")}catch(e){console.log("Callback Error"),console.log(e)}}function loadMoreContent(e,o,i){e.find(".lastclickedajax").removeClass("lastclickedajax"),i.addClass("lastclickedajax");var r=jQuery("#"+o.ajaxContentTarget).find(".eg-ajax-target").eq(0),a=i.data("ajaxsource"),s=i.data("ajaxtype"),n=i.data("ajaxvideoaspect");if(r.data("container",e),n="16:9"==n?"widevideo":"normalvideo",showHideAjaxContainer(r,!1),0<r.length)switch(o.ajaxJsUrl!=undefined&&""!=o.ajaxJsUrl&&3<o.ajaxJsUrl.length&&jQuery.getScript(o.ajaxJsUrl).done(function(e,t){o.ajaxJsUrl=""}).fail(function(e,t,a){console.log("Loading Error on Ajax jQuery File. Please doublecheck if JS File and Path exist:"+o.ajaxJSUrl),o.ajaxJsUrl=""}),o.ajaxCssUrl!=undefined&&""!=o.ajaxCssUrl&&3<o.ajaxCssUrl.length&&(jQuery("<link>").appendTo("head").attr({type:"text/css",rel:"stylesheet"}).attr("href",o.ajaxCssUrl),o.ajaxCssUrl=""),buildLoader(r.closest(".eg-ajaxanimwrapper"),o),r.data("ajaxload")!=undefined&&r.data("ajaxload").abort(),killOldCustomAjaxContent(r),s){case"postid":var t={action:o.loadMoreAjaxAction,client_action:"load_more_content",token:o.loadMoreAjaxToken,postid:a};setTimeout(function(){r.data("ajaxload",jQuery.ajax({type:"post",url:o.loadMoreAjaxUrl,dataType:"json",data:t})),r.data("ajaxload").success(function(e,t,a){e.success&&(jQuery(r).html(e.data),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),removeLoader(r),ajaxCallBack(o,i))}),r.data("ajaxload").error(function(e,t,a){"abort"!=t&&(jQuery(r).append("<p>FAILURE: <strong>"+t+"</strong></p>"),removeLoader(r))})},300);break;case"youtubeid":setTimeout(function(){"false"!=o.youtubeNoCookie?r.html('<div class="eg-ajax-video-container '+n+'"><iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/'+a+'?autoplay=1&vq=hd1080&fs=1" frameborder="0" allowfullscreen></iframe></div>'):r.html('<div class="eg-ajax-video-container '+n+'"><iframe width="560" height="315" src="//www.youtube.com/embed/'+a+'?autoplay=1&vq=hd1080&fs=1" frameborder="0" allowfullscreen></iframe></div>'),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),ajaxCallBack(o,i)},300);break;case"vimeoid":setTimeout(function(){r.html('<div class="eg-ajax-video-container '+n+'"><iframe src="https://player.vimeo.com/video/'+a+'?portrait=0&autoplay=1" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>'),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),ajaxCallBack(o,i)},300);break;case"wistiaid":setTimeout(function(){r.html('<div class="eg-ajax-video-container '+n+'"><iframe src="//fast.wistia.net/embed/iframe/'+a+'"allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="640" height="388"></iframe></div>'),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),ajaxCallBack(o,i)},300);break;case"html5vid":a=a.split("|"),setTimeout(function(){var e=-1!==a[0].search("mp4")?"video/mp4":"audio/mpeg";r.html('<video autoplay="true" loop="" class="rowbgimage" poster="" width="100%" height="auto"><source src="'+a[0]+'" type="'+e+'"><source src="'+a[1]+'" type="video/webm"><source src="'+a[2]+'" type="video/ogg"></video>'),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),ajaxCallBack(o,i)},300);break;case"soundcloud":case"soundcloudid":setTimeout(function(){r.html('<iframe width="100%" height="250" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/'+a+'&amp;auto_play=true&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>'),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),ajaxCallBack(o,i)},300);break;case"imageurl":setTimeout(function(){var e=new Image;e.onload=function(){var e=jQuery(this);r.html(""),e.css({width:"100%",height:"auto"}),r.append(jQuery(this)),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset),ajaxCallBack(o,i)},e.onerror=function(e){r.html("Error"),removeLoader(r),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset)},e.src=a},300);break;default:jQuery.each(jQuery.fn.tpessential.defaults.ajaxTypes,function(e,t){t.openAnimationSpeed==undefined&&(t.openAnimationSpeed=0),t!=undefined&&t.type!=undefined&&t.type==s&&setTimeout(function(){r.data("lastposttype",s),r.data("oldajaxsource",a),r.data("oldajaxtype",s),r.data("oldajaxvideoaspect",n),r.data("oldselector","#"+o.ajaxContentTarget+" .eg-ajax-target"),showHideAjaxContainer(r,!0,o.ajaxScrollToOnLoad,o.ajaxScrollToOffset,0),r.html(t.func.call(this,{id:a,type:s,aspectratio:n})),removeLoader(r)},300)})}}var is_mobile=function(){var e=["android","webos","iphone","ipad","blackberry","Android","webos","iPod","iPhone","iPad","Blackberry","BlackBerry"],t=!1;for(var a in e)1<navigator.userAgent.split(e[a]).length&&(t=!0);return t};function resetFiltersFromCookies(a,o,e){if("on"==a.cookies.filter){var t=e!==undefined?e:readCookie("grid_"+a.gridID+"_filters");if(t!==undefined&&null!==t&&0<t.length){var i=0;jQuery.each(t.split(","),function(e,t){t!==undefined&&-1!==t&&"-1"!==t&&jQuery(a.filterGroupClass+".esg-filterbutton,"+a.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).data("fid")!=t&&parseInt(jQuery(this).data("fid"),0)!==parseInt(t,0)||jQuery(this).hasClass("esg-pagination-button")||(o?jQuery(this).click():jQuery(this).addClass("selected"),i++)})}),0<i&&jQuery(a.filterGroupClass+".esg-filterbutton.esg-allfilter,"+a.filterGroupClass+" .esg-filterbutton.esg-allfilter").removeClass("selected")}}}function resetPaginationFromCookies(e,t){if("on"===e.cookies.pagination){var a=t!==undefined?t:readCookie("grid_"+e.gridID+"_pagination");a!==undefined&&null!==a&&0<a.length&&jQuery(e.filterGroupClass+".esg-filterbutton.esg-pagination-button,"+e.filterGroupClass+" .esg-filterbutton.esg-pagination-button").each(function(){parseInt(jQuery(this).data("page"),0)!==parseInt(a,0)||jQuery(this).hasClass("selected")||jQuery(this).click()})}}function resetSearchFromCookies(e){if("on"===e.cookies.search){var t=readCookie("grid_"+e.gridID+"_search");t!==undefined&&null!=t&&0<t.length&&(jQuery(e.filterGroupClass+".eg-search-wrapper .eg-search-input").val(t).trigger("change"),e.cookies.searchjusttriggered=!0)}}function onRightNavClick(e){var t=getOptions(e);t.oldpage=t.currentpage,t.currentpage++,t.currentpage>=t.realmaxpage&&(t.currentpage=0);var a=getBestFitColumn(t,jQuery(window).width(),"id");t.column=a.column,t.columnindex=a.index,t.mmHeight=a.mmHeight,setItemsOnPages(t),organiseGrid(t,"RightNavigation"),setOptions(e,t),stopAllVideos(!0)}function mainPreparing(c,p){resetFiltersFromCookies(p);var i=c.find(".eg-leftright-container"),e=getBestFitColumn(p,jQuery(window).width(),"id");if(p.column=e.column,p.columnindex=e.index,p.mmHeight=e.mmHeight,prepareItemsInGrid(p),organiseGrid(p,"MainPreparing"),0<jQuery(p.filterGroupClass+".eg-search-wrapper").length){var t=p.filterGroupClass.replace(".",""),a=jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-submit"),o=jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-clean");function r(){if(1==p.lastsearchtimer)return!1;p.lastsearchtimer=1,buildLoader(jQuery(p.filterGroupClass+".eg-search-wrapper"),{spinner:"spinner3",spinnerColor:"#fff"},!0),punchgs.TweenLite.fromTo(jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader"),.3,{autoAlpha:0},{autoAlpha:1,ease:punchgs.Power3.easeInOut});var s,n=this,e=jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input"),l=e.val(),d=jQuery(p.filterGroupClass+".eg-search-wrapper.esg-filter-wrapper .hiddensearchfield");if(e.attr("disabled","true"),0<l.length){e.trigger("searchstarting");var t={search:l,id:p.gridID},a={action:p.loadMoreAjaxAction,client_action:"get_grid_search_ids",token:p.loadMoreAjaxToken,data:t};jQuery.ajax({type:"post",url:p.loadMoreAjaxUrl,dataType:"json",data:a}).success(function(e,t,a){if("on"===p.cookies.search&&createCookie("grid_"+p.gridID+"_search",l,p.cookies.timetosave*(1/60/60)),!0===p.cookies.searchjusttriggered){var o=readCookie("grid_"+p.gridID+"_pagination"),i=readCookie("grid_"+p.gridID+"_filters");setTimeout(function(){resetFiltersFromCookies(p,!0,i),resetPaginationFromCookies(p,o)},200),p.cookies.searchjusttriggered=!1}setTimeout(function(){p.lastsearchtimer=0,jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").attr("disabled",!1),punchgs.TweenLite.to(jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader"),.5,{autoAlpha:1,ease:punchgs.Power3.easeInOut,onComplete:function(){jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader").remove()}}),jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").trigger("searchended")},1e3);var r=[];e&&jQuery.each(e,function(e,t){t!=undefined&&jQuery.isNumeric(t)&&r.push(t)}),c.find(".cat-searchresult").removeClass("cat-searchresult");jQuery.each(p.loadMoreItems,function(e,a){a[2]="notsearched",jQuery.each(r,function(e,t){if(parseInt(a[0],0)===parseInt(t,0)&&-1!=parseInt(a[0],0))return a[2]="cat-searchresult",0,!1})}),jQuery.each(r,function(e,t){c.find(".eg-post-id-"+t).addClass("cat-searchresult")}),d.addClass("eg-forcefilter").addClass("eg-justfilteredtosearch"),(s=jQuery(p.filterGroupClass+".esg-filter-wrapper .esg-allfilter")).length?s.trigger("click"):u.call(n)}).error(function(e,t,a){console.log("FAILURE: "+t),setTimeout(function(){p.lastsearchtimer=0,jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").attr("disabled",!1),punchgs.TweenLite.to(jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader"),.5,{autoAlpha:1,ease:punchgs.Power3.easeInOut,onComplete:function(){jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader").remove()}}),jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").trigger("searchended")},1e3)})}else jQuery.each(p.loadMoreItems,function(e,t){t[2]="notsearched"}),c.find(".cat-searchresult").removeClass("cat-searchresult"),(d=jQuery(p.filterGroupClass+".eg-search-wrapper.esg-filter-wrapper .hiddensearchfield")).removeClass("eg-forcefilter").addClass("eg-justfilteredtosearch"),"on"===p.cookies.search&&createCookie("grid_"+p.gridID+"_search","",-1),(s=jQuery(p.filterGroupClass+".esg-filter-wrapper .esg-allfilter")).length?s.trigger("click"):u.call(n),setTimeout(function(){p.lastsearchtimer=0,jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").attr("disabled",!1),punchgs.TweenLite.to(jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader"),.5,{autoAlpha:1,ease:punchgs.Power3.easeInOut,onComplete:function(){jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader").remove()}}),jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").trigger("searchended")},1e3)}jQuery(p.filterGroupClass+".esg-filter-wrapper.eg-search-wrapper").append('<div style="display:none !important" class="esg-filterbutton hiddensearchfield '+t+'" data-filter="cat-searchresult"><span>Search Result</span></div>'),p.lastsearchtimer=0,a.click(r),jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").on("change",r),o.click(function(){"on"===p.cookies.search&&createCookie("grid_"+p.gridID+"_search","",-1),jQuery.each(p.loadMoreItems,function(e,t){t[2]="notsearched"}),c.find(".cat-searchresult").removeClass("cat-searchresult");var e=jQuery(p.filterGroupClass+".eg-search-wrapper.esg-filter-wrapper .hiddensearchfield");jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").val(""),e.removeClass("eg-forcefilter").addClass("eg-justfilteredtosearch");var t=jQuery(p.filterGroupClass+".esg-filter-wrapper .esg-allfilter");t.length?t.trigger("click"):u.call(this),setTimeout(function(){p.lastsearchtimer=0,jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").attr("disabled",!1),punchgs.TweenLite.to(jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader"),.5,{autoAlpha:1,ease:punchgs.Power3.easeInOut,onComplete:function(){jQuery(p.filterGroupClass+".eg-search-wrapper").find(".esg-loader").remove()}}),jQuery(p.filterGroupClass+".eg-search-wrapper .eg-search-input").trigger("searchended")},1e3)})}addCountSuffix(c,p),jQuery(p.filterGroupClass+".esg-filter-wrapper,"+p.filterGroupClass+" .esg-filter-wrapper").each(function(e){var t=jQuery(this);t.hasClass("dropdownstyle")&&(t.find(".esg-filter-checked").each(function(){jQuery(this).prependTo(jQuery(this).parent())}),is_mobile()?t.find(".esg-selected-filterbutton").click(function(){var e=t.find(".esg-selected-filterbutton");e.hasClass("hoveredfilter")?(e.removeClass("hoveredfilter"),t.find(".esg-dropdown-wrapper").stop().hide()):(e.addClass("hoveredfilter"),t.find(".esg-dropdown-wrapper").stop().show())}):"click"==p.showDropFilter?(t.click(function(){var e=jQuery(this).closest(".esg-filter-wrapper");e.find(".esg-selected-filterbutton").addClass("hoveredfilter"),e.find(".esg-dropdown-wrapper").stop().show()}),t.on("mouseleave",function(){var e=jQuery(this).closest(".esg-filter-wrapper");e.find(".esg-selected-filterbutton").removeClass("hoveredfilter"),e.find(".esg-dropdown-wrapper").stop().hide()})):t.hover(function(){var e=jQuery(this).closest(".esg-filter-wrapper");e.find(".esg-selected-filterbutton").addClass("hoveredfilter"),e.find(".esg-dropdown-wrapper").stop().show()},function(){var e=jQuery(this).closest(".esg-filter-wrapper");e.find(".esg-selected-filterbutton").removeClass("hoveredfilter"),e.find(".esg-dropdown-wrapper").stop().hide()}))}),is_mobile()&&jQuery(document).on("click touchstart",function(e){0==jQuery(e.target).closest(".esg-filter-wrapper").length&&(p.container.find(".hoveredfilter").removeClass("hoveredfilter"),p.container.find(".esg-dropdown-wrapper").stop().hide())}),p.container.find(".esg-filters").each(function(e){punchgs.TweenLite.set(this,{zIndex:70-e})}),p.container.find(".esg-filter-wrapper.dropdownstyle").each(function(e){punchgs.TweenLite.set(this,{zIndex:1570-e})});var s,n=c.attr("id");function u(){var e=getOptions(c);stopAllVideos(!0);var t=jQuery(this);t.hasClass("esg-pagination-button")||(jQuery(e.filterGroupClass+".esg-allfilter, "+e.filterGroupClass+" .esg-allfilter").removeClass("selected"),t.hasClass("esg-allfilter")&&jQuery(e.filterGroupClass+".esg-filterbutton, "+e.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).removeClass("selected")})),t.closest(".esg-filters").hasClass("esg-singlefilters")||"single"==e.filterType?(jQuery(e.filterGroupClass+".esg-filterbutton, "+e.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).removeClass("selected")}),t.addClass("selected")):t.hasClass("selected")?t.removeClass("selected"):t.addClass("selected");var a=jQuery(e.filterGroupClass+".esg-filter-wrapper .hiddensearchfield");a.hasClass("eg-forcefilter")&&a.addClass("selected");var o=0,i="";if(jQuery(e.filterGroupClass+".esg-filterbutton.selected,"+e.filterGroupClass+" .esg-filterbutton.selected").each(function(){jQuery(this).hasClass("selected")&&!jQuery(this).hasClass("esg-pagination-button")&&(i=0===++o?jQuery(this).data("fid"):i+","+jQuery(this).data("fid"))}),"on"===e.cookies.filter&&!0!==e.cookies.searchjusttriggered&&createCookie("grid_"+e.gridID+"_filters",i,e.cookies.timetosave*(1/60/60)),0==o&&jQuery(e.filterGroupClass+".esg-allfilter,"+e.filterGroupClass+" .esg-allfilter").addClass("selected"),e.filterchanged=!0,e.currentpage=0,1==e.maxpage?(jQuery(e.filterGroupClass+".navigationbuttons,"+e.filterGroupClass+" .navigationbuttons").css({display:"none"}),jQuery(e.filterGroupClass+".esg-pagination,"+e.filterGroupClass+" .esg-pagination").css({display:"none"})):(jQuery(e.filterGroupClass+".navigationbuttons,"+e.filterGroupClass+" .navigationbuttons").css({display:"inline-block"}),jQuery(e.filterGroupClass+".esg-pagination,"+e.filterGroupClass+" .esg-pagination").css({display:"inline-block"})),e.lmbut!=undefined&&0<e.lmbut.length){var r=checkMoreToLoad(e).length;0<r?"off"==e.loadMoreNr?e.lmbut.html(e.loadMoreTxt):e.lmbut.html(e.loadMoreTxt+" ("+r+")"):e.lmbut.data("loading",0).html(e.loadMoreEndTxt)}setItemsOnPages(e),organiseGrid(e,"filtergroup"),setOptions(c,e)}function l(){var e,t=c.find(".eg-leftright-container"),a=c.find(".esg-overflowtrick").first();if(clearTimeout(c.data("callednow")),0<p.maxheight&&p.maxheight<9999999999){p.inanimation=!1,e=p.mainul,t=c.find(".eg-leftright-container");var o=parseInt(a.css("paddingTop"),0);o=null==(o=o==undefined?0:o)?0:o;var i=parseInt(a.css("paddingBottom"),0);i=null==(i=i==undefined?0:i)?0:i;var r=p.maxheight+p.overflowoffset+o+i;if("on"==p.forceFullScreen){var s=jQuery(window).height();if(p.fullScreenOffsetContainer!=undefined)try{var n=p.fullScreenOffsetContainer.split(",");jQuery.each(n,function(e,t){(s-=jQuery(t).outerHeight(!0))<p.minFullScreenHeight&&(s=p.minFullScreenHeight)})}catch(e){}r=s}var l=p.firstLoadFinnished?p.animSpeed:.001*p.startAnimationSpeed;e.data("hhh",r),a.data("hhh",r),punchgs.TweenLite.to(e,l,{force3D:"auto",height:r,ease:punchgs.Power3.easeInOut,clearProps:"transform"}),punchgs.TweenLite.to(a,l,{force3D:!0,height:r,ease:punchgs.Power3.easeInOut,clearProps:"transform",onComplete:function(){c.closest(".eg-grid-wrapper, .myportfolio-container").css({height:"auto"}).removeClass("eg-startheight").addClass("esg-revealed"),p.releaseHovers=!0}}),0<t.length&&punchgs.TweenLite.to(t,l,{minHeight:r,ease:punchgs.Power3.easeInOut});var d=jQuery(p.filterGroupClass+".esg-navbutton-solo-left,"+p.filterGroupClass+" .esg-navbutton-solo-left"),u=jQuery(p.filterGroupClass+".esg-navbutton-solo-right,"+p.filterGroupClass+" .esg-navbutton-solo-right");0<d.length&&d.css({marginTop:0-d.height()/2}),0<u.length&&u.css({marginTop:0-u.height()/2})}else 0==p.maxheight&&(e=c.find("ul").first(),punchgs.TweenLite.to(e,1,{force3D:"auto",height:0,ease:punchgs.Power3.easeInOut,clearProps:"transform"}),punchgs.TweenLite.to(a,1,{force3D:!0,height:0,ease:punchgs.Power3.easeInOut,clearProps:"transform"}));c.data("callednow",setTimeout(function(){c.find(".itemtoshow.isvisiblenow").each(function(){hideUnderElems(jQuery(this))})},250)),p.firstLoadFinnished===undefined&&(c.trigger("essential_grid_ready_to_use"),resetSearchFromCookies(p),resetPaginationFromCookies(p),p.firstLoadFinnished=!0)}jQuery("body").on("click."+n,"#"+c.attr("id")+" "+p.filterGroupClass+".esg-left,"+p.filterGroupClass+" .esg-left",function(){(p=getOptions(c)).oldpage=p.currentpage,p.currentpage--,p.currentpage<0&&(p.currentpage=p.realmaxpage-1);var e=getBestFitColumn(p,jQuery(window).width(),"id");p.column=e.column,p.columnindex=e.index,p.mmHeight=e.mmHeight,setItemsOnPages(p),organiseGrid(p,"LeftNavigation"),setOptions(c,p),stopAllVideos(!0)}),jQuery("body").on("click."+n,"#"+n+" "+p.filterGroupClass+".esg-right,"+p.filterGroupClass+" .esg-right",function(){onRightNavClick(c)}),jQuery(p.filterGroupClass+".esg-filterbutton, "+p.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).hasClass("esg-pagination-button")||jQuery(this).click(u)}),jQuery(window).on("resize.essg"+n,function(e){if(clearTimeout(s),"on"==p.forceFullWidth||"on"==p.forceFullScreen){var t=c.parent().parent().find(".esg-relative-placeholder").offset().left;c.closest(".esg-container-fullscreen-forcer").css({left:0-t,width:jQuery(window).width()})}else c.closest(".esg-container-fullscreen-forcer").css({left:0,width:"auto"});if(0<i.length){var a=i.outerWidth(!0);punchgs.TweenLite.set(c.find(".esg-overflowtrick"),{width:c.width()-a,overwrite:"all"})}var o=getBestFitColumn(p,jQuery(window).width(),"id");p.column=o.column,p.columnindex=o.index,p.mmHeight=o.mmHeight,setOptions(c,p),s=setTimeout(function(){p.fromResize=!0,setItemsOnPages(p=getOptions(c)),organiseGrid(p,"resize"),setOptions(c,p),stopAllVideos(!0,!1,!1,!0)},200)}).on("resize.esglb"+n,function(){var e=jQuery(".esgbox-slide--video .esgbox-iframe");if(e.length){var t,a,o,i,r=jQuery("body").hasClass("esg-four-by-three"),s=p.container.data("lightboxsettings").videoScale,n=jQuery(window),l=n.width(),d=n.height();s&&(buffer=p.container.data("lightboxsettings").videoScaleBuffer,buffer&&(d-=2*buffer)),r?(o=800,i=600):(o=1280,i=720),e.each(function(){if(o<l&&i<d&&!s)a=o,t=i;else{var e=(t=d/i)<(a=l/o)?t:a;a=o*e,t=i*e,d<l?d<t&&(a=o*((t=d)/i)):t<a?l<a&&(t=i*((a=l)/o)):d<t&&(a=o*((t=d)/i))}jQuery(this).width(a).height(t)})}}),c.on("itemsinposition",function(e,t){isComplete=t,clearTimeout(p.iteminspositiontimer),p.iteminspositiontimer=setTimeout(l,50)}),prepareSortingAndOrders(c),prepareSortingClicks(c),p.convertFilterMobile&&"ontouchend"in document?prepareMobileDropdowns(c):(c.find(".esg-filter-wrapper").css("visibility","visible"),c.find(".esg-selected-filterbutton").show())}function prepareMobileDropdowns(e){var t;function a(){var e=jQuery(this).hide();t+='<option value="'+e.attr("data-filter")+'">'+e.children("span").not(".esg-filter-checked").eq(0).text()+"</option>"}e.find(".esg-mobile-filter-button").addClass("esg-selected-filterbutton").show(),e.find(".esg-filter-wrapper").addClass("esg-mobile-filter-wrap").each(function(){var e=jQuery(this).css("position","relative");t='<select class="esg-sorting-select">',e.find(".esg-filterbutton").each(a),jQuery(t+="</select>").on("change",function(){e.find('.esg-filterbutton[data-filter="'+this.value+'"]').click(),e.find(".esg-selected-filterbutton span").eq(0).text(this.options[this.selectedIndex].innerHTML)}).appendTo(e)})}function prepareSortingAndOrders(e){var t=getOptions(e);e.find(".tp-esg-item").each(function(){var e=new Date(jQuery(this).data("date"));jQuery(this).data("date",e.getTime()/1e3)}),jQuery(t.filterGroupClass+".esg-sortbutton-order,"+t.filterGroupClass+" .esg-sortbutton-order").each(function(){var e=jQuery(this);e.removeClass("tp-desc").addClass("tp-asc"),e.data("dir","asc")})}function prepareSortingClicks(r){var s;opt=getOptions(r),jQuery(opt.filterGroupClass+".esg-sortbutton-wrapper .esg-sortbutton-order,"+opt.filterGroupClass+" .esg-sortbutton-wrapper .esg-sortbutton-order").click(function(){var e=jQuery(this);e.hasClass("tp-desc")?(e.removeClass("tp-desc").addClass("tp-asc"),e.data("dir","asc")):(e.removeClass("tp-asc").addClass("tp-desc"),e.data("dir","desc"));var t=e.data("dir");stopAllVideos(!0,!0),jQuery(opt.filterGroupClass+".esg-sorting-select,"+opt.filterGroupClass+" .esg-sorting-select").each(function(){var e=jQuery(this).val();clearTimeout(s),r.find(".tp-esg-item").tsort({data:e,forceStrings:"false",order:t}),s=setTimeout(function(){opt=getOptions(r),setItemsOnPages(opt),organiseGrid(opt,"preparSorting"),setOptions(r,opt)},200)})}),jQuery(opt.filterGroupClass+".esg-sorting-select,"+opt.filterGroupClass+" .esg-sorting-select").each(function(){var i=jQuery(this);i.change(function(){var e=jQuery(this).closest(".esg-sortbutton-wrapper").find(".esg-sortbutton-order"),t=i.val(),a=i.find("option:selected").text(),o=e.data("dir");stopAllVideos(!0,!0),clearTimeout(s),i.parent().parent().find(".sortby_data").text(a),r.find(".tp-esg-item").tsort({data:t,forceStrings:"false",order:o})!==undefined&&(opt=getOptions(r),setItemsOnPages(opt),organiseGrid(opt,"OnSorting"),setOptions(r,opt))})})}function fixCenteredCoverElement(e,t,a){if(t==undefined&&(t=e.find(".esg-entry-cover")),a==undefined&&(a=e.find(".esg-entry-media")),t&&a){var o=a.outerHeight();punchgs.TweenLite.set(t,{height:o});var i=e.find(".esg-cc");punchgs.TweenLite.set(i,{top:(o-i.height())/2})}}function getBestFitColumn(e,t,a){var i=t,r=0,s=9999,n=0,l=e.column,d=e.column,u=0,c=0;e.responsiveEntries!=undefined&&0<e.responsiveEntries.length&&jQuery.each(e.responsiveEntries,function(e,t){var a=t.width!=undefined?t.width:0,o=t.amount!=undefined?t.amount:0;a<s&&(s=a,l=o,c=e),n<a&&(n=a,lamount=o),r<a&&a<=i&&(r=a,d=o,u=e)}),t<s&&(d=l,u=c);var o={};return o.index=u,o.column=d,o.mmHeight=e.responsiveEntries[o.index].mmheight,"id"==a?o:d}function getOptions(e){return e.data("opt")}function setOptions(e,t){e.data("opt",t)}function checkMediaListeners(e){e.find("iframe").each(function(e){var t=jQuery(this);0<t.attr("src").toLowerCase().indexOf("youtube")?prepareYT(t):0<t.attr("src").toLowerCase().indexOf("vimeo")?prepareVimeo(t):0<t.attr("src").toLowerCase().indexOf("wistia")?prepareWs(t):0<t.attr("src").toLowerCase().indexOf("soundcloud")&&prepareSoundCloud(t)}),e.find("video").each(function(e){prepareVideo(jQuery(this))})}function waitMediaListeners(e){var t=e.find("iframe").first(),a=e.find("video").first(),o=0<t.length&&0<t.attr("src").toLowerCase().indexOf("youtube")?"y":0<t.length&&0<t.attr("src").toLowerCase().indexOf("vimeo")?"v":0<t.length&&0<t.attr("src").toLowerCase().indexOf("wistia")?"w":0<t.length&&0<t.attr("src").toLowerCase().indexOf("soundcloud")?"s":0<a.length&&1<=a.length?"h":"",i=setInterval(function(){e.find("iframe, video").each(function(e){(""===o||"y"===o&&prepareYT(t)||"v"===o&&prepareVimeo(t)||"w"===o&&prepareWs(t)||"s"===o&&prepareSoundCloud(t)||"h"===o&&prepareVideo(a))&&clearInterval(i)})},50)}function directionPrepare(e,t,a,o,i){var r={};switch(e){case 0:r.x=0,r.y="in"==t?0-o:10+o,r.y=i&&"in"==t?r.y-5:r.y;break;case 1:r.y=0,r.x="in"==t?a:-10-a,r.x=i&&"in"==t?r.x+5:r.x;break;case 2:r.y="in"==t?o:-10-o,r.x=0,r.y=i&&"in"==t?r.y+5:r.y;break;case 3:r.y=0,r.x="in"==t?0-a:10+a,r.x=i&&"in"==t?r.x-5:r.x}return r}function getDir(e,t){var a=e.width(),o=e.height(),i=(t.x-e.offset().left-a/2)*(o<a?o/a:1),r=(t.y-e.offset().top-o/2)*(a<o?a/o:1);return Math.round((Math.atan2(r,i)*(180/Math.PI)+180)/90+3)%4}function hideUnderElems(i){i.find(".eg-handlehideunder").each(function(){var e=jQuery(this),t=e.data("hideunder"),a=e.data("hideunderheight"),o=e.data("hidetype");e.data("knowndisplay")==undefined&&e.data("knowndisplay",e.css("display")),i.width()<t&&t!=undefined||i.height()<a&&a!=undefined?"visibility"==o?e.addClass("forcenotvisible"):"display"==o&&e.addClass("forcenotdisplay"):"visibility"==o?e.removeClass("forcenotvisible"):"display"==o&&e.removeClass("forcenotdisplay")})}function offsetParrents(e,t){var a=t.closest(".mainul"),o=a.parent(),i=a.data("hhh");if(i&&o.data("hhh")&&(t.position().top+t.height()>i+40||0==e||0!=a.data("bh")&&a.data("bh")!=undefined&&t.position().top+t.height()>parseInt(a.data("bh"),0)+40)){a.data("bh")!=undefined&&0!=a.data("bh")||a.data("bh",a.data("hhh")),o.data("bh")!=undefined&&0!=o.data("bh")||o.data("bh",o.data("hhh"));var r=a.data("bh"),s=o.data("bh"),n=o.closest(".esg-grid"),l=n.find(".esg-navbutton-solo-left"),d=n.find(".esg-navbutton-solo-right");if(l.length||(l=!1),d.length||(d=!1),!o.data("fheightcalc")){var u=0,c=o.index(),p=n.find(".esg-filters").each(function(){var e=jQuery(this);"relative"===e.css("position")&&e.index()>c&&-1===this.className.search(/solo-left|solo-right/)&&(u+=e.outerHeight(!0))}),h=u?(parseInt(n.css("padding-top"),10)+parseInt(n.css("padding-bottom"),10))/2:0;o.data({fheightcalc:u||!0,fmargincalc:h,fstartval:Math.ceil(u/2)+Math.ceil(h/2)})}if(0!=e){clearTimeout(a.data("offtimer")),o.data("navarrowtrick")||(l&&l.appendTo(n),d&&d.appendTo(n),o.data("navarrowtrick",!0)),a.data("alreadyinoff",!1),punchgs.TweenLite.to(a,.2,{height:r+e}),punchgs.TweenLite.to(o,.2,{height:s+e});p=o.data("fheightcalc");var g=o.data("fmargincalc")||0;!0===p&&(p=0),(l||d)&&punchgs.TweenLite.set([l,d],{top:s/2+p/2,y:g})}else a.data("alreadyinoff")||a.data("offtimer",setTimeout(function(){a.data("alreadyinoff",!0),punchgs.TweenLite.to(a,.3,{height:r,ease:punchgs.Power3.easeIn}),punchgs.TweenLite.to(o,.3,{height:s,ease:punchgs.Power3.easeIn,onComplete:function(){a.data("bh",0),o.data("bh",0),a.data("alreadyinoff",!1),l&&l.appendTo(o),d&&d.appendTo(o);var e={top:"50%"};fMar=o.data("fstartval"),fMar&&(e.y=fMar),(l||d)&&punchgs.TweenLite.set([l,d],e),o.removeData("navarrowtrick")}})},100))}}function itemHoverAnim(d,e,t,u){if(1!=d.data("simplevideo")&&checkMediaListeners(d),!d.hasClass("esg-video-active")){d.data("animstarted",1),punchgs.TweenLite.set(d,{z:.01,x:0,y:0,rotationX:0,rotationY:0,rotationZ:0}),d.addClass("esg-hovered");var a=d.find(".esg-entry-cover");if(punchgs.TweenLite.set(a,{transformStyle:"flat"}),fixCenteredCoverElement(d,a),0<d.find(".esg-entry-content").length&&"even"==t.layout){var o=d.data("pt"),i=d.data("pb"),r=d.data("pl"),s=d.data("pr"),n=d.data("bt"),l=d.data("bb"),c=d.data("bl"),p=d.data("br");if(d.data("hhh",d.outerHeight()),d.data("www",d.outerWidth()),punchgs.TweenLite.set(d.find(".esg-entry-content"),{display:"block"}),d.hasClass("esg-split-content")&&punchgs.TweenLite.set(d.find(".esg-entry-media-wrapper"),{height:d.data("hhh")}),punchgs.TweenLite.set(d,{z:.1,zIndex:50,x:0-(r+s+p+c)/2,y:0-(o+i+n+l)/2,height:"auto",width:d.data("www")+r+s+c+p}),1!=t.inanimation&&t.releaseHovers&&punchgs.TweenLite.set(d.closest(".esg-overflowtrick"),{overflow:"visible"}),"on"==t.evenGridMasonrySkinPusher)offsetParrents(d.height()-d.data("hhh"),d);d.css({paddingTop:o+"px",paddingLeft:r+"px",paddingRight:s+"px",paddingBottom:s+"px"}),d.css({borderTopWidth:n+"px",borderBottomWidth:l+"px",borderLeftWidth:c+"px",borderRightWidth:p+"px"})}d.find(".esg-transition").each(function(){var e=jQuery(this),t=e.attr("data-transition");if(esgAnimmatrix.hasOwnProperty(t)){var a=esgAnimmatrix[t],o=e.data("delay")!=undefined?e.data("delay"):0;animfrom=jQuery.extend({},a[1]),animto=jQuery.extend({},a[2]),animto.delay=o,animto.overwrite="all",animfrom.overwrite="all",animto.transformStyle="flat",animto.force3D=!0;var i=-1<t.indexOf("out");e.hasClass("esg-entry-media")||i||(animto.clearProps="transform"),i&&(animfrom.clearProps="transform"),animto.z=.001,animfrom.transformPerspective==undefined&&(animfrom.transformPerspective=1e3),e.hasClass("esg-overlay")&&(animfrom.z==undefined&&(animfrom.z=-.002),animto.z=-1e-4);var r,s,n,l=e;if(e.hasClass("esg-entry-media")&&0<e.find(".esg-media-video").length)return!0;switch(punchgs.TweenLite.killTweensOf(l,!1),t){case"esg-shifttotop":animto.y=0-d.find(".esg-bc.eec").last().height(),punchgs.TweenLite.fromTo(e,.5,{y:0},{y:animto.y});break;case"esg-slide":r=directionPrepare(u,"in",d.width(),d.height()),s={},n={},jQuery.extend(s,animfrom),jQuery.extend(n,animto),s.x=r.x,s.y=r.y,punchgs.TweenLite.fromTo(l,a[0],s,n,0);break;case"esg-slideout":r=directionPrepare(u,"out",d.width(),d.height()),s={},n={},jQuery.extend(s,animfrom),jQuery.extend(n,animto),n.x=r.x,n.y=r.y,n.clearProps="",punchgs.TweenLite.fromTo(l,a[0],s,n,0);break;default:punchgs.TweenLite.fromTo(l,a[0],animfrom,animto,0)}}})}}function videoClickEvent(n,e,l,t){supressFocus=!0,n.css({transform:"none","-moz-transform":"none","-webkit-transform":"none"}),n.closest(".esg-overflowtrick").css({transform:"none","-moz-transform":"none","-webkit-transform":"none"}),n.closest("ul").css({transform:"none","-moz-transform":"none","-webkit-transform":"none"}),n.addClass("esg-video-active"),t||n.find(".esg-media-video").each(function(){var e=jQuery(this),t=n.find(".esg-entry-media");if(e.data("youtube")!=undefined&&0==n.find(".esg-youtube-frame").length){if("false"!=l.youtubeNoCookie)var a="https://www.youtube-nocookie.com/embed/"+e.data("youtube")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0&fs=1";else a="https://www.youtube.com/embed/"+e.data("youtube")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0&fs=1";t.append('<iframe class="esg-youtube-frame" wmode="Opaque" style="position:absolute;top:0px;left:0px;display:none" width="'+e.attr("width")+'" height="'+e.attr("height")+'" data-src="'+a+'" src="about:blank" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>')}if(e.data("vimeo")!=undefined&&0==n.find(".esg-vimeo-frame").length){var o="https://player.vimeo.com/video/"+e.data("vimeo")+"?title=0&byline=0&html5=1&portrait=0";t.append('<iframe class="esg-vimeo-frame"  allowfullscreen="false" style="position:absolute;top:0px;left:0px;display:none" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" width="'+e.attr("width")+'" height="'+e.attr("height")+'" data-src="'+o+'" src="about:blank"></iframe>')}if(e.data("wistia")!=undefined&&0==n.find(".esg-wistia-frame").length){var i="https://fast.wistia.net/embed/iframe/"+e.data("wistia")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0";t.append('<iframe class="esg-wistia-frame" wmode="Opaque" style="position:absolute;top:0px;left:0px;display:none" width="'+e.attr("width")+'" height="'+e.attr("height")+'" data-src="'+i+'" src="about:blank"></iframe>')}if(e.data("soundcloud")!=undefined&&0==n.find(".esg-soundcloud-frame").length){var r="https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/"+e.data("soundcloud")+"&amp;auto_play=false&amp;hide_related=false&amp;visual=true&amp;show_artwork=true";t.append('<iframe class="esg-soundcloud-frame" allowfullscreen="false" style="position:absolute;top:0px;left:0px;display:none" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" width="'+e.attr("width")+'" height="'+e.attr("height")+'" scrolling="no" frameborder="no" data-src="'+r+'" src="about:blank"></iframe>')}if((e.data("mp4")!=undefined||e.data("webm")!=undefined||e.data("ogv")!=undefined)&&0==n.find(".esg-video-frame").length){if(t.append('<video class="esg-video-frame" style="position:absolute;top:0px;left:0px;display:none" width="'+e.attr("width")+'" height="'+e.attr("height")+'" data-origw="'+e.attr("width")+'" data-origh="'+e.attr("height")+'" ></video'),e.data("mp4")!=undefined){var s=-1!==e.data("mp4").search("mp4")?"video/mp4":"audio/mpeg";t.find("video").append('<source src="'+e.data("mp4")+'" type="'+s+'" />')}e.data("webm")!=undefined&&t.find("video").append('<source src="'+e.data("webm")+'" type="video/webm" />'),e.data("ogv")!=undefined&&t.find("video").append('<source src="'+e.data("ogv")+'" type="video/ogg" />')}}),adjustMediaSize(n,!0,null,l);var a,o=n.find(".esg-youtube-frame"),i=n.find(".esg-entry-cover"),r=n.find(".esg-media-poster"),s="y",d=!1;function u(){(d||"y"==s&&prepareYT(o)||"v"==s&&prepareVimeo(o)||"w"==s&&prepareWs(o)||"s"==s&&prepareSoundCloud(o)||"h"==s&&prepareVideo(o))&&(clearInterval(a),t||(is_mobile()?(punchgs.TweenLite.set(o,{autoAlpha:1}),punchgs.TweenLite.set(r,{autoAlpha:0}),punchgs.TweenLite.set(i,{autoAlpha:0})):(punchgs.TweenLite.to(o,.5,{autoAlpha:1}),punchgs.TweenLite.to(r,.5,{autoAlpha:0}),punchgs.TweenLite.to(i,.5,{autoAlpha:0})),"y"===s&&playYT(o,t),"v"===s&&playVimeo(o,t),"s"===s&&playSC(o,t),"h"===s&&playVideo(o,t),"w"===s&&playWs(o,t))),suppressFocus=!1}o.length||(o=n.find(".esg-vimeo-frame"),s="v"),o.length||(o=n.find(".esg-wistia-frame"),s="w"),o.length||(o=n.find(".esg-soundcloud-frame"),s="s"),o.length||(o=n.find(".esg-video-frame"),s="h"),"about:blank"==o.attr("src")?o.attr("src",o.data("src")):o.hasClass("esg-video-frame")?punchgs.TweenLite.set(o,{opacity:0,display:"block"}):d=!0,loadVideoApis(e,l),t||punchgs.TweenLite.set(o,{opacity:1,display:"block"}),a=setInterval(u,100),u()}function setMediaEntryAspectRatio(e){var t=e.img!==undefined?e.img.attr("width"):1,a=e.img!==undefined?e.img.attr("height"):1;(e.ar===undefined||"auto"==e.ar||isNaN(e.ar))&&(e.imgw=e.imgw===undefined?e.img!=undefined?e.img.width():1:e.imgw,e.imgh=e.imgh===undefined?e.img!=undefined?e.img.height():1:e.imgh,e.imgw=null===e.imgw||isNaN(e.imgw)||e.imgw===undefined||!1===e.imgw?1:e.imgw,e.imgh=null===e.imgh||isNaN(e.imgh)||e.imgh===undefined||!1===e.imgh?1:e.imgh,e.imgw=e.img!=undefined?t!==undefined&&!1!==t?t:e.imgw:1,e.imgh=e.img!=undefined?a!==undefined&&!1!==a?a:e.imgh:1,e.ar=e.img!==undefined&&1<=e.img.length?e.imgh/e.imgw*100:0),1!==e.ip.data("keepAspectRatio")&&(e.ip.css({paddingBottom:e.ar+"%"}),e.ip.data("bottompadding",e.ar)),e.keepAspectRatio&&e.ip.data("keepAspectRatio",1)}function onMouseMoveTrigger(){var e=jQuery(this);1!=e.data("animstarted")&&e.trigger("mouseenter")}function prepareItemsInGrid(p,e){var d=p.container;d.addClass("esg-container"),e||d.find(".mainul>li").each(function(){jQuery(this).addClass("eg-newli")});var t=p.mainul[0].getElementsByClassName("eg-newli"),a=p.aspectratio,o=d.find(".esg-overflowtrick").parent().width(),i=1,u=1;1<(a=a.split(":")).length?(i=parseInt(a[0],0)/parseInt(a[1],0),u=parseInt(a[1],0)/parseInt(a[0],0),o/p.column/i,kar=!0,u*=100):(u=i="auto",kar=!1);var r=d.find("li[data-anime]").length,s=d.find("li[data-anime-other]").length;(r||s)&&d.addClass("esg-itm-anime");for(var n=0;n<t.length;n++){var l=t[n],c=jQuery(l),h=c.find(".esg-entry-media"),g=h.find("img"),f=g!=undefined&&0<g.length?g.attr("src"):undefined,m=g!=undefined&&0<g.length?g.data("lazysrc"):undefined;if(m===undefined&&(m=f),h.addClass(p.mediaFilter),punchgs.TweenLite.set(c,{force3D:"auto",autoAlpha:0,opacity:0}),c.addClass("tp-esg-item"),r||s){var w=c.attr("data-anime-blur"),v=c.attr("data-anime-other-blur");(w||v)&&c.addClass("esg-anime-blur"),c.addClass("esg-anime-item").find(".esg-media-cover-wrapper").addClass("esg-item-anime").data({anime_itm:c.attr("data-anime"),anime_itm_other:c.attr("data-anime-other"),anime_itm_zoomin:c.attr("data-anime-zoomin"),anime_itm_other_zoomin:c.attr("data-anime-other-zoomin"),anime_itm_zoomout:c.attr("data-anime-zoomout"),anime_itm_other_zoomout:c.attr("data-anime-other-zoomout"),anime_itm_fade:c.attr("data-anime-fade"),anime_itm_other_fade:c.attr("data-anime-other-fade"),anime_itm_shift:c.attr("data-anime-shift"),anime_itm_other_shift:c.attr("data-anime-other-shift"),anime_itm_shift_amount:c.attr("data-anime-shift-amount"),anime_itm_shift_other_amount:c.attr("data-anime-other-shift-amount"),anime_itm_rotate:c.attr("data-anime-rotate"),anime_itm_other_rotate:c.attr("data-anime-other-rotate"),anime_itm_blur:w,anime_itm_other_blur:v}).find(".esg-entry-media.grayscale").removeClass("grayscale").parent().addClass("grayscale")}var y={bgpos:1<=g.length&&g!=undefined?g.data("bgposition"):undefined,bgsize:1<=g.length&&g!=undefined?g.data("bgsize"):undefined,bgrepeat:1<=g.length&&g!=undefined?g.data("bgrepeat"):undefined};y.bgpos=y.bgpos===undefined?"":"background-position:"+y.bgpos+";",y.bgsize=y.bgsize===undefined?"":"background-size:"+y.bgsize+";",y.bgrepeat=y.bgrepeat===undefined?"":"background-repeat:"+y.bgrepeat+";";var b=m||"";h.append('<div class="esg-media-poster" src="'+m+'" data-src="'+m+'" data-lazythumb="'+g.data("lazythumb")+'" style="'+y.bgsize+y.bgrepeat+y.bgpos+"background-image:url("+b+')"></div>'),"even"==p.layout?h.wrap('<div class="esg-entry-media-wrapper" style="width:100%;height:100%;overflow:hidden;position:relative;"></div>'):h.wrap('<div class="esg-entry-media-wrapper" style="overflow:hidden;position:relative;"></div>'),setMediaEntryAspectRatio({ip:h,img:g,ar:u,keepAspectRatio:kar}),g!=undefined&&0<g.length&&g.css({display:"none"}),c.find(".esg-media-video").each(function(){var e=jQuery(this),t="display:none;",a="data-src=";if(vidsrc="src=",e.data("poster")!=undefined&&3<e.data("poster").length?h.find(".esg-media-poster").css({opacity:1,backgroundImage:"url("+e.data("poster")+")"}).attr("src",e.data("poster")).data("src",e.data("poster")):(c.hasClass("esg-split-content")||c.find(".esg-entry-cover").remove(),c.find(".esg-media-poster").remove(),t="display:block;",u=parseInt(e.attr("height"),0)/parseInt(e.attr("width"),0)*100,setMediaEntryAspectRatio({ip:h,ar:u,keepAspectRatio:!0}),c.data("simplevideo",1)),0==c.find(".esg-click-to-play-video").length&&(c.find(".esg-entry-cover").find("*").each(function(){0==jQuery(this).closest("a").length&&0==jQuery(this).find("a").length&&jQuery(this).addClass("esg-click-to-play-video")}),c.find(".esg-overlay").addClass("esg-click-to-play-video")),e.data("youtube")!=undefined){if("false"!=p.youtubeNoCookie)var o="https://www.youtube-nocookie.com/embed/"+e.data("youtube")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0&fs=1&playsinline=1";else o="https://www.youtube.com/embed/"+e.data("youtube")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0&fs=1&playsinline=1";h.append('<iframe class="esg-youtube-frame" wmode="Opaque" style="position:absolute;top:0px;left:0px;'+t+'" width="'+e.attr("width")+'" height="'+e.attr("height")+'" '+a+'"'+o+'"'+vidsrc+'"about:blank" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>')}if(e.data("vimeo")!=undefined){var i="https://player.vimeo.com/video/"+e.data("vimeo")+"?title=0&byline=0&html5=1&portrait=0&playsinline=1";h.append('<iframe class="esg-vimeo-frame" style="position:absolute;top:0px;left:0px;'+t+'" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""  width="'+e.attr("width")+'" height="'+e.attr("height")+'" '+a+'"'+i+'"'+vidsrc+'"about:blank"></iframe>')}if(e.data("wistia")!=undefined){var r="https://fast.wistia.net/embed/iframe/"+e.data("wistia")+"?version=3&enablejsapi=1&html5=1&controls=1&autohide=1&rel=0&showinfo=0";h.append('<iframe class="esg-wistia-frame" wmode="Opaque" style="position:absolute;top:0px;left:0px;'+t+'" width="'+e.attr("width")+'" height="'+e.attr("height")+'" '+a+'"'+r+'"'+vidsrc+'"about:blank"></iframe>')}if(e.data("soundcloud")!=undefined){var s="https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/"+e.data("soundcloud")+"&amp;auto_play=false&amp;hide_related=false&amp;visual=true&amp;show_artwork=true";h.append('<iframe class="esg-soundcloud-frame" style="position:absolute;top:0px;left:0px;'+t+'" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" width="'+e.attr("width")+'" height="'+e.attr("height")+'" '+a+'"'+s+'"'+vidsrc+'"about:blank"></iframe>')}if(e.data("mp4")!=undefined||e.data("webm")!=undefined||e.data("ogv")!=undefined){h.append('<video class="esg-video-frame" controls style="position:absolute;top:0px;left:0px;'+t+'" width="'+e.attr("width")+'" height="'+e.attr("height")+'" data-origw="'+e.attr("width")+'" data-origh="'+e.attr("height")+'" playsinline></video');var n=h.find("video");if(e.data("mp4")!=undefined){var l=-1!==e.data("mp4").search("mp4")?"video/mp4":"audio/mpeg";n.append('<source src="'+e.data("mp4")+'" type="'+l+'" />')}e.data("webm")!=undefined&&n.append('<source src="'+e.data("webm")+'" type="video/webm" />'),e.data("ogv")!=undefined&&n.append('<source src="'+e.data("ogv")+'" type="video/ogg" />')}c.find(".esg-click-to-play-video").click(function(){var e=jQuery(this);e.hasClass("eg-ajaxclicklistener")||e.closest(".eg-ajaxclicklistener").length||videoClickEvent(e=e.closest(".tp-esg-item"),d,p)}),1==c.data("simplevideo")&&waitMediaListeners(c)}),0==c.find(".esg-media-video").length&&c.find(".esg-click-to-play-video").remove(),adjustMediaSize(c,!0,null,p),0<c.find(".esg-entry-content").length&&0<c.find(".esg-media-cover-wrapper").length&&(c.find(".esg-entry-content").index()<c.find(".esg-media-cover-wrapper").index()||c.find(".esg-entry-content").addClass("esg-notalone")),c.find(".esg-entry-cover").each(function(e){var t=jQuery(this),a=t.data("clickable");t.find(".esg-top").wrapAll('<div class="esg-tc eec"></div>'),t.find(".esg-left").wrapAll('<div class="esg-lc eec"></div>'),t.find(".esg-right").wrapAll('<div class="esg-rc eec"></div>'),t.find(".esg-center").wrapAll('<div class="esg-cc eec"></div>'),t.find(".esg-bottom").wrapAll('<div class="esg-bc eec"></div>'),t.find(".eec").append("<div></div>"),"on"==a&&1<=t.find(".esg-overlay").length&&t.click(function(e){0==jQuery(e.target).closest("a").length&&jQuery(this).find(".eg-invisiblebutton")[0].click()}).css({cursor:"pointer"})}),c.data("pt",parseInt(c.css("paddingTop"),0)),c.data("pb",parseInt(c.css("paddingBottom"),0)),c.data("pl",parseInt(c.css("paddingLeft"),0)),c.data("pr",parseInt(c.css("paddingRight"),0)),c.data("bt",parseInt(c.css("borderTopWidth"),0)),c.data("bb",parseInt(c.css("borderBottomWidth"),0)),c.data("bl",parseInt(c.css("borderLeftWidth"),0)),c.data("br",parseInt(c.css("borderRightWidth"),0)),0<c.find(".esg-entry-content").length&&"even"==p.layout&&(c.css({paddingTop:"0px",paddingLeft:"0px",paddingRight:"0px",paddingBottom:"0px"}),c.css({borderTopWidth:"0px",borderBottomWidth:"0px",borderLeftWidth:"0px",borderRightWidth:"0px"})),p.ajaxContentTarget!=undefined&&0<jQuery("#"+p.ajaxContentTarget).length&&c.find(".eg-ajaxclicklistener, a").each(function(){var e=jQuery(this),t=jQuery("#"+p.ajaxContentTarget).find(".eg-ajax-target");t.parent().hasClass("eg-ajaxanimwrapper")||t.wrap('<div class="eg-ajaxanimwrapper" style="position:relative;overflow:hidden;"></div>'),e.data("ajaxsource")!=undefined&&e.data("ajaxtype")!=undefined&&(e.addClass("eg-ajax-a-button"),e.click(function(){return loadMoreContent(d,p,e),!(0<t.length)}))}),c.find(".eg-triggerfilter").click(function(){var e=jQuery(this).data("filter");return jQuery(p.filterGroupClass+".esg-filterbutton,"+p.filterGroupClass+" .esg-filterbutton").each(function(){jQuery(this).data("filter")==e&&jQuery(this).trigger("click")}),!1}).css({cursor:"pointer"}),c.on("mouseenter.hoverdir mouseleave.hoverdir",function(e){var d=jQuery(this).off("mousemove.hoverdir",onMouseMoveTrigger);if(p.releaseHovers||"none"!==p.startAnimation){var u=getDir(d,{x:e.pageX,y:e.pageY});if("mouseenter"===e.type)itemHoverAnim(jQuery(this),"nope",p,u);else if(1==d.data("animstarted")){d.data("animstarted",0),d.removeClass("esg-hovered");var c=0;0<d.find(".esg-entry-content").length&&"even"==p.layout&&(punchgs.TweenLite.set(d.find(".esg-entry-content"),{display:"none"}),punchgs.TweenLite.set(d,{zIndex:5}),punchgs.TweenLite.set(d.closest(".esg-overflowtrick"),{overflow:"hidden"}),d.css({paddingTop:"0px",paddingLeft:"0px",paddingRight:"0px",paddingBottom:"0px"}),d.css({borderTopWidth:"0px",borderBottomWidth:"0px",borderLeftWidth:"0px",borderRightWidth:"0px"}),isNaN(d.data("hhh"))||punchgs.TweenLite.set(d,{z:0,height:d.data("hhh"),width:d.data("www"),x:0,y:0}),"on"==p.evenGridMasonrySkinPusher&&offsetParrents(0,d)),d.find(".esg-transition").each(function(){var e=jQuery(this),t=e.attr("data-transition");if(esgAnimmatrix.hasOwnProperty(t)){var a,o,i=esgAnimmatrix[t],r=e.data("delay")!=undefined?e.data("delay"):0,s=i[4],n=e,l=-1<t.indexOf("out");switch(c<r&&(c=r),s.z==undefined&&(s.z=1),t){case"esg-slide":a=directionPrepare(u,"in",d.width(),d.height(),!0),s.x=a.x,s.y=a.y,o=punchgs.TweenLite.to(n,.5,{y:s.y,x:s.x,overwrite:"all",onCompleteParams:[n],onComplete:function(e){punchgs.TweenLite.set(e,{autoAlpha:0})}});break;case"esg-slideout":a=directionPrepare(u,"out",d.width(),d.height()),s.x=0,s.y=0,s.overwrite="all",o=punchgs.TweenLite.fromTo(n,.5,{autoAlpha:1,x:a.x,y:a.y},{x:0,y:0,autoAlpha:1,overwrite:"all"});break;default:s.force3D="auto",o=punchgs.TweenLite.to(n,i[3],s,0)}l&&o.eventCallback("onComplete",resetTransforms,[n])}})}}else d.on("mousemove.hoverdir",onMouseMoveTrigger)})}d.find(".esg-transition").each(function(){var e=jQuery(this),t=e.attr("data-transition");if(esgAnimmatrix.hasOwnProperty(t)){var a=esgAnimmatrix[t],o=jQuery.extend({},a[1]);punchgs.TweenLite.set(e,o)}}),loadVideoApis(d,p),setItemsOnPages(p),p.mainul.find(".eg-newli").removeClass("eg-newli")}function resetTransforms(e){punchgs.TweenLite.set(e,{clearProps:"transform",css:{clearProps:"transform"}})}function adjustMediaSize(s,n,l,d){var e=0<s.find("iframe").length?"iframe":0<s.find(".esg-video-frame").length?".esg-video-frame":"";""!==e&&s.find(e).each(function(e){var t=jQuery(this);t.data("origw",t.attr("width")),t.data("origh",t.attr("height"));var a,o,i=t.data("origw"),r=t.data("origh");a=l!=undefined?l.itemw:s.width(),o=Math.round(a/i*r),a=Math.round(a),t.data("neww",a),t.data("newh",o),n&&"even"!=d.layout?punchgs.TweenLite.set(t,{width:a,height:o}):punchgs.TweenLite.set(t,{width:"100%",height:"100%"})})}function setItemsOnPages(d){var e,a=d.container,t=a.find(".mainul>li"),s=d.column*d.row,o=d.rowItemMultiplier,i=o.length;if(0<i&&"even"==d.layout)for(e=s=0;e<d.row;e++){var r=e-i*Math.floor(e/i);s+=o[r][d.columnindex]}if("on"==d.evenCobbles&&d.cobblesPattern!=undefined){var n=0;s=0,jQuery.each(t,function(e,t){var a=jQuery(a),o=a.data("cobblesw"),i=a.data("cobblesh");if(d.cobblesPattern!=undefined&&2<d.cobblesPattern.length){var r=getCobblePat(d.cobblesPattern,e);o=parseInt(r.w,0),i=parseInt(r.h,0)}o=o==undefined?1:o,i=i==undefined?1:i,d.column<o&&(o=d.column),n+=o*i,d.column*d.row>=n&&s++})}var u=s*d.currentpage,c=u+s,p=jQuery(d.filterGroupClass+".esg-filterbutton.selected:not(.esg-navigationbutton),"+d.filterGroupClass+" .esg-filterbutton.selected:not(.esg-navigationbutton)"),h=0,g=d.container.closest(".myportfolio-container").hasClass("source_type_stream");if(a.find(".esgbox").each(function(){-1!==this.className.search("facebook")&&jQuery(this).removeAttr("data-width data-height")}),0<jQuery(d.filterGroupClass+".esg-filter-wrapper, "+d.filterGroupClass+" .esg-filter-wrapper").length?jQuery.each(t,function(e,t){var a=jQuery(t),o=a.find(".esgbox");if(1<o.length)for(var i,r=o.length,s=1;s<r;s++)(i=o.eq(s)).parent().hasClass("esgbox-additional")||i.removeClass("esgbox").addClass("esgbox-clone").off("click.essbox-start").removeAttr("data-esgbox").removeData("esgbox");a.find(".esgbox").each(function(){var e=jQuery(this),t=e.data("posttitle")||e.data("caption");theTitle=t?encodeURIComponent(t):"","all"==d.lightBoxMode?e.attr("data-esgbox",d.lightboxHash):"contentgroup"!=d.lightBoxMode&&e.attr("data-esgbox","");var a={featured:e.data("featured"),titl:theTitle,lbTitle:d.lightBoxPostTitle,lbTag:d.lightBoxPostTitleTag,lbImg:d.lightBoxFeaturedImg,lbMargin:d.lightBoxFeaturedMargin,lbWidth:d.lightBoxFeaturedWidth,lbPos:d.lightBoxFeaturedPos,lbMin:d.lightboxPostMinWid,lbMax:d.lightboxPostMaxWid,margin:d.lightboxMargin,padding:d.lbContentPadding,overflow:d.lbContentOverflow,revslider:e.data("revslider"),essgrid:e.data("lbesg"),ispost:e.data("ispost"),gridid:e.data("gridid")};a=JSON.stringify(a),e.hasClass("esgbox-post")&&"javascript:void(0);"===e.attr("href")&&e.attr("data-type","ajax").attr("href",d.loadMoreAjaxUrl+"?action="+d.loadMoreAjaxAction+"&client_action=load_post_content&token="+d.loadMoreAjaxToken+"&postid="+e.data("post")+"&settings="+a);var o=e.closest(".tp-esg-item").find(".esgbox-additional").find(".esgbox");o.length&&o.each(function(){jQuery(this).attr("data-caption",t).find("img").remove()}),g&&e.data("ratio","16:9")}),jQuery.fn.esgbox&&d.container.find(".esgbox").esgbox(d.container.data("lightboxsettings"));var n=!0,l=0;jQuery.each(p,function(e,t){a.hasClass(jQuery(t).data("filter"))&&(n=!1,l++)}),"and"==d.filterLogic&&l<p.length&&(n=!0),hidsbutton=jQuery(d.filterGroupClass+".esg-filter-wrapper .hiddensearchfield"),hidsbutton.hasClass("eg-forcefilter")&&l<p.length&&(n=!0),u<=h&&h<c&&!n?(a.addClass("itemtoshow").removeClass("itemishidden").removeClass("itemonotherpage"),"filterpage"!=d.lightBoxMode&&"filterall"!=d.lightBoxMode||a.find(".esgbox").attr("data-esgbox",d.filterGroupClass.replace(".","")),h++):n?a.addClass("itemishidden").removeClass("itemtoshow").removeClass("fitsinfilter"):(h<u||c<=h?(a.addClass("itemonotherpage"),a.removeClass("itemtoshow")):a.addClass("itemtoshow").removeClass("itemishidden").removeClass("itemonotherpage"),h++,a.addClass("fitsinfilter"),"filterall"==d.lightBoxMode&&a.find(".esgbox").attr("data-esgbox",d.filterGroupClass.replace(".","")))}):(jQuery.each(t,function(e,t){var a=jQuery(t),o=a.find(".esgbox");if(1<o.length)for(var i,r=o.length,s=1;s<r;s++)(i=o.eq(s)).parent().hasClass("esgbox-additional")||i.removeClass("esgbox").addClass("esgbox-clone").off("click.essbox-start").removeAttr("data-esgbox").removeData("esgbox");a.find(".esgbox").each(function(){var e=jQuery(this),t=e.data("posttitle")||e.data("caption");theTitle=t?encodeURIComponent(t):"","all"==d.lightBoxMode?e.attr("data-esgbox",d.lightboxHash):"contentgroup"!=d.lightBoxMode&&e.attr("data-esgbox","");var a={featured:e.data("featured"),titl:theTitle,lbTitle:d.lightBoxPostTitle,lbTag:d.lightBoxPostTitleTag,lbImg:d.lightBoxFeaturedImg,lbMargin:d.lightBoxFeaturedMargin,lbWidth:d.lightBoxFeaturedWidth,lbPos:d.lightBoxFeaturedPos,lbMin:d.lightboxPostMinWid,lbMax:d.lightboxPostMaxWid,margin:d.lightboxMargin,padding:d.lbContentPadding,overflow:d.lbContentOverflow,revslider:e.data("revslider"),essgrid:e.data("lbesg"),ispost:e.data("ispost"),gridid:e.data("gridid")};a=JSON.stringify(a),e.hasClass("esgbox-post")&&"javascript:void(0);"===e.attr("href")&&e.attr("data-type","ajax").attr("href",d.loadMoreAjaxUrl+"?action="+d.loadMoreAjaxAction+"&client_action=load_post_content&token="+d.loadMoreAjaxToken+"&postid="+e.data("post")+"&settings="+a);var o=e.closest(".tp-esg-item").find(".esgbox-additional").find(".esgbox");o.length&&o.each(function(){jQuery(this).attr("data-caption",t).find("img").remove()}),g&&e.data("ratio","16:9")}),"filterall"==d.lightBoxMode&&a.find(".esgbox").attr("data-esgbox",d.lightboxHash),u<=h&&h<c?(a.addClass("itemtoshow").removeClass("itemishidden").removeClass("itemonotherpage"),h++,"filterpage"!=d.lightBoxMode&&"filterall"!=d.lightBoxMode||a.find(".esgbox").attr("data-esgbox",d.lightboxHash)):(h<u||c<=h?(a.addClass("itemonotherpage"),a.removeClass("itemtoshow")):a.addClass("itemtoshow").removeClass("itemishidden").removeClass("itemonotherpage"),h++,a.addClass("fitsinfilter"))}),jQuery.fn.esgbox&&d.container.find(".esgbox").esgbox(d.container.data("lightboxsettings"))),d.nonefiltereditems=a.find(".itemtoshow, .fitsinfilter").length,"none"!=d.loadMoreType){var l=0,f=!1;p.each(function(){var e=jQuery(this).data("filter");if(e!=undefined){var t=a.find("."+e).length;l+=t,0==t&&(f=!0)}}),0!=p.length&&1!=p.length||(l=1),(0==l||f)&&loadMoreItems(d)}var m,w=jQuery(d.filterGroupClass+".esg-pagination,"+d.filterGroupClass+" .esg-pagination");w.find(".esg-pagination").remove(),w.html(""),d.maxpage=0;var v=Math.ceil(d.nonefiltereditems/s);if(7<(d.realmaxpage=v)&&"on"==d.smartPagination)if(d.currentpage<3){for(e=0;e<4;e++)m=e==d.currentpage?"selected":"",d.maxpage++,w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="'+e+'">'+(e+1)+"</div>");w.append('<div class="esg-navigationbutton">...</div>'),w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="'+(v-1)+'">'+v+"</div>")}else if(v-d.currentpage<4)for(w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="0">1</div>'),w.append('<div class="esg-navigationbutton">...</div>'),e=v-4;e<v;e++)m=e==d.currentpage?"selected":"",d.maxpage++,w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="'+e+'">'+(e+1)+"</div>");else{for(w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="0">1</div>'),w.append('<div class="esg-navigationbutton">...</div>'),e=d.currentpage-1;e<d.currentpage+2;e++)m=e==d.currentpage?"selected":"",d.maxpage++,w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="'+e+'">'+(e+1)+"</div>");w.append('<div class="esg-navigationbutton">...</div>'),w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="'+(v-1)+'">'+v+"</div>")}else for(e=0;e<v;e++)m=e==d.currentpage?"selected":"",d.maxpage++,w.append('<div class="esg-navigationbutton esg-filterbutton esg-pagination-button '+m+'" data-page="'+e+'">'+(e+1)+"</div>");if(1==d.maxpage?(jQuery(d.filterGroupClass+".esg-navigationbutton,"+d.filterGroupClass+" .esg-navigationbutton").not(".esg-loadmore").css({display:"none"}),w.css({display:"none"})):(jQuery(d.filterGroupClass+".esg-navigationbutton,"+d.filterGroupClass+" .esg-navigationbutton").css({display:"inline-block"}),w.css({display:"inline-block"})),d.currentpage>=Math.ceil(d.nonefiltereditems/s)){d.oldpage=d.currentpage;var y=d.currentpage=0;a.find(".itemtoshow, .fitsinfilter").each(function(){++y<c&&jQuery(this).removeClass("itemonotherpage")}),w.find(".esg-pagination-button").first().addClass("selected")}d.currentpage<0&&(d.currentpage=0),w.find(".esg-pagination-button").on("click",function(){stopAllVideos(!0),d.oldpage=d.currentpage,d.currentpage=jQuery(this).data("page");var e=getBestFitColumn(d=getOptions(a),jQuery(window).width(),"id");d.column=e.column,d.columnindex=e.index,d.mmHeight=e.mmHeight,"on"===d.cookies.pagination&&!0!==d.cookies.searchjusttriggered&&createCookie("grid_"+d.gridID+"_pagination",d.currentpage,d.cookies.timetosave*(1/60/60)),setItemsOnPages(d),organiseGrid(d,"paginholder"),setOptions(a,d),"on"==d.paginationScrollToTop&&jQuery("html, body").animate({scrollTop:a.offset().top-d.paginationScrollToTopOffset},{queue:!1,speed:.5})}),d.firstshowever==undefined&&jQuery(d.filterGroupClass+".esg-navigationbutton,"+d.filterGroupClass+" .esg-navigationbutton").css({visibility:"hidden"})}function waittorungGrid(e,t,a,o){var i=e.closest(".mainul");clearTimeout(i.data("intreorganisier")),i.hasClass("gridorganising")?i.data("intreorganisier",setTimeout(function(){waittorungGrid(e,t,a,o)},10)):o.init||runGrid(t,a,o)}function loadHoverImage(e){var t=e.parent().find(".esg-hover-image");t.length&&t.css("background-image",'url("'+t.data("src")+'")').appendTo(e)}function loadAllPrepared(t,a,o){if(1==t.data("preloading"))return!1;var i=new Image;t.data("lazysrc")!=t.attr("src")&&t.data("lazysrc")!=undefined&&"undefined"!=t.data("lazysrc")&&t.data("lazysrc")!=undefined&&"undefined"!=t.data("lazysrc")&&t.attr("src",t.data("lazysrc")),t.data("preloading",1),i.onload=function(e){t.data("lazydone",1),t.data("ww",i.width),t.data("hh",i.height),t.closest(".showmeonload").addClass("itemtoshow").removeClass("showmeonload").addClass("loadedmedia"),removeLLCover(t,i.width,i.height),loadHoverImage(t),"on"==a.lazyLoad&&waittorungGrid(t,a,!0,o)},i.onerror=function(){t.data("lazydone",1),t.closest(".showmeonload").addClass("itemtoshow").removeClass("showmeonload").addClass("loadedmedia"),"on"==a.lazyLoad&&waittorungGrid(t,a,!0,o)},t.attr("src")!=undefined&&"undefined"!=t.attr("src")?i.src=t.attr("src"):t.data("src")!=undefined&&"undefined"!=t.data("src")&&(i.src=t.data("src")),i.complete&&(t.data("lazydone",1),t.data("ww",i.width),t.data("hh",i.height),t.closest(".showmeonload").addClass("itemtoshow").removeClass("showmeonload").addClass("loadedmedia"),removeLLCover(t,i.width,i.height),"on"==a.lazyLoad&&waittorungGrid(t,a,!0,o))}var waitForLoads=function(t,r){"add"!==r.esgloaderprocess&&t.each(function(){if(!jQuery(this).hasClass("isvisiblenow"))return r.esgloaderprocess="add",punchgs.TweenLite.to(r.esgloader,.5,{autoAlpha:1,ease:punchgs.Power3.easeInOut}),!1});var a,s,n={init:!1};function o(e){var t=jQuery(this),a=(t.attr("src"),t.parent());if(1!=t.data("lazydone")&&"on"==r.lazyLoad&&a.find(".lazyloadcover").length<1){lthumb=t.data("lazythumb");var o="",i="";lthumb!=undefined&&"undefined"!==lthumb&&(t.data("lazysrc"),o=";background-image:url("+lthumb+")",i="esg-lazyblur"),o||(o=r.lazyLoadColor),a.append('<div class="lazyloadcover '+i+'" style="background:'+o+'"></div>')}1!=t.data("lazydone")&&s<3&&(s++,loadAllPrepared(jQuery(this),r,n)),"on"!==r.lazyLoad&&punchgs.TweenLite.set(t,{autoAlpha:1})}a=setInterval(function(){if(r.bannertimeronpause=!0,r.cd=0,s=0,t.find(".esg-media-poster").each(o),0==s&&0<r.esgloader.length&&"remove"!==r.esgloaderprocess){r.esgloaderprocess="remove";var e=0;r.esgloader.hasClass("infinityscollavailable")&&(e=1),punchgs.TweenLite.to(r.esgloader,.5,{autoAlpha:0,ease:punchgs.Power3.easeInOut,delay:e})}0!=s||t.closest(".mainul").hasClass("gridorganising")||(clearInterval(a),n.init||runGrid(r,!1,n))},50)};function organiseGrid(e,t){waitForLoads(e.container.find(".itemtoshow"),e)}function removeLLCover(e,t,a){var o=e.parent();setMediaEntryAspectRatio({ip:o,img:e,imgw:t,imgh:a}),!e.hasClass("coverremoved")&&0<o.find(".lazyloadcover").length?(e.addClass("coverremoved"),punchgs.TweenLite.set(o.find(".lazyloadcover"),{zIndex:0}),punchgs.TweenLite.fromTo(e,.5,{autoAlpha:0,zIndex:1},{force3D:!0,autoAlpha:1,ease:punchgs.Power1.easeInOut,onComplete:function(){e.parent().find(".lazyloadcover").remove()}})):"off"==opt.lazyLoad&&punchgs.TweenLite.set(e,{force3D:!0,autoAlpha:1})}function runGrid(e,t,a){a.init=!0;var o=e.container;"scroll"==e.loadMoreType&&checkBottomPos(e),e.firstshowever==undefined?(o.is(":hidden")&&punchgs.TweenLite.set(o,{autoAlpha:1,display:"block"}),runGridMain(e,t),jQuery(e.filterGroupClass+".esg-navigationbutton, "+e.filterGroupClass+" .esg-navigationbutton").css({visibility:"visible"}),e.firstshowever=1):(runGridMain(e,t),jQuery(e.filterGroupClass+".esg-navigationbutton, "+e.filterGroupClass+" .esg-navigationbutton").css({visibility:"visible"}))}function getCobblePat(e,t){var a={w:1,h:1};return(e=e.split(","))!=undefined&&(e=e[t-Math.floor(t/e.length)*e.length].split("x"),a.w=e[0],a.h=e[1]),a}function runGridMain(p,e){var h,g=p.container,t=p.itemstoload?p.itemstoload:g.find(".itemtoshow, .isvisiblenow").not(".ui-sortable-helper"),f={},m=g.find("ul").first(),a=p.aspectratio,w=0;p.aspectratioOrig=p.aspectratio,delete p.itemstoload,g.find(".mainul").addClass("gridorganising"),a=a.split(":"),h=parseInt(a[0],0)/parseInt(a[1],0),f.item=0,f.pagetoanimate=0-p.currentpage,f.col=0,f.row=0,f.pagecounter=0,f.itemcounter=0,f.fakecol=0,f.fakerow=0,f.maxheight=0,f.allcol=0,f.allrow=0,f.ulcurheight=0,f.ulwidth=m.width(),f.verticalsteps=1,f.currentcolumnheight=[];for(var o=0;o<p.column;o++)f.currentcolumnheight[o]=0;f.pageitemcounterfake=0,f.pageitemcounter=0,p.delayBasic!=undefined?f.delaybasic=p.delayBasic:f.delaybasic=.08,f.anim=p.pageAnimation,f.itemtowait=0,f.itemouttowait=0,f.ease="punchgs.Power1.easeInOut",f.easeout=f.ease,f.row=0,f.col=0;var v=p.rowItemMultiplier,y=v.length;f.y=0,f.fakey=0;var i=g.find(".esg-overflowtrick").css("width","100%");100==i.width()&&i.css({width:i.parent().width()}),f.cwidth=i.width()-2*p.overflowoffset,p.inanimation=!0,f.cwidth_n_spaces=f.cwidth-(p.column-1)*p.space,f.itemw=Math.round(f.cwidth_n_spaces/p.column),f.originalitemw=f.itemw;var b=!1;if("on"==p.forceFullScreen){if(w=jQuery(window).height(),p.fullScreenOffsetContainer!=undefined)try{var r=p.fullScreenOffsetContainer.split(",");jQuery.each(r,function(e,t){(w-=jQuery(t).outerHeight(!0))<p.minFullScreenHeight&&(w=p.minFullScreenHeight)})}catch(e){}b=!0}"even"==p.layout?(f.itemh=0==Math.round(w)?Math.round(f.cwidth_n_spaces/p.column/h):Math.round(w/p.row),p.aspectratio=0==w?p.aspectratio:f.itemw+":"+f.itemh,0<y?punchgs.TweenLite.set(t,{display:"block",visibility:"visible",overwrite:"auto"}):"on"==p.evenCobbles?punchgs.TweenLite.set(t,{display:"block",visibility:"visible",overwrite:"auto"}):punchgs.TweenLite.set(t,{display:"block",width:f.itemw,height:f.itemh,visibility:"visible",overwrite:"auto"})):punchgs.TweenLite.set(t,{display:"block",width:f.itemw,height:"auto",visibility:"visible",overwrite:"auto"}),e||punchgs.TweenLite.killTweensOf(t),f.originalitemh=f.itemh;for(var x=[],j=p.row*p.column*2,s=0;s<j;s++){for(var n=[],l=0;l<p.column;l++)n.push(0);x.push(n)}var C=0;0==t.length&&g.trigger("itemsinposition"),jQuery.each(t,function(e,t){var a,o,i=jQuery(t);if(f.itemw=f.originalitemw,punchgs.TweenLite.set(i.find(".esg-entry-content"),{minHeight:p.mmHeight+"px"}),"on"!=p.evenCobbles||i.hasClass("itemonotherpage")||i.hasClass("itemishidden")){var r=f.row-y*Math.floor(f.row/y);"even"==p.layout&&0<y&&(p.column=v[r][p.columnindex],f.cwidth=g.find(".esg-overflowtrick").width()-2*p.overflowoffset,f.cwidth_n_spaces=f.cwidth-(p.column-1)*p.space,f.itemw=Math.round(f.cwidth_n_spaces/p.column),f.itemh=0==w?f.cwidth_n_spaces/p.column/h:w/p.row,p.aspectratio=0==w?p.aspectratio:f.itemw+":"+f.itemh,punchgs.TweenLite.set(i,{width:f.itemw,height:f.itemh,overwrite:"auto"})),b&&(o=i.find(".esg-entry-media"),a=f.itemh/f.itemw*100)}else{var s=i.data("cobblesw"),n=i.data("cobblesh");if(p.cobblesPattern!=undefined&&2<p.cobblesPattern.length){var l=getCobblePat(p.cobblesPattern,C);s=parseInt(l.w,0),n=parseInt(l.h,0),C++}s=s==undefined?1:s,n=n==undefined?1:n,p.column<s&&(s=p.column),f.cobblesorigw=f.originalitemw,f.cobblesorigh=f.originalitemh,f.itemw=f.itemw*s+(s-1)*p.space,f.itemh=f.originalitemh,f.itemh=f.itemh*n+(n-1)*p.space;var d=!1,u=0,c=0;switch(s+":"+n){case"1:1":for(;0==x[u][c]&&(x[u][c]="1:1",d=!0,f.cobblesx=c,f.cobblesy=u),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"1:2":for(;0==x[u][c]&&u<j-1&&0==x[u+1][c]&&(x[u][c]="1:2",x[u+1][c]="1:2",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"1:3":for(;0==x[u][c]&&u<j-2&&0==x[u+1][c]&&0==x[u+2][c]&&(x[u][c]="1:3",x[u+1][c]="1:3",x[u+2][c]="1:3",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"2:1":for(;0==x[u][c]&&c<p.column-1&&0==x[u][c+1]&&(x[u][c]="2:1",x[u][c+1]="2:1",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"3:1":for(;0==x[u][c]&&c<p.column-2&&0==x[u][c+1]&&0==x[u][c+2]&&(x[u][c]="3:1",x[u][c+1]="3:1",x[u][c+2]="3:1",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"2:2":for(;c<p.column-1&&u<j-1&&0==x[u][c]&&0==x[u][c+1]&&0==x[u+1][c]&&0==x[u+1][c+1]&&(x[u][c]="2:2",x[u+1][c]="2:2",x[u][c+1]="2:2",x[u+1][c+1]="2:2",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"3:2":for(;c<p.column-2&&u<j-1&&0==x[u][c]&&0==x[u][c+1]&&0==x[u][c+2]&&0==x[u+1][c]&&0==x[u+1][c+1]&&0==x[u+1][c+2]&&(x[u][c]="3:2",x[u][c+1]="3:2",x[u][c+2]="3:2",x[u+1][c]="3:2",x[u+1][c+1]="3:2",x[u+1][c+2]="3:2",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"2:3":for(;c<p.column-1&&u<j-2&&0==x[u][c]&&0==x[u][c+1]&&0==x[u+1][c]&&0==x[u+1][c+1]&&0==x[u+2][c+1]&&0==x[u+2][c+1]&&(x[u][c]="2:3",x[u][c+1]="2:3",x[u+1][c]="2:3",x[u+1][c+1]="2:3",x[u+2][c]="2:3",x[u+2][c+1]="2:3",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);break;case"3:3":for(;c<p.column-2&&u<j-2&&0==x[u][c]&&0==x[u][c+1]&&0==x[u][c+2]&&0==x[u+1][c]&&0==x[u+1][c+1]&&0==x[u+1][c+2]&&0==x[u+2][c]&&0==x[u+2][c+1]&&0==x[u+2][c+2]&&(x[u][c]="3:3",x[u][c+1]="3:3",x[u][c+2]="3:3",x[u+1][c]="3:3",x[u+1][c+1]="3:3",x[u+1][c+2]="3:3",x[u+2][c]="3:3",x[u+2][c+1]="3:3",x[u+2][c+2]="3:3",f.cobblesx=c,f.cobblesy=u,d=!0),++c==p.column&&(c=0,u++),j<=u&&(d=!0),!d;);}p.aspectratio=f.itemw+":"+f.itemh,punchgs.TweenLite.set(i,{width:f.itemw,height:f.itemh,overwrite:"auto"}),o=i.find(".esg-entry-media"),a=f.itemh/f.itemw*100,punchgs.TweenLite.set(o,{paddingBottom:a+"%"})}"even"!==p.layout&&(i.hasClass("itemtoshow")&&(i.width()!=f.itemw||0==i.css("opacity")||"hidden"==i.css("visibility"))?f=prepareItemToMessure(i,f,g):(adjustMediaSize(i,!0,f,p),f.itemh=i.height())),(f=animateGrid(i,p,f,e)).itemcounter++,m.height()<f.maxheight&&g.trigger("itemsinposition")}),p.aspectratio=p.aspectratioOrig,"off"!==p.hideMarkups&&0!=f.itemtowait||g.find(".mainul").removeClass("gridorganising");var d=getBestFitColumn(p,jQuery(window).width(),"id");if(p.column=d.column,p.columnindex=d.index,p.mmHeight=d.mmHeight,p.maxheight=f.maxheight,p.container.trigger("itemsinposition"),p.inanimation=!0,p.started=!1,p.filterchanged=!1,p.silent=!1,p.silentout=!1,p.changedAnim="",setOptions(g,p),0<p.esgloader.length&&"remove"!=p.esgloaderprocess){p.esgloaderprocess="remove";var u=0;p.esgloader.hasClass("infinityscollavailable")&&(u=1),punchgs.TweenLite.to(p.esgloader,1,{autoAlpha:0,ease:punchgs.Power3.easeInOut,delay:u})}p.fromResize=!1,p.inViewport||jQuery(window).trigger("resize.esgviewport")}function prepareItemToMessure(e,t,a){return adjustMediaSize(e,!0,t,a.data("opt")),t.itemh=e.outerHeight(!0),t}function animateGrid(e,t,a,o){if(a.skipanim=!1,a.x=Math.round(a.col*a.itemw),"even"==t.layout);else{a.idealcol=0,a.backupcol=a.col;for(var i=0;i<t.column;i++)a.currentcolumnheight[a.idealcol]>a.currentcolumnheight[i]&&(a.idealcol=i);a.y=a.currentcolumnheight[a.idealcol],a.x=Math.round(a.idealcol*a.itemw)+a.idealcol*t.space,a.col=a.idealcol,a.itemh==undefined&&(a.itemh=0)}if(a.cobblesx!=undefined&&(a.x=a.cobblesx*a.cobblesorigw,a.y=a.cobblesy*a.cobblesorigh),"rotatefall"!==a.anim){var r=e.data("eg-load-more-new");isNaN(r)?a.waits="item"===t.animationType?a.col*a.delaybasic+a.row*(a.delaybasic*t.column):"col"===t.animationType?a.col*a.delaybasic:a.row*(a.delaybasic*t.column):(0===parseInt(r,10)&&(t.loadStartRow=a.row),a.waits="item"===t.animationType?r*a.delaybasic:"col"===t.animationType?a.col*a.delaybasic:(a.row-t.loadStartRow)*(a.delaybasic*t.column),e.removeData("eg-load-more-new"))}else a.waits=a.col*a.delaybasic+a.row*(a.delaybasic*t.column);if(a.speed=t.animSpeed,a.inxrot=0,a.inyrot=0,a.outxrot=0,a.outyrot=0,a.inorigin="center center",a.outorigin="center center",a.itemh=Math.round(a.itemh),a.scale=1,a.outfade=0,a.infade=0,e.hasClass("itemonotherpage"))a.skipanim=!0;else if(!t.firstLoadFinnished&&t.startAnimation||!t.inViewport){var s=t.startAnimationSpeed?t.startAnimationSpeed:0,n=t.startAnimationDelay?t.startAnimationDelay:0;a.anim=t.startAnimation,"none"!==a.anim?(a.speed=s?.001*s:0,a.waits=n&&"reveal"!==a.anim?n/100:0):(a.speed=0,a.waits=0),a.waits&&(a.waits*="item"===t.startAnimationType?o:a[t.startAnimationType])}if("horizontal-slide"==a.anim?(a.waits=0,a.hsoffset=0-a.cwidth-parseInt(t.space),a.hsoffsetout=0-a.cwidth-parseInt(t.space),t.oldpage!=undefined&&t.oldpage>t.currentpage&&(a.hsoffset=a.cwidth+parseInt(t.space),a.hsoffsetout=a.cwidth+parseInt(t.space))):"vertical-slide"==a.anim&&(a.waits=0,a.maxcalcheight=t.row*t.space+t.row*a.itemh,a.vsoffset=a.maxcalcheight+parseInt(t.space),a.vsoffsetout=a.maxcalcheight+parseInt(t.space),t.oldpage!=undefined&&t.oldpage>t.currentpage&&(a.vsoffset=0-a.maxcalcheight-parseInt(t.space),a.vsoffsetout=0-a.maxcalcheight-parseInt(t.space))),t.fromResize&&(a.waits=0),a.outwaits=a.waits,"even"==t.layout&&a.cobblesx==undefined&&(a.x=a.x+a.col*t.space),a.cobblesx!=undefined&&(a.x=a.x+a.cobblesx*t.space,a.y=a.y+a.cobblesy*t.space),"vertical-flip"!=a.anim&&"horizontal-flip"!=a.anim&&"vertical-flipbook"!=a.anim&&"horizontal-flipbook"!=a.anim||(a=fakePositions(e,a,t)),"vertical-flip"==a.anim?(a.inxrot=-180,a.outxrot=180):"horizontal-flip"==a.anim&&(a.inyrot=-180,a.outyrot=180),a.outspeed=a.speed,"off"==t.animDelay&&(a.waits=0,a.outwaits=0),"scale"==a.anim?a.scale=0:"vertical-flipbook"==a.anim?(a.inxrot=-90,a.outxrot=90,a.inorigin="center top",a.outorigin="center bottom",a.waits=a.waits+a.speed/3,a.outfade=1,a.infade=1,a.outspeed=a.speed/1.2,a.ease="Sine.easeOut",a.easeout="Sine.easeIn","off"==t.animDelay&&(a.waits=a.speed/3,a.outwaits=0)):"horizontal-flipbook"==a.anim?(a.inyrot=-90,a.outyrot=-90,a.inorigin="left center",a.outorigin="right center",a.waits=a.waits+a.speed/2.4,a.outfade=1,a.infade=1,a.outspeed=a.speed/1.2,a.ease="Sine.easeOut",a.easeout="Sine.easeIn","off"==t.animDelay&&(a.waits=a.speed/3,a.outwaits=0)):"fall"!=a.anim&&"rotatefall"!=a.anim||(a.outoffsety=100,(a=fakePositions(e,a,t)).outfade=0),"rotatefall"==a.anim?(a.rotatez=20,a.outorigin="left top",a.outfade=1,a.outoffsety=600):"rotatescale"==a.anim?(a.scale=0,a.inorigin="left bottom",a.outorigin="center center",a.faeout=1,a.outoffsety=100,a=fakePositions(e,a,t)):"stack"==a.anim&&(a.scale=0,a.inorigin="center center",a.faeout=1,a.ease="punchgs.Power3.easeOut",(a=fakePositions(e,a,t)).ease="Back.easeOut"),t.silent&&(a.waits=0,a.outwaits=0,a.speed=0,a.outspeed=0),t.silentout&&(a.outwaits=0,a.outspeed=.4,a.speed=.4,a.ease="punchgs.Power3.easeOut",a.easeout=a.ease),a.hooffset=t.overflowoffset,a.vooffset=t.overflowoffset,a.itemw+a.x-a.cwidth<20&&-20<a.itemw+a.x-a.cwidth){var l=a.itemw+a.x-a.cwidth;a.itemw=a.itemw-l}if(!e.hasClass("itemtoshow")&&!e.hasClass("fitsinfilter")||a.skipanim)a.itemouttowait++,punchgs.TweenLite.set(e,{zIndex:5}),e.removeClass("isvisiblenow"),0<e.css("opacity")?"stack"==a.anim?(punchgs.TweenLite.set(e,{zIndex:a.pageitemcounterfake+100}),punchgs.TweenLite.to(e,a.outspeed/2,{force3D:"auto",x:-20-a.itemw,rotationY:30,rotationX:10,ease:Sine.easeInOut,delay:a.outwaits}),punchgs.TweenLite.to(e,.01,{force3D:"auto",zIndex:a.pageitemcounterfake,delay:a.outwaits+a.outspeed/3}),punchgs.TweenLite.to(e,.2*a.outspeed,{force3D:"auto",delay:a.outwaits+.9*a.outspeed,autoAlpha:0,ease:Sine.easeInOut}),punchgs.TweenLite.to(e,a.outspeed/3,{zIndex:2,force3D:"auto",x:0,scale:.9,rotationY:0,rotationX:0,ease:Sine.easeInOut,delay:a.outwaits+a.outspeed/1.4,onComplete:function(){e.hasClass("itemtoshow")||punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}})):"horizontal-flipbook"==a.anim||"vertical-flipbook"==a.anim?punchgs.TweenLite.to(e,a.outspeed,{force3D:"auto",zIndex:2,scale:a.scale,autoAlpha:a.outfade,transformOrigin:a.outorigin,rotationX:a.outxrot,rotationY:a.outyrot,ease:a.easeout,delay:a.outwaits,onComplete:function(){e.hasClass("itemtoshow")||punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}}):"fall"==a.anim?punchgs.TweenLite.to(e,a.outspeed,{zIndex:2,force3D:"auto",y:a.outoffsety,autoAlpha:0,ease:a.easeout,delay:a.outwaits,onComplete:function(){e.hasClass("itemtoshow")||punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}}):"horizontal-slide"==a.anim?punchgs.TweenLite.to(e,a.outspeed,{zIndex:2,force3D:"auto",autoAlpha:1,left:a.hooffset+e.position().left+a.hsoffsetout,top:a.vooffset+e.position().top,ease:a.easeout,delay:a.outwaits,onComplete:function(){punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}}):"vertical-slide"==a.anim?punchgs.TweenLite.to(e,a.outspeed,{zIndex:2,force3D:"auto",autoAlpha:1,left:a.hooffset+e.position().left,top:a.vooffset+e.position().top+a.vsoffsetout,ease:a.easeout,delay:a.outwaits,onComplete:function(){punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}}):"rotatefall"==a.anim&&0<e.css("opacity")?(punchgs.TweenLite.set(e,{zIndex:300-a.item}),punchgs.TweenLite.to(e,a.outspeed/2,{force3D:"auto",transformOrigin:a.outorigin,ease:"punchgs.Bounce.easeOut",rotationZ:a.rotatez,delay:a.outwaits}),punchgs.TweenLite.to(e,a.outspeed/2,{zIndex:2,force3D:"auto",autoAlpha:0,y:a.outoffsety,ease:punchgs.Power3.easeIn,delay:a.outwaits+a.outspeed/3})):punchgs.TweenLite.to(e,a.outspeed,{force3D:"auto",zIndex:2,scale:a.scale,autoAlpha:a.outfade,transformOrigin:a.outorigin,rotationX:a.outxrot,rotationY:a.outyrot,ease:a.easeout,delay:a.outwaits,onComplete:function(){e.hasClass("itemtoshow")||punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}}):punchgs.TweenLite.set(e,{zIndex:2,scale:a.scale,autoAlpha:0,transformOrigin:a.outorigin,rotationX:a.outxrot,rotationY:a.outyrot,onComplete:function(){e.hasClass("itemtoshow")||punchgs.TweenLite.set(e,{autoAlpha:0,overwrite:"all",display:"none"}),a.itemouttowait--,0==a.itemouttowait&&t.container.trigger("itemsinposition")}}),a=shiftGridFake(a,t);else{e.addClass("isvisiblenow"),"even"!=t.layout?(a.currentcolumnheight[a.idealcol]=a.currentcolumnheight[a.idealcol]+a.itemh+parseInt(t.space),a.ulcurheight<a.currentcolumnheight[a.idealcol]&&(a.ulcurheight=a.currentcolumnheight[a.idealcol])):a.ulcurheight=a.y+a.itemh,a.maxheight<a.ulcurheight&&(a.maxheight=a.ulcurheight),a.itemtowait++;var d,u,c=Math.round(a.hooffset+a.x),p=Math.round(a.vooffset+a.y);if("on"==t.rtl&&(c=a.ulwidth-c-a.itemw),0==e.css("opacity")&&"fade"==a.anim?punchgs.TweenLite.set(e,{opacity:0,autoAlpha:0,width:a.itemw,height:a.itemh,scale:1,left:c,y:0,top:p,overwrite:"all"}):0==e.css("opacity")&&"scale"==a.anim?punchgs.TweenLite.set(e,{width:a.itemw,height:a.itemh,scale:0,left:c,y:0,top:p,overwrite:"all"}):0==e.css("opacity")&&"rotatescale"==a.anim?punchgs.TweenLite.set(e,{width:a.itemw,height:a.itemh,scale:1,left:c,top:p,xPercent:150,yPercent:150,rotationZ:20,overwrite:"all"}):0==e.css("opacity")&&"fall"==a.anim?punchgs.TweenLite.set(e,{width:a.itemw,height:a.itemh,scale:.5,left:c,top:p,y:0,overwrite:"all"}):0==e.css("opacity")&&"rotatefall"==a.anim&&punchgs.TweenLite.set(e,{autoAlpha:0,width:a.itemw,height:a.itemh,left:c,rotationZ:0,top:p,y:0,overwrite:"all"}),0!=e.css("opacity")||"vertical-flip"!=a.anim&&"horizontal-flip"!=a.anim&&"vertical-flipbook"!=a.anim&&"horizontal-flipbook"!=a.anim||punchgs.TweenLite.set(e,{autoAlpha:a.infade,zIndex:10,scale:1,y:0,transformOrigin:a.inorigin,rotationX:a.inxrot,rotationY:a.inyrot,width:a.itemw,height:a.itemh,left:c,top:p,overwrite:"all"}),"stack"==a.anim&&punchgs.TweenLite.set(e,{zIndex:a.pageitemcounter,scale:.5,autoAlpha:1,left:c,top:p}),"horizontal-slide"==a.anim&&0==e.css("opacity")&&punchgs.TweenLite.set(e,{autoAlpha:1,left:Math.round(a.hooffset+(a.x-a.hsoffset)),top:p,width:a.itemw,height:a.itemh}),"vertical-slide"==a.anim&&0==e.css("opacity")&&punchgs.TweenLite.set(e,{autoAlpha:1,left:c,top:Math.round(a.vooffset+a.y-a.vsoffset),width:a.itemw,height:a.itemh}),"none"!==a.anime&&-1!==mergedTransitions.indexOf(a.anim)&&startAnimations.hasOwnProperty("esg-"+a.anim)){u=startAnimations["esg-"+a.anim],d=!0;var h=jQuery.extend(!0,{},u[1]);delete h.autoAlpha,punchgs.TweenLite.set(e,{left:c,top:p,width:a.itemw,height:a.itemh}),punchgs.TweenLite.set(e,h)}var g,f=e.find(".esg-entry-cover"),m=e.find(".esg-entry-media");if(f&&m){var w=m.outerHeight(),v=e.find(".esg-cc");punchgs.TweenLite.to(f,.01,{height:w,ease:a.ease,delay:a.waits}),punchgs.TweenLite.to(v,.01,{top:(w-v.height())/2,ease:a.ease,delay:a.waits})}function y(){e.hasClass("itemtoshow")&&punchgs.TweenLite.set(e,{autoAlpha:1,overwrite:"all"}),a.itemtowait--,0==a.itemtowait&&(t.container.trigger("itemsinposition"),e.closest(".mainul").removeClass("gridorganising"))}if(t.container.trigger("itemsinposition"),d){var b=jQuery.extend(!0,{},u[2]);b.top=p,b.ease=a.ease,b.delay=a.waits,b.onComplete=y,b.overwrite="all",e.data("viewportanime",[a.speed,b]),t.inViewport&&(g=e.data("viewportanime"),punchgs.TweenLite.to(e,g[0],g[1]))}else e.data("viewportanime",[a.speed,{force3D:"auto",autoAlpha:1,scale:1,transformOrigin:a.inorigin,rotationX:0,rotationY:0,y:0,x:0,xPercent:0,yPercent:0,z:.1,rotationZ:0,left:c,top:p,ease:a.ease,delay:a.waits,onComplete:y}]),t.inViewport&&(g=e.data("viewportanime"),punchgs.TweenLite.to(e,g[0],g[1]));"masonry"==t.layout&&(a.col=a.backupcol),a=shiftGrid(a,t,e)}return a}function fakePositions(e,t,a){if(!e.hasClass("itemtoshow")&&!e.hasClass("fitsinfilter")||t.skipanim){var o=e.data("col"),i=e.data("row");o!=undefined&&i!=undefined||0!=t.x&&0!=t.y&&(t.x=Math.round(t.fakecol*t.itemw),t.y=t.fakey,o=t.fakecol,i=t.fakerow,e.data("col",t.fakecol),e.data("row",t.fakerow)),"rotatefall"!==t.anim?t.outwaits="item"===a.animationType?o*t.delaybasic+i*(t.delaybasic*a.column):"col"===a.animationType?o*t.delaybasic:i*(t.delaybasic*a.column):t.outwaits=(a.column-o)*t.delaybasic+i*(t.delaybasic*a.column)}else;return t}function shiftGrid(e,t,a){if(a.data("col",e.col),a.data("row",e.row),e.pageitemcounter++,e.col=e.col+e.verticalsteps,e.allcol++,e.col==t.column&&(e.col=0,e.row++,e.allrow++,e.y=parseFloat(e.y)+parseFloat(e.itemh)+parseFloat(t.space),e.row==t.row&&(e.row=0,e.pageitemcounter>=t.column*t.row&&(e.pageitemcounter=0),e.pagetoanimate=e.pagetoanimate+1,e.pagecounter++,0==e.pageitemcounter)))for(var o=0;o<t.column;o++)e.currentcolumnheight[o]=0;return e}function shiftGridFake(e,t){return e.fakecol=e.fakecol+1,e.pageitemcounterfake++,e.fakecol==t.column&&(e.fakecol=0,e.fakerow++,e.fakey=e.fakey+e.itemh+t.space,e.fakerow==t.row&&(e.fakerow=0,e.pageitemcounterfake=0)),e}function checkVideoScript(e,t,a){var o,i,r=!0;if(vhandlers[e]=!0,jQuery("script[src]").each(function(){if(-1!==jQuery(this).attr("src").search(t))return r=!1}),r){(i=document.createElement("script")).src=a,o=document.getElementsByTagName("script")[0];try{o.parentNode.insertBefore(i,o)}catch(e){}}}function loadVideoApis(e,t){e.find("iframe").each(function(){var e=jQuery(this).attr("src");0<e.indexOf("you")&&!vhandlers.addedyt?checkVideoScript("addedyt","www.youtube.com/iframe_api","https://www.youtube.com/iframe_api"):0<e.indexOf("ws")&&!vhandlers.addedws?(httpprefix="https:"!==location.protocol?"http":"https",checkVideoScript("addedws","fast.wistia.com/assets/external/E-v1.js",httpprefix+"://fast.wistia.com/assets/external/E-v1.js")):0<e.indexOf("vim")&&!vhandlers.addedvim?checkVideoScript("addedvim","player.vimeo.com/api/player.js","https://player.vimeo.com/api/player.js"):0<e.indexOf("soundcloud")&&!vhandlers.addedsc&&(httpprefix="https:"!==location.protocol?"http":"https",checkVideoScript("addedsc","w.soundcloud.com/player/api.js",httpprefix+"://w.soundcloud.com/player/api.js"))})}function stopAllVideos(e,t,a,o){var i,r=" isplaying";e&&(r=""),i=o?jQuery(".tp-esg-item").not(".isvisiblenow").toArray():document.getElementsByClassName("tp-esg-item isvisiblenow");for(var s=0;s<i.length;s++){var n,l,d,u,c=i[s].getElementsByClassName("esg-youtubevideo haslistener"+r),p=i[s].getElementsByClassName("esg-vimeovideo haslistener"+r),h=i[s].getElementsByClassName("esg-wistiavideo haslistener"+r),g=i[s].getElementsByClassName("esg-htmlvideo haslistener"+r),f=i[s].getElementsByClassName("esg-soundcloud"+r);for(u=0;u<c.length;u++)n=(l=jQuery(c[u])).data("player"),a!=l.attr("id")&&(n.pauseVideo(),e&&forceVideoInPause(l,!1,n,"youtube"));for(u=0;u<p.length;u++)d=(l=jQuery(p[u])).attr("id"),n=l.data("newvimeoplayer"),a!=d&&(n.pause(),a===undefined&&e&&forceVideoInPause(l,!1,n,"vimeo"));for(u=0;u<h.length;u++)n=(l=jQuery(h[u])).data("player"),a!=l.attr("id")&&(l.wistiaApi.pause(),e&&forceVideoInPause(l,!1,n,"wistia"));for(u=0;u<g.length;u++)d=(l=jQuery(g[u])).attr("id"),n=document.getElementById(d),a!=d&&(n.pause(),e&&forceVideoInPause(l,!1,n,"html5vid"));for(u=0;u<f.length;u++)n=(l=jQuery(f[u])).data("player"),a!=l.attr("id")&&(n.pause(),e&&forceVideoInPause(l,!1,n,"soundcloud"))}}function forceVideoInPause(e,t,a,o){e.removeClass("isplaying");var i=e.closest(".tp-esg-item").removeClass("esg-video-active");if(0<i.find(".esg-media-video").length&&!jQuery("body").data("fullScreenMode")){var r=i.find(".esg-entry-cover"),s=i.find(".esg-media-poster");if(0<s.length)if(is_mobile()?(punchgs.TweenLite.set(r,{autoAlpha:1}),punchgs.TweenLite.set(s,{autoAlpha:1}),punchgs.TweenLite.set(e,{autoAlpha:0})):(punchgs.TweenLite.to(r,.5,{autoAlpha:1}),punchgs.TweenLite.to(s,.5,{autoAlpha:1}),punchgs.TweenLite.to(e,.5,{autoAlpha:0})),t)if("youtube"==o)try{a.destroy()}catch(e){}else if("vimeo"==o)try{a.unload()}catch(e){}else if("wistia"==o)try{a.end()}catch(e){}else"html5vid"!=o&&(e.removeClass("haslistener"),e.removeClass("readytoplay"));else setTimeout(function(){is_mobile()||e.css({display:"none"})},500)}}function onPlayerStateChange(e){var t=e.target.getIframe(),a=jQuery(t);if(clearTimeout(a.data("esgplayertimer")),e.data==YT.PlayerState.PLAYING&&(e.target.setPlaybackQuality("hd1080"),stopAllVideos(!0,!1,t.id),a.addClass("isplaying").removeClass("isinpause")),2==e.data){var o=e.target;a.data("esgplayertimer",setTimeout(function(){2==o.getPlayerState()&&(forceVideoInPause(a),o.pauseVideo())},100))}0==e.data&&forceVideoInPause(a)}function vimeoready_auto(t){var e=t.data("newvimeoplayer");e||(e=new Vimeo.Player(t[0]),t.data("newvimeoplayer",e)),t.addClass("readytoplay"),e.on("play",function(e){stopAllVideos(!0,!1,t.attr("id")),t.addClass("isplaying"),t.removeClass("isinpause")}),e.on("finish",function(e){forceVideoInPause(t),t.removeClass("isplaying")}),e.on("pause",function(e){forceVideoInPause(t),t.removeClass("isplaying")}),e.on("error",function(){console.log("vimeo error occured")})}function html5vidready(e,t,a){var o,i;function r(){o?o=!1:(forceVideoInPause(t),t.removeClass("isplaying"))}t.addClass("readytoplay"),t.on("play",function(){o||(stopAllVideos(!(o=!1),!1,a),t.addClass("isplaying"),t.removeClass("isinpause"))}),t.on("pause",function(){clearTimeout(i),i=setTimeout(r,100)}),t.on("ended",function(){forceVideoInPause(t),t.removeClass("isplaying")}),t.on("seeking",function(){o=!0})}function prepareYT(e){var t,a="ytiframe"+Math.round(1e5*Math.random()+1);if(e.hasClass("haslistener")||"undefined"==typeof YT)return(t=e.data("player"))!=undefined&&"function"==typeof t.playVideo;try{e.attr("id",a),t=new YT.Player(a,{events:{onStateChange:onPlayerStateChange}}),e.data("player",t),e.addClass("haslistener").addClass("esg-youtubevideo")}catch(e){return!1}}function playYT(e){var t=e.data("player");t!=undefined&&"function"==typeof t.playVideo&&t.playVideo()}function prepareVimeo(e){if(e.hasClass("haslistener")||"undefined"==typeof Vimeo)return"undefined"!=typeof Vimeo&&!(!e.data("newvimeoplayer")||!e.hasClass("readytoplay"));try{var t="vimeoiframe"+Math.round(1e5*Math.random()+1);e.attr("id",t);for(var a,o=e.attr("src"),i={},r=o,s=/([^&=]+)=([^&]*)/g;a=s.exec(r);)i[decodeURIComponent(a[1])]=decodeURIComponent(a[2]);o=(o=i.player_id!=undefined?o.replace(i.player_id,t):o+"&player_id="+t).replace(/&api=0|&api=1/,""),e.attr("src",o),vimeoready_auto(e),e.addClass("haslistener").addClass("esg-vimeovideo")}catch(e){return!1}}function playVimeo(e){var t=e.data("newvimeoplayer");t&&t.play()}function prepareWs(e){var t,a="wsiframe"+Math.round(1e5*Math.random()+1);if(e.hasClass("haslistener")||"undefined"==typeof Ws)return(t=e.data("player"))!=undefined&&"function"==typeof t.playVideo;try{e.attr("id",a),t=new Ws.Player(a,{events:{onStateChange:onPlayerStateChange}}),e.data("player",t),e.addClass("haslistener").addClass("esg-wistiavideo")}catch(e){return!1}}function playWs(e){var t=e.data("player");t!=undefined&&"function"==typeof t.playVideo&&t.wistiaApi.Plau()}function prepareSoundCloud(e){var t;if(e.data("player")!=undefined||"undefined"==typeof SC)return(t=e.data("player"))!=undefined&&"function"==typeof t.getVolume;var a="sciframe"+Math.round(1e5*Math.random()+1);try{e.attr("id",a),(t=SC.Widget(a)).bind(SC.Widget.Events.PLAY,function(){stopAllVideos(!0,!1,e.attr("id")),e.addClass("isplaying"),e.removeClass("isinpause")}),t.bind(SC.Widget.Events.PAUSE,function(){e.hasClass("isplaying")&&(forceVideoInPause(e),e.removeClass("isplaying"))}),t.bind(SC.Widget.Events.FINISH,function(){forceVideoInPause(e),e.removeClass("isplaying")}),e.data("player",t),e.addClass("haslistener").addClass("esg-soundcloud")}catch(e){return!1}}function playSC(e){var t=e.data("player");t!=undefined&&"function"==typeof t.getVolume&&setTimeout(function(){t.play()},500)}function prepareVideo(e){var t;if(e.hasClass("haslistener"))try{var a=e.attr("id");return!("function"!=typeof(t=document.getElementById(a)).play||!e.hasClass("readytoplay"))}catch(e){return!1}else{var o="videoid_"+Math.round(1e5*Math.random()+1);e.attr("id",o),(t=document.getElementById(o)).oncanplay=html5vidready(t,e,o),e.addClass("haslistener").addClass("esg-htmlvideo")}}function playVideo(e){var t=e.attr("id");document.getElementById(t).play()}}(jQuery),function(b,e){"use strict";var t,x=!1,j=null,C=parseFloat,k=Math.min,A=/(-?\d+\.?\d*)$/g,T=/(\d+\.?\d*)$/g,O=[],P=[],Q=function(e){return"string"==typeof e},I=function(e,t){for(var a,o=e.length,i=o;i--;)t(e[a=o-i-1],a)},L=Array.prototype.indexOf||function(e){var t=this.length,a=Number(arguments[1])||0;for((a=a<0?Math.ceil(a):Math.floor(a))<0&&(a+=t);a<t;a++)if(a in this&&this[a]===e)return a;return-1};function M(e,t){for(var a=0,o=e.length;a<o;a++)if(e[a]==t)return!x;return x}b.tinysort={id:"TinySort",version:"1.5.6",copyright:"Copyright (c) 2008-2013 Ron Valstar",uri:"http://tinysort.sjeiti.com/",licensed:{MIT:"http://www.opensource.org/licenses/mit-license.php",GPL:"http://www.gnu.org/licenses/gpl.html"},plugin:(t=function(e,t){O.push(e),P.push(t)},t.indexOf=L,t),defaults:{order:"asc",attr:j,data:j,useVal:x,place:"start",returns:x,cases:x,forceStrings:x,ignoreDashes:x,sortFunction:j}},b.fn.extend({tinysort:function(){var p,d,e,c,t=this,h=[],u=[],g=[],f=[],m=0,a=[],o=[],w=function(t){I(O,function(e){e.call(e,t)})},v=function(e,t){var a;return"string"==typeof t&&(e.cases||(t=(a=t)&&a.toLowerCase?a.toLowerCase():a),t=t.replace(/^\s*(.*?)\s*$/i,"$1")),t},i=function(e,t){var a=0;for(0!==m&&(m=0);0===a&&m<c;){var o=f[m],i=o.oSettings,r=i.ignoreDashes?T:A;if(w(i),i.sortFunction)a=i.sortFunction(e,t);else if("rand"==i.order)a=Math.random()<.5?1:-1;else{var s=x,n=v(i,e.s[m]),l=v(i,t.s[m]);if(!i.forceStrings){var d=Q(n)?n&&n.match(r):x,u=Q(l)?l&&l.match(r):x;if(d&&u)n.substr(0,n.length-d[0].length)==l.substr(0,l.length-u[0].length)&&(s=!x,n=C(d[0]),l=C(u[0]))}a=o.iAsc*(n<l?-1:l<n?1:0)}I(P,function(e){a=e.call(e,s,n,l,a)}),0===a&&m++}return a};for(p=0,e=arguments.length;p<e;p++){var r=arguments[p];Q(r)?a.push(r)-1>o.length&&(o.length=a.length-1):o.push(r)>a.length&&(a.length=o.length)}for(a.length>o.length&&(o.length=a.length),0===(c=a.length)&&(c=a.length=1,o.push({})),p=0,e=c;p<e;p++){var s=a[p],y=b.extend({},b.tinysort.defaults,o[p]),n=!(!s||""===s),l=n&&":"===s[0];f.push({sFind:s,oSettings:y,bFind:n,bAttr:!(y.attr===j||""===y.attr),bData:y.data!==j,bFilter:l,$Filter:l?t.filter(s):t,fnSort:y.sortFunction,iAsc:"asc"==y.order?1:-1})}return t.each(function(e,t){var a,o=b(t),i=o.parent().get(0),r=[];for(d=0;d<c;d++){var s=f[d],n=s.bFind?s.bFilter?s.$Filter.filter(t):o.find(s.sFind):o;r.push(s.bData?n.data(s.oSettings.data):s.bAttr?n.attr(s.oSettings.attr):s.oSettings.useVal?n.val():n.text()),void 0===a&&(a=n)}var l=L.call(g,i);l<0&&(l=g.push(i)-1,u[l]={s:[],n:[]}),0<a.length?u[l].s.push({s:r,e:o,n:e}):u[l].n.push({e:o,n:e})}),I(u,function(e){e.s.sort(i)}),I(u,function(e){var t=e.s,a=e.n,o=t.length,i=a.length,r=o+i,s=[],n=r,l=[0,0];switch(y.place){case"first":I(t,function(e){n=k(n,e.n)});break;case"org":I(t,function(e){s.push(e.n)});break;case"end":n=i;break;default:n=0}for(p=0;p<r;p++){var d=M(s,p)?!x:n<=p&&p<n+o,u=d?0:1,c=(d?t:a)[l[u]].e;c.parent().append(c),!d&&y.returns||h.push(c.get(0)),l[u]++}}),t.length=0,Array.prototype.push.apply(t,h),t}}),b.fn.TinySort=b.fn.Tinysort=b.fn.tsort=b.fn.tinysort,jQuery(document).ready(function(){jQuery("span.eg-post-like").click(function(){var t,e;return 0,e=(t=jQuery(this).closest("a")).data("post_id"),jQuery.ajax({type:"post",url:eg_ajax_var.url,data:"action=ess_grid_post_like&nonce="+eg_ajax_var.nonce+"&post_like=&post_id="+e,success:function(e){"already"!=e&&(t.addClass("eg-post-like-voted"),t.closest("li").find(".eg-post-count").text(e))}}),!1})})}(jQuery);