(function(){var n=!1;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function t(i){function u(){!n&&this._init&&this._init.apply(this,arguments)}var e=this.prototype,f,r;n=!0;f=new this;n=!1;for(r in i)f[r]=typeof i[r]=="function"&&typeof e[r]=="function"?function(n,t){return function(){var r=this._super,i;return this._super=function(t){return e[n].apply(this,t||[])},i=t.apply(this,arguments),this._super=r,i}}(r,i[r]):i[r];return u.prototype=f,u.prototype.constructor=u,u.extend=t,u}})(),function(n){function t(n){return n.replace(/-([a-z])/g,function(n,t){return t.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){n.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var i=t(this.name);n[i]=this;n.fn[i]=function(t){var r=Array.prototype.slice.call(arguments,1);return n[i]._isNotChained(t,r)?n[i][t].apply(n[i],[this[0]].concat(r)):this.each(function(){if(typeof t=="string"){if(t[0]==="_"||!n[i][t])throw"Unknown method: "+t;n[i][t].apply(n[i],[this].concat(r))}else n[i]._attach(this,t)})}},setDefaults:function(t){n.extend(this.defaultOptions,t||{})},_isNotChained:function(t,i){return t==="option"&&(i.length===0||i.length===1&&typeof i[0]=="string")?!0:n.inArray(t,this._getters)>-1},_attach:function(t,i){if(t=n(t),!t.hasClass(this._getMarker())){t.addClass(this._getMarker());i=n.extend({},this.defaultOptions,this._getMetadata(t),i||{});var r=n.extend({name:this.name,elem:t,options:i},this._instSettings(t,i));t.data(this.name,r);this._postAttach(t,r);this.option(t,i)}},_instSettings:function(){return{}},_postAttach:function(){},_getMetadata:function(d){var f,g,h;try{f=d.data(this.name.toLowerCase())||"";f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(n,t,i){var r=f.substring(0,i).match(/"/g);return!r||r.length%2==0?'"'+t+'":':t+":"});f=n.parseJSON("{"+f+"}");for(g in f)h=f[g],typeof h=="string"&&h.match(/^new Date\((.*)\)$/)&&(f[g]=eval(h));return f}catch(e){return{}}},_getInst:function(t){return n(t).data(this.name)||{}},option:function(t,i,r){var f,u;if(t=n(t),f=t.data(this.name),!i||typeof i=="string"&&r==null)return u=(f||{}).options,u&&i?u[i]:u;t.hasClass(this._getMarker())&&(u=i||{},typeof i=="string"&&(u={},u[i]=r),this._optionsChanged(t,f,u),n.extend(f.options,u))},_optionsChanged:function(){},destroy:function(t){(t=n(t),t.hasClass(this._getMarker()))&&(this._preDestroy(t,this._getInst(t)),t.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(){}});n.JQPlugin={createPlugin:function(n,i){typeof n=="object"&&(i=n,n="JQPlugin");n=t(n);var r=t(i.name);JQClass.classes[r]=JQClass.classes[n].extend(i);new JQClass.classes[r]}}}(jQuery),function(n){var s="countdown",t=0,r=1,e=2,o=3,u=4,f=5,i=6;n.JQPlugin.createPlugin({name:s,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{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}},_getters:["getTimes"],_rtlClass:s+"-rtl",_sectionClass:s+"-section",_amountClass:s+"-amount",_periodClass:s+"-period",_rowClass:s+"-row",_holdingClass:s+"-holding",_showClass:s+"-show",_descrClass:s+"-descr",_timerElems:[],_init:function(){function e(n){var o=n<1e12?f?performance.now()+performance.timing.navigationStart:t():n||t();o-r>=1e3&&(u._updateElems(),r=o);i(e)}var u=this,t,f,i,r;this._super();this._serverSyncs=[];t=typeof Date.now=="function"?Date.now:function(){return(new Date).getTime()};f=window.performance&&typeof window.performance.now=="function";i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;r=0;!i||n.noRequestAnimationFrame?(n.noRequestAnimationFrame=null,setInterval(function(){u._updateElems()},980)):(r=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||t(),i(e))},UTCDate:function(n,t,i,r,u,f,e,o){typeof t=="object"&&t.constructor==Date&&(o=t.getMilliseconds(),e=t.getSeconds(),f=t.getMinutes(),u=t.getHours(),r=t.getDate(),i=t.getMonth(),t=t.getFullYear());var s=new Date;return s.setUTCFullYear(t),s.setUTCDate(1),s.setUTCMonth(i||0),s.setUTCDate(r||1),s.setUTCHours(u||0),s.setUTCMinutes((f||0)-(Math.abs(n)<30?n*60:n)),s.setUTCSeconds(e||0),s.setUTCMilliseconds(o||0),s},periodsToSeconds:function(n){return n[0]*31557600+n[1]*2629800+n[2]*604800+n[3]*86400+n[4]*3600+n[5]*60+n[6]},resync:function(){var t=this,i;for(n("."+this._getMarker()).each(function(){var i=n.data(this,t.name),r,u,f;if(i.options.serverSync){for(r=null,u=0;u<t._serverSyncs.length;u++)if(t._serverSyncs[u][0]==i.options.serverSync){r=t._serverSyncs[u];break}r[2]==null&&(f=n.isFunction(i.options.serverSync)?i.options.serverSync.apply(this,[]):null,r[2]=(f?(new Date).getTime()-f.getTime():0)-r[1]);i._since&&i._since.setMilliseconds(i._since.getMilliseconds()+r[2]);i._until.setMilliseconds(i._until.getMilliseconds()+r[2])}}),i=0;i<t._serverSyncs.length;i++)t._serverSyncs[i][2]!=null&&(t._serverSyncs[i][1]+=t._serverSyncs[i][2],delete t._serverSyncs[i][2])},_instSettings:function(){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(n){this._hasElem(n)||this._timerElems.push(n)},_hasElem:function(t){return n.inArray(t,this._timerElems)>-1},_removeElem:function(t){this._timerElems=n.map(this._timerElems,function(n){return n==t?null:n})},_updateElems:function(){for(var n=this._timerElems.length-1;n>=0;n--)this._updateCountdown(this._timerElems[n])},_optionsChanged:function(t,i,r){var f,u;r.layout&&(r.layout=r.layout.replace(/&lt;/g,"<").replace(/&gt;/g,">"));this._resetExtraLabels(i.options,r);f=i.options.timezone!=r.timezone;n.extend(i.options,r);this._adjustSettings(t,i,r.until!=null||r.since!=null||f);u=new Date;(i._since&&i._since<u||i._until&&i._until>u)&&this._addElem(t[0]);this._updateCountdown(t,i)},_updateCountdown:function(t,i){var r,u,f;(t=t.jquery?t:n(t),i=i||this._getInst(t),i)&&(t.html(this._generateHTML(i)).toggleClass(this._rtlClass,i.options.isRTL),n.isFunction(i.options.onTick)&&(r=i._hold!="lap"?i._periods:this._calculatePeriods(i,i._show,i.options.significant,new Date),(i.options.tickInterval==1||this.periodsToSeconds(r)%i.options.tickInterval==0)&&i.options.onTick.apply(t[0],[r])),u=i._hold!="pause"&&(i._since?i._now.getTime()<i._since.getTime():i._now.getTime()>=i._until.getTime()),u&&!i._expiring?(i._expiring=!0,(this._hasElem(t[0])||i.options.alwaysExpire)&&(this._removeElem(t[0]),n.isFunction(i.options.onExpiry)&&i.options.onExpiry.apply(t[0],[]),i.options.expiryText&&(f=i.options.layout,i.options.layout=i.options.expiryText,this._updateCountdown(t[0],i),i.options.layout=f),i.options.expiryUrl&&(window.location=i.options.expiryUrl)),i._expiring=!1):i._hold=="pause"&&this._removeElem(t[0]))},_resetExtraLabels:function(n,t){var i;for(i in t)i.match(/[Ll]abels[02-9]|compactLabels1/)&&(n[i]=t[i]);for(i in n)i.match(/[Ll]abels[02-9]|compactLabels1/)&&typeof t[i]=="undefined"&&(n[i]=null)},_adjustSettings:function(t,i,r){for(var s=null,u,o,f,e=0;e<this._serverSyncs.length;e++)if(this._serverSyncs[e][0]==i.options.serverSync){s=this._serverSyncs[e][1];break}if(s!=null)u=i.options.serverSync?s:0,o=new Date;else{var h=n.isFunction(i.options.serverSync)?i.options.serverSync.apply(t[0],[]):null,o=new Date,u=h?o.getTime()-h.getTime():0;this._serverSyncs.push([i.options.serverSync,u])}f=i.options.timezone;f=f==null?-o.getTimezoneOffset():f;(r||!r&&i._until==null&&i._since==null)&&(i._since=i.options.since,i._since!=null&&(i._since=this.UTCDate(f,this._determineTime(i._since,null)),i._since&&u&&i._since.setMilliseconds(i._since.getMilliseconds()+u)),i._until=this.UTCDate(f,this._determineTime(i.options.until,o)),u&&i._until.setMilliseconds(i._until.getMilliseconds()+u));i._show=this._determineShow(i)},_preDestroy:function(n){this._removeElem(n[0]);n.empty()},pause:function(n){this._hold(n,"pause")},lap:function(n){this._hold(n,"lap")},resume:function(n){this._hold(n,null)},toggle:function(t){var i=n.data(t,this.name)||{};this[i._hold?"resume":"pause"](t)},toggleLap:function(t){var i=n.data(t,this.name)||{};this[i._hold?"resume":"lap"](t)},_hold:function(t,i){var r=n.data(t,this.name),u;r&&(r._hold!="pause"||i||(r._periods=r._savePeriods,u=r._since?"-":"+",r[r._since?"_since":"_until"]=this._determineTime(u+r._periods[0]+"y"+u+r._periods[1]+"o"+u+r._periods[2]+"w"+u+r._periods[3]+"d"+u+r._periods[4]+"h"+u+r._periods[5]+"m"+u+r._periods[6]+"s"),this._addElem(t)),r._hold=i,r._savePeriods=i=="pause"?r._periods:null,n.data(t,this.name,r),this._updateCountdown(t,r))},getTimes:function(t){var i=n.data(t,this.name);return i?i._hold=="pause"?i._savePeriods:i._hold?this._calculatePeriods(i,i._show,i.options.significant,new Date):i._periods:null},_determineTime:function(n,t){var r=this,u=function(n){var t=new Date;return t.setTime(t.getTime()+n*1e3),t},f=function(n){n=n.toLowerCase();for(var u=new Date,f=u.getFullYear(),e=u.getMonth(),i=u.getDate(),o=u.getHours(),s=u.getMinutes(),h=u.getSeconds(),c=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,t=c.exec(n);t;){switch(t[2]||"s"){case"s":h+=parseInt(t[1],10);break;case"m":s+=parseInt(t[1],10);break;case"h":o+=parseInt(t[1],10);break;case"d":i+=parseInt(t[1],10);break;case"w":i+=parseInt(t[1],10)*7;break;case"o":e+=parseInt(t[1],10);i=Math.min(i,r._getDaysInMonth(f,e));break;case"y":f+=parseInt(t[1],10);i=Math.min(i,r._getDaysInMonth(f,e))}t=c.exec(n)}return new Date(f,e,i,o,s,h,0)},i=n==null?t:typeof n=="string"?f(n):typeof n=="number"?u(n):n;return i&&i.setMilliseconds(0),i},_getDaysInMonth:function(n,t){return 32-new Date(n,t,32).getDate()},_normalLabels:function(n){return n},_generateHTML:function(s){var a=this,v,h;s._periods=s._hold?s._periods:this._calculatePeriods(s,s._show,s.options.significant,new Date);var w=!1,b=0,p=s.options.significant,c=n.extend({},s._show);for(h=t;h<=i;h++)w|=s._show[h]=="?"&&s._periods[h]>0,c[h]=s._show[h]=="?"&&!w?null:s._show[h],b+=c[h]?1:0,p-=s._periods[h]>0?1:0;for(v=[!1,!1,!1,!1,!1,!1,!1],h=i;h>=t;h--)s._show[h]&&(s._periods[h]?v[h]=!0:(v[h]=p>0,p--));var k=s.options.compact?s.options.compactLabels:s.options.labels,d=s.options.whichLabels||this._normalLabels,y=function(n){var t=s.options["compactLabels"+d(s._periods[n])];return c[n]?a._translateDigits(s,s._periods[n])+(t?t[n]:k[n])+" ":""},g=s.options.padZeroes?2:1,l=function(n){var t=s.options["labels"+d(s._periods[n])];return!s.options.significant&&c[n]||s.options.significant&&v[n]?'<span class="'+a._sectionClass+'"><span class="'+a._amountClass+'">'+a._minDigits(s,s._periods[n],g)+'<\/span><span class="'+a._periodClass+'">'+(t?t[n]:k[n])+"<\/span><\/span>":""};return s.options.layout?this._buildLayout(s,c,s.options.layout,s.options.compact,s.options.significant,v):(s.options.compact?'<span class="'+this._rowClass+" "+this._amountClass+(s._hold?" "+this._holdingClass:"")+'">'+y(t)+y(r)+y(e)+y(o)+(c[u]?this._minDigits(s,s._periods[u],2):"")+(c[f]?(c[u]?s.options.timeSeparator:"")+this._minDigits(s,s._periods[f],2):"")+(c[i]?(c[u]||c[f]?s.options.timeSeparator:"")+this._minDigits(s,s._periods[i],2):""):'<span class="'+this._rowClass+" "+this._showClass+(s.options.significant||b)+(s._hold?" "+this._holdingClass:"")+'">'+l(t)+l(r)+l(e)+l(o)+l(u)+l(f)+l(i))+"<\/span>"+(s.options.description?'<span class="'+this._rowClass+" "+this._descrClass+'">'+s.options.description+"<\/span>":"")},_buildLayout:function(s,h,c,l,a,v){for(var g=s.options[l?"compactLabels":"labels"],nt=s.options.whichLabels||this._normalLabels,p=function(n){return(s.options[(l?"compactLabels":"labels")+nt(s._periods[n])]||g)[n]},y=function(n,t){return s.options.digits[Math.floor(n/t)%10]},tt={desc:s.options.description,sep:s.options.timeSeparator,yl:p(t),yn:this._minDigits(s,s._periods[t],1),ynn:this._minDigits(s,s._periods[t],2),ynnn:this._minDigits(s,s._periods[t],3),y1:y(s._periods[t],1),y10:y(s._periods[t],10),y100:y(s._periods[t],100),y1000:y(s._periods[t],1e3),ol:p(r),on:this._minDigits(s,s._periods[r],1),onn:this._minDigits(s,s._periods[r],2),onnn:this._minDigits(s,s._periods[r],3),o1:y(s._periods[r],1),o10:y(s._periods[r],10),o100:y(s._periods[r],100),o1000:y(s._periods[r],1e3),wl:p(e),wn:this._minDigits(s,s._periods[e],1),wnn:this._minDigits(s,s._periods[e],2),wnnn:this._minDigits(s,s._periods[e],3),w1:y(s._periods[e],1),w10:y(s._periods[e],10),w100:y(s._periods[e],100),w1000:y(s._periods[e],1e3),dl:p(o),dn:this._minDigits(s,s._periods[o],1),dnn:this._minDigits(s,s._periods[o],2),dnnn:this._minDigits(s,s._periods[o],3),d1:y(s._periods[o],1),d10:y(s._periods[o],10),d100:y(s._periods[o],100),d1000:y(s._periods[o],1e3),hl:p(u),hn:this._minDigits(s,s._periods[u],1),hnn:this._minDigits(s,s._periods[u],2),hnnn:this._minDigits(s,s._periods[u],3),h1:y(s._periods[u],1),h10:y(s._periods[u],10),h100:y(s._periods[u],100),h1000:y(s._periods[u],1e3),ml:p(f),mn:this._minDigits(s,s._periods[f],1),mnn:this._minDigits(s,s._periods[f],2),mnnn:this._minDigits(s,s._periods[f],3),m1:y(s._periods[f],1),m10:y(s._periods[f],10),m100:y(s._periods[f],100),m1000:y(s._periods[f],1e3),sl:p(i),sn:this._minDigits(s,s._periods[i],1),snn:this._minDigits(s,s._periods[i],2),snnn:this._minDigits(s,s._periods[i],3),s1:y(s._periods[i],1),s10:y(s._periods[i],10),s100:y(s._periods[i],100),s1000:y(s._periods[i],1e3)},b=c,k,d,w=t;w<=i;w++)k="yowdhms".charAt(w),d=new RegExp("\\{"+k+"<\\}([\\s\\S]*)\\{"+k+">\\}","g"),b=b.replace(d,!a&&h[w]||a&&v[w]?"$1":"");return n.each(tt,function(n,t){var i=new RegExp("\\{"+n+"\\}","g");b=b.replace(i,t)}),b},_minDigits:function(n,t,i){return(t=""+t,t.length>=i)?this._translateDigits(n,t):(t="0000000000"+t,this._translateDigits(n,t.substr(t.length-i)))},_translateDigits:function(n,t){return(""+t).replace(/[0-9]/g,function(t){return n.options.digits[t]})},_determineShow:function(n){var s=n.options.format,h=[];return h[t]=s.match("y")?"?":s.match("Y")?"!":null,h[r]=s.match("o")?"?":s.match("O")?"!":null,h[e]=s.match("w")?"?":s.match("W")?"!":null,h[o]=s.match("d")?"?":s.match("D")?"!":null,h[u]=s.match("h")?"?":s.match("H")?"!":null,h[f]=s.match("m")?"?":s.match("M")?"!":null,h[i]=s.match("s")?"?":s.match("S")?"!":null,h},_calculatePeriods:function(n,s,h,c){var a,l,rt,w,y,p,v;if(n._now=c,n._now.setMilliseconds(0),a=new Date(n._now.getTime()),n._since?c.getTime()<n._since.getTime()?n._now=c=a:c=n._since:(a.setTime(n._until.getTime()),c.getTime()>n._until.getTime()&&(n._now=c=a)),l=[0,0,0,0,0,0,0],s[t]||s[r]){var b=this._getDaysInMonth(c.getFullYear(),c.getMonth()),g=this._getDaysInMonth(a.getFullYear(),a.getMonth()),nt=a.getDate()==c.getDate()||a.getDate()>=Math.min(b,g)&&c.getDate()>=Math.min(b,g),tt=function(n){return(n.getHours()*60+n.getMinutes())*60+n.getSeconds()},it=Math.max(0,(a.getFullYear()-c.getFullYear())*12+a.getMonth()-c.getMonth()+(a.getDate()<c.getDate()&&!nt||nt&&tt(a)<tt(c)?-1:0));l[t]=s[t]?Math.floor(it/12):0;l[r]=s[r]?it-l[t]*12:0;c=new Date(c.getTime());rt=c.getDate()==b;w=this._getDaysInMonth(c.getFullYear()+l[t],c.getMonth()+l[r]);c.getDate()>w&&c.setDate(w);c.setFullYear(c.getFullYear()+l[t]);c.setMonth(c.getMonth()+l[r]);rt&&c.setDate(w)}if(y=Math.floor((a.getTime()-c.getTime())/1e3),p=function(n,t){l[n]=s[n]?Math.floor(y/t):0;y-=l[n]*t},p(e,604800),p(o,86400),p(u,3600),p(f,60),p(i,1),y>0&&!n._since){var ut=[1,12,4.3482,7,24,60,60],k=i,d=1;for(v=i;v>=t;v--)s[v]&&(l[k]>=d&&(l[k]=0,y=1),y>0&&(l[v]++,y=0,k=v,d=1)),d*=ut[v]}if(h)for(v=t;v<=i;v++)h&&l[v]?h--:h||(l[v]=0);return l}})}(jQuery)