text: require(["jquery","wdn"],function(p,m){"use strict";var D=p("<progress>");window.location;p(function(){var t,o,i,e,c=p("link[rel=home]"),n=p("#script_main"),r=p(".wp-calendar"),a="day";function l(t,e){window.history.pushState&&window.location.href!==t&&window.history.pushState({route:e},"",t)}function u(){o=new Date(r.data("datetime"));var t=new Date,e=o.getMonth(),n=o.getFullYear(),a=p("td",r);a.removeClass("today active"),n===t.getFullYear()&&e===t.getMonth()&&a.not(".prev,.next").each(function(){if(p.trim(p(this).text())==t.getDate())return p(this).addClass("today"),!1}),n==i.getFullYear()&&e==i.getMonth()&&a.not(".prev,.next").each(function(){if(p.trim(p(this).text())==i.getDate())return p(this).addClass("active"),!1})}function h(t){f(),D.hide(),e=setTimeout(function(){D.prependTo(t),D.fadeIn(200)},1e3)}function f(){clearTimeout(e)}function s(){var t=p("#heading-date").data("datetime");i=t?new Date(t):new Date}function d(t){var e,n=p("aside .calendar");e=t instanceof Date?c+t.getFullYear()+"/"+(t.getMonth()+1)+"/":t,h(n),p.get(e+"?monthwidget&format=hcalendar",function(t){f(),n.html(t),r=p(".wp-calendar"),u()})}function g(t){var e,n=new Date,a=p("#updatecontent");l(e=t instanceof Date?c+t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate()+"/":t,"day");var r="format=hcalendar";"?"===e.charAt(e.length-1)?e+=r:e=0<e.indexOf("?")?e+"&"+r:e+"?"+r,h(a),p.get(e,function(t){f(),a.html(t),s(),i.getFullYear()==n.getFullYear()&&i.getMonth()==n.getMonth()&&i.getDate()==n.getDate()&&(window.location=window.location),o.getFullYear()!==i.getFullYear()||o.getMonth()!==i.getMonth()?d(i):u(),i.getFullYear()!=n.getFullYear()&&i.getMonth()!=n.getMonth()&&i.getDate()!=n.getDate()&&p("#events-promo-bar").hide()})}function v(t){var e=p("#updatecontent");l(t,"event"),h(e),p.get(t+"?format=hcalendar",function(t){f(),e.html(t)})}function w(t,e){var n=new Date(t);return n.setMonth(n.getMonth()+e),n.getDate()<t.getDate()&&n.setDate(0),n}c=c.length?c[0].href:"/",n=n.length?m.toAbs("./",n[0].src):"/templates/default/html/js/",(t=p("aside .calendar")).length&&(s(),u(),t.on("click","td a",function(t){t.preventDefault(),g(this.href)}),t.on("click","a.next, a.prev",function(t){t.preventDefault(),d(this.href)})),p(".view-unl_ucbcn_frontend_eventinstance").length?a="event":p(".view-unl_ucbcn_frontend_search").length&&(a="search"),p(document).on("keyup",function(t){if(!p(t.target).is("input, select, textarea, button")){var e=p(".day-nav");if(e.length)switch(t.which){case 39:g(t.altKey?w(i,1):p(".next",e).attr("href"));break;case 37:g(t.altKey?w(i,-1):p(".prev",e).attr("href"))}}}),p("#updatecontent").on("click",".vevent a.summary",function(t){t.preventDefault(),v(this.href)}),p(window).on("popstate",function(t){var e=t.originalEvent.state&&t.originalEvent.state.route||a,n=window.location.href;if(null===t.originalEvent.state)return event.preventDefault(),!1;switch(e){case"event":v(n);break;case"day":g(n);break;case"search":!function(t){var e=p("#updatecontent");l(t,"search"),h(e),p.get(t+(-1==t.indexOf("?")?"?":"&")+"format=hcalendar",function(t){f(),e.html(t)})}(n)}})})});