function essbSetCookie(e,t,s){var i=new Date;i.setTime(i.getTime()+24*s*60*60*1e3);var n="expires="+i.toGMTString();document.cookie=e+"="+t+"; "+n+"; path=/"}function essbGetCookie(e){for(var t=e+"=",s=document.cookie.split(";"),i=0;i=n&&(heroshareTriggeredOnScroll=!0,essb_heroshare_show())}else{var r=90;s>r&&r>0&&(heroshareTriggeredOnScroll=!0,essb_heroshare_show())}}else s>heroshareTriggerPercent&&heroshareTriggerPercent>0&&(heroshareTriggeredOnScroll=!0,essb_heroshare_show())}},essb_heroshare_show=function(){jQuery.fn.extend({center:function(){return this.each(function(){var e=(jQuery(window).height()-jQuery(this).outerHeight())/2,t=(jQuery(window).width()-jQuery(this).outerWidth())/2;jQuery(this).css({position:"fixed",margin:0,top:(e>0?e:0)+"px",left:(t>0?t:0)+"px"})})}});var e=jQuery(".essb-heroshare");if(e.length){var t=jQuery(e).attr("data-width")||"",s=jQuery(e).attr("data-close-hide")||"",i=jQuery(e).attr("data-close-hide-all")||"",n=jQuery(e).attr("data-postid")||"";jQuery(e).attr("data-close-after")||"";if("1"==s||"1"==i){var r="",o="essb_heroshare_";if("1"==s){r=o+n;var a=essbGetCookie(r);if("yes"==a)return;essbSetCookie(r,"yes",7)}if("1"==i){r=o+"all";var a=essbGetCookie(r);if("yes"==a)return;essbSetCookie(r,"yes",7)}}var h=jQuery(window).width(),l=(jQuery("document").height(),960),u=t;Number(u)&&Number(u)>0&&(l=u),l>h&&(l=h-60);var _=heroImageWidth,d=l-_-50;jQuery(".essb-heroshare-post-image").css({width:_+"px"}),jQuery(".essb-heroshare-post-content").css({width:d+"px"}),jQuery(".essb-heroshare").css({width:l+"px"}),jQuery(".essb-heroshare").center(),jQuery(".essb-heroshare").fadeIn(400),jQuery(".essb-heroshare-shadow").fadeIn(200)}},essb_heroshare_close=function(){jQuery(".essb-heroshare").fadeOut(400),jQuery(".essb-heroshare-shadow").fadeOut(400)};jQuery(document).ready(function(e){var t=e(".essb-heroshare");if(!t.length)return void console.log("no heroshare");heroImageWidth=e(".essb-heroshare-post-image-src").prop("naturalWidth");var s=e(".essb-heroshare-post-image-src").prop("naturalHeight"),i=200/s;if(heroImageWidth=Math.round(heroImageWidth*i),"true"==get_url_parameter("essb_heroshare")&&t.hasClass("essb-heroshare-oncomment"))return void essb_heroshare_show();var n=e(t).attr("data-load-percent")||"",r=e(t).attr("data-load-time")||"",o=e(t).attr("data-load-end")||"",a=e(t).attr("data-load-manual")||"",h=e(t).attr("data-exit-intent")||"";return"1"==a?void console.log("manual display"):""!=n||"1"==o?(heroshareTriggerPercent=Number(n),heroshareTriggeredOnScroll=!1,heroshareTriggerEnd="1"==o?!0:!1,console.log("scroll event heroshareTriggerPercent = "+heroshareTriggerPercent+", heroshareTriggeredOnScroll = "+heroshareTriggeredOnScroll+", heroshareTriggerEnd = "+heroshareTriggerEnd),void e(window).scroll(essb_heroshare_onscroll)):"1"==h?void e(document).mouseout(essb_heroshare_exit):void(r&&"undefined"!=typeof r&&""!=r&&Number(r)&&(shortly1=new Date,shortly1.setSeconds(shortly1.getSeconds()+Number(r)),e("#essb_settings_heroafter_counter").countdown({until:shortly1,onExpiry:essb_heroshare_show})))}),function(e){function t(){function t(e){var o=1e12>e?i?performance.now()+performance.timing.navigationStart:s():e||s();o-r>=1e3&&(_._updateTargets(),r=o),n(t)}this.regional=[],this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1},this._defaults={until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},e.extend(this._defaults,this.regional[""]),this._serverSyncs=[];var s="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},i=window.performance&&"function"==typeof window.performance.now,n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,r=0;!n||e.noRequestAnimationFrame?(e.noRequestAnimationFrame=null,setInterval(function(){_._updateTargets()},980)):(r=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||s(),n(t))}function s(t,s){return"option"==t&&(0==s.length||1==s.length&&"string"==typeof s[0])?!0:e.inArray(t,u)>-1}var i=0,n=1,r=2,o=3,a=4,h=5,l=6;e.extend(t.prototype,{markerClassName:"hasCountdown1",propertyName:"countdown",_rtlClass:"countdown_rtl",_sectionClass:"countdown_section",_amountClass:"countdown_amount",_rowClass:"countdown_row",_holdingClass:"countdown_holding",_showClass:"countdown_show",_descrClass:"countdown_descr",_timerTargets:[],setDefaults:function(t){this._resetExtraLabels(this._defaults,t),e.extend(this._defaults,t||{})},UTCDate:function(e,t,s,i,n,r,o,a){"object"==typeof t&&t.constructor==Date&&(a=t.getMilliseconds(),o=t.getSeconds(),r=t.getMinutes(),n=t.getHours(),i=t.getDate(),s=t.getMonth(),t=t.getFullYear());var h=new Date;return h.setUTCFullYear(t),h.setUTCDate(1),h.setUTCMonth(s||0),h.setUTCDate(i||1),h.setUTCHours(n||0),h.setUTCMinutes((r||0)-(Math.abs(e)<30?60*e:e)),h.setUTCSeconds(o||0),h.setUTCMilliseconds(a||0),h},periodsToSeconds:function(e){return 31557600*e[0]+2629800*e[1]+604800*e[2]+86400*e[3]+3600*e[4]+60*e[5]+e[6]},_attachPlugin:function(t,s){if(t=e(t),!t.hasClass(this.markerClassName)){var i={options:e.extend({},this._defaults),_periods:[0,0,0,0,0,0,0]};t.addClass(this.markerClassName).data(this.propertyName,i),this._optionPlugin(t,s)}},_addTarget:function(e){this._hasTarget(e)||this._timerTargets.push(e)},_hasTarget:function(t){return e.inArray(t,this._timerTargets)>-1},_removeTarget:function(t){this._timerTargets=e.map(this._timerTargets,function(e){return e==t?null:e})},_updateTargets:function(){for(var e=this._timerTargets.length-1;e>=0;e--)this._updateCountdown(this._timerTargets[e])},_optionPlugin:function(t,s,i){t=e(t);var n=t.data(this.propertyName);if(!s||"string"==typeof s&&null==i){var r=s;return s=(n||{}).options,s&&r?s[r]:s}if(t.hasClass(this.markerClassName)){if(s=s||{},"string"==typeof s){var r=s;s={},s[r]=i}s.layout&&(s.layout=s.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(n.options,s);var o=n.options.timezone!=s.timezone;e.extend(n.options,s),this._adjustSettings(t,n,null!=s.until||null!=s.since||o);var a=new Date;(n._since&&n._sincea)&&this._addTarget(t[0]),this._updateCountdown(t,n)}},_updateCountdown:function(t,s){var i=e(t);if(s=s||i.data(this.propertyName)){if(i.html(this._generateHTML(s)).toggleClass(this._rtlClass,s.options.isRTL),e.isFunction(s.options.onTick)){var n="lap"!=s._hold?s._periods:this._calculatePeriods(s,s._show,s.options.significant,new Date);(1==s.options.tickInterval||this.periodsToSeconds(n)%s.options.tickInterval==0)&&s.options.onTick.apply(t,[n])}var r="pause"!=s._hold&&(s._since?s._now.getTime()=s._until.getTime());if(r&&!s._expiring){if(s._expiring=!0,this._hasTarget(t)||s.options.alwaysExpire){if(this._removeTarget(t),e.isFunction(s.options.onExpiry)&&s.options.onExpiry.apply(t,[]),s.options.expiryText){var o=s.options.layout;s.options.layout=s.options.expiryText,this._updateCountdown(t,s),s.options.layout=o}s.options.expiryUrl&&(window.location=s.options.expiryUrl)}s._expiring=!1}else"pause"==s._hold&&this._removeTarget(t);i.data(this.propertyName,s)}},_resetExtraLabels:function(e,t){var s=!1;for(var i in t)if("whichLabels"!=i&&i.match(/[Ll]abels/)){s=!0;break}if(s)for(var i in e)i.match(/[Ll]abels[02-9]|compactLabels1/)&&(e[i]=null)},_adjustSettings:function(t,s,i){for(var n,r=0,o=null,a=0;a=g;g++)u|="?"==t._show[g]&&t._periods[g]>0,c[g]="?"!=t._show[g]||u?t._show[g]:null,d+=c[g]?1:0,p-=t._periods[g]>0?1:0;for(var m=[!1,!1,!1,!1,!1,!1,!1],g=l;g>=i;g--)t._show[g]&&(t._periods[g]?m[g]=!0:(m[g]=p>0,p--));var f=t.options.compact?t.options.compactLabels:t.options.labels,w=t.options.whichLabels||this._normalLabels,y=function(e){var i=t.options["compactLabels"+w(t._periods[e])];return c[e]?s._translateDigits(t,t._periods[e])+(i?i[e]:f[e])+" ":""},v=function(e){var i=t.options["labels"+w(t._periods[e])];return!t.options.significant&&c[e]||t.options.significant&&m[e]?''+s._translateDigits(t,t._periods[e])+"
"+(i?i[e]:f[e])+"
":""};return t.options.layout?this._buildLayout(t,c,t.options.layout,t.options.compact,t.options.significant,m):(t.options.compact?''+y(i)+y(n)+y(r)+y(o)+(c[a]?this._minDigits(t,t._periods[a],2):"")+(c[h]?(c[a]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[h],2):"")+(c[l]?(c[a]||c[h]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[l],2):""):''+v(i)+v(n)+v(r)+v(o)+v(a)+v(h)+v(l))+""+(t.options.description?''+t.options.description+"":"")},_buildLayout:function(t,s,u,_,d,p){for(var c=t.options[_?"compactLabels":"labels"],g=t.options.whichLabels||this._normalLabels,m=function(e){return(t.options[(_?"compactLabels":"labels")+g(t._periods[e])]||c)[e]},f=function(e,s){return t.options.digits[Math.floor(e/s)%10]},w={desc:t.options.description,sep:t.options.timeSeparator,yl:m(i),yn:this._minDigits(t,t._periods[i],1),ynn:this._minDigits(t,t._periods[i],2),ynnn:this._minDigits(t,t._periods[i],3),y1:f(t._periods[i],1),y10:f(t._periods[i],10),y100:f(t._periods[i],100),y1000:f(t._periods[i],1e3),ol:m(n),on:this._minDigits(t,t._periods[n],1),onn:this._minDigits(t,t._periods[n],2),onnn:this._minDigits(t,t._periods[n],3),o1:f(t._periods[n],1),o10:f(t._periods[n],10),o100:f(t._periods[n],100),o1000:f(t._periods[n],1e3),wl:m(r),wn:this._minDigits(t,t._periods[r],1),wnn:this._minDigits(t,t._periods[r],2),wnnn:this._minDigits(t,t._periods[r],3),w1:f(t._periods[r],1),w10:f(t._periods[r],10),w100:f(t._periods[r],100),w1000:f(t._periods[r],1e3),dl:m(o),dn:this._minDigits(t,t._periods[o],1),dnn:this._minDigits(t,t._periods[o],2),dnnn:this._minDigits(t,t._periods[o],3),d1:f(t._periods[o],1),d10:f(t._periods[o],10),d100:f(t._periods[o],100),d1000:f(t._periods[o],1e3),hl:m(a),hn:this._minDigits(t,t._periods[a],1),hnn:this._minDigits(t,t._periods[a],2),hnnn:this._minDigits(t,t._periods[a],3),h1:f(t._periods[a],1),h10:f(t._periods[a],10),h100:f(t._periods[a],100),h1000:f(t._periods[a],1e3),ml:m(h),mn:this._minDigits(t,t._periods[h],1),mnn:this._minDigits(t,t._periods[h],2),mnnn:this._minDigits(t,t._periods[h],3),m1:f(t._periods[h],1),m10:f(t._periods[h],10),m100:f(t._periods[h],100),m1000:f(t._periods[h],1e3),sl:m(l),sn:this._minDigits(t,t._periods[l],1),snn:this._minDigits(t,t._periods[l],2),snnn:this._minDigits(t,t._periods[l],3),s1:f(t._periods[l],1),s10:f(t._periods[l],10),s100:f(t._periods[l],100),s1000:f(t._periods[l],1e3)},y=u,v=i;l>=v;v++){var T="yowdhms".charAt(v),b=new RegExp("\\{"+T+"<\\}([\\s\\S]*)\\{"+T+">\\}","g");y=y.replace(b,!d&&s[v]||d&&p[v]?"$1":"")}return e.each(w,function(e,t){var s=new RegExp("\\{"+e+"\\}","g");y=y.replace(s,t)}),y},_minDigits:function(e,t,s){return t=""+t,t.length>=s?this._translateDigits(e,t):(t="0000000000"+t,this._translateDigits(e,t.substr(t.length-s)))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format,s=[];return s[i]=t.match("y")?"?":t.match("Y")?"!":null,s[n]=t.match("o")?"?":t.match("O")?"!":null,s[r]=t.match("w")?"?":t.match("W")?"!":null,s[o]=t.match("d")?"?":t.match("D")?"!":null,s[a]=t.match("h")?"?":t.match("H")?"!":null,s[h]=t.match("m")?"?":t.match("M")?"!":null,s[l]=t.match("s")?"?":t.match("S")?"!":null,s},_calculatePeriods:function(e,t,s,u){e._now=u,e._now.setMilliseconds(0);var d=new Date(e._now.getTime());e._since?u.getTime()e._until.getTime()&&(e._now=u=d));var p=[0,0,0,0,0,0,0];if(t[i]||t[n]){var c=_._getDaysInMonth(u.getFullYear(),u.getMonth()),g=_._getDaysInMonth(d.getFullYear(),d.getMonth()),m=d.getDate()==u.getDate()||d.getDate()>=Math.min(c,g)&&u.getDate()>=Math.min(c,g),f=function(e){return 60*(60*e.getHours()+e.getMinutes())+e.getSeconds()},w=Math.max(0,12*(d.getFullYear()-u.getFullYear())+d.getMonth()-u.getMonth()+(d.getDate()v&&u.setDate(v),u.setFullYear(u.getFullYear()+p[i]),u.setMonth(u.getMonth()+p[n]),y&&u.setDate(v)}var T=Math.floor((d.getTime()-u.getTime())/1e3),b=function(e,s){p[e]=t[e]?Math.floor(T/s):0,T-=p[e]*s};if(b(r,604800),b(o,86400),b(a,3600),b(h,60),b(l,1),T>0&&!e._since)for(var D=[1,12,4.3482,7,24,60,60],C=l,S=1,M=l;M>=i;M--)t[M]&&(p[C]>=S&&(p[C]=0,T=1),T>0&&(p[M]++,T=0,C=M,S=1)),S*=D[M];if(s)for(var M=i;l>=M;M++)s&&p[M]?s--:s||(p[M]=0);return p}});var u=["getTimes"];e.fn.countdown=function(e){var t=Array.prototype.slice.call(arguments,1);return s(e,t)?_["_"+e+"Plugin"].apply(_,[this[0]].concat(t)):this.each(function(){if("string"==typeof e){if(!_["_"+e+"Plugin"])throw"Unknown command: "+e;_["_"+e+"Plugin"].apply(_,[this].concat(t))}else _._attachPlugin(this,e||{})})};var _=e.countdown=new t}(jQuery);