// source --> https://www.ekdd.gr/wp-content/plugins/calendarize-it/js/frontend.min.js?ver=5.0.0.5 
function _rhc_check_visibility(){jQuery(document).ready(function(n){var a=!1;n(".fullCalendar").each(function(e,t){n(t).is(":visible")&&n(t).find(".fc-content").height()<10?n(t).fullCalendar("render"):n(t).find(".fc-content").height()<10&&(a=!0)}),a&&setTimeout("_rhc_check_visibility()",300)})}function _rhc_check_init_rhc(){jQuery(".rhc_holder").each(function(e,t){return!!jQuery(this).data("Calendarize")||(init_rhc(),!1)}),setTimeout("_rhc_check_init_rhc()",1e3)}function rhc_in_array(e,t){var n=jQuery.inArray(e,t);return null!=n&&-1!=n}function _rhc_widget_link_click(n,e){var t=jQuery(e).data("rhc_event")||!1;if(t&&t.fc_click_target)var a=t.fc_click_target;else a="_self";if(n.event_rdate||n.gotodate){jQuery("form#calendarizeit_repeat_instance").remove();jQuery('<form id="calendarizeit_repeat_instance" method="post"></form>').attr("action",n.url).attr("target",a).appendTo("BODY"),n.gotodate&&jQuery('<input type="hidden" name="gotodate" value="'+n.gotodate+'"/>').appendTo("form#calendarizeit_repeat_instance"),n.event_rdate&&jQuery('<input type="hidden" name="event_rdate" value="'+n.event_rdate+'" />').appendTo("form#calendarizeit_repeat_instance"),jQuery("form#calendarizeit_repeat_instance").submit(function(e){e.stopPropagation();var t=n.url;return!(null==t||0<t.indexOf("javascript:void(0);"))}).submit()}else{var r=n.url;if(null!=r&&0==r.indexOf("javascript:void(0);"))return!1;"_blank"==a?window.open(r):location.href=r}return!1}function _rhc_sort_events(e,t){return e.start>t.start?1:e.start<t.start?-1:0}jQuery(document).ready(function(e){RHC.visibility_check&&(0<jQuery(".fullCalendar").length&&setTimeout("_rhc_check_visibility()",200),setTimeout("_rhc_check_init_rhc()",500))}),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,t,n,a,r){return jQuery.easing[jQuery.easing.def](e,t,n,a,r)},easeInQuad:function(e,t,n,a,r){return a*(t/=r)*t+n},easeOutQuad:function(e,t,n,a,r){return-a*(t/=r)*(t-2)+n},easeInOutQuad:function(e,t,n,a,r){return(t/=r/2)<1?a/2*t*t+n:-a/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,a,r){return a*(t/=r)*t*t+n},easeOutCubic:function(e,t,n,a,r){return a*((t=t/r-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,a,r){return(t/=r/2)<1?a/2*t*t*t+n:a/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,a,r){return a*(t/=r)*t*t*t+n},easeOutQuart:function(e,t,n,a,r){return-a*((t=t/r-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,a,r){return(t/=r/2)<1?a/2*t*t*t*t+n:-a/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,a,r){return a*(t/=r)*t*t*t*t+n},easeOutQuint:function(e,t,n,a,r){return a*((t=t/r-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,a,r){return(t/=r/2)<1?a/2*t*t*t*t*t+n:a/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,a,r){return-a*Math.cos(t/r*(Math.PI/2))+a+n},easeOutSine:function(e,t,n,a,r){return a*Math.sin(t/r*(Math.PI/2))+n},easeInOutSine:function(e,t,n,a,r){return-a/2*(Math.cos(Math.PI*t/r)-1)+n},easeInExpo:function(e,t,n,a,r){return 0==t?n:a*Math.pow(2,10*(t/r-1))+n},easeOutExpo:function(e,t,n,a,r){return t==r?n+a:a*(1-Math.pow(2,-10*t/r))+n},easeInOutExpo:function(e,t,n,a,r){return 0==t?n:t==r?n+a:(t/=r/2)<1?a/2*Math.pow(2,10*(t-1))+n:a/2*(2-Math.pow(2,-10*--t))+n},easeInCirc:function(e,t,n,a,r){return-a*(Math.sqrt(1-(t/=r)*t)-1)+n},easeOutCirc:function(e,t,n,a,r){return a*Math.sqrt(1-(t=t/r-1)*t)+n},easeInOutCirc:function(e,t,n,a,r){return(t/=r/2)<1?-a/2*(Math.sqrt(1-t*t)-1)+n:a/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,a,r){var i=1.70158,o=0,s=a;if(0==t)return n;if(1==(t/=r))return n+a;if(o||(o=.3*r),s<Math.abs(a)){s=a;i=o/4}else i=o/(2*Math.PI)*Math.asin(a/s);return-s*Math.pow(2,10*(t-=1))*Math.sin((t*r-i)*(2*Math.PI)/o)+n},easeOutElastic:function(e,t,n,a,r){var i=1.70158,o=0,s=a;if(0==t)return n;if(1==(t/=r))return n+a;if(o||(o=.3*r),s<Math.abs(a)){s=a;i=o/4}else i=o/(2*Math.PI)*Math.asin(a/s);return s*Math.pow(2,-10*t)*Math.sin((t*r-i)*(2*Math.PI)/o)+a+n},easeInOutElastic:function(e,t,n,a,r){var i=1.70158,o=0,s=a;if(0==t)return n;if(2==(t/=r/2))return n+a;if(o||(o=r*(.3*1.5)),s<Math.abs(a)){s=a;i=o/4}else i=o/(2*Math.PI)*Math.asin(a/s);return t<1?s*Math.pow(2,10*(t-=1))*Math.sin((t*r-i)*(2*Math.PI)/o)*-.5+n:s*Math.pow(2,-10*(t-=1))*Math.sin((t*r-i)*(2*Math.PI)/o)*.5+a+n},easeInBack:function(e,t,n,a,r,i){return null==i&&(i=1.70158),a*(t/=r)*t*((i+1)*t-i)+n},easeOutBack:function(e,t,n,a,r,i){return null==i&&(i=1.70158),a*((t=t/r-1)*t*((i+1)*t+i)+1)+n},easeInOutBack:function(e,t,n,a,r,i){return null==i&&(i=1.70158),(t/=r/2)<1?a/2*(t*t*((1+(i*=1.525))*t-i))+n:a/2*((t-=2)*t*((1+(i*=1.525))*t+i)+2)+n},easeInBounce:function(e,t,n,a,r){return a-jQuery.easing.easeOutBounce(e,r-t,0,a,r)+n},easeOutBounce:function(e,t,n,a,r){return(t/=r)<1/2.75?a*(7.5625*t*t)+n:t<2/2.75?a*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?a*(7.5625*(t-=2.25/2.75)*t+.9375)+n:a*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutBounce:function(e,t,n,a,r){return t<r/2?.5*jQuery.easing.easeInBounce(e,2*t,0,a,r)+n:.5*jQuery.easing.easeOutBounce(e,2*t-r,0,a,r)+.5*a+n}}),function(e){var t="undefined"!=typeof module&&module.exports,n=function(){if(!n._nlp)if(t)n._nlp=require("./nlp");else if(!(n._nlp=e._RRuleNLP))throw new Error("You need to include rrule/nlp.js for fromText/toText to work.");return n._nlp},Z={MONTH_DAYS:[31,28,31,30,31,30,31,31,30,31,30,31],ONE_DAY:864e5,MAXYEAR:9999,ORDINAL_BASE:new Date(1970,0,1),PY_WEEKDAYS:[6,0,1,2,3,4,5],getYearDay:function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());return Math.ceil((t-new Date(e.getFullYear(),0,1))/Z.ONE_DAY)+1},isLeapYear:function(e){return e instanceof Date&&(e=e.getFullYear()),e%4==0&&e%100!=0||e%400==0},tzOffset:function(e){return 60*e.getTimezoneOffset()*1e3},daysBetween:function(e,t){var n=e.getTime()-Z.tzOffset(e),a=t.getTime()-Z.tzOffset(t),r=Math.abs(n-a);return Math.round(r/Z.ONE_DAY)},toOrdinal:function(e){return Z.daysBetween(e,Z.ORDINAL_BASE)},fromOrdinal:function(e){var t=e*Z.ONE_DAY;return new Date(Z.ORDINAL_BASE.getTime()-Z.tzOffset(Z.ORDINAL_BASE)+t+Z.tzOffset(new Date(t)))},monthRange:function(e,t){var n=new Date(e,t,1);return[Z.getWeekday(n),Z.getMonthDays(n)]},getMonthDays:function(e){var t=e.getMonth();return 1==t&&Z.isLeapYear(e)?29:Z.MONTH_DAYS[t]},getWeekday:function(e){return Z.PY_WEEKDAYS[e.getDay()]},combine:function(e,t){return t=t||e,new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())},clone:function(e){var t=new Date(e.getTime());return t.setMilliseconds(0),t},cloneDates:function(e){for(var t=[],n=0;n<e.length;n++)t.push(Z.clone(e[n]));return t},sort:function(e){e.sort(function(e,t){return e.getTime()-t.getTime()})},timeToUntilString:function(e){for(var t,n=new Date(e),a=[n.getUTCFullYear(),n.getUTCMonth()+1,n.getUTCDate(),"T",n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),"Z"],r=0;r<a.length;r++)t=a[r],!/[TZ]/.test(t)&&t<10&&(a[r]="0"+String(t));return a.join("")},untilStringToDate:function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/.exec(e);if(!t)throw new Error("Invalid UNTIL value: "+e);return new Date(Date.UTC(t[1],t[2]-1,t[3],t[5]||0,t[6]||0,t[7]||0))},Time:function(e,t,n){this.hour=e,this.minute=t,this.second=n}};Z.Time.prototype={getHours:function(){return this.hour},getMinutes:function(){return this.minute},getSeconds:function(){return this.second},getTime:function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)}};function a(e,t){1===arguments.length&&(t=e,e=0);for(var n=[],a=e;a<t;a++)n.push(a);return n}function C(e,t){var n=0,a=[];if(e instanceof Array)for(;n<t;n++)a[n]=[].concat(e);else for(;n<t;n++)a[n]=e;return a}function X(e,t){var n=e%t;return n*t<0?n+t:n}function ee(e,t){return{div:Math.floor(e/t),mod:X(e,t)}}function te(e){return!(e instanceof Array&&0==e.length)&&Boolean(e)}function ne(e,t){return-1!=e.indexOf(t)}var x=[].concat(C(1,31),C(2,28),C(3,31),C(4,30),C(5,31),C(6,30),C(7,31),C(8,31),C(9,30),C(10,31),C(11,30),C(12,31),C(1,7)),D=[].concat(C(1,31),C(2,29),C(3,31),C(4,30),C(5,31),C(6,30),C(7,31),C(8,31),C(9,30),C(10,31),C(11,30),C(12,31),C(1,7)),r=a(1,29),i=a(1,30),o=a(1,31),s=a(1,32),T=[].concat(s,i,s,o,s,o,s,s,o,s,o,s,s.slice(0,7)),M=[].concat(s,r,s,o,s,o,s,s,o,s,o,s,s.slice(0,7));r=a(-28,0),i=a(-29,0),o=a(-30,0),s=a(-31,0);function _(e,t){if(0===t)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}var $=[].concat(s,i,s,o,s,o,s,s,o,s,o,s,s.slice(0,7)),E=[].concat(s,r,s,o,s,o,s,s,o,s,o,s,s.slice(0,7)),S=[0,31,60,91,121,152,182,213,244,274,305,335,366],O=[0,31,59,90,120,151,181,212,243,273,304,334,365],j=function(){for(var e=[],t=0;t<55;t++)e=e.concat(a(7));return e}();_.prototype={nth:function(e){return this.n==e?this:new _(this.weekday,e)},equals:function(e){return this.weekday==e.weekday&&this.n==e.n},toString:function(){var e=["MO","TU","WE","TH","FR","SA","SU"][this.weekday];return this.n&&(e=(0<this.n?"+":"")+String(this.n)+e),e},getJsWeekday:function(){return 6==this.weekday?0:this.weekday+1}};var ae=function(t,e){this._string=null,t=t||{},this._cache=e?null:{all:!1,before:[],after:[],between:[]},this.origOptions={};var n=[],a=Object.keys(t),r=Object.keys(ae.DEFAULT_OPTIONS);if(a.forEach(function(e){this.origOptions[e]=t[e],ne(r,e)||n.push(e)},this),n.length)throw new Error("Invalid options: "+n.join(", "));if(!ae.FREQUENCIES[t.freq]&&null===t.byeaster)throw new Error("Invalid frequency: "+String(t.freq));r.forEach(function(e){ne(a,e)||(t[e]=ae.DEFAULT_OPTIONS[e])});var i=this.options=t;if(null!==i.byeaster&&(i.freq=ae.YEARLY),i.dtstart||(i.dtstart=new Date,i.dtstart.setMilliseconds(0)),null===i.wkst?i.wkst=ae.MO.weekday:"number"==typeof i.wkst||(i.wkst=i.wkst.weekday),null!==i.bysetpos){"number"==typeof i.bysetpos&&(i.bysetpos=[i.bysetpos]);for(var o=0;o<i.bysetpos.length;o++){if(0==(d=i.bysetpos[o])||!(-366<=d&&d<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(te(i.byweekno)||te(i.byyearday)||te(i.bymonthday)||null!==i.byweekday||null!==i.byeaster))switch(i.freq){case ae.YEARLY:i.bymonth||(i.bymonth=i.dtstart.getMonth()+1),i.bymonthday=i.dtstart.getDate();break;case ae.MONTHLY:i.bymonthday=i.dtstart.getDate();break;case ae.WEEKLY:i.byweekday=Z.getWeekday(i.dtstart)}if(null===i.bymonth||i.bymonth instanceof Array||(i.bymonth=[i.bymonth]),null===i.byyearday||i.byyearday instanceof Array||(i.byyearday=[i.byyearday]),null===i.bymonthday)i.bymonthday=[],i.bynmonthday=[];else if(i.bymonthday instanceof Array){var s=[],l=[];for(o=0;o<i.bymonthday.length;o++){var d;0<(d=i.bymonthday[o])?s.push(d):d<0&&l.push(d)}i.bymonthday=s,i.bynmonthday=l}else i.bymonthday<0?(i.bynmonthday=[i.bymonthday],i.bymonthday=[]):(i.bynmonthday=[],i.bymonthday=[i.bymonthday]);if(null===i.byweekno||i.byweekno instanceof Array||(i.byweekno=[i.byweekno]),null===i.byweekday)i.bynweekday=null;else if("number"==typeof i.byweekday)i.byweekday=[i.byweekday],i.bynweekday=null;else if(i.byweekday instanceof _)!i.byweekday.n||i.freq>ae.MONTHLY?(i.byweekday=[i.byweekday.weekday],i.bynweekday=null):(i.bynweekday=[[i.byweekday.weekday,i.byweekday.n]],i.byweekday=null);else{var c=[],f=[];for(o=0;o<i.byweekday.length;o++){var u=i.byweekday[o];"number"==typeof u?c.push(u):!u.n||i.freq>ae.MONTHLY?c.push(u.weekday):f.push([u.weekday,u.n])}i.byweekday=te(c)?c:null,i.bynweekday=te(f)?f:null}if(null===i.byhour?i.byhour=i.freq<ae.HOURLY?[i.dtstart.getHours()]:null:"number"==typeof i.byhour&&(i.byhour=[i.byhour]),null===i.byminute?i.byminute=i.freq<ae.MINUTELY?[i.dtstart.getMinutes()]:null:"number"==typeof i.byminute&&(i.byminute=[i.byminute]),null===i.bysecond?i.bysecond=i.freq<ae.SECONDLY?[i.dtstart.getSeconds()]:null:"number"==typeof i.bysecond&&(i.bysecond=[i.bysecond]),i.freq>=ae.HOURLY)this.timeset=null;else{for(this.timeset=[],o=0;o<i.byhour.length;o++)for(var h=i.byhour[o],p=0;p<i.byminute.length;p++)for(var m=i.byminute[p],v=0;v<i.bysecond.length;v++){var g=i.bysecond[v];this.timeset.push(new Z.Time(h,m,g))}Z.sort(this.timeset)}};ae.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],ae.YEARLY=0,ae.MONTHLY=1,ae.WEEKLY=2,ae.DAILY=3,ae.HOURLY=4,ae.MINUTELY=5,ae.SECONDLY=6,ae.MO=new _(0),ae.TU=new _(1),ae.WE=new _(2),ae.TH=new _(3),ae.FR=new _(4),ae.SA=new _(5),ae.SU=new _(6),ae.DEFAULT_OPTIONS={freq:null,dtstart:null,interval:1,wkst:ae.MO,count:null,until:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},ae.parseText=function(e,t){return n().parseText(e,t)},ae.fromText=function(e,t){return n().fromText(e,t)},ae.optionsToString=function(e){var t,n,a,r,i,o=[];n=Object.keys(e),a=Object.keys(ae.DEFAULT_OPTIONS);for(var s=0;s<n.length;s++)if(ne(a,n[s])&&(t=n[s].toUpperCase(),i=[],!(null===(r=e[n[s]])||r instanceof Array&&!r.length))){switch(t){case"FREQ":r=ae.FREQUENCIES[e.freq];break;case"WKST":r=r.toString();break;case"BYWEEKDAY":t="BYDAY",r instanceof Array||(r=[r]);for(var l,d=0;d<r.length;d++)(l=r[d])instanceof _||(l=l instanceof Array?new _(l[0],l[1]):new _(l)),i[d]=l.toString();r=i;break;case"DTSTART":case"UNTIL":r=Z.timeToUntilString(r);break;default:if(r instanceof Array){for(d=0;d<r.length;d++)i[d]=String(r[d]);r=i}else r=String(r)}o.push([t,r])}var c=[];for(s=0;s<o.length;s++){var f=o[s];c.push(f[0]+"="+f[1].toString())}return c.join(";")},ae.prototype={all:function(e){if(e)return this._iter(new d("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new l("all",{})),this._cacheAdd("all",t)),t},between:function(e,t,n,a){var r={before:t,after:e,inc:n};if(a)return this._iter(new d("between",r,a));var i=this._cacheGet("between",r);return!1===i&&(i=this._iter(new l("between",r)),this._cacheAdd("between",i,r)),i},before:function(e,t){var n={dt:e,inc:t},a=this._cacheGet("before",n);return!1===a&&(a=this._iter(new l("before",n)),this._cacheAdd("before",a,n)),a},after:function(e,t){var n={dt:e,inc:t},a=this._cacheGet("after",n);return!1===a&&(a=this._iter(new l("after",n)),this._cacheAdd("after",a,n)),a},count:function(){return this.all().length},toString:function(){return ae.optionsToString(this.origOptions)},toText:function(e,t){return n().toText(this,e,t)},isFullyConvertibleToText:function(){return n().isFullyConvertible(this)},_cacheAdd:function(e,t,n){this._cache&&(t&&(t=t instanceof Date?Z.clone(t):Z.cloneDates(t)),"all"==e?this._cache.all=t:(n._value=t,this._cache[e].push(n)))},_cacheGet:function(e,t){if(!this._cache)return!1;var n=!1;if("all"==e)n=this._cache.all;else e:for(var a,r=0;r<this._cache[e].length;r++){for(var i in a=this._cache[e][r],t)if(t.hasOwnProperty(i)&&String(t[i])!=String(a[i]))continue e;n=a._value;break}if(!n&&this._cache.all){var o=new l(e,t);for(r=0;r<this._cache.all.length&&o.accept(this._cache.all[r]);r++);n=o.getValue(),this._cacheAdd(e,n,t)}return n instanceof Array?Z.cloneDates(n):n instanceof Date?Z.clone(n):n},clone:function(){return new ae(this.origOptions)},_iter:function(e){var t=this.options.dtstart,n=t.getFullYear(),a=t.getMonth()+1,r=t.getDate(),i=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),l=Z.getWeekday(t),d=(Z.getYearDay(t),this.options.freq),c=this.options.interval,f=this.options.wkst,u=this.options.until,h=this.options.bymonth,p=this.options.byweekno,m=this.options.byyearday,v=this.options.byweekday,g=this.options.byeaster,_=this.options.bymonthday,y=this.options.bynmonthday,w=this.options.bysetpos,b=this.options.byhour,k=this.options.byminute,C=this.options.bysecond,x=new re(this);x.rebuild(n,a);var D,T={};if(T[ae.YEARLY]=x.ydayset,T[ae.MONTHLY]=x.mdayset,T[ae.WEEKLY]=x.wdayset,T[ae.DAILY]=x.ddayset,T[ae.HOURLY]=x.ddayset,T[ae.MINUTELY]=x.ddayset,T[ae.SECONDLY]=x.ddayset,T=T[d],d<ae.HOURLY)D=this.timeset;else{var M={};M[ae.HOURLY]=x.htimeset,M[ae.MINUTELY]=x.mtimeset,M[ae.SECONDLY]=x.stimeset,M=M[d],D=d>=ae.HOURLY&&te(b)&&!ne(b,i)||d>=ae.MINUTELY&&te(k)&&!ne(k,o)||d>=ae.SECONDLY&&te(C)&&!ne(C,o)?[]:M.call(x,i,o,s)}var $,E,S,O,j,L,R,I,H,A,z,Y,N,Q=0,F=this.options.count;for(N=0;;){for(N++,H=(I=T.call(x,n,a,r))[0],A=I[1],z=I[2],$=!1,S=A;S<z;S++)E=H[S],(te(h)&&!ne(h,x.mmask[E])||te(p)&&!x.wnomask[E]||te(v)&&!ne(v,x.wdaymask[E])||te(x.nwdaymask)&&!x.nwdaymask[E]||null!==g&&!ne(x.eastermask,E)||(te(_)||te(y))&&!ne(_,x.mdaymask[E])&&!ne(y,x.nmdaymask[E])||te(m)&&(E<x.yearlen&&!ne(m,E+1)&&!ne(m,-x.yearlen+E)||E>=x.yearlen&&!ne(m,E+1-x.yearlen)&&!ne(m,-x.nextyearlen+E-x.yearlen)))&&($=!(H[E]=null));if(te(w)&&te(D)){var W,B,q=[];for(S=0;S<w.length;S++){var U;B=(U=w[S])<0?(W=Math.floor(U/D.length),X(U,D.length)):(W=Math.floor((U-1)/D.length),X(U-1,D.length));try{for(I=[],O=A;O<z;O++){var P=H[O];null!==P&&I.push(P)}E=W<0?I.slice(W)[0]:I[W];var V=D[B];(J=Z.fromOrdinal(x.yearordinal+E)).setDate(J.getDate()),1==N&&t.getTimezoneOffset()!=J.getTimezoneOffset()&&J.setDate(t.getDate());var K=Z.combine(J,V);ne(q,K)||q.push(K)}catch(e){}}for(Z.sort(q),S=0;S<q.length;S++){K=q[S];if(u&&u<K)return this._len=Q,e.getValue();if(t<=K){if(++Q,!e.accept(K))return e.getValue();if(F&&!--F)return this._len=Q,e.getValue()}}}else for(S=A;S<z;S++){var J;if(null!==(E=H[S]))for((J=Z.fromOrdinal(x.yearordinal+E)).setDate(J.getDate()),1==N&&t.getTimezoneOffset()!=J.getTimezoneOffset()&&J.setDate(t.getDate()),O=0;O<D.length;O++){V=D[O],K=Z.combine(J,V);if(u&&u<K)return this._len=Q,e.getValue();if(t<=K){if(++Q,!e.accept(K))return e.getValue();if(F&&!--F)return this._len=Q,e.getValue()}}}if(Y=!1,d==ae.YEARLY){if((n+=c)>Z.MAXYEAR)return this._len=Q,e.getValue();x.rebuild(n,a)}else if(d==ae.MONTHLY){if(12<(a+=c)&&(n+=L=Math.floor(a/12),0==(a=R=X(a,12))&&(a=12,--n),n>Z.MAXYEAR))return this._len=Q,e.getValue();x.rebuild(n,a)}else if(d==ae.WEEKLY)r+=l<f?7*c-(l+1+(6-f)):7*c-(l-f),l=f,Y=!0;else if(d==ae.DAILY)r+=c,Y=!0;else if(d==ae.HOURLY){for($&&(i+=Math.floor((23-i)/c)*c);L=(j=ee(i+=c,24)).div,R=j.mod,L&&(i=R,r+=L,Y=!0),te(b)&&!ne(b,i););D=M.call(x,i,o,s)}else if(d==ae.MINUTELY){for($&&(o+=Math.floor((1439-(60*i+o))/c)*c);L=(j=ee(o+=c,60)).div,R=j.mod,L&&(o=R,L=(j=ee(i+=L,24)).div,R=j.mod,L&&(i=R,r+=L,$=!(Y=!0))),te(b)&&!ne(b,i)||te(k)&&!ne(k,o););D=M.call(x,i,o,s)}else if(d==ae.SECONDLY){for($&&(s+=Math.floor((86399-(3600*i+60*o+s))/c)*c);L=(j=ee(s+=c,60)).div,R=j.mod,L&&(s=R,L=(j=ee(o+=L,60)).div,R=j.mod,L&&(o=R,L=(j=ee(i+=L,24)).div,R=j.mod,L&&(i=R,r+=L,Y=!0))),te(b)&&!ne(b,i)||te(k)&&!ne(k,o)||te(C)&&!ne(C,s););D=M.call(x,i,o,s)}if(Y&&28<r){var G=Z.monthRange(n,a-1)[1];if(G<r){for(;G<r;){if(r-=G,13==++a&&(a=1,++n>Z.MAXYEAR))return this._len=Q,e.getValue();G=Z.monthRange(n,a-1)[1]}x.rebuild(n,a)}}}}},ae.parseString=function(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t,n,a,r,i,o=e.split(";"),s={};for(t=0;t<o.length;t++)switch(a=(i=o[t].split("="))[0],r=i[1],a){case"FREQ":s.freq=ae[r];break;case"WKST":s.wkst=ae[r];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":if(-1!=r.indexOf(","))for(r=r.split(","),n=0;n<r.length;n++)/^[+-]?\d+$/.test(r[n])&&(r[n]=Number(r[n]));else/^[+-]?\d+$/.test(r)&&(r=Number(r));s[a=a.toLowerCase()]=r;break;case"BYDAY":var l,d,c,f=r.split(",");for(s.byweekday=[],n=0;n<f.length;n++)2==(c=f[n]).length?(d=ae[c],s.byweekday.push(d)):(c=c.match(/^([+-]?\d)([A-Z]{2})$/),l=Number(c[1]),d=c[2],d=ae[d].weekday,s.byweekday.push(new _(d,l)));break;case"DTSTART":s.dtstart=Z.untilStringToDate(r);break;case"UNTIL":s.until=Z.untilStringToDate(r);break;case"BYEASTER":s.byeaster=Number(r);break;default:throw new Error("Unknown RRULE property '"+a+"'")}return s},ae.fromString=function(e){return new ae(ae.parseString(e))};var re=function(e){this.rrule=e,this.lastyear=null,this.lastmonth=null,this.yearlen=null,this.nextyearlen=null,this.yearordinal=null,this.yearweekday=null,this.mmask=null,this.mrange=null,this.mdaymask=null,this.nmdaymask=null,this.wdaymask=null,this.wnomask=null,this.nwdaymask=null,this.eastermask=null};re.prototype.easter=function(e,t){t=t||0;var n=e%19,a=Math.floor(e/100),r=e%100,i=Math.floor(a/4),o=a%4,s=Math.floor((a+8)/25),l=Math.floor((a-s+1)/3),d=Math.floor(19*n+a-i-l+15)%30,c=Math.floor(r/4),f=r%4,u=Math.floor(32+2*o+2*c-d-f)%7,h=Math.floor((n+11*d+22*u)/451),p=Math.floor((d+u-7*h+114)/31),m=(d+u-7*h+114)%31+1,v=Date.UTC(e,p-1,m+t),g=Date.UTC(e,0,1);return[Math.ceil((v-g)/864e5)]},re.prototype.rebuild=function(e,t){var n=this.rrule;if(e!=this.lastyear){this.yearlen=Z.isLeapYear(e)?366:365,this.nextyearlen=Z.isLeapYear(e+1)?366:365;var a=new Date(e,0,1);this.yearordinal=Z.toOrdinal(a),this.yearweekday=Z.getWeekday(a);var r=Z.getWeekday(new Date(e,0,1));if(365==this.yearlen?(this.mmask=[].concat(x),this.mdaymask=[].concat(M),this.nmdaymask=[].concat(E),this.wdaymask=j.slice(r),this.mrange=[].concat(O)):(this.mmask=[].concat(D),this.mdaymask=[].concat(T),this.nmdaymask=[].concat($),this.wdaymask=j.slice(r),this.mrange=[].concat(S)),te(n.options.byweekno)){var i,o,s;this.wnomask=C(0,this.yearlen+7),s=4<=(i=o=X(7-this.yearweekday+n.options.wkst,7))?(i=0,this.yearlen+X(this.yearweekday-n.options.wkst,7)):this.yearlen-i;for(var l=Math.floor(s/7),d=X(s,7),c=Math.floor(l+d/4),f=0;f<n.options.byweekno.length;f++)if((k=n.options.byweekno[f])<0&&(k+=c+1),0<k&&k<=c){1<k?(h=i+7*(k-1),i!=o&&(h-=7-o)):h=i;for(var u=0;u<7&&(this.wnomask[h]=1,h++,this.wdaymask[h]!=n.options.wkst);u++);}if(ne(n.options.byweekno,1)){var h=i+7*c;if(i!=o&&(h-=7-o),h<this.yearlen)for(f=0;f<7&&(h+=this.wnomask[h]=1,this.wdaymask[h]!=n.options.wkst);f++);}if(i){var p;if(ne(n.options.byweekno,-1))p=-1;else{var m=Z.getWeekday(new Date(e-1,0,1)),v=X(7-m+n.options.wkst,7),g=Z.isLeapYear(e-1)?366:365;p=4<=v?(v=0,Math.floor(52+X(g+X(m-n.options.wkst,7),7)/4)):Math.floor(52+X(this.yearlen-i,7)/4)}if(ne(n.options.byweekno,p))for(h=0;h<i;h++)this.wnomask[h]=1}}else this.wnomask=null}if(te(n.options.bynweekday)&&(t!=this.lastmonth||e!=this.lastyear)){var _=[];if(n.options.freq==ae.YEARLY)if(te(n.options.bymonth))for(f=0;f<n.options.bymonth.length;f++)t=n.options.bymonth[f],_.push(this.mrange.slice(t-1,t+1));else _=[[0,this.yearlen]];else n.options.freq==ae.MONTHLY&&(_=[this.mrange.slice(t-1,t+1)]);if(te(_)){this.nwdaymask=C(0,this.yearlen);for(f=0;f<_.length;f++){var y=_[f],w=y[0],b=y[1];--b;for(u=0;u<n.options.bynweekday.length;u++){var k;r=n.options.bynweekday[u][0];(k=n.options.bynweekday[u][1])<0?(h=b+7*(k+1),h-=X(this.wdaymask[h]-r,7)):(h=w+7*(k-1),h+=X(7-this.wdaymask[h]+r,7)),w<=h&&h<=b&&(this.nwdaymask[h]=1)}}}this.lastyear=e,this.lastmonth=t}null!==n.options.byeaster&&(this.eastermask=this.easter(e,n.options.byeaster))},re.prototype.ydayset=function(e,t,n){return[a(this.yearlen),0,this.yearlen]},re.prototype.mdayset=function(e,t,n){for(var a=C(null,this.yearlen),r=this.mrange[t-1],i=this.mrange[t],o=r;o<i;o++)a[o]=o;return[a,r,i]},re.prototype.wdayset=function(e,t,n){for(var a=C(null,this.yearlen+7),r=Z.toOrdinal(new Date(e,t-1,n))-this.yearordinal,i=r,o=0;o<7&&(a[r]=r,++r,this.wdaymask[r]!=this.rrule.options.wkst);o++);return[a,i,r]},re.prototype.ddayset=function(e,t,n){var a=C(null,this.yearlen),r=Z.toOrdinal(new Date(e,t-1,n))-this.yearordinal;return a[r]=r,[a,r,1+r]},re.prototype.htimeset=function(e,t,n){for(var a=[],r=this.rrule,i=0;i<r.options.byminute.length;i++){t=r.options.byminute[i];for(var o=0;o<r.options.bysecond.length;o++)n=r.options.bysecond[o],a.push(new Z.Time(e,t,n))}return Z.sort(a),a},re.prototype.mtimeset=function(e,t,n){for(var a=[],r=this.rrule,i=0;i<r.options.bysecond.length;i++)n=r.options.bysecond[i],a.push(new Z.Time(e,t,n));return Z.sort(a),a},re.prototype.stimeset=function(e,t,n){return[new Z.Time(e,t,n)]};var l=function(e,t){this.init(e,t)};l.prototype={init:function(e,t){this.method=e,this.args=t,this._result=[],this.minDate=null,this.maxDate=null,"between"==e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"==e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"==e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))},accept:function(e){var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if("between"==this.method){if(t)return!0;if(n)return!1}else if("before"==this.method){if(n)return!1}else if("after"==this.method)return!!t||(this.add(e),!1);return this.add(e)},add:function(e){return this._result.push(e),!0},getValue:function(){switch(this.method){case"all":case"between":return this._result;case"before":case"after":return this._result.length?this._result[this._result.length-1]:null}}};var d=function(e,t,n){if(!ne(["all","between"],e))throw new Error('Invalid method "'+e+'". Only all and between works with iterator.');this.add=function(e){return!!n(e,this._result.length)&&(this._result.push(e),!0)},this.init(e,t)};d.prototype=l.prototype,t&&(module.exports={RRule:ae}),"undefined"==typeof ender&&(e.RRule=ae),"function"==typeof define&&define.amd&&define("rrule",[],function(){return ae})}(this),function(e){var f,t="undefined"!=typeof module&&module.exports;if(t)f=require("./rrule").RRule;else if(e.RRule)f=e.RRule;else{if("undefined"==typeof require)throw new Error("rrule.js is required for rrule/nlp.js to work");f||(f=require("rrule"))}function a(e,t){return-1!=e.indexOf(t)}function r(e,t,n){if(this.gettext=t||function(e){return e},this.language=n||h,this.text="",this.rrule=e,this.freq=e.options.freq,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),r=[].concat(this.options.bynmonthday);a.sort(),r.sort(),r.reverse(),this.bymonthday=a.concat(r),this.bymonthday.length||(this.bymonthday=null)}if(this.origOptions.byweekday){var i=this.origOptions.byweekday instanceof Array?this.origOptions.byweekday:[this.origOptions.byweekday],o=String(i);this.byweekday={allWeeks:i.filter(function(e){return!Boolean(e.n)}),someWeeks:i.filter(function(e){return Boolean(e.n)}),isWeekdays:-1!=o.indexOf("MO")&&-1!=o.indexOf("TU")&&-1!=o.indexOf("WE")&&-1!=o.indexOf("TH")&&-1!=o.indexOf("FR")&&-1==o.indexOf("SA")&&-1==o.indexOf("SU")};function s(e,t){return e.weekday-t.weekday}this.byweekday.allWeeks.sort(s),this.byweekday.someWeeks.sort(s),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}var n=["count","until","interval","byweekday","bymonthday","bymonth"];(r.IMPLEMENTED=[])[f.DAILY]=n,r.IMPLEMENTED[f.WEEKLY]=n,r.IMPLEMENTED[f.MONTHLY]=n,r.IMPLEMENTED[f.YEARLY]=["byweekno","byyearday"].concat(n),r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED))return!1;if(e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(a(["dtstart","wkst","freq"],n))return!0;if(!a(r.IMPLEMENTED[e.options.freq],n))return t=!1}return t},r.prototype={isFullyConvertible:function(){return r.isFullyConvertible(this.rrule)},toString:function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[f.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.language.monthNames[t.getMonth()]).add(t.getDate()+",").add(t.getFullYear())}else this.options.count&&this.add(e("for")).add(this.options.count).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},DAILY:function(){var e=this.gettext;1!=this.options.interval&&this.add(this.options.interval),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday()},WEEKLY:function(){var e=this.gettext;1!=this.options.interval&&this.add(this.options.interval).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?1==this.options.interval?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):(1==this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},MONTHLY:function(){var e=this.gettext;this.origOptions.bymonth?(1!=this.options.interval&&(this.add(this.options.interval).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!=this.options.interval&&this.add(this.options.interval),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},YEARLY:function(){var e=this.gettext;this.origOptions.bymonth?(1!=this.options.interval&&(this.add(this.options.interval),this.add(e("years"))),this._bymonth()):(1!=this.options.interval&&this.add(this.options.interval),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,null,e("and")))},_bymonthday:function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},_byweekday:function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},_bymonth:function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},nth:function(e){var t,n,a=this.gettext;if(-1==e)return a("last");switch(n=Math.abs(e)){case 1:case 21:case 31:t=n+a("st");break;case 2:case 22:t=n+a("nd");break;case 3:case 23:t=n+a("rd");break;default:t=n+a("th")}return e<0?t+" "+a("last"):t},monthtext:function(e){return this.language.monthNames[e-1]},weekdaytext:function(e){var t="number"==typeof e?e:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},plural:function(e){return e%100!=1},add:function(e){return this.text.push(" "),this.text.push(e),this},list:function(e,t,n,a){a=a||",",t=t||function(e){return e};function r(e){return t.call(i,e)}var i=this;return n?function(e,t,n){for(var a="",r=0;r<e.length;r++)0!=r&&(r==e.length-1?a+=" "+n+" ":a+=t+" "),a+=e[r];return a}(e.map(r),a,n):e.map(r).join(a+" ")}};var i=function(e,t){var o=new u((t||h).tokens);if(!o.start(e))return null;var s={};return function(){var e;o.expect("every"),(e=o.accept("number"))&&(s.interval=parseInt(e[0]));if(o.isDone())throw new Error("Unexpected end");switch(o.symbol){case"day(s)":s.freq=f.DAILY,o.nextSymbol()&&(a(),r());break;case"weekday(s)":s.freq=f.WEEKLY,s.byweekday=[f.MO,f.TU,f.WE,f.TH,f.FR],o.nextSymbol(),r();break;case"week(s)":s.freq=f.WEEKLY,o.nextSymbol()&&(a(),r());break;case"month(s)":s.freq=f.MONTHLY,o.nextSymbol()&&(a(),r());break;case"year(s)":s.freq=f.YEARLY,o.nextSymbol()&&(a(),r());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":if(s.freq=f.WEEKLY,s.byweekday=[f[o.symbol.substr(0,2).toUpperCase()]],!o.nextSymbol())return;for(;o.accept("comma");){if(o.isDone())throw new Error("Unexpected end");var t;if(!(t=d()))throw new Error("Unexpected symbol "+o.symbol+", expected weekday");s.byweekday.push(f[t]),o.nextSymbol()}!function(){var e;if(o.accept("on"),o.accept("the"),!(e=c()))return;s.bymonthday=[e],o.nextSymbol();for(;o.accept("comma");){if(!(e=c()))throw new Error("Unexpected symbol "+o.symbol+"; expected monthday");s.bymonthday.push(e),o.nextSymbol()}}(),r();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(s.freq=f.YEARLY,s.bymonth=[l()],!o.nextSymbol())return;for(;o.accept("comma");){if(o.isDone())throw new Error("Unexpected end");var n;if(!(n=l()))throw new Error("Unexpected symbol "+o.symbol+", expected month");s.bymonth.push(n),o.nextSymbol()}a(),r();break;default:throw new Error("Unknown symbol")}}(),s;function a(){var e=o.accept("on"),t=o.accept("the");if(e||t)do{var n,a,r;if(n=c())(a=d())?(o.nextSymbol(),s.byweekday||(s.byweekday=[]),s.byweekday.push(f[a].nth(n))):(s.bymonthday||(s.bymonthday=[]),s.bymonthday.push(n),o.accept("day(s)"));else if(a=d())o.nextSymbol(),s.byweekday||(s.byweekday=[]),s.byweekday.push(f[a]);else if("weekday(s)"==o.symbol)o.nextSymbol(),s.byweekday||(s.byweekday=[]),s.byweekday.push(f.MO),s.byweekday.push(f.TU),s.byweekday.push(f.WE),s.byweekday.push(f.TH),s.byweekday.push(f.FR);else if("week(s)"==o.symbol){var i;if(o.nextSymbol(),!(i=o.accept("number")))throw new Error("Unexpected symbol "+o.symbol+", expected week number");for(s.byweekno=[i[0]];o.accept("comma");){if(!(i=o.accept("number")))throw new Error("Unexpected symbol "+o.symbol+"; expected monthday");s.byweekno.push(i[0])}}else{if(!(r=l()))return;o.nextSymbol(),s.bymonth||(s.bymonth=[]),s.bymonth.push(r)}}while(o.accept("comma")||o.accept("the")||o.accept("on"))}function l(){switch(o.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function d(){switch(o.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return o.symbol.substr(0,2).toUpperCase();default:return!1}}function c(){switch(o.symbol){case"last":return o.nextSymbol(),-1;case"first":return o.nextSymbol(),1;case"second":return o.nextSymbol(),o.accept("last")?-2:2;case"third":return o.nextSymbol(),o.accept("last")?-3:3;case"nth":var e=parseInt(o.value[1]);if(e<-366||366<e)throw new Error("Nth out of range: "+e);return o.nextSymbol(),o.accept("last")?-e:e;default:return!1}}function r(){if("until"==o.symbol){var e=Date.parse(o.text);if(!e)throw new Error("Cannot parse until date:"+o.text);s.until=new Date(e)}else o.accept("for")&&(s.count=o.value[0],o.expect("number"))}},u=function(e){this.rules=e};u.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},u.prototype.isDone=function(){return this.done&&null==this.symbol},u.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n;for(var a in e=null,this.rules)(n=this.rules[a].exec(this.text))&&(null==e||n[0].length>e[0].length)&&(e=n,t=a);if(null!=e&&(this.text=this.text.substr(e[0].length),""==this.text&&(this.done=!0)),null==e)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"==t);return this.symbol=t,this.value=e,!0},u.prototype.accept=function(e){if(this.symbol!=e)return!1;if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0},u.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)};var h={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},o={fromText:function(e,t){return new f(i(e,t))},parseText:i,isFullyConvertible:r.isFullyConvertible,toText:function(e,t,n){return new r(e,t,n).toString()}};t?module.exports=o:e._RRuleNLP=o,"function"==typeof define&&define.amd&&define("rrule",[],function(){return f})}(this),Scheduler=function(e,t,n){this.test_mode=!0===n,this.start_date=e;var r=this;t=t.replace(/(UNTIL=)([^\;]{8})(?!T)/,function(e,t,n,a){return y=n.substring(0,4),m=n.substring(4,6),d=n.substring(6,8),until=new Date(y,parseInt(m)-1,d,23,59,59),v=r.timeToUntilString(until),t+v}),this.exception_dates=[],this.repeat_dates=[],this.rule=null,t&&(this.rule=RRule.fromString("DTSTART="+this.timeToUntilString(e)+";"+t),this.rule.dtstart=e)},Scheduler.prototype.timeToUntilString=function(e){for(var t,n=new Date(e),a=[n.getUTCFullYear(),n.getUTCMonth()+1,n.getUTCDate(),"T",n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),"Z"],r=0;r<a.length;r++)t=a[r],!/[TZ]/.test(t)&&t<10&&(a[r]="0"+String(t));return a.join("")},Scheduler.prototype.all_occurrences=function(e,t){if(null==this.rule)return[this.start_date];var n=[];if(n=this.rule.between(new Date(e),new Date(t)),0<this.repeat_dates.length){for(var a=0;a<this.repeat_dates.length;a++){var r=new Date(this.repeat_dates[a]);rhc_in_array(s,n)||n.push(r)}n.sort()}var i=n.length,o=[];for(a=0;a<i;a++){var s=(r=n[a]).getTime();rhc_in_array(s,this.exception_dates)||o.push(this.test_mode?s:r)}return o},Scheduler.prototype.occurrences_between=function(e,t){var n=e.getTime(),a=t.getTime();return this.all_occurrences(n,a)},Scheduler.prototype.limited_occurrences=function(e,t,n){var a=begin_date.getTime(),r=end_date.getTime();return this.all_occurrences(a,r).slice(0,n)},Scheduler.prototype.add_exception_dates=function(e){for(var t=e.length,n=0;n<t;n++)this.exception_dates.push(e[n].getTime());this.exception_dates.sort()},Scheduler.prototype.add_rdates=function(e){for(var t=e.length,n=0;n<t;n++)this.repeat_dates.push(e[n].getTime());this.repeat_dates.sort()},function(ge,_e){var p={defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"iso",weekNumberTitle:"W",allDayDefault:!0,ignoreTimezone:!0,lazyFetching:!0,startParam:"start",endParam:"end",titleFormat:{month:"MMMM yyyy",week:"MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",day:"dddd, MMM d, yyyy"},columnFormat:{month:"ddd",week:"ddd M/d",day:"dddd M/d"},timeFormat:{"":"h(:mm)t"},isRTL:!1,firstDay:0,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"],buttonText:{prev:"<span class='fc-text-arrow'>&lsaquo;</span>",next:"<span class='fc-text-arrow'>&rsaquo;</span>",prevYear:"<span class='fc-text-arrow'>&laquo;</span>",nextYear:"<span class='fc-text-arrow'>&raquo;</span>",today:"today",month:"month",week:"week",day:"day"},theme:!1,buttonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e"},unselectAuto:!0,dropAccept:"*",handleWindowResize:!0},e={header:{left:"next,prev today",center:"",right:"title"},buttonText:{prev:"<span class='fc-text-arrow'>&rsaquo;</span>",next:"<span class='fc-text-arrow'>&lsaquo;</span>",prevYear:"<span class='fc-text-arrow'>&raquo;</span>",nextYear:"<span class='fc-text-arrow'>&laquo;</span>"},buttonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w"}},H=ge.fullCalendar={version:"1.6.4"},A=H.views={};function t(e){ge.extend(!0,p,e)}function o(t,i,e){var s=this;s.options=i,s.render=function(e){d?y()&&(D(),C(e)):function(){i.theme?"ui":"fc",t.addClass("fc"),i.isRTL?t.addClass("fc-rtl"):t.addClass("fc-ltr");i.theme&&t.addClass("ui-widget");d=ge("<div class='fc-content' style='position:relative'/>").prependTo(t),l=new z(s,i),(n=l.render())&&t.prepend(n);b(i.defaultView),i.handleWindowResize&&ge(window).resize(M);w()||_()}()},s.destroy=function(){c&&(I("viewDestroy",c,c,c.element),c.triggerEventDestroy());ge(window).unbind("resize",M),l.destroy(),d.remove(),t.removeClass("fc fc-rtl ui-widget")},s.refetchEvents=function(){S(),O()},s.reportEvents=function(e){g=e,E()},s.reportEventChange=function(e){$(e)},s.rerenderEvents=$,s.changeView=b,s.select=function(e,t,n){c.select(e,t,n===_e||n)},s.unselect=j,s.prev=function(){k(-1)},s.next=function(){k(1)},s.prevYear=function(){Q(v,-1),k()},s.nextYear=function(){Q(v,1),k()},s.today=function(){v=new Date,k()},s.gotoDate=function(e,t,n){e instanceof Date?v=xe(e):W(v,e,t,n);k()},s.incrementDate=function(e,t,n){e!==_e&&Q(v,e);t!==_e&&F(v,t);n!==_e&&be(v,n);k()},s.formatDate=function(e,t){return U(e,t,i)},s.formatDates=function(e,t,n){return P(e,t,n,i)},s.getDate=function(){return xe(v)},s.getView=function(){return c},s.option=function(e,t){if(t===_e)return i[e];"height"!=e&&"contentHeight"!=e&&"aspectRatio"!=e||(i[e]=t,x())},s.trigger=I,s.rhc_search=function(e,t,n){0<ge(h).find(".fc-filters-dialog").length&&(n||ge(h).find(".fc-filters-dialog").is(":visible")?ge(h).find(".fc-filters-dialog").stop().find(".fbd-unchecked").css("overflow-y","hidden").end().animate({opacity:0,top:-10},"fast","linear",function(){ge(this).hide()}):(jQuery(".fct-tooltip").trigger("close-tooltip"),ge(h).find(".fc-filters-dialog").stop().show().find(".fbd-unchecked").css("overflow-y","hidden").end().animate({opacity:1,top:0},"fast","linear",function(){ge(this).find(".fbd-unchecked").css("overflow-y","auto")})))},function(m,e){var t=this;t.isFetchNeeded=function(e,t){return!v||e<v||g<t},t.fetchEvents=function(e,t){v=e,g=t,c=[];var n=++o,a=i.length;d=a;for(var r=0;r<a;r++)u(i[r],n)},t.addEventSource=function(e){(e=h(e))&&(d++,u(e,o))},t.removeEventSource=function(t){i=ge.grep(i,function(e){return!w(e,t)}),c=ge.grep(c,function(e){return!w(e.source,t)}),l(c)},t.updateEvent=function(e){var t,n,a=c.length,r=s().defaultEventEnd,i=e.start-e._start,o=e.end?e.end-(e._end||r(e)):0;for(t=0;t<a;t++)(n=c[t])._id==e._id&&n!=e&&(n.start=new Date(+n.start+i),e.end?n.end?n.end=new Date(+n.end+o):n.end=new Date(+r(n)+o):n.end=null,n.title=e.title,n.url=e.url,n.allDay=e.allDay,n.className=e.className,n.editable=e.editable,n.color=e.color,n.backgroundColor=e.backgroundColor,n.borderColor=e.borderColor,n.textColor=e.textColor,p(n));p(e),l(c)},t.renderEvent=function(e,t){p(e),e.source||(t&&(a.events.push(e),e.source=a),c.push(e));l(c)},t.removeEvents=function(e){if(e){if(!ge.isFunction(e)){var t=e+"";e=function(e){return e._id==t}}c=ge.grep(c,e,!0);for(n=0;n<i.length;n++)ge.isArray(i[n].events)&&(i[n].events=ge.grep(i[n].events,e,!0))}else{c=[];for(var n=0;n<i.length;n++)ge.isArray(i[n].events)&&(i[n].events=[])}l(c)},t.clientEvents=function(t){{if(ge.isFunction(t))return ge.grep(c,t);if(t)return t+="",ge.grep(c,function(e){return e._id==t})}return c},t.normalizeEvent=p,t.removeEventSources=function(){i=[],l(c=[])};for(var v,g,n=t.trigger,s=t.getView,l=t.reportEvents,a={events:[]},i=[a],o=0,d=0,r=0,c=[],f=0;f<e.length;f++)h(e[f]);function u(n,a){!function e(t,n){var a;var r=H.sourceFetchers;var i;for(a=0;a<r.length;a++){if(!0===(i=r[a](t,v,g,n)))return;if("object"==typeof i)return void e(i,n)}var o=t.events;if(o)ge.isFunction(o)?(_(),o(xe(v),xe(g),function(e){n(e),y()})):ge.isArray(o)?n(o):n();else{var s=t.url;if(s){var l,d=t.success,c=t.error,f=t.complete;l=ge.isFunction(t.data)?t.data():t.data;var u=ge.extend({},l||{}),h=J(t.startParam,m.startParam),p=J(t.endParam,m.endParam);h&&(u[h]=Math.round(+v/1e3)),p&&(u[p]=Math.round(+g/1e3)),_(),ge.ajax(ge.extend({},Y,t,{data:u,success:function(e){e=e||[];var t=K(d,this,arguments);ge.isArray(t)&&(e=t),n(e)},error:function(){K(c,this,arguments),n()},complete:function(){K(f,this,arguments),y()}}))}else n()}}(n,function(e){if(a==o){if(e){m.eventDataTransform&&(e=ge.map(e,m.eventDataTransform)),n.eventDataTransform&&(e=ge.map(e,n.eventDataTransform));for(var t=0;t<e.length;t++)e[t].source=n,p(e[t]);c=c.concat(e)}--d||l(c)}})}function h(e){if(ge.isFunction(e)||ge.isArray(e)?e={events:e}:"string"==typeof e&&(e={url:e}),"object"==typeof e)return function(e){e.className?"string"==typeof e.className&&(e.className=e.className.split(/\s+/)):e.className=[];for(var t=H.sourceNormalizers,n=0;n<t.length;n++)t[n](e)}(e),i.push(e),e}function _(){r++||n("loading",null,!0,s())}function y(){--r||n("loading",null,!1,s())}function p(e){var t=e.source||{},n=J(t.ignoreTimezone,m.ignoreTimezone);e._id=e._id||(e.id===_e?"_fc"+N++:e.id+""),e.date&&(e.start||(e.start=e.date),delete e.date),e._start=xe(e.start=B(e.start,n)),e.end=B(e.end,n),e.end&&e.end<=e.start&&(e.end=null),e._end=e.end?xe(e.end):null,e.allDay===_e&&(e.allDay=J(t.allDayDefault,m.allDayDefault)),e.className?"string"==typeof e.className&&(e.className=e.className.split(/\s+/)):e.className=[]}function w(e,t){return e&&t&&b(e)==b(t)}function b(e){return("object"==typeof e?e.events||e.url:"")||e}}.call(s,i,e);var l,n,d,c,a,r,o,f=s.isFetchNeeded,u=s.fetchEvents,h=t[0],p=0,m=0,v=new Date,g=[];function _(){setTimeout(function(){!c.start&&w()&&k()},0)}function y(){return t.is(":visible")}function w(){return ge("body").is(":visible")}function b(e){c&&e==c.name||function(e){firstTime=0==d.find(".fc-view").length,noTransition=!!(firstTime||s.options.transition.notransition&&1==parseInt(s.options.transition.notransition));var t=c;jQuery(".fct-tooltip").trigger("close-tooltip"),m++,c&&(I("viewDestroy",c,c,c.element),j(),c.triggerEventDestroy(),L(),noTransition&&c.element.remove(),l.deactivateButton(c.name));l.activateButton(e),c=new A[e](ge("<div class='fc-view fc-view-"+e+"' style='position:relative'/>").appendTo(d),s),t&&t.viewLeave&&t.viewLeave(t,c,s);c.transitionStarted&&c.transitionStarted(t);{if(!noTransition){d.css("overflow","hidden");var n=d.width(),a=d.height(),r={rtl:{newView:{left:n,top:0},oldView:{left:-1*n,top:0}},ltr:{newView:{left:-1*n,top:0},oldView:{left:n,top:0}},ttb:{newView:{left:0,top:-1*a},oldView:{left:0,top:a}},btt:{newView:{left:0,top:a},oldView:{left:0,top:-1*a}}},i=s.options.transition.direction?s.options.transition.direction:"horizontal";if(t){if(0==ge(".fc-button-"+e).length)var o="horizontal"==i?r.rtl:r.ttb;else if(0<ge(".fc-button-"+t.name).length&&0<ge(".fc-button-"+e).length&&ge(".fc-button-"+t.name).position().left<ge(".fc-button-"+e).position().left)o="horizontal"==i?r.rtl:r.ttb;else o="horizontal"==i?r.ltr:r.btt;c.lastView=t.name}else{o="horizontal"==i?r.rtl:r.ttb;c.lastView=!1}return t&&t.element.css("z-index",0).css("position","absolute"),c.element.appendTo(d).css("left",o.newView.left).css("top",o.newView.top).css("opacity",0).css("z-index",1).show(),t.element.animate({opacity:0,left:o.oldView.left,top:o.oldView.top},s.options.transition.duration||"slow",s.options.transition.easing||"linear",function(){t.element.hide().css("position","relative").css("opacity",1).css("left",0)}),k(),L(),c.element.animate({opacity:1,left:0,top:0},s.options.transition.duration||"slow",s.options.transition.easing||"linear",function(){t.element.hide().css("position","relative"),c.transitionEnded&&c.transitionEnded(t),R(),m--,d.find(".fc-view:hidden").remove()})}c.transitionEnded&&c.transitionEnded(t)}k(),R(),m--}(e)}function k(e){(!c.start||e||v<c.start||v>=c.end)&&y()&&C(e)}function C(e){if(m++,c.start&&(I("viewDestroy",c,c,c.element),j(),S()),L(),c.render(v,e||0),s.options.skipMonths&&-1!=ge.inArray(v.getMonth(),s.options.skipMonths)){increase=e||1;for(var t=0;t++<366;){if(-1==ge.inArray(v.getMonth(),s.options.skipMonths)){c.render(v,0);break}v.setDate(v.getDate()+increase)}}T(),R(),(c.afterRender||function(){})(),l.updateTitle(c.title),function(){var e=new Date;e>=c.start&&e<c.end?l.disableButton("today"):l.enableButton("today")}(),I("viewRender",c,c,c.element),c.trigger("viewDisplay",h),m--,!i.lazyFetching||f(c.visStart,c.visEnd)?O():E()}function x(){if(y()){if(j(),S(),D(),T(),"rhc_event"==c.name)return;E()}}function D(){r=i.contentHeight?i.contentHeight:i.height?i.height-(n?n.height():0)-Le(d):Math.round(d.width()/Math.max(i.aspectRatio,.5))}function T(){r===_e&&D(),m++,c.setHeight(r),c.setWidth(d.width()),m--,a=t.outerWidth()}function M(){if(!m)if(c.start){var e=++p;setTimeout(function(){e==p&&!m&&y()&&a!=(a=t.outerWidth())&&(m++,x(),c.trigger("windowResize",h),m--)},200)}else _()}function $(e){S(),E(e)}function E(e){y()&&(c.setEventData(g),c.renderEvents(g,e),c.trigger("eventAfterAllRender"))}function S(){c.triggerEventDestroy(),c.clearEvents(),c.clearEventData()}function O(){u(c.visStart,c.visEnd)}function j(){c&&c.unselect()}function L(){d.css({width:"100%",height:d.height(),overflow:"hidden"})}function R(){d.css({width:"",height:"",overflow:""})}function I(e,t){if(i[e])return i[e].apply(t||h,Array.prototype.slice.call(arguments,2))}W(s.date=v,i.year,i.month,i.date),i.droppable&&ge(document).bind("dragstart",function(e,t){var n=e.target,a=ge(n);if(!a.parents(".fc").length){var r=i.dropAccept;(ge.isFunction(r)?r.call(n,a):a.is(r))&&(o=n,c.dragStart(o,e,t))}}).bind("dragstop",function(e,t){o&&(c.dragStop(o,e,t),o=null)})}function z(l,d){var e=this;e.render=function(){if(c=d.theme?"ui":"fc",d.header)return t=ge("<div class='fc-header'/>").append(ge("<div class='fc-header-row' />").append(n("center")).append(n("left")).append(n("right")))},e.destroy=function(){t.remove()},e.updateTitle=function(e){t.find("h2").html(e)},e.activateButton=function(e){t.find("span.fc-button-"+e).addClass(c+"-state-active")},e.deactivateButton=function(e){t.find("span.fc-button-"+e).removeClass(c+"-state-active")},e.disableButton=function(e){t.find("span.fc-button-"+e).addClass(c+"-state-disabled")},e.enableButton=function(e){t.find("span.fc-button-"+e).removeClass(c+"-state-disabled")};var c,t=ge([]);function n(e){var s=ge("<div class='fc-header-cell fc-header-"+e+"'/>"),t=d.header[e];return t&&ge.each(t.split(" "),function(e){var o;0<e&&s.append("<span class='fc-header-space'/>"),ge.each(this.split(","),function(e,t){var n;if("title"==t)s.append("<span class='fc-header-title'><h2>&nbsp;</h2></span>"),o&&o.addClass(c+"-corner-right"),o=null;else if(l[t]?n=l[t]:A[t]?n=function(){i.removeClass(c+"-state-hover"),l.changeView(t)}:(d[t]||d[t.replace("-","")])&&(n=function(){n=d[t]}),n){var a=d.theme?S(d.buttonIcons,t):null;if(void 0===(r=S(d.buttonText,t)))var r=S(d.buttonText,t.replace("-",""));var i=ge("<span class='fc-button fc-button-"+t+" "+c+"-state-default'>"+(a?"<span class='fc-icon-wrap'><span class='ui-icon ui-icon-"+a+"'/></span>":r)+"</span>").click(function(){i.hasClass(c+"-state-disabled")||n(l,s)}).mousedown(function(){i.not("."+c+"-state-active").not("."+c+"-state-disabled").addClass(c+"-state-down")}).mouseup(function(){i.removeClass(c+"-state-down")}).hover(function(){i.not("."+c+"-state-active").not("."+c+"-state-disabled").addClass(c+"-state-hover")},function(){i.removeClass(c+"-state-hover").removeClass(c+"-state-down")}).appendTo(s);He(i),o||i.addClass(c+"-corner-left"),o=i}}),o&&o.addClass(c+"-corner-right")}),s}}ge.fn.fullCalendar=function(r){if("string"==typeof r){var n,a=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=ge.data(this,"fullCalendar");if(e&&ge.isFunction(e[r])){var t=e[r].apply(e,a);n===_e&&(n=t),"destroy"==r&&ge.removeData(this,"fullCalendar")}}),n!==_e?n:this}var i=(r=r||{}).eventSources||[];return delete r.eventSources,r.events&&(i.push(r.events),delete r.events),r=ge.extend(!0,{},p,r.isRTL||r.isRTL===_e&&p.isRTL?e:{},r),this.each(function(e,t){var n=ge(t),a=new o(n,r,i);n.data("fullCalendar",a),a.render()}),this},H.sourceNormalizers=[];var Y={dataType:"json",cache:!(H.sourceFetchers=[])},N=1;H.addDays=be,H.cloneDate=xe,H.parseDate=B,H.parseISO8601=q,H.parseTime=Me,H.formatDate=U,H.formatDates=P,H.addMonths=F;var ye=["sun","mon","tue","wed","thu","fri","sat"],n=864e5,r=36e5,we=6e4;function Q(e,t,n){return e.setFullYear(e.getFullYear()+t),n||Ce(e),e}function F(e,t,n){if(+e){var a=e.getMonth()+t,r=xe(e);for(r.setDate(1),r.setMonth(a),e.setMonth(a),n||Ce(e);e.getMonth()!=r.getMonth();)e.setDate(e.getDate()+(e<r?1:-1))}return e}function be(e,t,n){if(+e){var a=e.getDate()+t,r=xe(e);r.setHours(9),r.setDate(a),e.setDate(a),n||Ce(e),s(e,r)}return e}function s(e,t){if(+e)for(;e.getDate()!=t.getDate();)e.setTime(+e+(e<t?1:-1)*r)}function ke(e,t){return e.setMinutes(e.getMinutes()+t),e}function Ce(e){return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function xe(e,t){return t?Ce(new Date(+e)):new Date(+e)}function De(){for(var e,t=0;(e=new Date(1970,t++,1)).getHours(););return e}function Te(e,t){return Math.round((xe(e,!0)-xe(t,!0))/n)}function W(e,t,n,a){t!==_e&&t!=e.getFullYear()&&(e.setDate(1),e.setMonth(0),e.setFullYear(t)),n!==_e&&n!=e.getMonth()&&(e.setDate(1),e.setMonth(n)),a!==_e&&e.setDate(a)}function B(e,t){return"object"==typeof e?e:"number"==typeof e?new Date(1e3*e):"string"==typeof e?e.match(/^\d+(\.\d+)?$/)?new Date(1e3*parseFloat(e)):(t===_e&&(t=!0),q(e,t)||(e?new Date(e):null)):null}function q(e,t){var n=e.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);if(!n)return null;var a=new Date(n[1],0,1);if(t||!n[13]){var r=new Date(n[1],0,1,9,0);n[3]&&(a.setMonth(n[3]-1),r.setMonth(n[3]-1)),n[5]&&(a.setDate(n[5]),r.setDate(n[5])),s(a,r),n[7]&&a.setHours(n[7]),n[8]&&a.setMinutes(n[8]),n[10]&&a.setSeconds(n[10]),n[12]&&a.setMilliseconds(1e3*Number("0."+n[12])),s(a,r)}else if(a.setUTCFullYear(n[1],n[3]?n[3]-1:0,n[5]||1),a.setUTCHours(n[7]||0,n[8]||0,n[10]||0,n[12]?1e3*Number("0."+n[12]):0),n[14]){var i=60*Number(n[16])+(n[18]?Number(n[18]):0);i*="-"==n[15]?1:-1,a=new Date(+a+60*i*1e3)}return a}function Me(e){if("number"==typeof e)return 60*e;if("object"==typeof e)return 60*e.getHours()+e.getMinutes();var t=e.match(/(\d+)(?::(\d+))?\s*(\w+)?/);if(t){var n=parseInt(t[1],10);return t[3]&&(n%=12,"p"==t[3].toLowerCase().charAt(0)&&(n+=12)),60*n+(t[2]?parseInt(t[2],10):0)}}function U(e,t,n){return P(e,null,t,n)}function P(e,t,n,a){a=a||p;var r,i,o,s,l=e,d=t,c=n.length,f="";for(r=0;r<c;r++)if("'"==(i=n.charAt(r))){for(o=r+1;o<c;o++)if("'"==n.charAt(o)){l&&(f+=o==r+1?"'":n.substring(r+1,o),r=o);break}}else if("("==i){for(o=r+1;o<c;o++)if(")"==n.charAt(o)){var u=U(l,n.substring(r+1,o),a);parseInt(u.replace(/\D/,""),10)&&(f+=u),r=o;break}}else if("["==i){for(o=r+1;o<c;o++)if("]"==n.charAt(o)){var h=n.substring(r+1,o);(u=U(l,h,a))!=U(d,h,a)&&(f+=u),r=o;break}}else if("{"==i)l=t,d=e;else if("}"==i)l=e,d=t;else{for(o=c;r<o;o--)if(s=m[n.substring(r,o)]){l&&(f+=s(l,a)),r=o-1;break}o==r&&l&&(f+=i)}return f}var m={s:function(e){return e.getSeconds()},ss:function(e){return i(e.getSeconds())},m:function(e){return e.getMinutes()},mm:function(e){return i(e.getMinutes())},h:function(e){return e.getHours()%12||12},hh:function(e){return i(e.getHours()%12||12)},H:function(e){return e.getHours()},HH:function(e){return i(e.getHours())},d:function(e){return e.getDate()},dd:function(e){return i(e.getDate())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return e.getMonth()+1},MM:function(e){return i(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},yy:function(e){return(e.getFullYear()+"").substring(2)},yyyy:function(e){return e.getFullYear()},t:function(e){return e.getHours()<12?"a":"p"},tt:function(e){return e.getHours()<12?"am":"pm"},T:function(e){return e.getHours()<12?"A":"P"},TT:function(e){return e.getHours()<12?"AM":"PM"},u:function(e){return U(e,"yyyy-MM-dd'T'HH:mm:ss'Z'")},S:function(e){var t=e.getDate();return 10<t&&t<20?"th":["st","nd","rd"][t%10-1]||"th"},w:function(e,t){return t.weekNumberCalculation(e)},W:function(e){return function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1}(e)}};function $e(e){return e.end?function(e,t){return e=xe(e),t||e.getHours()||e.getMinutes()?be(e,1):Ce(e)}(e.end,e.allDay):be(xe(e.start),1)}function Ee(e,i,o){e.unbind("mouseover").mouseover(function(e){for(var t,n,a,r=e.target;r!=this;)r=(t=r).parentNode;(n=t._fci)!==_e&&(t._fci=_e,a=i[n],o(a.event,a.element,a),ge(e.target).trigger(e)),e.stopPropagation()})}function Se(e,t,n){for(var a,r=0;r<e.length;r++)(a=ge(e[r])).width(Math.max(0,t-je(a,n)))}function Oe(e,t,n){for(var a,r=0;r<e.length;r++)(a=ge(e[r])).height(Math.max(0,t-Le(a,n)))}function je(e,t){return function(e){return(parseFloat(ge.css(e[0],"paddingLeft",!0))||0)+(parseFloat(ge.css(e[0],"paddingRight",!0))||0)}(e)+function(e){return(parseFloat(ge.css(e[0],"borderLeftWidth",!0))||0)+(parseFloat(ge.css(e[0],"borderRightWidth",!0))||0)}(e)+(t?function(e){return(parseFloat(ge.css(e[0],"marginLeft",!0))||0)+(parseFloat(ge.css(e[0],"marginRight",!0))||0)}(e):0)}function Le(e,t){return function(e){return(parseFloat(ge.css(e[0],"paddingTop",!0))||0)+(parseFloat(ge.css(e[0],"paddingBottom",!0))||0)}(e)+function(e){return(parseFloat(ge.css(e[0],"borderTopWidth",!0))||0)+(parseFloat(ge.css(e[0],"borderBottomWidth",!0))||0)}(e)+(t?function(e){return(parseFloat(ge.css(e[0],"marginTop",!0))||0)+(parseFloat(ge.css(e[0],"marginBottom",!0))||0)}(e):0)}function Re(e,t){return e-t}function V(e){return Math.max.apply(Math,e)}function i(e){return(e<10?"0":"")+e}function S(e,t){if(e[t]!==_e)return e[t];for(var n,a=t.split(/(?=[A-Z])/),r=a.length-1;0<=r;r--)if((n=e[a[r].toLowerCase()])!==_e)return n;return e[""]}function Ie(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function He(e){e.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function Ae(e){e.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function ze(e,t){var n=e.source||{},a=e.color,r=n.color,i=t("eventColor"),o=e.backgroundColor||a||n.backgroundColor||r||t("eventBackgroundColor")||i,s=e.borderColor||a||n.borderColor||r||t("eventBorderColor")||i,l=e.textColor||n.textColor||t("eventTextColor"),d=[];return o&&d.push("background-color:"+o),s&&d.push("border-color:"+s),l&&d.push("color:"+l),d.join(";")}function K(e,t,n){if(ge.isFunction(e)&&(e=[e]),e){var a,r;for(a=0;a<e.length;a++)r=e[a].apply(t,n)||r;return r}}function J(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==_e)return arguments[e]}function y(i,e,o){var s=this;s.renderBasic=function(e,t,n){g=e,_=t,y=n,x=E("theme")?"ui":"fc",D=E("columnFormat"),T=E("weekNumbers"),M=E("weekNumberTitle"),$="iso"!=E("weekNumberCalculation")?"w":"W",r||(m=ge("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(i));!function(){var e="<table class='fc-border-separate' style='width:100%' cellspacing='0'>"+function(){var e,t,n=x+"-widget-header",a="";for(a+="<thead><tr>",T&&(a+="<th class='fc-week-number "+n+"'>"+Ie(M)+"</th>"),e=0;e<_;e++)t=R(0,e),a+="<th class='fc-day-header fc-"+ye[t.getDay()]+" "+n+"'>"+Ie(A(t,D))+"</th>";return a+="</tr></thead>"}()+function(){var e,t,n,a=x+"-widget-content",r="";for(r+="<tbody>",e=0;e<g;e++){for(r+="<tr class='fc-week'>",T&&(n=R(e,0),r+="<td class='fc-week-number "+a+"'><div>"+Ie(A(n,$))+"</div></td>"),t=0;t<_;t++)n=R(e,t),r+=z(n);r+="</tr>"}return r+="</tbody>"}()+"</table>";a&&a.remove();a=ge(e).appendTo(i),l=a.find("thead"),d=l.find(".fc-day-header"),r=a.find("tbody"),c=r.find("tr"),f=r.find(".fc-day"),u=c.find("td:first-child"),h=c.eq(0).find(".fc-day > div"),p=c.eq(0).find(".fc-day-content > div"),Ae(l.add(l.find("tr"))),Ae(c),c.eq(0).addClass("fc-first"),c.filter(":last").addClass("fc-last"),f.each(function(e,t){var n=R(Math.floor(e/_),e%_);S("dayRender",s,n,ge(t))}),Y(f)}()},s.setHeight=function(e){if(ge(s.element).closest(".rhc_holder").is(".fc-small"))return;var n,a,r,t=e-l.height();"variable"==E("weekMode")?n=a=Math.floor(t/(1==g?2:6)):(n=Math.floor(t/g),a=t-n*(g-1));u.each(function(e,t){e<g&&(r=ge(t)).find("> div").css("min-height",(e==g-1?a:n)-Le(r))})},s.setWidth=function(e){t=e,k.clear(),C.clear(),v=0,T&&(v=l.find("th.fc-week-number").outerWidth());n=Math.floor((t-v)/_),Se(d.slice(0,-1),n)},s.renderDayOverlay=Q,s.defaultSelectionEnd=function(e,t){return xe(e)},s.renderSelection=function(e,t,n){Q(e,be(xe(t),1),!0)},s.clearSelection=function(){j()},s.reportDayClick=function(e,t,n){var a=I(e),r=f[a.row*_+a.col];S("dayClick",r,e,t,n)},s.dragStart=function(e,t,n){b.start(function(e){j(),e&&F(e.row,e.col,e.row,e.col)},t)},s.dragStop=function(e,t,n){var a=b.stop();if(j(),a){var r=R(a);S("drop",e,r,!0,t,n)}},s.defaultEventEnd=function(e){return xe(e.start)},s.getHoverListener=function(){return b},s.colLeft=function(e){return k.left(e)},s.colRight=function(e){return k.right(e)},s.colContentLeft=function(e){return C.left(e)},s.colContentRight=function(e){return C.right(e)},s.getIsCellAllDay=function(){return!0},s.allDayRow=function(e){return c.eq(e)},s.getRowCnt=function(){return g},s.getColCnt=function(){return _},s.getColWidth=function(){return n},s.getDaySegmentContainer=function(){return m},Qe.call(s,i,e,o),Be.call(s),We.call(s),function(){var n=this;n.renderEvents=function(e,t){n.renderDayEvents(e,t)},n.clearEvents=function(){n.getDaySegmentContainer().empty()},Fe.call(n)}.call(s);var a,l,d,r,c,f,u,h,p,m,t,n,v,g,_,y,w,b,k,C,x,D,T,M,$,E=s.opt,S=s.trigger,O=s.renderOverlay,j=s.clearOverlays,L=s.daySelectionMousedown,R=s.cellToDate,I=s.dateToCell,H=s.rangeToSegments,A=e.formatDate;function z(e){var t=x+"-widget-content",n=s.start.getMonth(),a=Ce(new Date),r="",i=["fc-day","fc-"+ye[e.getDay()],t];if(e.getMonth()!=n&&i.push("fc-other-month"),+e==+a?i.push("fc-today",x+"-state-highlight"):e<a?i.push("fc-past"):i.push("fc-future"),r+="<td class='"+i.join(" ")+"' data-date='"+A(e,"yyyy-MM-dd")+"'><div>",y){switch(o){case"basicWeek":value=Ie(A(e,D));break;case"month":value=e.getDate(),mobile_month_cell_num_format=E("mobile_month_cell_num_format"),mobile_month_cell_num_format&&1==parseInt(value)&&(value=Ie(A(e,mobile_month_cell_num_format)));break;default:value=e.getDate()}r+="<div class='fc-day-number'>"+value+"</div>"}return r+="<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>"}function Y(e){e.click(N).mousedown(L)}function N(e){if(!E("selectable")){var t=q(ge(this).data("date"));S("dayClick",this,t,!0,e)}}function Q(e,t,n){n&&w.build();for(var a=H(e,t,null),r=0;r<a.length;r++){var i=a[r];Y(F(i.row,i.leftCol,i.row,i.rightCol))}}function F(e,t,n,a){var r=w.rect(e,t,n,a,i);return O(r,i)}He(i.addClass("fc-grid")),w=new qe(function(n,a){var r,i,o;d.each(function(e,t){r=ge(t),i=r.offset().left,e&&(o[1]=i),o=[i],a[e]=o}),o[1]=i+r.outerWidth(),c.each(function(e,t){e<g&&(r=ge(t),i=r.offset().top,e&&(o[1]=i),o=[i],n[e]=o)}),o[1]=i+r.outerHeight()}),b=new Ue(w),k=new Pe(function(e){return h.eq(e)}),C=new Pe(function(e){return p.eq(e)})}function v(l,e,t){var n=this;n.renderAgenda=function(e){S=e,function(){H=B("theme")?"ui":"fc",A=B("isRTL"),z=Me(B("minTime")),Y=Me(B("maxTime")),N=B("columnFormat"),Q=B("weekNumbers"),F=B("weekNumberTitle"),W="iso"!=B("weekNumberCalculation")?"w":"W";M=B("snapMinutes")||B("slotMinutes")}(),o?ae():function(){var e,t,n,a,r,i=H+"-widget-header",o=H+"-widget-content",s=B("slotMinutes")%15==0;ae(),h=ge("<div style='position:absolute;z-index:2;left:0;width:100%'/>").appendTo(l),B("allDaySlot")?(p=ge("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(h),e="<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='"+i+" fc-agenda-axis'>"+B("allDayText")+"</th><td><div class='fc-day-content'><div style='position:relative'/></div></td><th class='"+i+" fc-agenda-gutter'>&nbsp;</th></tr></table>",m=ge(e).appendTo(h),re((v=m.find("tr")).find("td")),h.append("<div class='fc-agenda-divider "+i+"'><div class='fc-agenda-divider-inner'/></div>")):p=ge([]);for(g=ge("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>").appendTo(h),_=ge("<div style='position:relative;width:100%;overflow:hidden'/>").appendTo(g),y=ge("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(_),e="<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>",t=De(),a=ke(xe(t),Y),ke(t,z),n=O=0;t<a;n++)r=t.getMinutes(),e+="<tr class='fc-slot"+n+" "+(r?"fc-minor":"")+"'><th class='fc-agenda-axis "+i+"'>"+(s&&r?"&nbsp;":te(t,B("axisFormat")))+"</th><td class='"+o+"'><div style='position:relative'>&nbsp;</div></td></tr>",ke(t,B("slotMinutes")),O++;ie((w=ge(e+="</tbody></table>").appendTo(_)).find("td"))}()},n.setWidth=function(e){e,R.clear(),I.clear();var t=r.find("th:first");m&&(t=t.add(m.find("th:first")));t=t.add(w.find("th:first")),C=0,Se(t.width("").each(function(e,t){C=Math.max(C,ge(t).outerWidth())}),C);var n=o.find(".fc-agenda-gutter");m&&(n=n.add(m.find("th.fc-agenda-gutter")));var a=g[0].clientWidth;(D=g.width()-a)?(Se(n,D),n.show().prev().removeClass("fc-last")):n.hide().prev().addClass("fc-last");x=Math.floor((a-C)/S),Se(c.slice(0,-1),x)},n.setHeight=function(e){e===_e&&(e=k);k=e,ne={};var t=i.position().top,n=g.position().top,a=Math.min(e-t,w.height()+n+1);u.height(a-Le(f)),h.css("top",t),g.height(a-n-1),T=w.find("tr:first").height()+1,$=B("slotMinutes")/M,E=T/$},n.afterRender=function(){!function(){var e=De(),t=xe(e);t.setHours(B("firstHour"));var n=ue(e,t)+1;function a(){g.scrollTop(n)}a(),setTimeout(a,0)}()},n.defaultEventEnd=function(e){var t=xe(e.start);if(e.allDay)return t;return ke(t,B("defaultEventMinutes"))},n.timePosition=ue,n.getIsCellAllDay=ce,n.allDayRow=function(e){return v},n.getCoordinateGrid=function(){return j},n.getHoverListener=function(){return L},n.colLeft=function(e){return R.left(e)},n.colRight=function(e){return R.right(e)},n.colContentLeft=function(e){return I.left(e)},n.colContentRight=function(e){return I.right(e)},n.getDaySegmentContainer=function(){return p},n.getSlotSegmentContainer=function(){return y},n.getMinMinute=function(){return z},n.getMaxMinute=function(){return Y},n.getSlotContainer=function(){return _},n.getRowCnt=function(){return 1},n.getColCnt=function(){return S},n.getColWidth=function(){return x},n.getSnapHeight=function(){return E},n.getSnapMinutes=function(){return M},n.defaultSelectionEnd=function(e,t){if(t)return xe(e);return ke(xe(e),B("slotMinutes"))},n.renderDayOverlay=se,n.renderSelection=function(e,t,n){n?B("allDaySlot")&&se(e,be(xe(t),1),!0):he(e,t)},n.clearSelection=pe,n.reportDayClick=ve,n.dragStart=function(e,t,n){L.start(function(e){if(P(),e)if(ce(e))le(e.row,e.col,e.row,e.col);else{var t=fe(e);de(t,ke(xe(t),B("defaultEventMinutes")))}},t)},n.dragStop=function(e,t,n){var a=L.stop();P(),a&&q("drop",e,fe(a),ce(a),t,n)},Qe.call(n,l,e,t),Be.call(n),We.call(n),function(){var i=this;i.renderEvents=function(e,t){var n,a=e.length,r=[],i=[];for(n=0;n<a;n++)e[n].allDay?r.push(e[n]):i.push(e[n]);x("allDaySlot")&&(u(r,t),l());!function(e,t){var n,a,r,i,o,s,l,d,c,f,u,h,p,m,v,g,_=e.length,y="",w=k(),b=x("isRTL");for(n=0;n<_;n++)a=e[n],r=a.event,i=C(a.start,a.start),o=C(a.start,a.end),s=M(a.col),l=$(a.col),c=(d=(l-=.025*(d=l-s))-s)*(a.forwardCoord-a.backwardCoord),x("slotEventOverlap")&&(c=Math.max(2*(c-10),c)),b?(u=l-a.backwardCoord*d,f=u-c):(f=s+a.backwardCoord*d,u=f+c),f=Math.max(f,s),u=Math.min(u,l),c=u-f,0<ge(w[0]).closest(".rhcalendar").length&&ge(w[0]).closest(".rhcalendar").is(".rhc-timetable")&&(c+=5),a.top=i,a.left=f,a.outerWidth=c,a.outerHeight=o-i,y+=F(r,a);for(w[0].innerHTML=y,h=w.children(),n=0;n<_;n++)a=e[n],r=a.event,p=ge(h[n]),!1===(m=D("eventRender",r,r,p))?p.remove():(m&&!0!==m&&(p.remove(),p=ge(m).css({position:"absolute",top:a.top,left:a.left}).appendTo(w)),a.element=p,r._id===t?W(r,p,a):p[0]._fci=n,R(r,p));for(Ee(w,e,W),n=0;n<_;n++)a=e[n],(p=a.element)&&(a.vsides=Le(p,!0),a.hsides=je(p,!0),(v=p.find(".fc-event-title")).length&&(a.contentTop=v[0].offsetTop));for(n=0;n<_;n++)a=e[n],(p=a.element)&&(p[0].style.width=Math.max(0,a.outerWidth-a.hsides)+"px",g=Math.max(0,a.outerHeight-a.vsides),p[0].style.height=g+"px",r=a.event,a.contentTop!==_e&&g-a.contentTop<10&&(p.find("div.fc-event-time").text(N(r.start,x("timeFormat"))+" - "+r.title),p.find("div.fc-event-title").remove()),D("eventAfterRender",r,r,p))}(function(e){var t,n,a,r,i,o=S(),s=m(),l=f(),d=ge.map(e,p),c=[];for(n=0;n<o;n++)for(ke(t=E(0,n),s),i=Ye(i=h(e,d,t,ke(xe(t),l-s))),a=0;a<i.length;a++)(r=i[a]).col=n,c.push(r);return c}(i),t)},i.clearEvents=function(){e().empty(),k().empty()},i.slotSegHtml=F,Fe.call(i);var x=i.opt,D=i.trigger,o=i.isEventDraggable,s=i.isEventResizable,d=i.eventEnd,r=i.eventElementHandlers,l=i.setHeight,e=i.getDaySegmentContainer,k=i.getSlotSegmentContainer,t=i.getHoverListener,f=i.getMaxMinute,m=i.getMinMinute,C=i.timePosition,T=i.getIsCellAllDay,M=i.colContentLeft,$=i.colContentRight,E=i.cellToDate,S=i.getColCnt,O=i.getColWidth,j=i.getSnapHeight,L=i.getSnapMinutes,v=i.getSlotContainer,R=i.reportEventElement,I=i.showEvents,H=i.hideEvents,A=i.eventDrop,c=i.eventResize,z=i.renderDayOverlay,Y=i.clearOverlays,u=i.renderDayEvents,n=i.calendar,N=n.formatDate,Q=n.formatDates;function h(e,t,n,a){var r,i,o,s,l,d,c,f,u=[],h=e.length;for(r=0;r<h;r++)o=(i=e[r]).start,n<(s=t[r])&&o<a&&(c=o<n?(l=xe(n),!1):(l=o,!0),f=a<s?(d=xe(a),!1):(d=s,!0),u.push({event:i,start:l,end:d,isStart:c,isEnd:f}));return u.sort(Ne)}function p(e){return e.end?xe(e.end):ke(xe(e.start),x("defaultEventMinutes"))}function F(e,t){var n="<",a=e.url,r=ze(e,x),i=["fc-event","fc-event-vert"];return o(e)&&i.push("fc-event-draggable"),t.isStart&&i.push("fc-event-start"),t.isEnd&&i.push("fc-event-end"),i=i.concat(e.className),e.source&&(i=i.concat(e.source.className||[])),n+=a?"a href='"+Ie(e.url)+"'":"div",n+=" class='"+i.join(" ")+"' style='position:absolute;top:"+t.top+"px;left:"+t.left+"px;"+r+"'><div class='fc-event-inner'><div class='fc-event-time'>"+Ie(Q(e.start,e.end,x("timeFormat")))+"</div><div class='fc-event-title'>"+Ie(e.title||"")+"</div></div><div class='fc-event-bg'></div>",t.isEnd&&s(e)&&(n+="<div class='ui-resizable-handle ui-resizable-s'>=</div>"),n+="</"+(a?"a":"div")+">"}function W(e,t,n){var a=t.find("div.fc-event-time");o(e)&&function(a,o,r){var s,l,d,c,f,u,h,p,m,v,g,_=i.getCoordinateGrid(),y=S(),w=O(),b=j(),k=L();function C(){Y(),d&&(f?(r.hide(),o.draggable("option","grid",null),z(be(xe(a.start),m),be($e(a),m))):(function(e){var t,n=ke(xe(a.start),e);a.end&&(t=ke(xe(a.end),e));r.text(Q(n,t,x("timeFormat")))}(v),r.css("display",""),o.draggable("option","grid",[w,b])))}o.draggable({scroll:!1,grid:[w,b],axis:1==y&&"y",opacity:x("dragOpacity"),revertDuration:x("dragRevertDuration"),start:function(e,t){D("eventDragStart",o,a,e,t),H(a,o),_.build(),s=o.position(),l=_.cell(e.pageX,e.pageY),d=c=!0,f=u=T(l),h=p=0,v=g=m=0},drag:function(e,t){var n=_.cell(e.pageX,e.pageY);if(d=!!n){if(f=T(n),(h=Math.round((t.position.left-s.left)/w))!=p){var a=E(0,l.col),r=l.col+h;r=Math.max(0,r),r=Math.min(y-1,r);var i=E(0,r);m=Te(i,a)}f||(v=Math.round((t.position.top-s.top)/b)*k)}d==c&&f==u&&h==p&&v==g||(C(),c=d,u=f,p=h,g=v),o.draggable("option","revert",!d)},stop:function(e,t){Y(),D("eventDragStop",o,a,e,t),d&&(f||m||v)?A(this,a,m,f?0:v,f,e,t):(f=!(d=!0),v=m=h=0,C(),o.css("filter",""),o.css(s),I(a,o))}})}(e,t,a),n.isEnd&&s(e)&&function(n,a,r){var i,o,s=j(),l=L();a.resizable({handles:{s:".ui-resizable-handle"},grid:s,start:function(e,t){i=o=0,H(n,a),D("eventResizeStart",this,n,e,t)},resize:function(e,t){(i=Math.round((Math.max(s,a.height())-t.originalSize.height)/s))!=o&&(r.text(Q(n.start,i||n.end?ke(d(n),l*i):null,x("timeFormat"))),o=i)},stop:function(e,t){D("eventResizeStop",this,n,e,t),i?c(this,n,0,l*i,e,t):I(n,a)}})}(e,t,a),r(e,t)}i.draggableDayEvent=function(r,i,e){var n,o,s,l=e.isStart,d=!0,a=t(),c=O(),f=j(),u=L(),h=m();function p(){d||(i.width(n).height("").draggable("option","grid",null),d=!0)}i.draggable({opacity:x("dragOpacity","month"),revertDuration:x("dragRevertDuration"),start:function(e,t){D("eventDragStart",i,r,e,t),H(r,i),n=i.width(),a.start(function(e,t){if(Y(),e){o=!1;var n=E(0,t.col),a=E(0,e.col);s=Te(a,n),e.row?l?d&&(i.width(c-10),Oe(i,f*Math.round((r.end?(r.end-r.start)/we:x("defaultEventMinutes"))/u)),i.draggable("option","grid",[c,1]),d=!1):o=!0:(z(be(xe(r.start),s),be($e(r),s)),p()),o=o||d&&!s}else p(),o=!0;i.draggable("option","revert",o)},e,"drag")},stop:function(e,t){if(a.stop(),Y(),D("eventDragStop",i,r,e,t),o)p(),i.css("filter",""),I(r,i);else{var n=0;d||(n=Math.round((i.offset().top-v().offset().top)/f)*u+h-(60*r.start.getHours()+r.start.getMinutes())),A(this,r,s,n,d,e,t)}}})}}.call(n);var o,r,c,i,s,a,d,f,u,h,p,m,v,g,_,y,w,b,k,C,x,D,T,M,$,E,S,O,j,L,R,I,H,A,z,Y,N,Q,F,W,B=n.opt,q=n.trigger,U=n.renderOverlay,P=n.clearOverlays,V=n.reportSelection,K=n.unselect,J=n.daySelectionMousedown,G=n.slotSegHtml,Z=n.cellToDate,X=n.dateToCell,ee=n.rangeToSegments,te=e.formatDate,ne={};function ae(){var e="<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>"+function(){var e,t,n,a=H+"-widget-header",r="";for(r+="<thead><tr>",Q?(e=Z(0,0),t=te(e,W),A?t+=F:t=F+t,r+="<th class='fc-agenda-axis fc-week-number "+a+"'>"+Ie(t)+"</th>"):r+="<th class='fc-agenda-axis "+a+"'>&nbsp;</th>",n=0;n<S;n++)e=Z(0,n),r+="<th class='fc-"+ye[e.getDay()]+" fc-col"+n+" "+a+"'>"+Ie(te(e,N))+"</th>";return r+="<th class='fc-agenda-gutter "+a+"'>&nbsp;</th></tr></thead>"}()+function(){var e,t,n,a,r,i=H+"-widget-header",o=H+"-widget-content",s=Ce(new Date),l="";for(l+="<tbody><tr><th class='fc-agenda-axis "+i+"'>&nbsp;</th>",n="",t=0;t<S;t++)e=Z(0,t),r=["fc-col"+t,"fc-"+ye[e.getDay()],o],+e==+s?r.push(H+"-state-highlight","fc-today"):e<s?r.push("fc-past"):r.push("fc-future"),a="<td class='"+r.join(" ")+"'><div><div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>",n+=a;return l+=n,l+="<td class='fc-agenda-gutter "+o+"'>&nbsp;</td></tr></tbody>"}()+"</table>";o&&o.remove(),o=ge(e).appendTo(l),r=o.find("thead"),c=r.find("th").slice(1,-1),i=o.find("tbody"),s=i.find("td").slice(0,-1),a=s.find("> div"),d=s.find(".fc-day-content > div"),f=s.eq(0),u=a.eq(0),Ae(r.add(r.find("tr"))),Ae(i.add(i.find("tr")))}function re(e){e.click(oe).mousedown(J)}function ie(e){e.click(oe).mousedown(me)}function oe(e){if(!B("selectable")){var t=Math.min(S-1,Math.floor((e.pageX-o.offset().left-C)/x)),n=Z(0,t),a=this.parentNode.className.match(/fc-slot(\d+)/);if(a){var r=parseInt(a[1])*B("slotMinutes"),i=Math.floor(r/60);n.setHours(i),n.setMinutes(r%60+z),q("dayClick",s[t],n,!1,e)}else q("dayClick",s[t],n,!0,e)}}function se(e,t,n){n&&j.build();for(var a=ee(e,t,null),r=0;r<a.length;r++){var i=a[r];re(le(i.row,i.leftCol,i.row,i.rightCol))}}function le(e,t,n,a){var r=j.rect(e,t,n,a,h);return U(r,h)}function de(e,t){for(var n=0;n<S;n++){var a=Z(0,n),r=be(xe(a),1),i=new Date(Math.max(a,e)),o=new Date(Math.min(r,t));if(i<o){var s=j.rect(0,n,0,n,_),l=ue(a,i),d=ue(a,o);s.top=l,s.height=d-l,ie(U(s,_))}}}function ce(e){return B("allDaySlot")&&!e.row}function fe(e){var t=Z(0,e.col),n=e.row;return B("allDaySlot")&&n--,0<=n&&ke(t,z+n*M),t}function ue(e,t){if(t<ke(xe(e=xe(e,!0)),z))return 0;if(t>=ke(xe(e),Y))return w.height();var n=B("slotMinutes"),a=60*t.getHours()+t.getMinutes()-z,r=Math.floor(a/n),i=ne[r];return i===_e&&(i=ne[r]=w.find("tr").eq(r).find("td div")[0].offsetTop),Math.max(0,Math.round(i-1+T*(a%n/n)))}function he(e,t){var n=B("selectHelper");if(j.build(),n){var a=X(e).col;if(0<=a&&a<S){var r=j.rect(0,a,0,a,_),i=ue(e,e),o=ue(e,t);if(i<o){if(r.top=i,r.height=o-i,r.left+=2,r.width-=5,ge.isFunction(n)){var s=n(e,t);s&&(r.position="absolute",b=ge(s).css(r).appendTo(_))}else r.isStart=!0,r.isEnd=!0,(b=ge(G({title:"",start:e,end:t,className:["fc-select-helper"],editable:!1},r))).css("opacity",B("dragOpacity"));b&&(ie(b),_.append(b),Se(b,r.width,!0),Oe(b,r.height,!0))}}}else de(e,t)}function pe(){P(),b&&(b.remove(),b=null)}function me(e){var r;1==e.which&&B("selectable")&&(K(e),L.start(function(e,t){if(pe(),e&&e.col==t.col&&!ce(e)){var n=fe(t),a=fe(e);he((r=[n,ke(xe(n),M),a,ke(xe(a),M)].sort(Re))[0],r[3])}else r=null},e),ge(document).one("mouseup",function(e){L.stop(),r&&(+r[0]==+r[1]&&ve(r[0],!1,e),V(r[0],r[3],!1,e))}))}function ve(e,t,n){q("dayClick",s[X(e).col],e,t,n)}He(l.addClass("fc-agenda")),j=new qe(function(e,n){var a,r,i;c.each(function(e,t){a=ge(t),r=a.offset().left,e&&(i[1]=r),i=[r],n[e]=i}),i[1]=r+a.outerWidth(),B("allDaySlot")&&(r=(a=v).offset().top,e[0]=[r,r+a.outerHeight()]);var t=_.offset().top,o=g.offset().top,s=o+g.outerHeight();function l(e){return Math.max(o,Math.min(s,e))}for(var d=0;d<O*$;d++)e.push([l(t+E*d),l(t+E*(d+1))])}),L=new Ue(j),R=new Pe(function(e){return a.eq(e)}),I=new Pe(function(e){return d.eq(e)})}function Ye(e){var t,n=function(e){var t,n,a,r=[];for(t=0;t<e.length;t++){for(n=e[t],a=0;a<r.length&&c(n,r[a]).length;a++);(r[a]||(r[a]=[])).push(n)}return r}(e),a=n[0];if(function(e){var t,n,a,r,i;for(t=0;t<e.length;t++)for(n=e[t],a=0;a<n.length;a++)for((r=n[a]).forwardSegs=[],i=t+1;i<e.length;i++)c(r,e[i],r.forwardSegs)}(n),a){for(t=0;t<a.length;t++)l(a[t]);for(t=0;t<a.length;t++)d(a[t],0,0)}return function(e){var t,n,a,r=[];for(t=0;t<e.length;t++)for(n=e[t],a=0;a<n.length;a++)r.push(n[a]);return r}(n)}function l(e){var t,n,a=e.forwardSegs,r=0;if(e.forwardPressure===_e){for(t=0;t<a.length;t++)l(n=a[t]),r=Math.max(r,1+n.forwardPressure);e.forwardPressure=r}}function d(e,t,n){var a,r=e.forwardSegs;if(e.forwardCoord===_e)for(r.length?(r.sort(f),d(r[0],t+1,n),e.forwardCoord=r[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),a=0;a<r.length;a++)d(r[a],0,e.forwardCoord)}function c(e,t,n){n=n||[];for(var a=0;a<t.length;a++)r=e,i=t[a],r.end>i.start&&r.start<i.end&&n.push(t[a]);var r,i;return n}function f(e,t){return t.forwardPressure-e.forwardPressure||(e.backwardCoord||0)-(t.backwardCoord||0)||Ne(e,t)}function Ne(e,t){return e.start-t.start||t.end-t.start-(e.end-e.start)||(e.event.title||"").localeCompare(t.event.title)}function Qe(e,n,r){var b=this;b.element=e,b.calendar=n,b.name=r,b.opt=l,b.trigger=f,b.isEventDraggable=function(e){var t=e.source||{};return J(e.startEditable,t.startEditable,l("eventStartEditable"),e.editable,t.editable,l("editable"))&&!l("disableDragging")},b.isEventResizable=function(e){var t=e.source||{};return J(e.durationEditable,t.durationEditable,l("eventDurationEditable"),e.editable,t.editable,l("editable"))&&!l("disableResizing")},b.setEventData=function(e){c={};var t,n,a=e.length;for(t=0;t<a;t++)n=e[t],c[n._id]?c[n._id].push(n):c[n._id]=[n]},b.clearEventData=function(){c={},o={},i=[]},b.eventEnd=u,b.reportEventElement=function(e,t){i.push({event:e,element:t}),o[e._id]?o[e._id].push(t):o[e._id]=[t]},b.triggerEventDestroy=function(){ge.each(i,function(e,t){b.trigger("eventDestroy",t.event,t.event,t.element)})},b.eventElementHandlers=function(t,n){n.click(function(e){if(!n.hasClass("ui-draggable-dragging")&&!n.hasClass("ui-resizable-resizing"))return f("eventClick",this,t,e)}).hover(function(e){f("eventMouseover",this,t,e)},function(e){f("eventMouseout",this,t,e)})},b.showEvents=function(e,t){h(e,t,"show")},b.hideEvents=function(e,t){h(e,t,"hide")},b.eventDrop=function(e,t,n,a,r,i,o){var s=t.allDay,l=t._id;p(c[l],n,a,r),f("eventDrop",e,t,n,a,r,function(){p(c[l],-n,-a,s),d(l)},i,o),d(l)},b.eventResize=function(e,t,n,a,r,i){var o=t._id;m(c[o],n,a),f("eventResize",e,t,n,a,function(){m(c[o],-n,-a),d(o)},r,i),d(o)};var t=b.defaultEventEnd,s=n.normalizeEvent,d=n.reportEventChange,c={},o={},i=[],k=n.options;function l(e,t){var n=k[e];return ge.isPlainObject(n)?S(n,t||r):n}function f(e,t){return n.trigger.apply(n,[e,t||b].concat(Array.prototype.slice.call(arguments,2),[b]))}function u(e){return e.end?xe(e.end):t(e)}function h(e,t,n){var a,r=o[e._id],i=r.length;for(a=0;a<i;a++)t&&r[a][0]==t[0]||r[a][n]()}function p(e,t,n,a){n=n||0;for(var r,i=e.length,o=0;o<i;o++)r=e[o],a!==_e&&(r.allDay=a),ke(be(r.start,t,!0),n),r.end&&(r.end=ke(be(r.end,t,!0),n)),s(r,k)}function m(e,t,n){n=n||0;for(var a,r=e.length,i=0;i<r;i++)(a=e[i]).end=ke(be(u(a),t,!0),n),s(a,k)}b.isHiddenDay=function(e){"object"==typeof e&&(e=e.getDay());return _[e]},b.skipHiddenDays=function(e,t,n){t=t||1;for(;_[(e.getDay()+(n?t:0)+7)%7];)be(e,t)},b.getCellsPerWeek=function(){return v},b.dateToCell=function(e){return E($(M(e)))},b.dateToDayOffset=M,b.dayOffsetToCellOffset=$,b.cellOffsetToCell=E,b.cellToDate=function(){return T(D(x.apply(null,arguments)))},b.cellToCellOffset=x,b.cellOffsetToDayOffset=D,b.dayOffsetToDate=T,b.rangeToSegments=function(e,t,n){var r=b.getRowCnt(),i=b.getColCnt(),o=[],s=M(e),l=M(t);nextDayThreshold=!(!k.nextDayThreshold||""==k.nextDayThreshold)&&parseInt(k.nextDayThreshold),n&&n.end&&n.end.getHours&&!1!==nextDayThreshold&&1<l-s&&n.end.getHours()<=nextDayThreshold&&(l-=1);for(var d=$(s),c=$(l)-1,f=0;f<r;f++){var u=f*i,h=u+i-1,p=Math.max(d,u),m=Math.min(c,h);if(p<=m){var v=E(p),g=E(m),_=[v.col,g.col].sort(),y=D(p)==s,w=D(m)+1==l;o.push({row:f,leftCol:_[0],rightCol:_[1],isStart:y,isEnd:w})}}if(ge(b.element).parents(".rhcalendar.not-widget").hasClass("fc-small"))return new_segments=[],ge.each(o,function(e,t){if(leftCol=t.leftCol,rightCol=t.rightCol,leftCol<rightCol)for(a=leftCol;a<=rightCol;a++){var n=jQuery.extend({},t);n.leftCol=a,n.rightCol=a,new_segments.push(n)}else new_segments.push(t)}),new_segments;return o};var v,g=l("hiddenDays")||[],_=[],y=[],w=[],C=l("isRTL");function x(e,t){var n=b.getColCnt(),a=C?-1:1,r=C?n-1:0;return"object"==typeof e&&(t=e.col,e=e.row),e*n+(t*a+r)}function D(e){var t=b.visStart.getDay();return e+=y[t],7*Math.floor(e/v)+w[(e%v+v)%v]-t}function T(e){var t=xe(b.visStart);return be(t,e),t}function M(e){return Te(e,b.visStart)}function $(e){var t=b.visStart.getDay();return e+=t,Math.floor(e/7)*v+y[(e%7+7)%7]-y[t]}function E(e){var t=b.getColCnt(),n=C?-1:1,a=C?t-1:0;return{row:Math.floor(e/t),col:(e%t+t)%t*n+a}}!function(){!1===l("weekends")&&g.push(0,6);for(var e=0,t=0;e<7;e++)y[e]=t,_[e]=-1!=ge.inArray(e,g),_[e]||(w[t]=e,t++);if(!(v=t))throw"invalid hiddenDays"}()}function Fe(){var a=this;a.renderDayEvents=function(e,t){var n=I(e,!1,!0);Z(n,function(e,t){r(e.event,t)}),function(e,r){var t=x();Z(e,function(e,t,n){var a=e.event;a._id===r?Y(a,t,e):t[0]._fci=n}),Ee(t,e,Y)}(n,t),Z(n,function(e,t){p("eventAfterRender",e.event,e.event,t)})},a.draggableDayEvent=function(o,s){var l,n=E();s.draggable({delay:50,opacity:d("dragOpacity"),revertDuration:d("dragRevertDuration"),start:function(e,t){p("eventDragStart",s,o,e,t),g(o,s),n.start(function(e,t,n,a){if(s.draggable("option","revert",!e||!n&&!a),M(),e){var r=S(t),i=S(e);l=Te(i,r),T(be(xe(o.start),l),be($e(o),l))}else l=0},e,"drag")},stop:function(e,t){n.stop(),M(),p("eventDragStop",s,o,e,t),l?c(this,o,l,0,o.allDay,e,t):(s.css("filter",""),v(o,s))}})},a.resizableDayEvent=function(c,n,f){var u=d("isRTL")?"w":"e",e=n.find(".ui-resizable-"+u),a=!1;He(n),n.mousedown(function(e){e.preventDefault()}).click(function(e){a&&(e.preventDefault(),e.stopImmediatePropagation())}),e.mousedown(function(e){if(1==e.which){a=!0;var i,o,t=E(),s=(y(),w(),n.css("top")),l=ge.extend({},c),d=R(L(c.start));$(),ge("body").css("cursor",u+"-resize").one("mouseup",function(e){p("eventResizeStop",this,c,e),ge("body").css("cursor",""),t.stop(),M(),i&&_(this,c,i,0,e);setTimeout(function(){a=!1},0)}),p("eventResizeStart",this,c,e),t.start(function(e,t){if(e){var n=O(t),a=O(e);if(a=Math.max(a,d),i=j(a)-j(n)){l.end=be(m(c),i,!0);var r=o;o=function(e,n,a){var t=I([e],!0,!1),r=[];return Z(t,function(e,t){e.row===n&&t.css("top",a),r.push(t[0])}),r}(l,f.row,s),(o=ge(o)).find("*").css("cursor",u+"-resize"),r&&r.remove(),g(c)}else o&&(v(c),o.remove(),o=null);M(),T(c.start,be($e(c),i))}},e)}})};var d=a.opt,p=a.trigger,s=a.isEventDraggable,l=a.isEventResizable,m=a.eventEnd,r=a.reportEventElement,i=a.eventElementHandlers,v=a.showEvents,g=a.hideEvents,c=a.eventDrop,_=a.eventResize,y=a.getRowCnt,w=a.getColCnt,f=(a.getColWidth,a.allDayRow),u=a.colLeft,b=a.colRight,k=a.colContentLeft,C=a.colContentRight,x=(a.dateToCell,a.getDaySegmentContainer),D=a.calendar.formatDates,T=a.renderDayOverlay,M=a.clearOverlays,$=a.clearSelection,E=a.getHoverListener,o=a.rangeToSegments,S=a.cellToDate,O=a.cellToCellOffset,j=a.cellOffsetToDayOffset,L=a.dateToDayOffset,R=a.dayOffsetToCellOffset;function I(e,t,n){var a,r,i=x(),o=t?ge("<div/>"):i,s=function(e){for(var t=[],n=0;n<e.length;n++){var a=H(e[n]);t.push.apply(t,a)}return t}(e);!function(e){for(var t=d("isRTL"),n=0;n<e.length;n++){var a=e[n],r=(t?a.isEnd:a.isStart)?k:u,i=(t?a.isStart:a.isEnd)?C:b,o=r(a.leftCol),s=i(a.rightCol);a.left=o,a.outerWidth=s-o}}(s),a=function(e){for(var t="",n=0;n<e.length;n++)t+=A(e[n]);return t}(s),o[0].innerHTML=a,r=o.children(),t&&i.append(r),function(e,t){for(var n=0;n<e.length;n++){var a=e[n],r=a.event,i=t.eq(n),o=p("eventRender",r,r,i);!1===o?i.remove():(o&&!0!==o&&(o=ge(o).css({position:"absolute",left:a.left}),i.replaceWith(o),i=o),a.element=i)}}(s,r);var l=ge(i).closest(".rhc_holder");return l.find(".fc-day").removeClass("has-event"),Z(s,function(e,t){_date=U(e.event.start,"yyyy-MM-dd"),l.find('[data-date="'+_date+'"]').addClass("has-event")}),Z(s,function(e,t){e.hsides=je(t,!0)}),Z(s,function(e,t){t.width(Math.max(0,e.outerWidth-e.hsides))}),Z(s,function(e,t){e.outerHeight=t.outerHeight(!0)}),function(e,t){!function(e){for(var t=y(),n=w(),a=[],r=function(e){var t,n,a,r=y(),i=[];for(t=0;t<e.length;t++)n=e[t],a=n.row,n.element&&(i[a]?i[a].push(n):i[a]=[n]);for(a=0;a<r;a++)i[a]=z(i[a]||[]);return i}(e),i=0;i<t;i++){for(var o=r[i],s=[],l=0;l<n;l++)s.push(0);for(var d=0;d<o.length;d++){var c=o[d];c.top=V(s.slice(c.leftCol,c.rightCol+1));for(l=c.leftCol;l<=c.rightCol;l++)s[l]=c.top+c.outerHeight}a.push(V(s))}}(e);var n=function(){var e,t=y(),n=[];for(e=0;e<t;e++)n[e]=f(e).find("div.fc-day-content > div");return n}(),a=[];{var r=y(),i=(w(),[]);for(row=0;row<r;row++)i[row]=[],Z(e,function(e,t){if(e.row==row&&!(e.leftCol>e.rightcol))for(col=e.leftCol;col<=e.rightCol;col++)i[row][col]=i[row][col]||0,i[row][col]+=e.outerHeight});if(t)for(var o=0;o<n.length;o++)if(n[o].length>=i[o].length)for(var s=0;s<n[o].length;s++)h=!(!i[o]||!i[o][s])&&i[o][s],!1===h?n[o].eq(s).addClass("fc-day-no-events"):n[o].eq(s).height(h);else new_h=0,ge.each(i[o],function(e,t){new_h=t>new_h?t:new_h}),n[o].height(new_h);for(o=0;o<n.length;o++)for(s=0;s<n[o].length;s++)a[o]=a[o]||[],a[o][s]=n[o].eq(s).position().top;Z(e,function(e,t){contentTop=a[e.row][e.leftCol]||a[e.row][0],t.css("top",contentTop+e.top)})}}(s,n),s}function H(e){for(var t=e.start,n=$e(e),a=o(t,n,e),r=0;r<a.length;r++)a[r].event=e;return a}function A(e){var t="",n=d("isRTL"),a=e.event,r=a.url,i=["fc-event","fc-event-hori"];s(a)&&i.push("fc-event-draggable"),e.isStart&&i.push("fc-event-start"),e.isEnd&&i.push("fc-event-end"),i=i.concat(a.className),a.source&&(i=i.concat(a.source.className||[]));var o=ze(a,d);return t+=r?"<a href='"+Ie(r)+"'":"<div",t+=" class='"+i.join(" ")+"' style='position:absolute;left:"+e.left+"px;"+o+"'><div class='fc-event-inner'>",!a.allDay&&e.isStart&&(t+="<span class='fc-event-time'>"+Ie(D(a.start,a.end,d("timeFormat")))+"</span>"),t+="<span class='fc-event-title'>"+Ie(a.title||"")+"</span></div>",e.isEnd&&l(a)&&(t+="<div class='ui-resizable-handle ui-resizable-"+(n?"w":"e")+"'>&nbsp;&nbsp;&nbsp;</div>"),t+="</"+(r?"a":"div")+">"}function z(e){for(var t=[],n=function(e){e.sort(X);for(var t=[],n=0;n<e.length;n++){for(var a=e[n],r=0;r<t.length&&G(a,t[r]);r++);t[r]?t[r].push(a):t[r]=[a]}return t}(e),a=0;a<n.length;a++)t.push.apply(t,n[a]);return t}function Y(e,t,n){s(e)&&a.draggableDayEvent(e,t,n),n.isEnd&&l(e)&&a.resizableDayEvent(e,t,n),i(e,t)}}function G(e,t){for(var n=0;n<t.length;n++){var a=t[n];if(a.leftCol<=e.rightCol&&a.rightCol>=e.leftCol)return!0}return!1}function Z(e,t){for(var n=0;n<e.length;n++){var a=e[n],r=a.element;r&&t(a,r,n)}}function X(e,t){return t.rightCol-t.leftCol-(e.rightCol-e.leftCol)||t.event.allDay-e.event.allDay||e.event.start-t.event.start||(e.event.title||"").localeCompare(t.event.title)}function We(){var o=this;o.select=function(e,t,n){c(),t||(t=a(e,n));l(e,t,n),f(e,t,n)},o.unselect=c,o.reportSelection=f,o.daySelectionMousedown=function(e){var n=o.cellToDate,a=o.getIsCellAllDay,t=o.getHoverListener(),r=o.reportDayClick;if(1==e.which&&s("selectable")){c(e);var i;t.start(function(e,t){d(),e&&a(e)?(i=[n(t),n(e)].sort(Re),l(i[0],i[1],!0)):i=null},e),ge(document).one("mouseup",function(e){t.stop(),i&&(+i[0]==+i[1]&&r(i[0],!0,e),f(i[0],i[1],!0,e))})}};var s=o.opt,r=o.trigger,a=o.defaultSelectionEnd,l=o.renderSelection,d=o.clearSelection,i=!1;function c(e){i&&(i=!1,d(),r("unselect",null,e))}function f(e,t,n,a){i=!0,r("select",null,e,t,n,a)}s("selectable")&&s("unselectAuto")&&ge(document).mousedown(function(e){var t=s("unselectCancel");t&&ge(e.target).parents(t).length||c(e)})}function Be(){this.renderOverlay=function(e,t){var n=r.shift();n||(n=ge("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>"));n[0].parentNode!=t[0]&&n.appendTo(t);return a.push(n.css(e).show()),n},this.clearOverlays=function(){var e;for(;e=a.shift();)r.push(e.hide().unbind())};var a=[],r=[]}function qe(e){var s,l;this.build=function(){e(s=[],l=[])},this.cell=function(e,t){var n,a=s.length,r=l.length,i=-1,o=-1;for(n=0;n<a;n++)if(t>=s[n][0]&&t<s[n][1]){i=n;break}for(n=0;n<r;n++)if(e>=l[n][0]&&e<l[n][1]){o=n;break}return 0<=i&&0<=o?{row:i,col:o}:null},this.rect=function(e,t,n,a,r){var i=r.offset();return{top:s[e][0]-i.top,left:l[t][0]-i.left,width:l[a][1]-l[t][0],height:s[n][1]-s[e][0]}}}function Ue(a){var r,i,o,s;function l(e){!function(e){e.pageX===_e&&(e.pageX=e.originalEvent.pageX,e.pageY=e.originalEvent.pageY)}(e);var t=a.cell(e.pageX,e.pageY);!t==!s&&(!t||t.row==s.row&&t.col==s.col)||(t?(o||(o=t),i(t,o,t.row-o.row,t.col-o.col)):i(t,o),s=t)}this.start=function(e,t,n){i=e,o=s=null,a.build(),l(t),r=n||"mousemove",ge(document).bind(r,l)},this.stop=function(){return ge(document).unbind(r,l),s}}function Pe(t){var n=this,a={},r={},i={};function o(e){return a[e]=a[e]||t(e)}n.left=function(e){return r[e]=r[e]===_e?o(e).position().left:r[e]},n.right=function(e){return i[e]=i[e]===_e?n.left(e)+o(e).width():i[e]},n.clear=function(){a={},r={},i={}}}H.dateFormatters=m,H.applyAll=K,A.month=function(e,u){var h=this;h.render=function(e,t){var n=p("left_trim_date")?Math.abs(parseInt(p("left_trim_date"))):0,a=p("right_trim_date")?Math.abs(parseInt(p("right_trim_date"))):0;a=28<a?28:a,(n=28<n?28:n)&&a&&a<n&&(_tmp=n,n=a,a=_tmp);var r=!1;p("upcoming")&&p("upcoming_trim_past")&&(r=0!=(r=parseInt(p("upcoming_trim_past"))));var i=new Date;t&&(F(e,t),e.setDate(1));var o=p("firstDay"),s=xe(e,!0);if(s.setDate(1),end=F(xe(s),1),r&&end.getTime()<i.getTime())return void u.next();(r=r&&s.getTime()<i.getTime())&&(s=new Date,e=xe(s,!0),end=F(xe(s),1),end.setDate(0),end.setHours(23,59,59));n&&s.setDate(n);a&&(end=xe(s),end.setDate(a),end.setHours(23,59,59));var l=xe(s);be(l,-(l.getDay()-o+7)%7),v(l);var d=xe(end);be(d,(7-d.getDay()+o)%7),v(d,-1,!0);var c=g(),f=Math.ceil(Te(d,l)/7);if("fixed"==p("weekMode")&&(_weeks_to_add=6-f,0<_weeks_to_add&&be(d,7*_weeks_to_add),f=6,r))f=Math.ceil(Te(d,l)/7);h.title=_(s,p("titleFormat")),h.start=s,h.end=end,h.visStart=l,h.visEnd=d,m(f,c,!0)},y.call(h,e,u,"month");var p=h.opt,m=h.renderBasic,v=h.skipHiddenDays,g=h.getCellsPerWeek,_=u.formatDate},A.basicWeek=function(e,t){var s=this;s.render=function(e,t){t&&be(e,7*t);var n=be(xe(e),-(e.getDay()-l("firstDay")+7)%7),a=be(xe(n),7),r=xe(n);c(r);var i=xe(a);c(i,-1,!0);var o=f();s.start=n,s.end=a,s.visStart=r,s.visEnd=i,s.title=u(r,be(xe(i),-1),l("titleFormat")),d(1,o,!0)},y.call(s,e,t,"basicWeek");var l=s.opt,d=s.renderBasic,c=s.skipHiddenDays,f=s.getCellsPerWeek,u=t.formatDates},A.basicDay=function(e,t){var r=this;r.render=function(e,t){t&&be(e,t);s(e,t<0?-1:1);var n=xe(e,!0),a=be(xe(n),1);r.title=l(e,i("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=a,o(1,1,!1)},y.call(r,e,t,"basicDay");var i=r.opt,o=r.renderBasic,s=r.skipHiddenDays,l=t.formatDate},t({weekMode:"fixed"}),A.agendaWeek=function(e,t){var s=this;s.render=function(e,t){t&&be(e,7*t);var n=be(xe(e),-(e.getDay()-l("firstDay")+7)%7),a=be(xe(n),7),r=xe(n);c(r);var i=xe(a);c(i,-1,!0);var o=f();s.title=u(r,be(xe(i),-1),l("titleFormat")),s.start=n,s.end=a,s.visStart=r,s.visEnd=i,d(o)},v.call(s,e,t,"agendaWeek");var l=s.opt,d=s.renderAgenda,c=s.skipHiddenDays,f=s.getCellsPerWeek,u=t.formatDates},A.agendaDay=function(e,t){var r=this;r.render=function(e,t){t&&be(e,t);s(e,t<0?-1:1);var n=xe(e,!0),a=be(xe(n),1);r.title=l(e,i("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=a,o(1)},v.call(r,e,t,"agendaDay");var i=r.opt,o=r.renderAgenda,s=r.skipHiddenDays,l=t.formatDate},t({allDaySlot:!0,allDayText:"all-day",firstHour:6,slotMinutes:30,defaultEventMinutes:120,axisFormat:"h(:mm)tt",timeFormat:{agenda:"h:mm{ - h:mm}"},dragOpacity:{agenda:.5},minTime:0,maxTime:24,slotEventOverlap:!0})}(jQuery),function(d){var e=d.fullCalendar,i=e.formatDate,c=e.parseISO8601,f=e.addDays,o=e.applyAll;e.sourceNormalizers.push(function(e){("gcal"==e.dataType||void 0===e.dataType&&(e.url||"").match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//))&&(e.dataType="gcal",void 0===e.editable&&(e.editable=!1))}),e.sourceFetchers.push(function(e,t,n){if("gcal"==e.dataType)return function(e,t,n){var a=e.success,r=d.extend({},e.data||{},{"start-min":i(t,"u"),"start-max":i(n,"u"),singleevents:!0,"max-results":9999}),l=e.currentTimezone;l&&(r.ctz=l=l.replace(" ","_"));return d.extend({},e,{url:e.url.replace(/\/basic$/,"/full")+"?alt=json-in-script&callback=?",dataType:"jsonp",data:r,startParam:!1,endParam:!1,success:function(e){var s=[];e.feed.entry&&d.each(e.feed.entry,function(e,t){var n,a=t.gd$when[0].startTime,r=c(a,!0),i=c(t.gd$when[0].endTime,!0),o=-1==a.indexOf("T");d.each(t.link,function(e,t){"text/html"==t.type&&(n=t.href,l&&(n+=(-1==n.indexOf("?")?"?":"&")+"ctz="+l))}),o&&f(i,-1),s.push({id:t.gCal$uid.value,title:t.title.$t,url:n,start:r,end:i,allDay:o,location:t.gd$where[0].valueString,description:t.content.$t})});var t=[s].concat(Array.prototype.slice.call(arguments,1)),n=o(a,this,t);return d.isArray(n)?n:s}})}(e,t,n)}),e.gcalFeed=function(e,t){return d.extend({},t,{url:e,dataType:"gcal"})}}(jQuery),function(R){function e(M,$){var l,E=this;function S(o,e,t,s){o.each(e,function(e,i){void 0!==s.extended_detail_cache[i]&&t.find(".ext_det_"+i).each(function(e,t){var n=s.extended_detail_cache[i].clone(),a=o(t).data("ev");if(n.find(".postmeta-fc_start .fe-extrainfo-value").html(o.fullCalendar.formatDate(a.start,s.options.eventList.extDateFormat||"MMMM d, yyyy",s.options)),n.find(".postmeta-fc_start_time .fe-extrainfo-value").html(o.fullCalendar.formatDate(a.start,s.options.eventList.extTimeFormat||"h:mm tt",s.options)),n.find(".postmeta-fc_start_datetime .fe-extrainfo-value").html(o.fullCalendar.formatDate(a.start,s.options.eventList.extDateTimeFormat||"MMMM d, yyyy. h:mm tt",s.options)),n.find(".postmeta-fc_end .fe-extrainfo-value").html(o.fullCalendar.formatDate(a.end,s.options.eventList.extDateFormat||"MMMM d, yyyy",s.options)),n.find(".postmeta-fc_end_time .fe-extrainfo-value").html(o.fullCalendar.formatDate(a.end,s.options.eventList.extTimeFormat||"h:mm tt",s.options)),n.find(".postmeta-fc_end_datetime .fe-extrainfo-value").html(o.fullCalendar.formatDate(a.end,s.options.eventList.extDateTimeFormat||"MMMM d, yyyy. h:mm tt",s.options)),0<n.find(".fc-button-social-panels").length){var r=n.find(".fc-button-social-panels");new_rhp_vars=r.data("rhp_vars"),new_rhp_vars.shareLink=a.url,new_rhp_vars.shareRedirectURI=a.url,r.data("rhp_vars",new_rhp_vars)}n.find(".fe-image-holder").RHCLink(a,o(t).closest(".fullCalendar").fullCalendar("getView")),original=o(t).replaceWith(n),n.parent().find(".ext-list-loading").fadeOut("fast")})}),o("BODY").trigger("dbox.loaded")}function O(e,t){return $.trigger.apply($,[e,t||E].concat(Array.prototype.slice.call(arguments,2),[E]))}function j(e,t){return e.start>t.start?1:e.start<t.start?-1:0}function L(e,t){return e.start<t.start?1:e.start>t.start?-1:0}E.name="rhc_event",E.render=function(e,t){var n=$.options.eventList.stack&&1==parseInt($.options.eventList.stack)||!1;E.direction=t,custom_delta=parseInt($.options.eventList.delta),custom_delta=isNaN(custom_delta)?0:custom_delta,date_changed=!1,n&&0<custom_delta&&E.first_date&&E.direction<0&&e>E.first_date&&(e=fc.cloneDate(E.first_date),date_changed=!0);0==E.direction?E.first_date=fc.cloneDate(e):E.direction<0&&E.first_date<e&&(E.first_date=fc.cloneDate(e));t&&0<custom_delta&&(fc.addDays(e,custom_delta*t),t=0);date_changed&&$.gotoDate(e);0<custom_delta?(start=fc.cloneDate(e,!0),end=fc.addDays(fc.cloneDate(start),custom_delta),_end=fc.cloneDate(end)):_end=!1;E.start=fc.cloneDate(e,!0),l||(R('<div class="fc-events-holder"></div>').appendTo(M),l=!0);E.oldView||(E.oldView=new R.fullCalendar.views.month(R("<div>"),$));E.oldView&&(custom_delta?E.oldView.render(fc.cloneDate(e),t):E.oldView.render(e,t),_end=!1===_end?fc.cloneDate(E.oldView.visEnd):_end,E.oldView.visStart&&E.oldView.visEnd&&(E.title=E.oldView.title,custom_delta?(E.start=fc.cloneDate(start),E.end=fc.cloneDate(end),E.visStart=fc.cloneDate(start),E.visEnd=fc.cloneDate(end)):(E.start=fc.cloneDate(E.oldView.start),E.end=fc.cloneDate(E.oldView.end),E.visStart=fc.cloneDate(E.oldView.start),E.visEnd=fc.cloneDate(E.oldView.visEnd)),$.options.eventList.TitleFormat&&($.options.eventList.TitleFormat=$.options.eventList.TitleFormat.replace(/&#91;/g,"["),$.options.eventList.TitleFormat=$.options.eventList.TitleFormat.replace(/&#93;/g,"]"),E.title=fc.formatDates(fc.cloneDate(E.visStart),fc.addDays(fc.cloneDate(_end),-1),$.options.eventList.TitleFormat,$.options))));if($.options.eventList.upcoming&&"1"==$.options.eventList.upcoming){var a=new Date;a.setHours(0,0,0),dayspast=$.options.widgetlist.dayspast||0,a.setDate(a.getDate()-parseInt(dayspast)),E.visStart=E.visStart.getTime()>a.getTime()?E.visStart:a}var r=$.options.eventList.monthsahead?$.options.eventList.monthsahead:"";if(0<(r=""==r.replace(" ","")?0<custom_delta?0:1:parseInt(r))){(o=new Date(E.visStart)).setMonth(o.getMonth()+r),E.visEnd=o}var i=$.options.eventList.daysahead?$.options.eventList.daysahead:"";if(0<(i=""==i.replace(" ","")?0:parseInt(i))){var o;(o=new Date(E.visStart)).setDate(o.getDate()+i-1),o.setHours(23,59,59),E.visEnd=o}if(parseInt($.options.eventList.auto)&&parseInt($.options.eventList.stack)){var s=R(M).parents(".rhc_holder").attr("id");void 0===R(document).data("rhc_event_scroll")&&(R(document).data("rhc_event_scroll",s),jQuery(document).scroll(function(){!function(e){if(!1===E.have_events)return;var t=R("#"+e+" .fc-view-rhc_event");if(t.is(":visible")&&!E.scroll_lockdown){var n=R(t).parents(".rhc_holder"),a=n.offset();if(window.mobile?paddingForMobile=1e3:paddingForMobile=0,R(window).scrollTop()+R(window).height()==R(document).height())E.scroll_lockdown=!0,R(t).parents(".rhc_holder").find(".fullCalendar").fullCalendar("next");else{var r=(r=$.options.eventList.scrolloffset&&""!=$.options.eventList.scrolloffset?$.options.eventList.scrolloffset:R(window).height()/2)-paddingForMobile;document_bottom=R(document).scrollTop()+R(window).height(),bottom_position=a.top+n.outerHeight(),document_bottom>bottom_position+r&&(E.scroll_lockdown=!0,R(t).parents(".rhc_holder").find(".fullCalendar").fullCalendar("next"))}}}(s)}))}},E.unselect=function(){},E.setHeight=function(e){M.css("min-height","200px"),M.css("height","auto")},E.setWidth=function(){},E.clearEvents=function(){},E.renderEvents=function(e,t){var n=R(".event_list_template").first().html(),l=R(n),d=l.find(".fc-event-list-item").clone().removeClass("fc-remove"),s=l.find(".fc-event-list-date").clone().removeClass("fc-remove"),a=l.find(".fc-event-list-no-events").clone().removeClass("fc-remove");$.options.eventList&&$.options.eventList.eventListNoEventsText&&a.find(".fc-no-list-events-message").html($.options.eventList.eventListNoEventsText);widget_templates=!1,$.options.eventList&&$.options.eventList.eventlist_template&&""!=$.options.eventList.eventlist_template&&0<R($.options.eventList.eventlist_template).length&&(widget_templates=!0,d=R($.options.eventList.eventlist_template).find(".rhc-widget-upcoming-item"));var r=!(!$.options.eventList.stack||"1"!=$.options.eventList.stack);if(r&&0<E.direction)var i=M.find(".fc-events-holder");else{i=M.find(".fc-events-holder").empty();E.rendered_events=[]}l.appendTo(i).find(".fc-remove").remove(),r&&R(i).find(".fc-event-list-no-events").parents(".fc-event-list-container").remove();if(0<e.length)if(E.have_events=!0,widget_templates){var c=$.options,f=$.options.widgetlist,o=e,h="#"+f.sel;f.dayspast=f.dayspast?f.dayspast:0;var p=R.fullCalendar.parseDate(f.end);if(!f.horizon||"hour"!=f.horizon&&"end"!=f.horizon){g=[];(v=new Date).setDate(v.getDate()-f.dayspast),f.historic&&""!=f.specific_date&&(v=R.fullCalendar.parseDate(f.specific_date));for(_=0;_<o.length;_++){var m=new Date(o[_].start);v.setHours(0,0,0,0),m.setHours(0,0,0,0),m.getTime()<v.getTime()||m.getTime()>p.getTime()||(g[g.length]=o[_])}o=g}else{var v,g=[];(v=new Date).setDate(v.getDate()-f.dayspast),f.historic&&"1"==f.historic&&(v=R.fullCalendar.parseDate(f.specific_date));for(var _=0;_<o.length;_++){if(o[_].end&&"end"==f.horizon){if(o[_].end.getTime()<v.getTime())continue}else if(o[_].start.getTime()<v.getTime())continue;o[_].start.getTime()>p.getTime()||(g[g.length]=o[_])}o=g}if(o.sort(_rhc_sort_events),f.premiere&&"1"==f.premiere){for(g=[],_=0;_<o.length;_++)o[_].premiere&&(g[g.length]=o[_]);o=g}else if(f.premiere&&"2"==f.premiere){var y=[];for(g=[],_=0;_<o.length;_++)-1<R.inArray(o[_]._id,y)||(y.push(o[_]._id),g.push(o[_]));o=g}o=o.slice(0,f.number);var w=[];R.each(o,function(e,t){var r=d.clone(),n=t,a=n.description.split(" ");a=a.slice(0,f.words),n.description=a.join(" "),f.using_calendar_url&&""!=f.using_calendar_url&&(n.url=f.using_calendar_url);var i=n.url,o=d.clone();o.find(".rhc-title-link").html(n.title).data("rhc_event",n).attr("href",i).end().find(".rhc-event-link").data("rhc_event",n).attr("href",i).end().find(".rhc-title-in-link").html(n.title).end().find(".rhc-description").html(n.description).end().find(".rhc-widget-date").html("").end().find(".rhc-widget-time").html("").end().find(".rhc-widget-end-date").html("").end().find(".rhc-widget-end-time").html("").end(),""!=f.fcdate_format&&(o.find(".rhc-widget-date").html(R.fullCalendar.formatDate(n.start,f.fcdate_format,c)),o.find(".rhc-widget-end-date").html(R.fullCalendar.formatDate(n.end,f.fcdate_format,c)),dstart=R.fullCalendar.formatDate(n.start,"yyyy-MM-dd",c),dend=R.fullCalendar.formatDate(n.end,"yyyy-MM-dd",c),0<Math.floor((Date.parse(dend)-Date.parse(dstart))/864e5)?(g=R.fullCalendar.formatDate(n.start,f.fcdate_format,c)+" &#8211; "+R.fullCalendar.formatDate(n.end,f.fcdate_format,c),o.find(".rhc-widget-date-range").html(g),o.find(".rhc-day_diff0").hide()):(o.find(".rhc-widget-date-range").html(R.fullCalendar.formatDate(n.start,f.fcdate_format,c)),o.find(".rhc-day_diff1").hide()));""==f.fctime_format||n.allDay||(o.find(".rhc-widget-time").html(R.fullCalendar.formatDate(n.start,f.fctime_format,c)),o.find(".rhc-widget-end-time").html(R.fullCalendar.formatDate(n.end,f.fctime_format,c))),n.allDay&&(o.addClass("fc-is-allday"),o.find(".rhc-widget-time").hide()),o.find(".rhc-date-start").each(function(e,t){R(t).html(R.fullCalendar.formatDate(n.start,R(t).html(),c))});var s=R.fullCalendar.formatDate(n.start,"yyyyMMdd",c);-1==R.inArray(s,w)?w.push(s):o.find(".hide-repeat-date").addClass("repeated-date"),1==f.showimage?(o.addClass("featured-1"),n.image&&n.image[0]&&""!=n.image[0]&&R("<a></a>").addClass("rhc-image-link").data("rhc_event",n).attr("href",i).append(R("<img></img>").attr("src",n.image[0])).appendTo(o.find(".rhc-widget-upcoming-featured-image"))):(o.addClass("featured-0"),o.find(".rhc-widget-upcoming-featured-image").remove()),R(o).find(".rhc-title-link,.rhc-event-link,.rhc-image-link").click(function(e){var t={url:n.url};return n.gotodate&&(t.gotodate=n.gotodate),n.event_rdate&&(t.event_rdate=n.event_rdate),_rhc_widget_link_click(t,this)}),(r=o).find(".fc-event-term").empty().hide().parent().addClass("rhc_event-empty-taxonomy"),t.terms&&0<t.terms.length&&R.each(t.terms,function(e,t){if(0<r.find(".taxonomy-"+t.taxonomy).parent().find("a").length&&r.find(".taxonomy-"+t.taxonomy).parent().append('<span class="rhc-event-list tax-term-divider"></span>'),t.name&&""!=t.name&&0<r.find(".taxonomy-"+t.taxonomy).length&&(""==t.url?R("<span>"+t.name+"</span>").appendTo(r.find(".taxonomy-"+t.taxonomy).show().parent().removeClass("rhc_event-empty-taxonomy")):R("<a>"+t.name+"</a>").attr("href",t.url).appendTo(r.find(".taxonomy-"+t.taxonomy).show().parent().removeClass("rhc_event-empty-taxonomy"))),0<r.find(".taxonomy-"+t.taxonomy+"-gaddress").length&&t.gaddress&&""!=t.gaddress){0<r.find(".taxonomy-"+t.taxonomy+"-gaddress").parent().find("a").length&&r.find(".taxonomy-"+t.taxonomy+"-gaddress").parent().append('<span class="rhc-event-list tax-term-divider"></span>');var n="http://www.google.com/maps?f=q&hl=en&source=embed&q="+escape(t.gaddress);R("<a>"+t.gaddress+"</a>").attr("href",n).attr("target","_blank").appendTo(r.find(".taxonomy-"+t.taxonomy+"-gaddress").show().parent().removeClass("rhc_event-empty-taxonomy").end())}for(var a in t)"taxonomy"!=a&&(term_property_value=t[a],0<r.find(".taxonomy-"+t.taxonomy+"-"+a).length&&""!=term_property_value&&R("<span>"+term_property_value+"</span>").appendTo(r.find(".taxonomy-"+t.taxonomy+"-"+a)))}),0<o.find(".move-out").length&&o.find(".move-out").appendTo(h),triggerRes=O("eventRender",t,t,o),!1===triggerRes||l.find(".fc-event-list-holder").append(o),O("loading",null,!1)})}else{$.options.widgetlist.dayspast=$.options.widgetlist.dayspast?$.options.widgetlist.dayspast:0,events=[];var b=new Date;if(b.setDate(b.getDate()-$.options.widgetlist.dayspast),R.each(e,function(e,t){if(r&&0<E.rendered_events.length)for(var n=0;n<E.rendered_events.length;n++)if(test_event=E.rendered_events[n],"function"==typeof test_event.start.getTime&&"function"==typeof t.start.getTime&&test_event.id==t.id&&test_event.start.getTime()==t.start.getTime())return;if(E.rendered_events.push(t),!($.options.eventList&&1==parseInt($.options.eventList.removeended)&&null!=t.end&&t.end<b)){if($.options.eventList&&"1"==$.options.eventList.outofrange){if(null!=t.end&&t.end<E.visStart)return}else{if(t.start<E.visStart)return;if(t.start>E.visEnd)return}events[events.length]=t}}),0==events.length)return;"1"==$.options.eventList.reverse?events.sort(L):events.sort(j);var k=[],C=!(!$.options.eventList.extendedDetails||"1"!=$.options.eventList.extendedDetails),x="";w=[];if(R.each(events,function(e,t){if(!(void 0!==$.options.eventList.display&&0<$.options.eventList.display&&e>=$.options.eventList.display)){var a=d.clone();t.gcal||""==t.url?a.find(".fc-event-list-title").parent().empty().append(R("<span></span>").addClass("fc-event-list-title").html(t.title)):t.direct_link?a.find(".fc-event-list-title").html(t.title).end().find("a.fc-event-link").attr("href",t.url).end():a.find(".fc-event-list-title").html(t.title).end().find("a.fc-event-link").attr("target","").attr("href","javascript:void(0);").bind("click",function(e){($.options.eventClick?$.options.eventClick:fc_click)(t,e,E)}).end();var n=!!t.local_feed;if(C&&n&&(a.find(".fe-extrainfo-container").addClass("skip-render").addClass("ext_det_"+t.id).hide().data("ev",t).before('<div class="ext-list-loading loading-events"><div class="ext-list-loading-1 ajax-loader loading-events"><div class="ext-list-loading-2x xspinner icon-xspinner-3"></div></div></div>'),-1==R.inArray(t.id,k)&&k.push(t.id)),a.find(".fc-event-list-description").html(t.description).end(),t.description&&""==t.description.replace(" ","")&&a.find(".fc-event-list-description").addClass("rhc-empty-description"),"none"==t.fc_click_link&&a.find("a.fc-event-link").addClass("fc-no-link"),t.image&&t.image[0]?a.find("img.fc-event-list-image").attr("src",t.image[0]):a.find(".fc-event-list-featured-image").empty(),t.allDay){a.find(".fc-time").remove(),a.find(".fc-end-time").remove();var r=$.options.eventList.extDateFormat||"dddd MMMM d, yyyy."}else{a.find(".fc-time").html(R.fullCalendar.formatDate(t.start,$.options.eventList.extTimeFormat||"h:mmtt")),a.find(".fc-end-time").html(R.fullCalendar.formatDate(t.end,$.options.eventList.extTimeFormat||"h:mmtt"));r=$.options.eventList.extDateFormat||"dddd MMMM d, yyyy."}if(t.start?a.find(".fc-start").html(R.fullCalendar.formatDate(t.start,r,$.options)):a.find(".fc-start").remove(),t.end?a.find(".fc-end").html(R.fullCalendar.formatDate(t.end,r,$.options)):a.find(".fc-end").parent().addClass("rhc_event-empty-taxonomy").end().remove(),a.find(".fc-event-link.fc-event-list-title").each(function(e,t){parseInt(RHC.disable_event_link)&&"javascript:void(0);"==R(t).attr("href")&&R(t).replaceWith(R(t).text())}),a.find(".fc-event-term").empty().hide().parent().addClass("rhc_event-empty-taxonomy"),t.terms&&0<t.terms.length&&R.each(t.terms,function(e,t){if(0<a.find(".taxonomy-"+t.taxonomy).parent().find("a").length&&a.find(".taxonomy-"+t.taxonomy).parent().append('<span class="rhc-event-list tax-term-divider"></span>'),t.name&&""!=t.name&&0<a.find(".taxonomy-"+t.taxonomy).length&&(""==t.url?R("<span>"+t.name+"</span>").appendTo(a.find(".taxonomy-"+t.taxonomy).show().parent().removeClass("rhc_event-empty-taxonomy").end()):R("<a>"+t.name+"</a>").attr("href",t.url).appendTo(a.find(".taxonomy-"+t.taxonomy).show().parent().removeClass("rhc_event-empty-taxonomy").end())),0<a.find(".taxonomy-"+t.taxonomy+"-gaddress").length&&t.gaddress&&""!=t.gaddress){0<a.find(".taxonomy-"+t.taxonomy+"-gaddress").parent().find("a").length&&a.find(".taxonomy-"+t.taxonomy+"-gaddress").parent().append('<span class="rhc-event-list tax-term-divider"></span>');var n="http://www.google.com/maps?f=q&hl=en&source=embed&q="+escape(t.gaddress);R("<a>"+t.gaddress+"</a>").attr("href",n).attr("target","_blank").appendTo(a.find(".taxonomy-"+t.taxonomy+"-gaddress").show().parent().removeClass("rhc_event-empty-taxonomy").end())}}),t.meta&&0<t.meta.length&&R.each(t.meta,function(e,t){h=".fc-event-meta-"+t[0],val=t[1],a.find(h).html(val).end()}),triggerRes=O("eventRender",t,t,a),!1===triggerRes);else{if($.options.eventList.ShowHeader&&1==parseInt($.options.eventList.ShowHeader)){var i=t.start;if(R.fullCalendar.formatDate(i,"yyyyMMdd")!=R.fullCalendar.formatDate(x,"yyyyMMdd")){x=i;var o=s.clone();o.find(".fc-event-list-date-header").html(R.fullCalendar.formatDate(t.start,$.options.eventList.DateFormat||"dddd MMMM d, yyyy",$.options)),l.find(".fc-event-list-holder").append(o)}}l.find(".fc-event-list-holder").append(a)}}}),0<k.length){void 0===$.extended_detail_cache&&($.extended_detail_cache={});var D=[];if(R.each(k,function(e,t){void 0===$.extended_detail_cache[t]&&D.push(t)}),0==D.length)S(R,k,l,$);else{url=RHC.ajaxurl,url+="?rhc_action=extended_details",0<k.length&&R.each(k,function(e,t){url=url+"&ids[]="+t}),ver=RHC.last_modified&&""!=RHC.last_modified?RHC.last_modified:b.getTime(),url=url+"&ver="+ver,queryString=url.substring(url.indexOf("?")+1),hash=CryptoJS.MD5(queryString),u=hash.toString(CryptoJS.enc.Hex),url=url+"&_="+u;var T={url:url,type:"GET",dataType:"html",not_used_data:{rhc_action:"extended_details",ids:k},success:function(n){R.each(k,function(e,t){0<R(n).find("."+t).length?$.extended_detail_cache[t]=R(n).find("."+t).clone():R(M).find(".skip-render.ext_det_"+t).removeClass("skip-render").removeClass("ext_det_"+t).fadeIn("fast").parent().find(".ext-list-loading").fadeOut("fast")}),S(R,k,l,$)},error:function(){R(M).find(".skip-render").show(),R(M).parent().find(".ext-list-loading").fadeOut("fast"),S(R,k,l,$)}};R.ajax(T)}}}else E.have_events=!1,l.find(".fc-event-list-holder").append(a),l.find(".fc-no-list-events-message").show();O("loading",null,!1)},E.trigger=O,E.viewChanged=function(e){if(e&&e.visStart&&e.visEnd){if(E.title=e.title,E.visStart=e.start,E.visEnd=e.visEnd,E.oldView=e,$.options.eventList.upcoming&&"1"==$.options.eventList.upcoming){var t=new Date;E.visStart=E.visStart.getTime()>t.getTime()?E.visStart:t}var n=$.options.eventList.monthsahead?$.options.eventList.monthsahead:"";if(0<(n=""==n.replace(" ","")?1:parseInt(n)))(a=new Date(E.visStart)).setMonth(a.getMonth()+n),E.visEnd=a;var a,r=$.options.eventList.daysahead?$.options.eventList.daysahead:"";if(0<(r=""==r.replace(" ","")?0:parseInt(r)))(a=new Date(E.visStart)).setDate(a.getDate()+r-1),a.setHours(23,59,59),E.visEnd=a}},E.beforeAnimation=function(e){},E.setEventData=function(e){},E.clearEventData=function(){},E.triggerEventDestroy=function(){},E.element=M,E.oldView=null,E.calendar=$,fc=R.fullCalendar,E.direction=0,E.first_date=null,E.scroll_lockdown=!1,E.loading=function(e,t,n){e?(E.scroll_lockdown=!0,R(t.element).parents(".rhc_holder").addClass("stacking-loading")):(E.scroll_lockdown=!1,R(t.element).parents(".rhc_holder").removeClass("stacking-loading"))},E.have_events=!1,E.rendered_events=[],$.options.eventList.daysahead&&parseInt($.options.eventList.delta)>parseInt($.options.eventList.daysahead)&&($.options.eventList.delta=$.options.eventList.daysahead)}R.fullCalendar.views.WeekEventList=function(o,s){var l,d=this,c=R.fullCalendar.addDays,f=R.fullCalendar.cloneDate,u=R.fullCalendar.formatDates;options=s.options,e.call(d,o,s),d.render=function(e,t){t&&c(e,7*t);var n=c(f(e),-(e.getDay()-function(e){return options[e]}("firstDay")+7)%7),a=c(f(n),7),r=f(n),i=f(a);s.options.titleFormat.week&&(s.options.titleFormat.week=s.options.titleFormat.week.replace(/&#91;/g,"["),s.options.titleFormat.week=s.options.titleFormat.week.replace(/&#93;/g,"]"),d.title=u(r,c(f(i),-1),s.options.titleFormat.week,s.options)),d.start=n,d.end=a,d.visStart=r,d.visEnd=i,l||(R('<div class="fc-events-holder"></div>').appendTo(o),l=!0)},d.viewChanged=function(){}},R.fullCalendar.views.rhc_event=e,R.fullCalendar.views.rhc_detail=function(n,t){var a,r=this;r.name="rhc_detail",r.render=function(e,t){r.start=e,a||(R('<div class="fc-detail-view-holder"><div class="fc-detail-view-content">TODO: a single event details. The button will be removed on the top right controls, and this view will be triggered when selecting an event.</div><div class="fc-detail-view-wp_footer" style="display:none;"></div></div>').appendTo(n),a=!0)},r.unselect=function(){},r.setHeight=function(e){n.css("min-height","200px"),n.css("height","auto")},r.setWidth=function(){},r.clearEvents=function(){R(".fc-detail-view-content").html("")},r.renderEvents=function(){var e={id:t.last_clicked_event.id};R.post(t.options.singleSource,e,function(e){"OK"==e.R&&(0==R("body .fc-single-item-holder").length&&R("body").append('<div class="fc-single-item-holder"></div>'),R("body .fc-single-item-holder").empty(),R(e.DATA.footer).each(function(e,t){if(t.nodeName&&"SCRIPT"==t.nodeName){var n=document.createElement("script");R(t).attr("type")&&(n.type=R(t).attr("type")||""),R(t).attr("src")?n.src=R(t).attr("src")||"":n.text=R(t).html()||"",document.body.appendChild(n)}else R("body .fc-single-item-holder").append(t)}),R(".fc-detail-view-content").html(e.DATA.body))},"json")},r.trigger=function(){},r.viewChanged=function(){},r.beforeAnimation=function(e){},r.element=n}}(jQuery);var CryptoJS=CryptoJS||function(s){function n(){}var e={},t=e.lib={},a=t.Base={extend:function(e){n.prototype=this;var t=new n;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=t.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||i).stringify(this)},concat:function(e){var t=this.words,n=e.words,a=this.sigBytes;if(e=e.sigBytes,this.clamp(),a%4)for(var r=0;r<e;r++)t[a+r>>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(a+r)%4*8;else if(65535<n.length)for(r=0;r<e;r+=4)t[a+r>>>2]=n[r>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=s.ceil(t/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(4294967296*s.random()|0);return new l.init(t,e)}}),r=e.enc={},i=r.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],a=0;a<e;a++){var r=t[a>>>2]>>>24-a%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],a=0;a<t;a+=2)n[a>>>3]|=parseInt(e.substr(a,2),16)<<24-a%8*4;return new l.init(n,t/2)}},o=r.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],a=0;a<e;a++)n.push(String.fromCharCode(t[a>>>2]>>>24-a%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],a=0;a<t;a++)n[a>>>2]|=(255&e.charCodeAt(a))<<24-a%4*8;return new l.init(n,t)}},d=r.Utf8={stringify:function(e){try{return decodeURIComponent(escape(o.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return o.parse(unescape(encodeURIComponent(e)))}},c=t.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,a=t.sigBytes,r=this.blockSize,i=a/(4*r);if(e=(i=e?s.ceil(i):s.max((0|i)-this._minBufferSize,0))*r,a=s.min(4*e,a),e){for(var o=0;o<e;o+=r)this._doProcessBlock(n,o);o=n.splice(0,e),t.sigBytes-=a}return new l.init(o,a)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});t.Hasher=c.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(e,t){return new n.init(t).finalize(e)}},_createHmacHelper:function(n){return function(e,t){return new f.HMAC.init(n,t).finalize(e)}}});var f=e.algo={};return e}(Math);function fc_mouseover(e,t,n){}function fc_event_details(h,p,m){h.id=h.id.replace(/[^a-zA-Z0-9]/g,"_"),h.gcal&&h.description&&(h.description=h.description.replace(/\n/g,"<br />")),jQuery(document).ready(function(a){var r=m.calendar.options.tooltip.target||"_self";h.fc_click_target&&(r=h.fc_click_target),m.calendar.rhc_search(m.calendar,p,!0);var e="fct-"+h.id;if(0<a("BODY").find("#"+e).length&&a("BODY").find("#"+e).remove(),0==a("BODY").find("#"+e).length&&a("BODY").find("#fct-item-template").clone().attr("id",e).addClass("fct-tooltip").bind("close-tooltip",function(e){a(this).animate({opacity:0},"fast","swing",function(e){a(this).remove()})}).find(".fc-close-tooltip a").on("click",function(e){a(".fct-tooltip").trigger("close-tooltip")}).end().appendTo("BODY"),0<a("BODY").find("#"+e).length){var t=a(p.target).offset(),n=m.element.offset(),i=t.left<n.left+m.element.width()/2,o=i?"fc-tip-left":"fc-tip-right";a(".fct-tooltip:not(#"+e+")").trigger("close-tooltip");var s=a("BODY").find("#"+e);if(a("BODY").trigger("rhc_tooltip_before_show",[h,s,m]),s.stop().addClass(o).find(".fc-description").html(h.description).end().css("opacity",0).show(),1!=parseInt(m.calendar.options.tooltip.excerpt)&&s.find(".fc-description").remove(),h.color&&s.css("border-left-color",h.color),h.source&&h.source.fc_click_target&&"_nolink"==h.source.fc_click_target&&(h.url=!1),parseInt(m.calendar.options.tooltip.image)||(h.image=!1),h.url){var l=h.url;if(h.fc_rrule&&h.fc_rrule,tooltip_click=function(e){jQuery("form#calendarizeit_repeat_instance").remove();if(-1!=h.url.indexOf("://www.facebook.com"))return!0;return jQuery('<form id="calendarizeit_repeat_instance" method="post"></form>').attr("target",r).attr("action",h.url).appendTo("BODY"),h.gotodate&&jQuery('<input type="hidden" name="gotodate" value="'+h.gotodate+'"/>').appendTo("form#calendarizeit_repeat_instance"),h.event_rdate&&jQuery('<input type="hidden" name="event_rdate" value="'+h.event_rdate+'" />').appendTo("form#calendarizeit_repeat_instance"),jQuery("form#calendarizeit_repeat_instance").submit(function(e){return e.stopPropagation(),!0}).submit(),!1},!!(m.calendar.options.tooltip&&m.calendar.options.tooltip.disableTitleLink&&"1"==m.calendar.options.tooltip.disableTitleLink)||h.gcal||"javascript:void(0);"==h.url)s.find(".fc-title").html(h.title);else if(h.direct_link)a("<a></a>").attr("href",l).html(h.title).attr("target",r).appendTo(s.find(".fc-title"));else{var d=a("<a></a>");-1!==l.indexOf(window.location.hostname)&&d.bind("click",tooltip_click),d.attr("href",l).html(h.title).html(h.title).attr("target",r).appendTo(s.find(".fc-title"))}h.image&&h.image[0]&&(disableTitleLink=void 0!==m.calendar.options.tooltip.disableTitleLink&&parseInt(m.calendar.options.tooltip.disableTitleLink),disableTitleLink?a("<img />").attr("src",h.image[0]).appendTo(s.find(".fc-image")):h.direct_link?a("<a></a>").attr("href",l).attr("target",r).append(a("<img />").attr("src",h.image[0])).appendTo(s.find(".fc-image")):a("<a></a>").attr("href",l).bind("click",tooltip_click).attr("target",r).append(a("<img />").attr("src",h.image[0])).appendTo(s.find(".fc-image")))}else s.find(".fc-title").html(h.title),h.image&&h.image[0]&&a("<img />").attr("src",h.image[0]).appendTo(s.find(".fc-image"));s.find(".fc-start,.fc-end,.fc-hide").hide(),h.allDay?(h.start&&s.find(".fc-start").append(a("<span></span>").html(a.fullCalendar.formatDate(h.start,m.calendar.options.tooltip.startDateAllDay,m.calendar.options))).show(),h.end&&s.find(".fc-end").append(a("<span></span>").html(a.fullCalendar.formatDate(h.end,m.calendar.options.tooltip.endDateAllDay||m.calendar.options.tooltip.startDateAllDay,m.calendar.options))).show()):(h.start&&s.find(".fc-start").append(a("<span></span>").html(a.fullCalendar.formatDate(h.start,m.calendar.options.tooltip.startDate,m.calendar.options))).show(),h.end&&s.find(".fc-end").append(a("<span></span>").html(a.fullCalendar.formatDate(h.end,m.calendar.options.tooltip.endDate||m.calendar.options.tooltip.startDate,m.calendar.options))).show()),h.terms&&0<h.terms.length&&a.each(h.terms,function(e,t){if(t.gaddress&&h.local_feed){var n=".fc-term-"+t.taxonomy+"-gaddress";0<s.find(n).find("a").length&&s.find(n).append('<span class="rhc-tooltip tax-term-divider"></span>'),a("<a></a>").attr("href","http://www.google.com/maps?f=q&hl=en&source=embed&q="+escape(t.gaddress)).html(t.gaddress).attr("target","_blank").appendTo(s.find(n).show())}0<s.find(".fc-tax-"+t.taxonomy).length&&(""==t.name?s.find(".fc-tax-"+t.taxonomy).hide():(0<s.find(".fc-tax-"+t.taxonomy).find("a").length&&s.find(".fc-tax-"+t.taxonomy).append('<span class="rhc-tooltip tax-term-divider"></span>'),t.gaddress&&0==h.local_feed?a("<a></a>").attr("href","http://www.google.com/maps?f=q&hl=en&source=embed&q="+escape(t.gaddress)).html(t.name).attr("target",r).appendTo(s.find(".fc-tax-"+t.taxonomy)):t.url&&""!=t.url&&m.calendar.options.tooltip.taxonomy_links?a("<a></a>").attr("href",t.url).html(t.name).attr("target",r).appendTo(s.find(".fc-tax-"+t.taxonomy)):a("<span></span>").html(t.name).appendTo(s.find(".fc-tax-"+t.taxonomy)),s.find(".fc-tax-"+t.taxonomy).find(".tax-label").html(t.taxonomy_label).end().show()))}),t.top=t.top-s.height()/2+a(p.srcElement).height()/2;var c=m.element.offset().top-t.top-5;0<c&&(t.top=t.top+c,s.find(".fct-arrow-holder").css("margin-top",-1*c)),t.left=i?t.left+a(p.target).width():t.left+-1*s.width(),"agendaDay"==m.name&&(t.left=t.left-s.width()+50),s.css("min-height","").css("height","auto").offset(t);var f=document.documentElement.clientWidth||window.innerWidth;client_right=a(document).scrollLeft()+f;var u=t.left+s.width();u>client_right&&(t.left=t.left-(u-client_right)-12,s.offset(t)),s.animate({opacity:1},"fast","swing"),s.unbind("mouseleave").bind("mouseleave",function(e){var t=this;return setTimeout(function(){if(a(t).is(":hover"))return!1;m.calendar.options.tooltip_on_hover&&"1"==m.calendar.options.tooltip_on_hover&&a(t).trigger("close-tooltip")},200),!0}),a("BODY").trigger("rhc_tooltip_after_show",[h,s,m])}})}function no_link(e,t,n){return t.stopPropagation(),!1}function fc_click_no_action(e,t,n){return t.stopPropagation(),!1}function fc_click(e,t,n){var a=e.fc_click_link?e.fc_click_link:"view";if(n&&"rhc_event"==n.name&&"view"==a&&(a="page"),"none"==a)return!1;if(void 0===e.fc_click_target&&(e.fc_click_target="_self"),e.url&&"page"==a){if("undefined"==typeof url)var r=!1;else r=-1==e.url.indexOf(window.location.hostname);if(e.fc_click_target&&""!=e.fc_click_target&&!r)return fc_event_links_to_page(e,t,n),!1;jQuery(this).prop("target",e.fc_click_target),jQuery("form#calendarizeit_external_link").remove();var i='<form id="calendarizeit_external_link" method="get" target="'+e.fc_click_target+'"></form>';return jQuery(i).attr("action",e.url).appendTo("BODY").submit(),!0}return fc_event_details(e,t,n),!1}function fc_event_links_to_page(e,t,n){jQuery("form#calendarizeit_repeat_instance").remove();var a='<form id="calendarizeit_repeat_instance" method="post" target="'+e.fc_click_target+'"></form>';jQuery(a).attr("action",e.url).appendTo("BODY"),e.gotodate&&jQuery('<input type="hidden" name="gotodate" value="'+e.gotodate+'"/>').appendTo("form#calendarizeit_repeat_instance"),e.event_rdate&&jQuery('<input type="hidden" name="event_rdate" value="'+e.event_rdate+'" />').appendTo("form#calendarizeit_repeat_instance"),jQuery("form#calendarizeit_repeat_instance").submit(function(e){return e.stopPropagation(),!0}).submit()}function fc_select(e,t,n,a,r){jQuery(document).ready(function(e){var t=e(a.target).offset(),n=e(a.target).width();e(".fc-dialog").CalendarizeDialog("open",{offset:t,margin_left:n})})}function _add_param_to_url(e,t,n){if("javascript:void(0);"==e)return e;var a="",r=e.split("#");2==r.length?(e=r[0],hash="#"+r[1]):hash="";var o=(d=e.split("?"))[0],s=d[1],l="";if(s){var d=s.split("&");for(i=0;i<d.length;i++)d[i].split("=")[0]!=t&&(a+=l+d[i],l="&")}return o+"?"+a+(l+""+t+"="+n)+hash}function _add_repeat_instance_data_to_url(e){if(e.repeat_instance&&(e.fc_rrule&&""!=e.fc_rrule||e.fc_rdate&&""!=e.fc_rdate))if(e.using_calendar_url)(t=jQuery.fullCalendar.formatDate(e.start,"yyyy-MM-dd"))&&""!=t&&(e.url=_add_param_to_url(e.url,"gotodate",t));else if(e.src_start&&e.fc_date_time&&e.src_start==e.fc_date_time);else{var t=jQuery.fullCalendar.formatDate(e.start,"yyyyMMddHHmmss"),n=jQuery.fullCalendar.formatDate(e.end,"yyyyMMddHHmmss");t&&""!=t&&(n&&""!=n&&(t=t+","+n),e.url=""==e.url?"":_add_param_to_url(e.url,"event_rdate",t))}return e}function _add_repeat_instance_data_to_event(e){if(e.repeat_instance&&(e.fc_rrule&&""!=e.fc_rrule||e.fc_rdate&&""!=e.fc_rdate))if(e.using_calendar_url)(t=jQuery.fullCalendar.formatDate(e.start,"yyyy-MM-dd"))&&""!=t&&(e.gotodate=t);else if(e.src_start&&e.fc_date_time&&e.src_start==e.fc_date_time);else{var t=jQuery.fullCalendar.formatDate(e.start,"yyyyMMddHHmmss"),n=jQuery.fullCalendar.formatDate(e.end,"yyyyMMddHHmmss");t&&""!=t&&(n&&""!=n&&(t=t+","+n),e.event_rdate=t,e.url=""==e.url?"":_add_param_to_url(e.url,"event_rdate",e.event_rdate))}return e}function exdate_to_array_of_dates(e){if(void 0===e)return[];var t=""==e?[]:e.split(",");if(0<t.length){var n=[];for(a=0;a<t.length;a++){var r=t[a];n[n.length]=new Date(r.substring(0,4),r.substring(4,6)-1,r.substring(6,8),r.substring(9,11),r.substring(11,13),r.substring(13,15))}return n}return[]}function init_rhc(){jQuery(document).ready(function($){init_sc_ical_feed(),$("BODY").bind("dbox.loaded",function(){init_sc_ical_feed()}),$(".rhc_holder").each(function(i,el){var ui_theme=$(el).data("rhc_ui_theme");""!=ui_theme&&$("#fullcalendar-theme-css").attr("href",ui_theme);var id=$(el).attr("id");if(RHC.rhc_options[id])$(el).Calendarize(RHC.rhc_options[id]);else{var rhc_options=$(el).data("rhc_options");eval("$(el).Calendarize("+rhc_options+")")}}),$(".fc-button-custom").hover(function(){$(this).addClass("fc-state-hover")},function(){$(this).removeClass("fc-state-hover")}),$(window).resize(function(){$(".rhcalendar.not-widget .fullCalendar ").each(function(e,t){set_fc_small(t)})}),$("BODY").data("rhc_tooltip_before_show")||$("BODY").data("rhc_tooltip_before_show",!0).bind("rhc_tooltip_before_show",rhc_tooltip_before_show),$("BODY").data("rhc_tooltip_contend_loaded")||$("BODY").data("rhc_tooltip_contend_loaded",!0).bind("rhc_tooltip_contend_loaded",rhc_tooltip_contend_loaded),$(".rhc-next").on("click",function(e){})})}function init_sc_ical_feed(){jQuery(document).ready(function(l){0<l(".rhc-ical-feed-cont").length&&l(".rhc-ical-feed-cont").each(function(e,t){if("1"!=l(t).data("sc_ical_feed_init")){l(t).data("sc_ical_feed_init","1");function n(e,t){l(e).width(l(e).data("width"));var n=l(t.target).offset(),a=l(t.target).width();l(e).removeClass("ical-tooltip-holder").addClass("ical-tooltip").CalendarizeDialog("open",{offset:n,margin_left:a})}var a=this,r=l(this).parent(),i=l(this).data("icalendar_button"),o=l(this).attr("data-theme");l(this).attr("data-title");l(a).find(".ical-close").unbind("click").click(function(e){l(a).CalendarizeDialog("close")});var s=l("<span class='fc-button fc-button-icalendar "+o+"-state-default '><span class='fc-button-inner'><span class='fc-button-content'>"+i+"</span><span class='fc-button-effect'><span></span></span></span></span>");s&&(s.click(function(e){s.hasClass(o+"-state-disabled")||n(a,e)}).mousedown(function(){s.not("."+o+"-state-active").not("."+o+"-state-disabled").addClass(o+"-state-down")}).mouseup(function(){s.removeClass(o+"-state-down")}).hover(function(){s.not("."+o+"-state-active").not("."+o+"-state-disabled").addClass(o+"-state-hover")},function(){s.removeClass(o+"-state-hover").removeClass(o+"-state-down")}).appendTo(r),s.addClass(o+"-corner-left"),s.addClass(o+"-corner-right"))}})})}function init_rhc_date_local_tz(){jQuery(document).ready(function(i){(new Date).getTimezoneOffset();i(".rhc-local-tz .rhc_date").each(function(e,t){var n=i(t).closest(".rhc-local-tz").data("format_options");n="object"==typeof n?n:null;var a=i(t).data("udate");if(a){var r=i(t).data("fc_date_format");r&&i(t).html(jQuery.fullCalendar.formatDate(new Date(1e3*a),r,n)).addClass("rhc-local-tz-rend")}})})}function get_event_ocurrences(e){var t=jQuery.fullCalendar.parseDate(e.start);if(e.fc_rrule=""==e.fc_rrule?"FREQ=DAILY;INTERVAL=1;COUNT=1":e.fc_rrule,scheduler=new Scheduler(t,e.fc_rrule,!0),""!=e.fc_interval&&e.fc_exdate){var n=exdate_to_array_of_dates(e.fc_exdate);0<n.length&&scheduler.add_exception_dates(n)}if(e.fc_rdate&&""!=e.fc_rdate){var a=exdate_to_array_of_dates(e.fc_rdate);0<a.length&&scheduler.add_rdates(a)}occurrences=scheduler.occurrences_between(start,end)}function set_fc_small(e){if(jQuery(e).parent().hasClass("not-widget")){var t,n=parseInt(jQuery(e).width());if(mobile_width=RHC.mobile_width||480,0<n&&n<=mobile_width)"agendaWeek"==(t=jQuery(e).fullCalendar("getView")).name&&(jQuery(e).data("restore_agenda_week",!0),jQuery(e).fullCalendar("changeView","basicWeek")),"agendaDay"==t.name&&(jQuery(e).data("restore_agenda_day",!0),jQuery(e).fullCalendar("changeView","basicDay")),jQuery(e).parent().addClass("fc-small"),jQuery(e).find("td:first-child").each(function(e,t){jQuery(t).find("> div").css("min-height","")});else jQuery(e).parent().removeClass("fc-small"),"basicWeek"==(t=jQuery(e).fullCalendar("getView")).name&&jQuery(e).data("restore_agenda_week")&&(jQuery(e).data("restore_agenda_week",!1),jQuery(e).fullCalendar("changeView","agendaWeek")),"basicDay"==t.name&&jQuery(e).data("restore_agenda_day")&&(jQuery(e).data("restore_agenda_day",!1),jQuery(e).fullCalendar("changeView","agendaDay"))}}function rhc_tooltip_before_show(n,a,r,i){return jQuery(document).ready(function(t){if(a.tooltip_details&&(RHC.tooltip_details[a.id]=t(a.tooltip_details).clone()),i.calendar.options.tooltip.enableCustom&&(a.local_feed||a.network&&"rhc_json_feed"==a.network))if(r.find(".fct-dbox").hide(),RHC.tooltip_details[a.id]&&"loading"==RHC.tooltip_details[a.id])setTimeout(function(){rhc_tooltip_before_show(n,a,r,i)},200);else if(RHC.tooltip_details[a.id]){if(!0===RHC.tooltip_details[a.id])return r.find(".fct-dbox").show(),!0;r.find(".fct-dbox").empty().show().append(RHC.tooltip_details[a.id].clone()),a.allDay?(a.start&&r.find(".postmeta-fc_start .fe-extrainfo-value,.postmeta-fc_start_datetime .fe-extrainfo-value").html(t.fullCalendar.formatDate(a.start,i.calendar.options.tooltip.startDateAllDay,i.calendar.options)),a.end&&r.find(".postmeta-fc_end .fe-extrainfo-value,.postmeta-fc_end_datetime .fe-extrainfo-value").html(t.fullCalendar.formatDate(a.end,i.calendar.options.tooltip.endDateAllDay||i.calendar.options.tooltip.startDateAllDay,i.calendar.options))):(a.start&&r.find(".postmeta-fc_start .fe-extrainfo-value,.postmeta-fc_start_datetime .fe-extrainfo-value").html(t.fullCalendar.formatDate(a.start,i.calendar.options.tooltip.startDate,i.calendar.options)),a.end&&r.find(".postmeta-fc_end .fe-extrainfo-value,.postmeta-fc_end_datetime .fe-extrainfo-value").html(t.fullCalendar.formatDate(a.end,i.calendar.options.tooltip.endDate||i.calendar.options.tooltip.startDate,i.calendar.options))),r.find(".rhc_date").each(function(e,t){field=jQuery(t).data("fc_field"),date_format=jQuery(t).data("fc_date_format"),(value=a[field])&&jQuery(t).html(jQuery.fullCalendar.formatDate(value,date_format,i.calendar.options))}),t("BODY").trigger("rhc_tooltip_contend_loaded",[n,a,r,i])}else t.post(RHC.ajaxurl,{rhc_action:"rhc_tooltip_detail",id:a.id,event_rdate:a.event_rdate},function(e){0<t(e).find(".fe-extrainfo-holder").length?(RHC.tooltip_details[a.id]=t(e).clone(),rhc_tooltip_before_show(n,a,r,i)):RHC.tooltip_details[a.id]=!0},"html")}),!0}function cb_event_mouseover(n,e,a){return jQuery(document).ready(function(t){if(a.calendar.options.tooltip.enableCustom&&n.local_feed)if(RHC.tooltip_details[n.id]);else{RHC.tooltip_details[n.id]="loading",url=RHC.ajaxurl,tmp=decodeURIComponent(url),res=tmp.split("?"),1<res.length?url=url+"&rhc_action=rhc_tooltip_detail&id="+n.id+"&event_rdate="+n.event_rdate:url=url+"?rhc_action=rhc_tooltip_detail&id="+n.id+"&event_rdate="+n.event_rdate;var e=new Date;ver=RHC.last_modified&&""!=RHC.last_modified?RHC.last_modified:e.getTime(),url=url+"&ver="+ver,queryString=url.substring(url.indexOf("?")+1),hash=CryptoJS.MD5(queryString),u=hash.toString(CryptoJS.enc.Hex),url=url+"&_="+u,t.get(url,{},function(e){0<t(e).find(".fe-extrainfo-holder").length?RHC.tooltip_details[n.id]=t(e).clone():RHC.tooltip_details[n.id]=!0},"html")}}),!0}function rhc_tooltip_contend_loaded(e){init_sc_ical_feed()}function calendar_widget_day_click(e,t,n,a,r,i,o){var s=jQuery(o).find(".rhc_calendar_widget_day_click_holder");return 0<s.children().length?s.children().fadeOut("fast",function(){_calendar_widget_day_click(e,t,n,a,r,i,o)}):_calendar_widget_day_click(e,t,n,a,r,i,o),!0}function _calendar_widget_day_click(e,t,n,o,a,v,s){if(client_events=jQuery("#"+v.calendar_id).find(".fullCalendar").fullCalendar("clientEvents"),0<client_events.length){var r=[],i=[],l=jQuery.fullCalendar.cloneDate(e);l.setHours(0,0,0),jQuery.each(client_events,function(e,t){if(ev_uid=t.id+"-"+t._start.getTime(),-1==jQuery.inArray(ev_uid,r)){var n=jQuery.fullCalendar.cloneDate(t._start);n.setHours(0,0,0),n.getTime()==l.getTime()&&(r.push(ev_uid),i.push(t))}}),i.sort(_rhc_sort_events);var d=jQuery(s).find(".rhc_calendar_widget_day_click_holder"),c=jQuery(s).find(".rhc_calendar_widget_day_click_template").children();d.empty(),jQuery.each(i,function(e,p){p.fc_click_link="page";var m=c.clone();m.find(".rhc_title").append(jQuery(jQuery("<span></span>").html(p.title)).RHCLink(p,o)),jQuery(s).is(".rhc-image-full")?p.image_full&&p.image_full[0]&&m.find(".rhc_featured_image").append(jQuery(jQuery("<img />").attr("src",p.image_full[0])).RHCLink(p,o)):p.image&&p.image[0]&&m.find(".rhc_featured_image").append(jQuery(jQuery("<img />").attr("src",p.image[0])).RHCLink(p,o)),m.find(".rhc_date").each(function(e,t){field=jQuery(t).data("fc_field"),date_format=jQuery(t).data("fc_date_format"),(value=p[field])&&jQuery(t).html(jQuery.fullCalendar.formatDate(value,date_format,v))}),p.allDay&&m.find(".rhc-event-time").hide(),m.find(".rhc_description").html(p.description),p.terms&&0<p.terms.length&&jQuery.each(p.terms,function(e,t){if(0<m.find(".taxonomy-"+t.taxonomy).parent().find("a").length&&m.find(".taxonomy-"+t.taxonomy).parent().append('<span class="rhc-event-list tax-term-divider"></span>'),t.name&&""!=t.name&&0<m.find(".taxonomy-"+t.taxonomy).length&&(""==t.url?jQuery("<span>"+t.name+"</span>").appendTo(m.find(".taxonomy-"+t.taxonomy).show().parent().removeClass("rhc_event-empty-taxonomy")):jQuery("<a>"+t.name+"</a>").attr("href",t.url).appendTo(m.find(".taxonomy-"+t.taxonomy).show().parent().removeClass("rhc_event-empty-taxonomy"))),0<m.find(".taxonomy-"+t.taxonomy+"-gaddress").length&&t.gaddress&&""!=t.gaddress){0<m.find(".taxonomy-"+t.taxonomy+"-gaddress").parent().find("a").length&&m.find(".taxonomy-"+t.taxonomy+"-gaddress").parent().append('<span class="rhc-event-list tax-term-divider"></span>');var n="http://www.google.com/maps?f=q&hl=en&source=embed&q="+escape(t.gaddress);jQuery("<a>"+t.gaddress+"</a>").attr("href",n).attr("target","_blank").appendTo(m.find(".taxonomy-"+t.taxonomy+"-gaddress").show().parent().removeClass("rhc_event-empty-taxonomy").end())}});var t=p.color||p.source.color||"",n=p.textColor||p.source.textColor||"";n=n.length<=1?"#ffffff":n,1<t.length&&1<n.length&&m.find(".rhc-widget-event-list-date").css("background-color",t).css("color",n),v.widget_autoclick&&1==parseInt(v.widget_autoclick)?m.find(".rhc-widget-event-list-head").parents(".rhc-widget-event-list").addClass("open").find(".rhc-widget-event-list-body").show():m.find(".rhc-widget-event-list-head").unbind("click").bind("click",function(e){var t=jQuery(this).parents(".rhc-widget-event-list");t.toggleClass("open"),t.is(".open")?t.find(".rhc-widget-event-list-body").slideDown("fast"):t.find(".rhc-widget-event-list-body").slideUp("fast")}),v.widget_autohover&&1==parseInt(v.widget_autohover)?m.find(".rhc-widget-event-list-head").addClass("hover"):m.find(".rhc-widget-event-list-head").mouseenter(function(){jQuery(this).addClass("hover")}).mouseleave(function(){jQuery(this).removeClass("hover")});var a=p.local_id||0;if(0<a){var r=v.events_source+v.events_source_query,i=(r=r.replace("get_calendar_events","get_icalendar_events"))+"&ics=1";i=i+"&ID="+a,m.find(".rhc-icon-ical").click(function(e){window.open(i,"_self")})}p.terms&&0<p.terms.length&&jQuery.each(p.terms,function(e,t){var n=t.glon||!1,a=t.glat||!1,r=t.gaddress||!1,i="",o=m.find(".rhc-map-view"),s=o.data("size"),l=o.data("zoom"),d=o.data("maptype"),c=p.color||p.source.color||"";if(c=1<c.length?c.toUpperCase(c).replace("#","0x"):"blue",!1!==n&&!1!==a?i="http://maps.googleapis.com/maps/api/staticmap?center="+a+","+n+"&zoom="+l+"&size="+s+"&maptype="+d+"&markers=color:"+c+"%7C"+a+","+n:!1!==r&&""!=r&&(i="http://maps.googleapis.com/maps/api/staticmap?center="+escape(r)+"&zoom="+l+"&size="+s+"&maptype="+d+"&markers=color:"+c+"%7C"+escape(r)),""!=i&&"none"!=v.widget_google_map)if(m.find(".rhc-icon-map").unbind("click").bind("click",function(e){var t=m.find(".rhc-map-view .sws-gmap3-cont");if(t.data("gmap_inited"));else if(0<m.find(".rhc-map-view .sws-gmap3-cont").length){t.data("gmap_inited",!0),ratio=m.find(".rhc-map-view").data("ratio"),arr=ratio.split(":"),ratio=arr[1]/arr[0],w=m.find(".rhc-map-view").width(),h=w*ratio,t.height(h);var n=t.data("maptype"),a=t.data("uid"),r=t.data("address");return void rhc_gmap3_init({glat:t.data("glat"),glon:t.data("glon"),zoom:t.data("zoom"),disableDefaultUI:!1,map_type:google.maps.MapTypeId[n],uid:a,name:"",info_windows:"sws-gmap3-info-"+a,markers:"#sws-gmap3-marker-"+a,address:r,scrollwheel:1,traffic:!1})}jQuery(this).parents(".rhc-widget-event-list").find(".rhc-map-view").slideToggle("fast")}).show(),"static"==v.widget_google_map)""!=i&&m.find(".rhc-map-view").empty().hide().append(jQuery("<img />").attr("src",i));else if("interactive"==v.widget_google_map){var f='<div class="sws-gmap3-frame"><div id="map_canvas{uid}" class="sws-gmap3-cont"></div></div><div id="sws-gmap3-marker-{uid}" class="sws-gmap3-marker">|||::</div><div class="sws-gmap3-marker"><div id="sws-gmap3-info-{uid}" >{info_windows}</div></div>',u=p.id+"-"+p.start.getTime();f=(f=f.replace(/\{uid\}/g,u)).replace(/\{info_windows\}/g,t.name),m.find(".rhc-map-view").empty().append(f),m.find(".rhc-map-view .sws-gmap3-cont").data("glat",a).data("glon",n).data("zoom",l).data("maptype",d).data("uid",u).data("address",r)}}),"undefined"!=typeof rhp_vars&&(0<m.find(".rhc-icon-facebook").length&&m.find(".rhc-icon-facebook").show().unbind("click").bind("click",function(e){e.preventDefault(),FB.init({appId:rhp_vars.fb_appID,status:!0,cookie:!0,version:"v2.4"});var t={method:"share",href:p.url,link:p.url,name:p.title,caption:p.title,description:p.description};FB.ui(t,function(e){})}),0<m.find(".rhc-icon-twitter").length&&m.find(".rhc-icon-twitter").show().unbind("click").bind("click",function(e){encodeURIComponent(p.url),encodeURIComponent(p.description);var t="https://twitter.com/share?&url="+p.url+"&text="+p.title+"&counturl="+p.url;window.open(t,"Twitter","width=660,height=400,scrollbars=no;resizable=no")}),0<m.find(".rhc-icon-linkedin").length&&m.find(".rhc-icon-linkedin").show().unbind("click").bind("click",function(e){var t=encodeURIComponent(p.url),n="http://www.linkedin.com/shareArticle?mini=true&url="+t+"&title="+encodeURIComponent(p.title)+"&summary="+encodeURIComponent(p.description)+t+"&source="+encodeURIComponent(p.url);window.open(n,"LinkedIn","width=660,height=400,scrollbars=no;resizable=no")}),0<m.find(".rhc-icon-googleplus").length&&m.find(".rhc-icon-googleplus").show().unbind("click").bind("click",function(e){var t="https://plus.google.com/share?url="+encodeURIComponent(p.url);window.open(t,"Google+","width=660,height=400,scrollbars=no;resizable=no")})),m.hide(),d.append(m.fadeIn("fast"))}),jQuery("BODY").trigger("dbox.loaded")}}function _rhc_sort_events(e,t){return e.start>t.start?1:e.start<t.start?-1:0}function btn_tax_dropdown(e,t){}function dayclick_tooltip_evenlits(e,t,n,a,r,i){console.log("day click",e,i)}function rhc_console(){console&&console.log.apply(console,arguments)}!function(i){function C(e,t,n,a,r,i,o){return((e=e+(t&n|~t&a)+r+o)<<i|e>>>32-i)+t}function x(e,t,n,a,r,i,o){return((e=e+(t&a|n&~a)+r+o)<<i|e>>>32-i)+t}function D(e,t,n,a,r,i,o){return((e=e+(t^n^a)+r+o)<<i|e>>>32-i)+t}function T(e,t,n,a,r,i,o){return((e=e+(n^(t|~a))+r+o)<<i|e>>>32-i)+t}for(var e=CryptoJS,t=(a=e.lib).WordArray,n=a.Hasher,a=e.algo,M=[],r=0;r<64;r++)M[r]=4294967296*i.abs(i.sin(r+1))|0;a=a.MD5=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var a=e[o=t+n];e[o]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}n=this._hash.words;var r,i,o=e[t+0],s=(a=e[t+1],e[t+2]),l=e[t+3],d=e[t+4],c=e[t+5],f=e[t+6],u=e[t+7],h=e[t+8],p=e[t+9],m=e[t+10],v=e[t+11],g=e[t+12],_=e[t+13],y=e[t+14],w=e[t+15],b=n[0],k=T(k=T(k=T(k=T(k=D(k=D(k=D(k=D(k=x(k=x(k=x(k=x(k=C(k=C(k=C(k=C(k=n[1],i=C(i=n[2],r=C(r=n[3],b=C(b,k,i,r,o,7,M[0]),k,i,a,12,M[1]),b,k,s,17,M[2]),r,b,l,22,M[3]),i=C(i,r=C(r,b=C(b,k,i,r,d,7,M[4]),k,i,c,12,M[5]),b,k,f,17,M[6]),r,b,u,22,M[7]),i=C(i,r=C(r,b=C(b,k,i,r,h,7,M[8]),k,i,p,12,M[9]),b,k,m,17,M[10]),r,b,v,22,M[11]),i=C(i,r=C(r,b=C(b,k,i,r,g,7,M[12]),k,i,_,12,M[13]),b,k,y,17,M[14]),r,b,w,22,M[15]),i=x(i,r=x(r,b=x(b,k,i,r,a,5,M[16]),k,i,f,9,M[17]),b,k,v,14,M[18]),r,b,o,20,M[19]),i=x(i,r=x(r,b=x(b,k,i,r,c,5,M[20]),k,i,m,9,M[21]),b,k,w,14,M[22]),r,b,d,20,M[23]),i=x(i,r=x(r,b=x(b,k,i,r,p,5,M[24]),k,i,y,9,M[25]),b,k,l,14,M[26]),r,b,h,20,M[27]),i=x(i,r=x(r,b=x(b,k,i,r,_,5,M[28]),k,i,s,9,M[29]),b,k,u,14,M[30]),r,b,g,20,M[31]),i=D(i,r=D(r,b=D(b,k,i,r,c,4,M[32]),k,i,h,11,M[33]),b,k,v,16,M[34]),r,b,y,23,M[35]),i=D(i,r=D(r,b=D(b,k,i,r,a,4,M[36]),k,i,d,11,M[37]),b,k,u,16,M[38]),r,b,m,23,M[39]),i=D(i,r=D(r,b=D(b,k,i,r,_,4,M[40]),k,i,o,11,M[41]),b,k,l,16,M[42]),r,b,f,23,M[43]),i=D(i,r=D(r,b=D(b,k,i,r,p,4,M[44]),k,i,g,11,M[45]),b,k,w,16,M[46]),r,b,s,23,M[47]),i=T(i,r=T(r,b=T(b,k,i,r,o,6,M[48]),k,i,u,10,M[49]),b,k,y,15,M[50]),r,b,c,21,M[51]),i=T(i,r=T(r,b=T(b,k,i,r,g,6,M[52]),k,i,l,10,M[53]),b,k,m,15,M[54]),r,b,a,21,M[55]),i=T(i,r=T(r,b=T(b,k,i,r,h,6,M[56]),k,i,w,10,M[57]),b,k,f,15,M[58]),r,b,_,21,M[59]),i=T(i,r=T(r,b=T(b,k,i,r,d,6,M[60]),k,i,v,10,M[61]),b,k,s,15,M[62]),r,b,p,21,M[63]);n[0]=n[0]+b|0,n[1]=n[1]+k|0,n[2]=n[2]+i|0,n[3]=n[3]+r|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,a=8*e.sigBytes;t[a>>>5]|=128<<24-a%32;var r=i.floor(n/4294967296);for(t[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t[14+(a+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process(),t=(e=this._hash).words,n=0;n<4;n++)a=t[n],t[n]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);return e},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),e.MD5=n._createHelper(a),e.HmacMD5=n._createHmacHelper(a)}(Math),function($){var methods={init:function(e){if(void 0!==e){var n=$.extend({editable:!1,mode:"view"},e);return $(".fc-dialog").CalendarizeDialog(),this.each(function(){if(!$(this).data("Calendarize")){if($(this).data("Calendarize",n).Calendarize("mode",n.mode),0==$(this).find(".rhc-sidelist").length&&($('<div class="rhc-sidelist-holder"><div class="rhc-sidelist-tab"><div class="rhc-sidelist-tab-label"></div></div><div class="rhc-sidelist-head"></div><div class="rhc-sidelist"></div></div>').appendTo(this),$(this).find(".rhc-sidelist-tab").click(function(e){$(this).parents(".rhc-sidelist-holder").toggleClass("sidelist-open")}),parseInt(n.modes[n.mode].options.sidelist.open)&&$(this).find(".rhc-sidelist-tab").trigger("click")),0==$(this).find("fullCalendar > .fc-head-control").length){var e=".fc-header";0<$(this).find(e).length&&($(this).find(e).after('<div class="fc-head-control rh-flat-ui"><div class="tax_filter_nav"><a href="#" class="tax_filter_previous btn btn-small btn-taxfilter fui-arrow-left"></a></div><div class="tax_filter_holder_viewport"><div class="tax_filter_holder"></div></div></div>'),$(this).find(".tax_filter_previous").click(function(e){var t=$(this).parents(".fc-head-control").find(".tax_filter_holder");if(t.stop(!1,!0),0<t.find(".tax_filter_item_holder").length){var n=t.find(".tax_filter_item_holder").first();n.stop(!1,!0);var a=-1*n.outerWidth(!0),r=n.css("opacity");n.animate({opacity:0},400,"swing"),t.animate({"margin-left":a},500,"swing",function(){n.stop(!1,!0).appendTo(t).css("opacity",r),$(this).css("margin-left",0)})}}))}0==$(this).find(".fc-lower-head-tools").length&&($(this).find(".fc-header").after('<div class="fc-lower-head-tools"></div>'),0==$(this).find(".fc-lower-head-tools .fc-filters-dialog").length&&$(this).find(".fc-filters-dialog-holder .fc-filters-dialog").clone().appendTo($(this).find(".fc-lower-head-tools")));var t=.6*parseInt($(this).find(".fc-content").innerHeight());t=t<300?300:t,$(this).find(".fc-lower-head-tools .fc-filters-dialog").find(".fbd-unchecked").css("max-height",t+"px"),$(this).find(".fc-filters-dialog .fbd-tabs").on("click",function(e){$(this).parent().parent().find(".fbd-tabs").removeClass("fbd-active-tab").end().find(".fbd-tabs-panel").hide().end().find($(this).find("a").data("tab-target")).show(),$(this).addClass("fbd-active-tab")}).first().trigger("click"),$(this).find('.fbd-cell input[type="checkbox"]').attr("checked",!1),$(this).find('.fbd-cell input[type="checkbox"]').on("click",function(e){if($(this).is(":checked"))var t=$(this).parent().parent().parent().parent().find(".fbd-checked");else t=$(this).parent().parent().parent().parent().find(".fbd-unchecked");r($(this).parent().parent(),t)}),$(this).find(".fullCalendar .fbd-dg-apply,.fullCalendar .fbd-dg-remove").attr("rel",$(this).attr("id")),$(this).find(".fullCalendar .fbd-dg-apply").on("click",function(e){return methods.apply_filter.apply($(this),[])}),$(this).find(".fbd-close-tooltip a").unbind("click").click(function(e){$(this).parents(".fullCalendar").find(".fc-button-rhc_search").trigger("click")}),$(this).find(".fullCalendar .fbd-dg-remove").on("click",function(e){$(this).parents(".rhc_holder").find("input[name=s]").val("").trigger("change"),$("#"+$(this).attr("rel")).find("input[type=checkbox].fbd-filter").each(function(e,t){if(void 0!==$(t).attr("checked")){$(t).attr("checked",!1);var n=$(this).parent().parent().parent().parent().find(".fbd-unchecked");r($(this).parents(".fbd-cell"),n)}}).end().find(".fbd-dg-apply").trigger("click"),$(this).closest(".fullCalendar").fullCalendar("gotoDate",$(this).closest(".fullCalendar").data("starting_date")),$(this).parents(".fullCalendar").find(".fc-button-rhc_search").trigger("click")}),$(this).find(".fullCalendar .fc-header").on("click",function(e){$(".fct-tooltip").trigger("close-tooltip")}),$(document).keyup(function(e){27==e.keyCode&&($(".fct-tooltip").trigger("close-tooltip"),$(".fc-filters-dialog:visible").stop().find(".fbd-unchecked").css("overflow-y","hidden").end().animate({opacity:0,top:-10},"fast","linear",function(){$(this).hide()}))}),0==$(this).find("fc-view-loading-bottom").length&&$(this).find(".fullCalendar .fc-footer").before($('<div class="fc-view-loading-bottom"></div>').append($('<div class="fc-view-loading-bottom-1"><div class="fc-view-loading-bottom-2 fc-next-arrow"></div></div>').click(function(e){$(this).parents(".rhc_holder").find(".fullCalendar").fullCalendar("next")}))),$(this).trigger("rhc_loaded")}})}function r(e,t){if(e.hasClass("fbd-cell")||(e=e.parents(".fbd-cell")),t.hasClass("fbd-checked"))var n={opacity:0,left:-30};else n={opacity:0,left:30};var r="linear",i="fast";if(0==t.find(".fbd-cell").length)$(e).animate(n,i,r,function(){$(this).appendTo(t).css("left",-1*n.left).animate({opacity:1,left:0})});else{var o=t.find(".fbd-cell");if(parseInt($(e).data("tab-index"))>parseInt($(o[o.length-1]).data("tab-index")))$(e).animate(n,i,r,function(){$(this).appendTo(t).css("left",-1*n.left).animate({opacity:1,left:0})});else if(parseInt($(e).data("tab-index"))<parseInt($(o[0]).data("tab-index")))$(e).animate(n,i,r,function(){$(o[0]).before(e).prev().css("left",-1*n.left).animate({opacity:1,left:0})});else for(a=0;a<o.length;a++){var s=o[a];if(parseInt($(e).data("tab-index"))>parseInt($(o[a]).data("tab-index"))&&parseInt($(e).data("tab-index"))<parseInt($(o[a+1]).data("tab-index"))){$(e).animate(n,i,r,function(){$(s).after($(this).css("left",-1*n.left).animate({opacity:1,left:0}))});break}}}}},mode:function(e){var r=this,t=$(this).data("Calendarize");if(t&&t.modes){var i=$.extend(t.common,t.modes[e].options);preload_events(this,i),i.for_widget?(i.eventRender=function(e,t,n){return cb_event_render(a,!0,e,t,n,i)},i.eventAfterAllRender=function(e){return hide_widget_event_list(a,!1,null,null,e,i),cb_event_render_all(a,!0,null,null,e,i)},i.dayClick=function(e,t,n,a){return cb_dayclick(e,t,n,a,i,r)}):(i.eventRender=function(e,t,n){return"rhc_grid"!=n.name&&$(".fc-event-title",t).html(e.title),cb_event_render(a,!1,e,t,n,i)},i.eventAfterAllRender=function(e){return cb_event_render_all(a,!1,null,null,e,i)}),i.loading=function(e,t){return cb_events_loading(r,this,e,t,a,i)},i.eventDataTransform=function(e){if(e.start&&e.start.getFullYear){e.terms||(e.terms=[]);var t=parseInt(e.start.getMonth()),n={filter_type:"AND",term_priority:t,description:$.fullCalendar.formatDate(e.start,"MMMM",i),taxonomy:"core_month",taxonomy_label:i.tax_filter_label&&i.tax_filter_label.month?i.tax_filter_label.month:"month",slug:$.fullCalendar.formatDate(e.start,"M",i)};e.terms.unshift(n);var a=e.start.getFullYear();n={filter_type:"AND",term_priority:parseInt(a),description:a,taxonomy:"core_year",taxonomy_label:i.tax_filter_label&&i.tax_filter_label.year?i.tax_filter_label.year:"year",slug:parseInt(a)};if(e.terms.unshift(n),e.end){for(year_end=e.end.getFullYear(),current_year=a,r=0;r++<10&&year_end>current_year;){current_year++;n={filter_type:"AND",term_priority:parseInt(current_year),description:current_year,taxonomy:"core_year",taxonomy_label:i.tax_filter_label&&i.tax_filter_label.year?i.tax_filter_label.year:"year",slug:parseInt(current_year)};e.terms.unshift(n)}if(month_end=parseInt(e.end.getMonth()),start_date=new Date(a,t,15,0,0,0,0),end_date=new Date(year_end,month_end,15,0,0,0,0),current_date=new Date(new Date(start_date).setMonth(start_date.getMonth()+1)),end_date.getTime()>start_date.getTime())for(var r=0;r<11;r++){n={filter_type:"AND",term_priority:parseInt(current_date.getMonth()),description:$.fullCalendar.formatDate(current_date,"MMMM",i),taxonomy:"core_month",taxonomy_label:i.tax_filter_label&&i.tax_filter_label.month?i.tax_filter_label.month:"month",slug:$.fullCalendar.formatDate(current_date,"M",i)};if(e.terms.unshift(n),!(end_date.getTime()>current_date.getTime()))break;current_date=new Date(new Date(current_date).setMonth(current_date.getMonth()+1))}}}return e};i.eventSources=[],"1"!=i.json_only&&i.eventSources.push(function(e,t,n){$.fn.Calendarize.events_source(e,t,n,i)}),i.json_feed&&0<i.json_feed.length&&("1"==i.json_only&&(i.events=null,i.singleSource=null),i.json_feed&&0<i.json_feed.length&&$.each(i.json_feed,function(e,a){if(a.rhc_feed&&"1"==a.rhc_feed){i.eventSources[i.eventSources.length]=function(e,t,n){$.fn.Calendarize.rhc_feed_src(e,t,n,a,i)}}else{i.eventSources[i.eventSources.length]=function(e,t,n){$.fn.Calendarize.ext_events_source(e,t,n,a,i)}}})),i.viewRender=function(e,t){cb_view_display(i.for_widget,a,e,t)},i.eventMouseover=function(e,t,n){cb_event_mouseover(e,t,n),i.tooltip_on_hover&&"1"==i.tooltip_on_hover&&"view"==e.fc_click_link&&$(t.target).closest("a").click(),$(t.target).closest("a").addClass("event-hovered")},i.eventMouseout=function(e,t,n){$(t.target).closest("a").removeClass("event-hovered")},i.select&&"function"==typeof window[i.select]&&(i.select=window[i.select],i.selectable=!!parseInt(i.selectable),i.selectHelper=!!parseInt(i.selectHelper)),i.calendar_id=$(this).attr("id"),f=$(this).find(".fullCalendar").fullCalendar(i),t.editable&&0==f.find(".fc-edit-tools").length&&f.prepend('<div class="fc-edit-tools"></div>'),0==f.find(".fc-footer").length&&(f.append('<div class="fc-footer"></div>'),i.icalendar_align&&$(".fc-footer").css("text-align",i.icalendar_align).addClass("dlg-align-"+i.icalendar_align)),i.header&&0==(i.header.center+i.header.left+i.header.right).length&&($(this).find(".fc-header").css("display","none"),$(this).find(".fc-edit-tools").css("display","none"),$(this).find(".fc-head-control").css("display","none"),$(this).find(".fc-lower-head-tools").css("display","none"),$(this).find(".fc-header").attr("hello",1));var n=f.find(".fc-footer"),a=f,o=i.theme?"ui":"fc";if(0<$(".ical-tooltip-template").length){var s=$(".ical-tooltip-template").first().data("button_text");add_footer_button({calendar:f,calendarize:r,e:n,tm:o,label:s,buttonName:"icalendar",buttonClick:ical_footer_button_click})}i.gotodate&&""!=i.gotodate&&$(this).find(".fullCalendar").fullCalendar("gotoDate",$.fullCalendar.parseDate(i.gotodate)),$(this).find(".fullCalendar").data("starting_date",$(this).find(".fullCalendar").fullCalendar("getDate")),render_tax_filters.apply(this,[i])}},destroy:function(){return this.each(function(){var e=$(this),t=e.data("Calendarize");$(window).unbind(".Calendarize"),t.Calendarize.remove(),e.removeData("Calendarize")})},apply_filter:function(d){return d=void 0===d||d,this.each(function(){var e="#"+$(this).attr("rel");$(e+" .fullCalendar").find(".bg_matched").each(function(e,t){$(t).css("background-color",$(t).data("original_bg")||"")});var a=[];$(e+" .fullCalendar").find(".fbd-filter-group").each(function(e,t){var n=[];$(t).find("input[type=checkbox].fbd-filter:checked").each(function(e,t){n[n.length]=$(t).val()}),0<n.length&&(a[a.length]={taxonomy:$(this).data("taxonomy"),terms:n.join(","),terms_array:n})});var t=$(e).data("Calendarize"),r=t.modes[t.mode].options;r.calendar_id=$(e).attr("id");var n=$(e+" .fullCalendar"),i=n.fullCalendar("getView");i.clear_events=!0,"rhc_year"==i.name&&(i.clearEvents(),n.find(".fc-have-event").removeClass("fc-have-event"));var o="";if(a&&$.each(a,function(e,t){r.replace_square_brackets?o+="&tax%5B"+t.taxonomy+"%5D="+t.terms:o+="&tax["+t.taxonomy+"]="+t.terms}),$(e).find(".fc-lower-head-tools  input[name=s]").length){var s=$(e).find(".fc-lower-head-tools  input[name=s]").val();""!=s&&(o+="&s="+escape(s))}r.events_source_query_original=r.events_source_query_original?r.events_source_query_original:r.events_source_query,""!=o?(n.fullCalendar("removeEventSources"),r.events_source_query=r.events_source_query_original+o):(n.fullCalendar("removeEventSources"),r.events_source_query=r.events_source_query_original);if(n.fullCalendar("addEventSource",function(e,t,n){$.fn.Calendarize.events_source(e,t,n,r)}),0==a.length)r.json_feed&&0<r.json_feed.length&&$.each(r.json_feed,function(e,a){if(a.rhc_feed&&"1"==a.rhc_feed){n.fullCalendar("addEventSource",function(e,t,n){$.fn.Calendarize.rhc_feed_src(e,t,n,a,r)})}else{n.fullCalendar("addEventSource",function(e,t,n){$.fn.Calendarize.ext_events_source(e,t,n,a,r)})}});else{var l=[];$.each(a,function(e,a){$.each(a.terms_array,function(e,n){r.json_feed&&0<r.json_feed.length&&$.each(r.json_feed,function(e,t){if(!(-1<$.inArray(t,l))&&t.terms&&0<t.terms.length)for(e=0;e<t.terms.length;e++)if(t.terms[e].taxonomy==a.taxonomy&&t.terms[e].slug==n)return void(-1==$.inArray(t,l)&&l.push(t))})})}),$.each(l,function(e,a){if(a.rhc_feed&&"1"==a.rhc_feed){n.fullCalendar("addEventSource",function(e,t,n){$.fn.Calendarize.rhc_feed_src(e,t,n,a,r)})}else{n.fullCalendar("addEventSource",function(e,t,n){$.fn.Calendarize.ext_events_source(e,t,n,a,r)})}})}"rhc_gmap"!=i.name&&"rhc_grid"!=i.name||(i.clear_events=!0,$(this).closest(".fullCalendar").fullCalendar("gotoDate",$(this).closest(".fullCalendar").data("starting_date"))),d&&$(this).parents(".fullCalendar").find(".fc-button-rhc_search").trigger("click"),$(this).closest(".fullCalendar").find(".fc-no-list-events-message").hide()})}};$.fn.Calendarize=function(e){return methods[e]?methods[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.Calendarize"):methods.init.apply(this,arguments)};var rhc_events_cache=[];function allday_group(e,t){return _allday_group=void 0!==t.allday_group&&0<parseInt(t.allday_group)?parseInt(t.allday_group):0,0<_allday_group&&$.each(e,function(e,t){void 0!==t.color&&""!=t.color&&(1==_allday_group?t.title='<span style="display:none;">'+t.color+"</span>"+t.title:2==_allday_group&&void 0!==t.menu_order&&(t.title='<span style="display:none;">'+parseInt(t.menu_order)+"</span>"+t.title))}),e}function preload_events(o,fc_options){fc_options.preload&&$(o).find(".rhc-preload").length&&$(o).find(".rhc-preload").each(function(i,el){if(!$(el).data("preloaded")){$(el).data("preloaded",!0);try{if(cache=$(el).data("request"),cache=eval(cache),cache)if($(el).data("events")?(tmp_events=$(el).data("events"),data=eval(tmp_events)):data=$.parseJSON($(el).html()),external_source=$(el).data("external_source")||!1,"OK"==data.R){if(cache.url=$(el).data("url"),!in_rhc_events_cache(cache.start,cache.end,cache.url)){cache.events=data.EVENTS;var events=[];start=new Date(1e3*cache.start),end=new Date(1e3*cache.end),events=rhc_events_to_fc_events(start,end,data,!0),events=handle_local_tz(events,fc_options,data),cache.events=events,rhc_events_cache[rhc_events_cache.length]=cache}}else if(external_source&&"object"==typeof data&&(cache.url=$(el).data("url"),!in_rhc_events_cache(cache.start,cache.end,cache.url))){cache.events=data.EVENTS;var events=data;start=new Date(1e3*cache.start),end=new Date(1e3*cache.end),events=handle_local_tz(events,fc_options,data),cache.events=events,rhc_events_cache[rhc_events_cache.length]=cache}}catch(e){}}})}function in_rhc_events_cache(e,t,n){for(var a=0;a<rhc_events_cache.length;a++)if(rhc_events_cache[a].start<=e&&rhc_events_cache[a].end>=t&&rhc_events_cache[a].url==n)return!0;return!1}function handle_local_tz(e,t,n){if(local_tz="local_tz"in t?parseInt(t.local_tz):0,0==local_tz)return e;if("GMT_OFFSET"in n){var a=-1*n.GMT_OFFSET*60;if(a==(new Date).getTimezoneOffset())return e;for(var r=0;r<e.length;r++)if(!e[r].allDay){"object"==typeof e[r].start&&(e[r].start=date_change_offset(e[r].start,a)),"object"==typeof e[r]._start&&(e[r]._start=date_change_offset(e[r]._start,a)),"object"==typeof e[r].end&&(e[r].end=date_change_offset(e[r].end,a)),"object"==typeof e[r]._end&&(e[r]._end=date_change_offset(e[r]._end,a));var i=jQuery.fullCalendar.formatDate(e[r].start,"yyyyMMddHHmmss"),o=jQuery.fullCalendar.formatDate(e[r].end,"yyyyMMddHHmmss");i&&""!=i&&(o&&""!=o&&(i=i+","+o),e[r].event_rdate=i,e[r].url=""==e[r].url?"":_add_param_to_url(e[r].url,"event_rdate",e[r].event_rdate))}}return e}function date_change_offset(e,t){return new Date(e.getTime()-6e4*(e.getTimezoneOffset()-t))}function handle_field_map(a){return a.MAP&&0<a.MAP.length&&a.EVENTS&&0<a.EVENTS.length&&(new_events=[],jQuery.each(a.EVENTS,function(e,n){new_ev={},jQuery.each(a.MAP,function(e,t){n[t[0]]&&(new_ev[t[1]]=n[t[0]])}),void 0===new_ev.allDay&&(new_ev.allDay=!1),new_ev.terms&&0<new_ev.terms.length&&(new_terms=[],jQuery.each(new_ev.terms,function(e,t){new_terms[e]="object"==typeof t?t:a.TERMS[t]}),new_ev.terms=new_terms,new_terms=[],jQuery.each(new_ev.terms,function(e,n){new_term={},jQuery.each(a.MAP,function(e,t){n[t[0]]&&(new_term[t[1]]=n[t[0]])}),new_terms[new_terms.length]=new_term}),new_ev.terms=new_terms),new_events[new_events.length]=new_ev}),a.EVENTS=new_events),a}function rhc_events_to_fc_events(s,u,e,h){var p=[];if(0<(e=handle_field_map(e)).EVENTS.length&&$(e.EVENTS).each(function(e,l){if(l.premiere=!0,l.description=void 0===l.description?"":l.description,l.local_feed=void 0===l.local_feed?h:l.local_feed,(!l.color||""==l.color||"#"==l.color)&&l.terms&&0<l.terms.length)for(var t=0;t<l.terms.length;t++){var n=!!(l.terms[t].background_color&&1<l.terms[t].background_color.length)&&l.terms[t].background_color,a=!!(l.terms[t].color&&1<l.terms[t].color.length)&&l.terms[t].color;if((n=(a=n&&!1===a?"#fff":a)&&!1===n?"#fff":n)&&a){l.color=n,l.textColor=a;break}}if(void 0!==l.start&&null!=l.start)if(l.src_start=l.start,l.fc_rrule=l.fc_rrule?l.fc_rrule:"",""==l.fc_rrule&&""==l.fc_rdate)p[p.length]=l;else{var d=!1,c=new Date($.fullCalendar.parseDate(l.start));if(l.end){var r=new Date($.fullCalendar.parseDate(l.end));d=r.getTime()-c.getTime()}var i=$.fullCalendar.parseDate(l.start);l.fc_rrule=""==l.fc_rrule?"FREQ=DAILY;INTERVAL=1;COUNT=1":l.fc_rrule;try{if(scheduler=new Scheduler(i,l.fc_rrule,!0),""!=l.fc_interval&&l.fc_exdate){var o=exdate_to_array_of_dates(l.fc_exdate);0<o.length&&scheduler.add_exception_dates(o)}var f=!1;if(l.fc_rdate&&""!=l.fc_rdate)0<(f=exdate_to_array_of_dates(l.fc_rdate)).length&&scheduler.add_rdates(f),fc_rdate_arr_str=l.fc_rdate.split(",");occurrences=scheduler.occurrences_between(s,u),0<occurrences.length&&$(occurrences).each(function(e,t){var n=new Date(t),a=$.fullCalendar.formatDate(n,"yyyyMMdd'T'HHmmss"),r=$.extend(!0,{},l);r.premiere=n.getTime()==c.getTime(),r._start=n,r.start=n,r.fc_start=$.fullCalendar.formatDate(n,"yyyy-MM-dd"),r.fc_start_time=$.fullCalendar.formatDate(n,"HH:mm:ss"),r.fc_date_time=$.fullCalendar.formatDate(n,"yyyy-MM-dd HH:mm:ss");var i=!1;if(f&&0<f.length&&f.find(function(e){return e.getTime()==n.getTime()})&&(i=!0,end_str=fc_rdate_arr_str.reduce(function(e,t){return a==t.split("/")[0]?t.split("/")[1]:e},!1)),i&&end_str)r.end=new Date(end_str.substring(0,4),end_str.substring(4,6)-1,end_str.substring(6,8),end_str.substring(9,11),end_str.substring(11,13),end_str.substring(13,15)),r._end=r.end;else if(d){var o=n.getTime()+d,s=new Date;s.setTime(o),r._end=s,r.end=s,r.fc_end=$.fullCalendar.formatDate(s,"yyyy-MM-dd"),r.fc_end_time=$.fullCalendar.formatDate(s,"HH:mm:ss")}else r.end=r.start,r._end=r._start;r.repeat_instance=!0,(r=_add_repeat_instance_data_to_event(r)).id=r.id+"-"+n.getTime(),p[p.length]=r}),c<=s&&s<r&&(l.start=c,l.end=r,l.id=l.id+"-"+l.start.getTime(),p[p.length]=l)}catch(e){console.log(e.message,l)}}}),0<p.length&&!p[0].local_feed){p.sort(_rhc_sort_events);var a=[];$(p).each(function(e,t){if(!t.local_feed){if(0<a.length)for(var n=0;n<a.length;n++)if(cev=a[n],t.id==cev.id&&t.start.getTime()==cev.start.getTime()&&t.network==cev.network)return!0;a.push(t)}}),p=a}return p}$.fn.Calendarize.rhc_feed_src=function(o,s,l,d,c){jQuery(document).ready(function(e){for(var t=new Date,n=RHC.last_modified&&""!=RHC.last_modified?RHC.last_modified:t.getTime(),a={start:Math.round(o.getTime()/1e3),end:Math.round(s.getTime()/1e3),_:n,"data[]":[]},r=0;r<rhc_events_cache.length;r++)if(rhc_events_cache[r].start<=a.start&&rhc_events_cache[r].end>=a.end&&rhc_events_cache[r].url==d.url)return parseInt(c.debugjs)&&rhc_console("rhc_feed_src.  Loading from rhc_events_cache."),void l(rhc_events_cache[r].events);var i=a;i.url=d.url,e.post(d.url,a,function(e){if("OK"==e.R){var t;t=rhc_events_to_fc_events(o,s,e,!1),i.events=t,in_rhc_events_cache(i.start,i.end,i.url)||(rhc_events_cache[rhc_events_cache.length]=i),l(t)}else e.R},"json")})},$.fn.Calendarize.ext_events_source=function(o,s,l,d,c){jQuery(document).ready(function(e){for(var t=new Date,n=RHC.last_modified&&""!=RHC.last_modified?RHC.last_modified:t.getTime(),a={start:Math.round(o.getTime()/1e3),end:Math.round(s.getTime()/1e3),_:n,"data[]":[]},r=0;r<rhc_events_cache.length;r++)if(rhc_events_cache[r].start<=a.start&&rhc_events_cache[r].end>=a.end&&rhc_events_cache[r].url==d.url)return parseInt(c.debugjs)&&rhc_console("rhc_feed_src.  Loading from rhc_events_cache."),void l(rhc_events_cache[r].events);var i=a;i.url=d.url,e.post(d.url,a,function(e){i.events=e,in_rhc_events_cache(i.start,i.end,i.url)||(rhc_events_cache[rhc_events_cache.length]=i),l(i.events)},"json")})},$.fn.Calendarize.events_source=function(d,c,f,u){jQuery(document).ready(function(i){var o=[];i(".calendarize_meta_data").each(function(e,t){"checkbox"==t.type?o[o.length]=[t.name,i(t).is(":checked")?1:0]:o[o.length]=[t.name,i(t).val()]});var n=u.events_source+u.events_source_query;"undefined"!=typeof icl_lang?n+="&lang="+icl_lang:"undefined"!=typeof icl_vars&&icl_vars.current_language&&(n+="&lang="+icl_vars.current_language),u.calendar_id&&""!=u.calendar_id?(vo=i("#"+u.calendar_id).find(".fullCalendar").fullCalendar("getView"),view_name=vo.name):view_name="";for(var e=new Date,t=RHC.last_modified&&""!=RHC.last_modified?RHC.last_modified:e.getTime(),a={start:Math.round(d.getTime()/1e3),end:Math.round(c.getTime()/1e3),rhc_shrink:u.shrink?parseInt(u.shrink):"",view:view_name,ver:t,_:"","data[]":o},r=0;r<rhc_events_cache.length;r++)if(rhc_events_cache[r].start<=a.start&&rhc_events_cache[r].end>=a.end&&rhc_events_cache[r].url==n)return parseInt(u.debugjs)&&rhc_console("Loading from rhc_events_cache."),void f(rhc_events_cache[r].events);var s=a;function l(e){if(null===e||"object"!=typeof e)return!1;if("OK"==e.R){var t=[];t=allday_group(t=handle_local_tz(t=rhc_events_to_fc_events(d,c,e,!0),u,e),u),s.events=t,in_rhc_events_cache(s.start,s.end,s.url)||(rhc_events_cache[rhc_events_cache.length]=s),f(t)}else e.R}n=(s.url=n)+"&start="+a.start+"&end="+a.end+"&rhc_shrink="+a.rhc_shrink+"&view="+a.view+"&ver="+a.ver,0<o.length&&i.each(o,function(e,t){n=(n=n+"&data["+e+"][0]="+t[0])+"&data["+e+"][1]="+t[1]}),queryString=n.substring(n.indexOf("?")+1),hash=CryptoJS.MD5(queryString),a._=hash.toString(CryptoJS.enc.Hex),n=n+"&_="+a._,i.ajax({url:n,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",cache:!0,success:function(e){l(e)},error:function(e,t,n){if("parsererror"==t){var a=!1;try{response=e.responseText.replace(/<!--[\s\S]*?-->/g,""),l(o=i.parseJSON(response)),a=!0}catch(e){}if(!a)try{if(j=e.responseText.indexOf('{"R":'),0<j){var r=e.responseText;r=r.substring(j),l(o=i.parseJSON(r)),a=!0}else-1==j&&console.log("RHC:ajax response is not valid.  Try using the Api url option in the troubleshooting section")}catch(e){}a||console.log("RHC:Could not recover data from bad ajax response; try turning on the option Catch php warnings in troubleshooting.  Or disable php warnings.")}}})})},$.fn.RHCLink=function(t,e){var n=e,a=e.calendar,r=a.options,i=($.extend({eventClick:"fc_click"},r),t.fc_click_target||"_self");return t.gcal||""==t.url?$(this):t.direct_link?$(this).wrap($("<a></a>").attr("href",t.url).attr("target",i)).parent():$(this).wrap($("<a></a>").attr("target",i).attr("href",t.url).unbind("click").bind("click",function(e){return(a.options.eventClick?a.options.eventClick:fc_click)(t,e,n)})).parent()};var sidelist_events=[];function cb_event_render(e,t,n,a,r,i){if(e||(e=$(r.element).parents(".fullCalendar")),$("body").trigger("cb_event_render_begin",[e,t,n,a,r,i]),showothermonth=i&&i.showothermonth?parseInt(i.showothermonth):1,showothermonth=r&&r.name&&"month"==r.name?showothermonth:1,"month"==r.name&&$(a).parents(".rhcalendar.not-widget").hasClass("fc-small")&&(showothermonth=0),0==showothermonth&&n.start&&n.end&&r.start&&r.end){if(n.end.getTime()<r.start.getTime())return!1;if(n.start.getTime()>=r.end.getTime())return!1}if(0==showothermonth&&n.start&&null==n.end&&r.start&&r.end){if(n.start.getTime()<r.start.getTime())return!1;if(n.start.getTime()>=r.end.getTime())return!1}if(event_skip=i&&i.event_skip?parseInt(i.event_skip):0,event_skip&&(void 0===r.event_skip&&(r.event_skip=event_skip),0<r.event_skip))return r.event_skip--,!1;if(1==parseInt(i.upcoming)){var o=new Date;if(n.allDay&&o.setHours(0,0,0,0),n.start.getTime()<o.getTime())return!1}if(norepeat=r.get_norepeat?r.get_norepeat(i.norepeat||!1):i.norepeat||!1,norepeat=parseInt(norepeat),n&&n.local_id?tmp_id=n.local_id:tmp_id=n.id,norepeat&&r&&n&&tmp_id){if(r.rendered=r.rendered?r.rendered:[],-1!=$.inArray(tmp_id,r.rendered))return!1;r.rendered.push(tmp_id)}if(i.taxonomycolor&&"1"==i.taxonomycolor&&n.terms){var s=[];$.each(n.terms,function(e,t){str="tax_"+t.taxonomy+"_"+t.slug,str=str.replace(/ /g,"_"),s.push(str)}),0<s.length&&$(a).addClass(s.join(" "))}if(n.venue_directory&&"rhc_gmap"!=r.name)return!1;if("rhc_gmap"==r.name&&n.start)if(1==parseInt(i.gmap_view.upcoming)){if(n.start.getTime()<r.visStart.getTime())return!1}else if(n.end&&2==parseInt(i.gmap_view.upcoming)&&n.end.getTime()<r.visStart.getTime())return!1;var l=$(e).data("rhc_tax_filters");if(l&&0<l.length){var d=!0,c=[],f=[];if($.each(n.terms,function(e,n){$.each(l,function(e,t){-1==$.inArray(t.taxonomy,f)&&f.push(t.taxonomy),t.taxonomy==n.taxonomy&&(n.gaddress&&n.gaddress==t.term?(d=!1,c.push(n.taxonomy)):n.description&&n.description==t.term?(d=!1,c.push(n.taxonomy)):n.name&&n.name==t.term&&(d=!1,c.push(n.taxonomy)))})}),!d&&0<f.length&&$.each(f,function(e,t){-1==$.inArray(t,c)&&(d=!0)}),d)return!1}if(max_events=i&&i.max_events?parseInt(i.max_events):0,max_events){if(void 0===r.max_events&&(r.max_events=max_events,r.rendered_events_count=0),r.rendered_events_count>=r.max_events)return!1;r.rendered_events_count++}if(t){var u=0;if(n.start&&n.end){var h=new Date(n.start),p=new Date(n.end);h.setHours(0,0,0,0),p.setHours(0,0,0,0),u=Math.floor((p.getTime()-h.getTime())/864e5)}var m=n._start.getDate();if(0==u)$(r.element).find(".fc-day-number").each(function(e,t){m==$(t).html()&&(n.start.getMonth()==r.start.getMonth()?$(t).parent().parent().hasClass("fc-other-month")||$(t).parent().parent().addClass("fc-state-highlight").addClass("fc-have-event").css("background-image","none"):$(t).parent().parent().hasClass("fc-other-month")&&$(t).parent().parent().addClass("fc-state-highlight").addClass("fc-have-event").css("background-image","none"))});else{h=new Date(n.start),p=new Date(n.start);h.setHours(0,0,0),p.setHours(23,59,59),$(r.element).find(".fc-day-number").each(function(e,t){current_date_str=$(t).closest(".fc-day").data("date"),current_date=new Date(current_date_str+"T00:00:00Z"),current_date.setTime(current_date.getTime()+60*h.getTimezoneOffset()*1e3),current_date.getTime()<=p.getTime()&&current_date.getTime()>=h.getTime()&&$(t).parent().parent().addClass("fc-state-highlight").addClass("fc-have-event").css("background-image","none")})}return!1}if(sidelist_events.push(n),i.matchBackground&&"1"==i.matchBackground){loop_date=new Date(n._start),compare_date=n._end||n._start;for(var v=0;loop_date<=compare_date&&(sel=".fc-day[data-date='"+$.fullCalendar.formatDate(loop_date,"yyyy-MM-dd")+"']",original_bg=$(r.element).find(sel).css("background-color"),$(r.element).find(sel).data("original_bg",original_bg).addClass("bg_matched").css("background-color",$(a).length&&$(a).get(0).tagName&&$(a).css("background-color")||""),loop_date.setDate(loop_date.getDate()+1),!(5e3<v++)););}if(render_something=!1,i.month_event_image&&"1"==i.month_event_image&&"month"==r.name&&n.month_image&&n.month_image[0]&&(loop_date=new Date(n._start),sel=".fc-day[data-date='"+$.fullCalendar.formatDate(loop_date,"yyyy-MM-dd")+"']",ratio=n.month_image[2]/n.month_image[1],container_w=r.element.find(sel).outerWidth(),_w=container_w,_h=_w*ratio,$(a).addClass("has-fc-image").find(".fc-event-inner").prepend($("<div></div>").addClass("fc-image-cont").append($("<img />").attr("src",n.month_image[0]).attr("height",parseInt(_h)).css("height",parseInt(_h)).addClass("fc-image"))),render_something=!0),"month"==r.name){if(i.render_events=void 0===i.render_events?1:i.render_events,0==parseInt(i.render_events)){if(!render_something)return!1;$(a).find(".fc-event-title").hide(),$(a).find(".fc-event-time").hide(),$(a).css("background-color","transparent")}void 0===i.fixed_title||0==i.fixed_title.length||($(a).find(".fc-event-time").html("&nbsp;"),$(a).find(".fc-event-title").html(i.fixed_title))}i.early_dynamic_tooltip&&"1"==i.early_dynamic_tooltip&&cb_event_mouseover(n,null,r),i.tooltip_close_on_title_leave&&parseInt(i.tooltip_close_on_title_leave)&&$(a).mouseleave(function(e){handle=setTimeout(function(){0==$(".fc-event.event-hovered").length&&$(".fct-tooltip").is(":visible")&&($(".fct-tooltip:visible").first().is(":hover")||$(".fct-tooltip:visible").trigger("close-tooltip"))},200)}),i.tooltip_close_on_outside_click&&parseInt(i.tooltip_close_on_outside_click)&&$(window).click(function(){$(".fct-tooltip").is(":visible")&&($(".fct-tooltip:visible").first().is(":hover")||$(".fct-tooltip:visible").trigger("close-tooltip"))})}function hide_widget_event_list(e,t,n,a,r,i){var o=jQuery(e).parents(".rhc_holder").find(".rhc_calendar_widget_day_click_holder");0<o.children().length&&o.children().fadeOut("fast",function(){})}function cb_event_render_all(e,t,n,a,r,i){if(void 0===e&&(e=$(r.element).parents(".rhcalendar.rhc_holder")),norepeat=r.get_norepeat?r.get_norepeat(i.norepeat||!1):i.norepeat||!1,norepeat=parseInt(norepeat),norepeat&&r&&(r.rendered=r.handle_rendered?r.handle_rendered():[]),has_sidelist_holder=0<$(e).parent().find(".rhc-sidelist").length,events=sidelist_events||[],0<events.length){var o=$(e).parent().find(".rhc-sidelist-holder .rhc-sidelist-tab-label");0<o.length&&i.sidelist&&i.sidelist.labels&&i.sidelist.labels.tab&&o.html(i.sidelist.labels.tab),render_sidelist(e,events,r.name,i)}sidelist_events=[],$.inArray(r.name,["rhc_event","rhc_gmap"]),$("body").trigger("cb_view_display",[t,e,r,a])}function render_tax_filters(o){var s=o&&o.taxfilter?o.taxfilter:{holder_class:"rh-flat-ui fc-head-control",selectpicker:!0,size:10,menu_class:"tax_filter_menu_medium",multiple:!(!o.tax_filter_multiple||!parseInt(o.tax_filter_multiple))},l=$(this);o.btn_tax_parent_only?arr_btn_tax_parent_only=o.btn_tax_parent_only.split(","):arr_btn_tax_parent_only=[],0<$(this).find("[class*='fc-button-btn_tax_']").length&&l.addClass("rhc-has-tax-filter"),$(this).find("[class*='fc-button-btn_tax_']").each(function(e,t){var r=(t.className.match(/(^|\s)(fc\-button\-btn_tax_([^\s]*))/)||[,,""])[3];1==parseInt(o.btn_tax_parent_only)&&arr_btn_tax_parent_only.push(r);var i=$('<select class="selectpicker"></select>');if(s.multiple&&i.attr("multiple",!0),i.attr("data-taxonomy",r).append($('<option value="">'+$(this).html()+"</option>")),l.find(".fbd-filter[data-taxonomy='"+r+"']").each(function(e,t){var n=$(t).data("bgcolor")||"transparent";if(0<arr_btn_tax_parent_only.length&&parseInt($(t).data("parent")))for(var a=0;a<arr_btn_tax_parent_only.length;a++)if(r==arr_btn_tax_parent_only[a])return;label=$(t).closest("label").find(".fbd-term-label").html(),parseInt($(t).data("parent"))&&(label="&mdash;&nbsp;"+label),count=parseInt($(t).data("count")),i.append($('<option data-count="'+count+'" data-bgcolor="'+n+'" value="'+$(t).val()+'">'+label+"</option>"))}),1<i.find("option").length?($(t).replaceWith(i),i.wrap($('<div class="tax_filter_holder fc-button fc-state-default"></div>').addClass(s.holder_class).addClass(s.menu_class))):($(t).remove(),console.log("Taxonomy filter added to calendar, but disabled in options.  Also turning off the hierarchical filter can help.")),s.selectpicker){i.selectpicker({style:"btn-small btn-taxfilter btn_tax",size:s.size});var n=!1,a=i.parent().find(".dropdown-menu");i.find("option").each(function(e,t){bgcolor=$(t).attr("data-bgcolor")||"transparent",count=$(t).attr("data-count")||"","transparent"!=bgcolor&&(n=!0),a.find('li[rel="'+e+'"] a').prepend($('<span class="rhc-term-color"></span>').css("background-color",bgcolor).addClass("transparent"==bgcolor?"rhc-no-color":"")),o.term_post_count&&parseInt(o.term_post_count)&&(count=parseInt(count),0<count&&a.find('li[rel="'+e+'"] a').append($('<i class="fbd-term-count">'+parseInt(count)+"</i>")))}),n&&a.addClass("rhc-with-tax-color")}i.unbind("change",tax_filter_change).bind("change",{taxonomy:r,holder:l,dropdown:i},tax_filter_change)})}function tax_filter_change(e){$(this).attr("rel",$(e.data.holder).attr("id"));var t=$(this).val(),n=[];"string"==typeof(t=null==t?"":t)?""==t||n.push(t):$.each(t,function(e,t){if(""==t)return!0;n.push(t)});var a=e.data.dropdown;return 0<$(n).toArray().length?(a.find("option").first().prop("selected",!1),a.find("option").first().removeAttr("selected")):(a.find("option").first().prop("selected",!0),a.find("option").first().attr("selected","selected")),a.selectpicker("render"),e.data.holder.find(".fbd-filter[data-taxonomy='"+e.data.taxonomy+"']").each(function(e,t){-1==$.inArray($(t).val(),n)?$(t).attr("checked",!1):$(t).attr("checked",!0)}),methods.apply_filter.apply($(this),[!1]),!0}function render_sidelist(n,e,a,r){$.each(e,function(e,t){!(t.skip_sidelist||!1)&&"rhc_gmap"==a&&has_sidelist_holder&&r.sidelist&&r.sidelist.template&&0<$(r.sidelist.template).length&&($(n).parent().find(".rhc-sidelist-holder").addClass("has-events"),sidelist=$(n).parent().find(".rhc-sidelist"),render_sidelist_event(sidelist,t,r))}),$(".rhc-sidelist-event-item").show()}function render_sidelist_event(l,d,c){jQuery(document).ready(function(e){var t=new Date(d.start),n=new Date;if(n.setHours(0,0,0,0),t.getTime()<n.getTime())return!1;var a=e(c.sidelist.template).clone();if(a.attr("id","").addClass("rhc-sidelist-event-item"),d.url&&""!=d.url&&"javascript:void(0);"!=d.url){var r=c.sidelist.link_target||"_BLANK";r=""==r?"_BLANK":r;var i=e('<a href="'+d.url+'">'+d.title+"</a>").attr("target",r).attr("href","javascript:void(0);").bind("click",function(e){var t=c.eventClick?c.eventClick:fc_click;d.fc_click_link="page",d.fc_click_target=r,t(d,e,null)})}else i=e("<span></span").html(d.title);a.find(".rhc-sidelist-title").empty().append(i);var o=a.find(".rhc-sidelist-date").html();if(a.find(".rhc-sidelist-date").html(e.fullCalendar.formatDate(d.start,o,c)),d.image&&d.image[0]&&""!=d.image[0])var s=e("<img></img>").attr("src",d.image[0]);d.venue_directory&&a.addClass("venue-directory-item").find(".rhc-sidelist-date").hide(),a.find(".rhc-sidelist-image").append(s),l.append(a.show())})}function cb_events_loading(e,t,n,a,r,i){i.for_widget?(a.loading&&a.loading(n,a,i),handle_loading_overlay(e,t,n,a,r,i),n?$(e).find(".fc-have-event").each(function(e,t){$(this).removeClass("fc-state-highlight").removeClass("fc-have-event").css("background-image","")}):cb_events_loaded(t,r,a,i)):(a.loading&&a.loading(n,a,i),n||cb_events_loaded(t,r,a,i),handle_loading_overlay(e,t,n,a,r,i))}function handle_loading_overlay(e,t,n,a,r,i){void 0!==i.loadingOverlay&&"1"==i.loadingOverlay&&(n?(0==$(e).find(".fc-content .fc-view-loading").length&&$(e).find(".fullCalendar .fc-content").prepend($('<div class="fc-view-loading"></div>').hide().append('<div class="fc-view-loading-1 ajax-loader"><div class="fc-view-loading-2x xspinner icon-xspinner-3"></div></div>')),$(e).addClass("is-loading").find(".fc-view-loading").addClass("loading-events").find(".ajax-loader").addClass("loading-events").end().stop().fadeIn()):$(e).removeClass("is-loading").find(".fc-view-loading").stop().fadeOut("fast",function(){$(e).find().remove(".fc-view-loading"),"rhc_event"==a.name&&$(e).find(".fc-view-rhc_event").css("min-height","")}))}function cb_events_loaded(e,t,n,s){if(calendar=e,(!s.tax_filter||"1"==s.tax_filter)&&0!=$(calendar).find(".fc-head-control").length){var a=$(calendar).fullCalendar("clientEvents"),l=[];if($.each(a,function(e,o){o.terms&&0<o.terms.length&&$.each(o.terms,function(e,t){if(s.tax_filter_include&&0<s.tax_filter_include.length){if(-1==$.inArray(t.taxonomy,s.tax_filter_include))return}else if(s.tax_filter_skip&&-1!=$.inArray(t.taxonomy,s.tax_filter_skip))return;for(var n=-1,a=0;a<l.length;a++)if(l[a].taxonomy==t.taxonomy){n=a;break}var r="",i={value:r=t.gaddress?t.gaddress:t.description?t.description:t.name?t.name:"unknown",order:t.term_priority?parseInt(t.term_priority):0,local_feed:o.local_feed,term:t};-1==n?l[l.length]={taxonomy:t.taxonomy,label:t.taxonomy_label,terms:[r],uterms:[i],print_priority:t.print_priority?parseInt(t.print_priority):0,filter_type:t.filter_type?t.filter_type:"",color:t.color||"",background_color:t.background_color||""}:-1==$.inArray(r,l[n].terms)&&(l[n].terms.push(r),l[n].uterms.push(i))})}),s.tax_filter_include&&0<s.tax_filter_include.length&&0<l.length&&(new_taxonomies=[],$.each(s.tax_filter_include,function(e,n){$.each(l,function(e,t){n==t.taxonomy&&(new_taxonomies[new_taxonomies.length]=t)})}),l=new_taxonomies),0<l.length){var d=$(calendar).find(".fc-head-control .tax_filter_holder");d.empty(),d.parents(".fc-head-control").removeClass("has-filters"),s.btn_tax_parent_only?arr_btn_tax_parent_only=s.btn_tax_parent_only.split(","):arr_btn_tax_parent_only=[],$.each(l,function(e,a){if(0!=a.terms.length){a.uterms.sort(cb_sort_tax_filter);var n=!(a.terms=[]),r=!1;$.each(a.uterms,function(e,t){n&&n!=t.order&&(r=!0),n=t.order,a.terms.push(t.value)}),r||(a.terms.sort(),a.uterms.sort(cb_sort_alphanum));var i=$("<select></select>").attr("title",a.label).attr("multiple","multiple").addClass("tax_filter_field").addClass("selectpicker").data("taxonomy",a.taxonomy).data("taxonomy_filter_type",a.filter_type).append('<option value="">'+a.label+"</option>");$.each(a.uterms,function(e,t){if(0<arr_btn_tax_parent_only.length&&parseInt(t.term.parent))for(var n=0;n<arr_btn_tax_parent_only.length;n++)if(a.taxonomy==arr_btn_tax_parent_only[n])return;bgcolor=t.term.background_color||"transparent",option_label=t.term&&t.term.name?t.term.name:t.value,_option=$('<option value="'+t.value+'">'+option_label+"</option>").data("term",t),_option.attr("data-bgcolor",bgcolor),i.append(_option)}),i.appendTo(d).wrap('<div class="tax_filter_item_holder"></div>').selectpicker({style:"btn-small btn-taxfilter"});var o=!1,s=i.parent().find(".dropdown-menu");i.find("option").each(function(e,t){bgcolor=$(t).attr("data-bgcolor")||"transparent","transparent"!=bgcolor&&(o=!0),s.find('li[rel="'+e+'"] a').prepend($('<span class="rhc-term-color"></span>').css("background-color",bgcolor).addClass("transparent"==bgcolor?"rhc-no-color":""))}),o&&s.addClass("rhc-with-tax-color"),d.parents(".fc-head-control").addClass("has-filters")}}),d.find(".tax_filter_field").change(function(e){var t=$(this).parents(".fullCalendar"),o=[];$(t).find(".tax_filter_field").each(function(e,i){$(i).find("option:selected").each(function(e,t){var n=$(t).attr("value");if(""!=n){var a=$(i).data("taxonomy_filter_type"),r=$(t).data("term");o.push({taxonomy:$(i).data("taxonomy"),term:n,filter_type:a,slug:r.term&&r.term.slug?r.term.slug:null,term_id:r.term&&r.term.term_id?r.term.term_id:null,local_feed:r.local_feed})}})}),0<$(t).parent().find(".rhc-sidelist").length&&($(t).parent().find(".rhc-sidelist-holder").removeClass("has-events"),$(t).parent().find(".rhc-sidelist").empty()),args={tax_filters:o},s.show_ad&&(args.show_ad=s.show_ad),$(t).data("rhc_tax_filters",o).fullCalendar("rerenderEvents"),$("BODY").trigger("rhc_filter",args)})}}}function cb_view_display(e,t,n,a){t||(t=$(n.element).parents(".fullCalendar")),set_fc_small(t);var r=$(t).fullCalendar("getView");"rhc_gmap"==r.name?$(t).find(".fc-head-control").addClass("show-control"):$(t).find(".fc-head-control").removeClass("show-control"),"rhc_event"==r.name?$(a).parents(".rhc_holder").addClass("view-rhc_event"):$(a).parents(".rhc_holder").removeClass("view-rhc_event"),$(t).data("rhc_tax_filters",[]),$(t).find(".tax_filter_field").each(function(e,t){$(t).val("")});var i=new Date;if(n.visStart<=i&&n.visEnd>=i?$(a).parents(".rhc_holder").addClass("has-current-date").removeClass("not-current-date"):$(a).parents(".rhc_holder").removeClass("has-current-date").addClass("not-current-date"),"month"==n.name&&0<$(a).parents(".rhc_holder").find(".fc-today").length&&$(a).parents(".rhc_holder").find(".fc-today").is(".fc-other-month")&&$(a).parents(".rhc_holder").removeClass("has-current-date").addClass("not-current-date"),$(a).parents(".rhc_holder").is(".flat-ui-cal")){var o=$(t).parents(".rhc_holder").data("Calendarize"),s=o.modes[o.mode].options;if($(a).parents(".rhc_holder").is(".has-current-date")){try{var l=$("<div/>").html(s.widget_hformat).text()}catch(e){l=null}var d=l||"'<span class=''fuiw-dayname''>'dddd'</span><span class=''fuiw-month''>'MMMM'</span><span class=''fuiw-year''>'yyyy'</span><span class=''fuiw-day''>'d'</span>'";$(t).find(".fc-header-title h2").html($.fullCalendar.formatDate(i,d,s))}else{str=$(t).find(".fc-header-title h2").html(),str=str.trim();var c=str.split(" ");2==c.length&&(d=isNaN(c[1])?"<span class='fuiw-month'>"+c[1]+"</span><span class='fuiw-year'>"+c[0]+"</span>":"<span class='fuiw-month'>"+c[0]+"</span><span class='fuiw-year'>"+c[1]+"</span>",$(t).find(".fc-header-title h2").html(d))}_skip=!(!s.widget_onechardaylabel||1!=parseInt(s.widget_onechardaylabel)),_skip||$(t).find(".fc-day-header").each(function(e,t){$(t).html($(t).html().substring(0,1))})}}function cb_sort_tax_filter(e,t){return e.order>t.order?1:e.order<t.order?-1:0}function cb_sort_alphanum(e,t){a=e.value.toString(),b=t.value.toString();var n=/[^a-zA-Z]/g,r=/[^0-9]/g,i=a.replace(n,""),o=b.replace(n,"");if(i!==o)return o<i?1:-1;var s=parseInt(a.replace(r,""),10),l=parseInt(b.replace(r,""),10);return s===l?0:l<s?1:-1}function add_footer_button(e){var t=$.extend({calendarize:null,calendar:null,e:null,tm:"fc",buttonName:"undefined",label:"",buttonClick:function(e,t,n){}},e);tm=t.tm;var n=$("<span class='fc-button fc-button-"+t.buttonName+" "+tm+"-state-default '><span class='fc-button-inner'><span class='fc-button-content'>"+t.label+"</span><span class='fc-button-effect'><span></span></span></span></span>");n&&(n.click(function(e){n.hasClass(tm+"-state-disabled")||t.buttonClick(this,e,t)}).mousedown(function(){n.not("."+tm+"-state-active").not("."+tm+"-state-disabled").addClass(tm+"-state-down")}).mouseup(function(){n.removeClass(tm+"-state-down")}).hover(function(){n.not("."+tm+"-state-active").not("."+tm+"-state-disabled").addClass(tm+"-state-hover")},function(){n.removeClass(tm+"-state-hover").removeClass(tm+"-state-down")}).appendTo(t.e),n.addClass(tm+"-corner-left"),n.addClass(tm+"-corner-right"))}function ical_footer_button_click(e,t,n){var a=n.calendarize;if(f,0<$(e).parent().find(".ical-tooltip").length)$(e).parent().find(".ical-tooltip").remove();else{var r=$(a).data("Calendarize"),i=r.modes[r.mode].options,o=i.events_source+i.events_source_query,s=(o=o.replace("get_calendar_events","get_icalendar_events"))+"&ics=1",l=i.feed&&""!=i.feed?"&feed="+i.feed:"";o+=l,s+=l;var d=$(".ical-tooltip-template").first().clone();d.removeClass("ical-tooltip-template").addClass("ical-tooltip").addClass("rhc-ical-dialog").find(".ical-url").html(o).end().find(".ical-clip").attr("href",o).on("click",function(e){return $(this).focus(),$(this).select(),!1}).end().find(".ical-close").on("click",function(e){$(this).parents(".fc-footer").find(".fc-button-icalendar").trigger("click")}).end().find(".ical-ics").attr("href",s).end().show(),$(e).after(d),setTimeout(function(){d.addClass("rhc-ical-dialog-open")},50)}}function cb_dayclick(e,t,n,a,r,i){var o;if(r.dayclick){if(o=!(!r.dayclick||""==r.dayclick||!window[r.dayclick])&&window[r.dayclick])return o(e,t,n,a,r,i)}else if(o=!(!r.widget_dayclick||""==r.widget_dayclick||!window[r.widget_dayclick])&&window[r.widget_dayclick])calendar_widget_day_click(e,t,n,a,rhc_events_cache,r,i);else if(r.widget_link){if(r.widget_link_view)var s=r.widget_link_view;else s="agendaDay";$('<form method="post" />').attr("action",r.widget_link).append('<input type="hidden" name="gotodate" value="'+$.fullCalendar.formatDate(e,"yyyy-MM-dd")+'" />').append('<input type="hidden" name="defaultview" value="'+s+'" />').append('<input type="hidden" name="fcalendar" value="'+(r.ev_calendar?r.ev_calendar:"")+'" />').append('<input type="hidden" name="fvenue" value="'+(r.ev_venue?r.ev_venue:"")+'" />').append('<input type="hidden" name="forganizer" value="'+(r.ev_organizer?r.ev_organizer:"")+'" />').appendTo(i).submit()}}}(jQuery),function(n){var t={init:function(e){var t=n.extend({draggable:!0},e);return this.each(function(){n(this).data("CalendarizeDialog")||(n(this).data("CalendarizeDialog",t),t.draggable&&n(this).draggable({handle:".ui-widget-header"}),n(this).find(".ui-dialog-titlebar-close").on("click",function(e){n(this).parent().parent().parent().CalendarizeDialog("close")})),n(this).hide()})},open:function(e){opacity=n(this).css("opacity"),n(this).css("opacity",0).show().css("margin-left",0).offset(e.offset).css("margin-left",e.margin_left);var t=this.get()[0].getBoundingClientRect();t.right>n(window).width()&&(margin_left=e.margin_left+-1*(5+t.right-n(window).width()),n(this).css("margin-left",margin_left)),n(this).animate({opacity:opacity},200,function(){})},close:function(){n(this).hide()}};n.fn.CalendarizeDialog=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void n.error("Method "+e+" does not exist on jQuery.CalendarizeDialog"):t.init.apply(this,arguments)}}(jQuery),function(c){var t={init:function(e){c.extend({todo:!1},e);return this.each(function(){var e=c(this);if(!e.data("rhc_gmap"))return e.data("rhc_gmap",!0),function r(i,e,o){o++;if(10<o)return!1;if("interactive"!=i.data("type"))return!1;if(0==e.length)return!1;function t(n,a){var e=function(e,t){return t==google.maps.GeocoderStatus.OK&&(latlng=e[0].geometry.location,n[a].lat=latlng.lat(),n[a].lon=latlng.lng()),r(i,n,o)};return e}for(var n=0;n<e.length;n++)if(!e[n].lat&&!e[n].lon&&e[n].address){var a=new google.maps.Geocoder;return void a.geocode({address:e[n].address},t(e,n))}i.uniqueId();ratio=i.data("ratio");ratio=""==ratio?"4:3":ratio;ratio_arr=ratio.split(":");h=i.width()*ratio_arr[1]/ratio_arr[0];i.height(h);maptype=i.data("maptype")||"ROADMAP";settings={mapTypeId:google.maps.MapTypeId[maptype],center:new google.maps.LatLng(e[0].lat,e[0].lon)};i.data("zoom")&&(settings.zoom=i.data("zoom"));var s=new google.maps.Map(i.get(0),settings);var l=new google.maps.LatLngBounds;var d=new google.maps.InfoWindow;c.each(e,function(e,t){marker=new google.maps.Marker({position:new google.maps.LatLng(t.lat,t.lon),map:s}),l.extend(marker.position),google.maps.event.addListener(marker,"click",function(e){return function(){d.setContent(t.info||t.name||t.address),d.open(s,e)}}(marker))});1<e.length&&s.fitBounds(l)}(e,function(e){var n=[];return e.children().each(function(e,t){n.push({name:c(t).html(),lon:c(t).data("glon"),lat:c(t).data("glat"),info:c(t).data("ginfo"),address:c(t).data("gaddress"),marker_active:c(t).data("marker_active"),marker_inactive:c(t).data("marker_active"),marker_size:c(t).data("marker_size")})}),n}(e),0),!0})}};c.fn.rhcGmap=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void c.error("Method "+e+" does not exist on jQuery.rhcGmap"):t.init.apply(this,arguments)}}(jQuery),jQuery(document).ready(function(e){init_rhc(),init_rhc_date_local_tz();try{window.matchMedia("print").addListener(function(){try{e(".rhc_holder .fullCalendar").fullCalendar("refetchEvents"),e(".rhc_holder .fullCalendar").fullCalendar("render")}catch(e){console.log("error",e)}})}catch(e){console.log(e)}});