var tribe_dynamic_helper_text=tribe_dynamic_helper_text||{};!function(t,e){"use strict";e.field_class=".event-dynamic-helper-text",e.date_fmt_settings={dateSettings:{days:tribe_dynamic_help_text.days,daysShort:tribe_dynamic_help_text.daysShort,months:tribe_dynamic_help_text.months,monthsShort:tribe_dynamic_help_text.monthsShort}},e.date_fmt=new DateFormatter(e.date_fmt_settings),e.text=JSON.parse(tribe_dynamic_help_text.msgs),e.date_with_year=tribe_dynamic_help_text.date_with_year,e.date_no_year=tribe_dynamic_help_text.date_no_year,e.datepicker_format=tribe_dynamic_help_text.datepicker_format,e.dynamic_text,e.start_date,e.start_time,e.end_date,e.end_time,e.all_day="",e.init=function(){e.setup_and_display_text(),e.event_date_change()},e.setup_and_display_text=function(){e.update(),e.msg_logic(),e.parse_and_display_text()},e.update=function(){(e.start_date=t("#EventStartDate").val(),e.start_time=t("#EventStartTime").val(),e.end_date=t("#EventEndDate").val(),e.end_time=t("#EventEndTime").val(),e.all_day=!!t("#allDayCheckbox").prop("checked")||"",e.start_date===e.end_date)&&(moment(e.start_time,"h:mm a").format("HH:mm")>moment(e.end_time,"h:mm a").format("HH:mm")&&(void 0!==t.fn.tribeTimepicker?t("#EventEndTime").tribeTimepicker("setTime",e.start_time):t("#EventEndTime").timepicker("setTime",e.start_time),e.end_time=e.start_time))},e.msg_logic=function(){e.start_date!=e.end_date||e.all_day||e.start_time==e.end_time?e.start_date!=e.end_date||e.all_day||e.start_time!=e.end_time?e.start_date==e.end_date&&e.all_day?e.dynamic_text=e.text[2]:e.start_date==e.end_date||e.all_day||e.start_time==e.end_time?e.start_date==e.end_date||e.all_day||e.start_time!=e.end_time?e.start_date!=e.end_date&&e.all_day&&(e.dynamic_text=e.text[5]):e.dynamic_text=e.text[4]:e.dynamic_text=e.text[3]:e.dynamic_text=e.text[1]:e.dynamic_text=e.text[0]},e.parse_and_display_text=function(){e.dynamic_text=e.dynamic_text.replace("%%starttime%%",e.start_time),e.dynamic_text=e.dynamic_text.replace("%%endtime%%",e.end_time),e.dynamic_text=e.dynamic_text.replace("%%startdatewithyear%%",e.date_formatter(e.start_date,e.datepicker_format,e.date_with_year)),e.dynamic_text=e.dynamic_text.replace("%%enddatewithyear%%",e.date_formatter(e.end_date,e.datepicker_format,e.date_with_year)),e.dynamic_text=e.dynamic_text.replace("%%startdatenoyear%%",e.date_formatter(e.start_date,e.datepicker_format,e.date_no_year)),e.dynamic_text=e.dynamic_text.replace("%%enddatenoyear%%",e.date_formatter(e.end_date,e.datepicker_format,e.date_no_year)),t(e.field_class).html(e.dynamic_text)},e.date_formatter=function(t,a,_){return e.date_fmt.formatDate(e.date_fmt.parseDate(t,a),_)},e.event_date_change=function(){t("#EventStartDate, #EventStartTime, #EventEndDate, #EventEndTime, #allDayCheckbox").on("change",function(){e.setup_and_display_text()})},t(function(){t("#eventDetails, #event_datepickers").hasClass("eventForm")&&e.init()})}(jQuery,tribe_dynamic_helper_text);
var tribe_events_bar_action;!function(e,t,a,r,i,s,n,b,l){a(t).ready(function(){l&&(a().bootstrapDatepicker||tec_debug.warn("TEC Debug: vendor bootstrapDatepicker was not loaded before its dependant file tribe-events-bar.js"),a().placeholder||tec_debug.warn("TEC Debug: vendor placeholder was not loaded before its dependant file tribe-events-bar.js"));var o=a(t.getElementById("tribe-bar-form")),d=a(t.getElementById("tribe-bar-date")),c=(a(t.getElementById("tribe-events")),a(t.getElementById("tribe-events-header"))),v=0,p=a("select[name=tribe-bar-view]");function m(e){if(!e.parents(".tribe-bar-disabled").length){var t=e.width();t>800?e.removeClass("tribe-bar-mini tribe-bar-collapse").addClass("tribe-bar-full"):e.removeClass("tribe-bar-full").addClass("tribe-bar-mini"),t<728?(e.removeClass("tribe-bar-mini").addClass("tribe-bar-collapse"),y(a("#tribe-bar-collapse-toggle"))):(e.removeClass("tribe-bar-collapse"),C(a("#tribe-bar-collapse-toggle")))}}if(c.length&&(v=c.data("startofweek")),m(o),o.resize(function(){m(o)}),!a(".tribe-events-week-grid").length&&"month"!==n.view){let e=n.datepicker_format.toString(),i=tribeDateFormat.masks[e]||"yyyy-mm-dd",s=tribeUtils.getInitialDateInfo(e,i);a(t.getElementById("tribe-bar-date-day")).val(tribeUtils.formatMoment(s.dateMoment,"tribeQuery")),d.val(s.formattedDate),l&&tec_debug.info('TEC Debug: bootstrapDatepicker was just initialized in "tribe-events-bar.js" on:',d),r.datepicker_opts={weekStart:v,format:i,autoclose:!0},tribe_ev.fn.ensure_datepicker_i18n(),d.bootstrapDatepicker(r.datepicker_opts)}d.blur(function(){""===d.val()&&a(".datepicker.dropdown-menu").is(":hidden")&&b.live_ajax()&&b.pushstate&&(n.date=r.cur_date,r.cur_url=r.base_url,a(i).trigger("tribe_ev_runAjax"),a(i).trigger("run-ajax.tribe"))}),a(".tribe-bar-settings").length&&a(t.getElementById("tribe-events-bar")).addClass("tribe-has-settings"),a("#tribe-events-bar .hasDatepicker").length&&a(t.getElementById("tribe-events-bar")).addClass("tribe-has-datepicker"),a('input[name*="tribe-bar-"]').placeholder(),a('
').insertAfter(p);var u=a(".tribe-bar-views-list");function f(){return u.find("li[data-view="+p.find(":selected").data("view")+"]")}p.find("option").each(function(e){var t=a(this);displaying=t.data("view");var r="tribe-bar-views-option-"+t.data("view");a(" ",{id:r,class:"tribe-bar-views-option",role:"option",tabindex:"-1","data-tribe-bar-order":e,"data-view":displaying,"aria-labelledby":"tribe-bar-views-label "+r}).html(' '+t.text()).appendTo(".tribe-bar-views-list")});var h=f();h.addClass("tribe-bar-active");var g=a("",{id:"tribe-bar-views-toggle",class:"tribe-bar-views-toggle","data-view":h.data("view"),"aria-haspopup":"listbox","aria-labelledby":"tribe-bar-views-label tribe-bar-views-toggle"});function w(){var e=f();g.removeAttr("aria-expanded"),o.removeClass("tribe-bar-views-open"),u.slideUp("fast").removeAttr("aria-activedescendant").find(".tribe-bar-views-option").removeClass("tribe-bar-active"),e.addClass("tribe-bar-active")}function _(e,t){e.preventDefault();var r=a(t);if(r.data("view")===g.data("view"))return g.focus(),void w();g.html(r.html()).focus(),w(),n.cur_url=a("option[data-view="+r.data("view")+"]").val(),n.view_target=a('select[name=tribe-bar-view] option[value="'+n.cur_url+'"]').data("view"),tribe_events_bar_action="change_view",k()}function C(e){var t=e.attr("data-label-shown");e.attr("aria-expanded","true"),e.find(".tribe-bar-toggle-text").html(t),e.addClass("tribe-bar-filters-open"),a(".tribe-bar-filters").slideDown("fast").attr("aria-hidden","false")}function y(e){var t=e.attr("data-label-hidden");a(".tribe-bar-filters").slideUp("fast").attr("aria-hidden","true"),e.removeClass("tribe-bar-filters-open"),e.find(".tribe-bar-toggle-text").html(t),e.attr("aria-expanded","false")}function k(){tribe_events_bar_action="change_view",n.url_params={},a(i).trigger("tribe_ev_preCollectBarParams"),a(i).trigger("pre-collect-bar-params.tribe");var s=a(t.getElementById("tribe-bar-form")).add(t.getElementById("tribe_events_filters_wrapper")).find("input, select");let l=n.datepicker_format.toString();s.each(function(){var e=a(this);e.val()&&e.val().length&&!e.hasClass("tribe-no-param")&&("month"!==n.view&&"0"!==n.datepicker_format&&e.is(d)?n.url_params[e.attr("name")]=tribeUtils.formatDateWithMoment(e.bootstrapDatepicker("getDate"),"tribeQuery",l):e.is(":checkbox")?e.is(":checked")&&(void 0===n.url_params[e.attr("name")]&&(n.url_params[e.attr("name")]=[]),n.url_params[e.attr("name")].push(e.val())):"radio"===e.attr("type")?e.is(":checked")&&(n.url_params[e.attr("name")]=e.val()):void 0!==e.attr("name")&&(n.url_params[e.attr("name")]=e.val()))});var o=a("#tribe-bar-views-option-"+r.default_mobile_view).data("redirected");if((r.redirected_view||o)&&(n.url_params.tribe_redirected=!0),"month"===n.view&&d.length){const e="m"+n.datepicker_format.toString(),t=d.val()||d.bootstrapDatepicker("getDate"),a=tribeUtils.maybeAlterMonthViewDate(t,e);n.url_params["tribe-bar-date"]=tribeUtils.formatDateWithMoment(a,"tribeQuery")}n.url_params=a.param(n.url_params),a(i).trigger("tribe_ev_postCollectBarParams"),a(i).trigger("post-collect-bar-params.tribe"),n.url_params.length&&(n.cur_url+=b.starting_delim()+n.url_params),e.location.href=n.cur_url}g.html(h.html()).insertBefore(u),p.hide(),o.on("click","#tribe-bar-views-toggle",function(e){var t;e.preventDefault(),o.hasClass("tribe-bar-views-open")?w():(t=f(),u.slideDown("fast").attr("aria-activedescendant",t.attr("id")).focus(),o.addClass("tribe-bar-views-open"),g.attr("aria-expanded","true"))}),o.on("click",".tribe-bar-views-option",function(e){_(e,this)}),a(t).on("keydown",function(e){if((38===e.which||40===e.which)&&o.hasClass("tribe-bar-views-open")){e.preventDefault();var t=e.which,a=null,r=u.find("li.tribe-bar-active");38===t&&r.prev(".tribe-bar-views-option")&&(a=r.prev(".tribe-bar-views-option")),40===t&&r.next(".tribe-bar-views-option")&&(a=r.next(".tribe-bar-views-option")),a.length&&(u.attr("aria-activedescendant",a.attr("id")),r.removeClass("tribe-bar-active"),a.addClass("tribe-bar-active").focus())}}),o.on("keyup",".tribe-bar-views-option",function(e){13===e.which&&o.hasClass("tribe-bar-views-open")&&_(e,this)}),o.on("change",".tribe-bar-views-select",function(e){e.preventDefault();var t=a("option:selected",this).data("view");n.cur_url=a("option[data-view="+t+"]").val(),n.view_target=a('select[name=tribe-bar-view] option[value="'+n.cur_url+'"]').data("view"),tribe_events_bar_action="change_view",k()}),s.maybe_default_view_change(),o.on("click","#tribe-bar-collapse-toggle",function(e){e.preventDefault();var t=a(this);t.hasClass("tribe-bar-filters-open")?y(t):C(t)}),a(t).on("keyup",function(e){if(9===e.which){var r=a("#tribe-bar-collapse-toggle");o.hasClass("tribe-bar-collapse")&&r.hasClass("tribe-bar-filters-open")&&!a.contains(t.getElementById("tribe-bar-filters-wrap"),e.target)&&y(r);var i=a("#tribe-bar-views-toggle");o.hasClass("tribe-bar-views-open")&&i.not(":focus")&&w()}}),a(t).on("keyup",function(e){if(27===e.which){var t=a("#tribe-bar-collapse-toggle");o.hasClass("tribe-bar-collapse")&&t.hasClass("tribe-bar-filters-open")&&(y(t),t.focus());var r=a("#tribe-bar-views-toggle");o.hasClass("tribe-bar-views-open")&&(w(),r.focus())}}),a(i).on("tribe_ev_serializeBar",function(){var e=a("#tribe-bar-collapse-toggle");o.hasClass("tribe-bar-collapse")&&e.hasClass("tribe-bar-filters-open")&&(y(e),e.focus()),a("form#tribe-bar-form input, form#tribe-bar-form select, #tribeHideRecurrence").each(function(){var e=a(this);if(e.is("#tribe-bar-date")){let t=e.val(),a=n.datepicker_format.toString();t.length?"month"===n.view?(a="m"+a,n.params[e.attr("name")]=tribeUtils.formatDateWithMoment(n.mdate,"tribeMonthQuery",a),n.url_params[e.attr("name")]=tribeUtils.formatDateWithMoment(n.mdate,"tribeMonthQuery",a)):t.match(/^[0-9]+[\-\.\/][0-9]+$/)?n.params[e.attr("name")]=n.url_params[e.attr("name")]=tribeUtils.formatDateWithMoment(t,"tribeQuery",a):(n.params[e.attr("name")]=tribeUtils.formatDateWithMoment(e.bootstrapDatepicker("getDate"),"tribeQuery",a),n.url_params[e.attr("name")]=tribeUtils.formatDateWithMoment(e.bootstrapDatepicker("getDate"),"tribeQuery",a)):e.is(".placeholder")&&e.is(".bd-updated")?n.url_params[e.attr("name")]=e.attr("data-oldDate"):n.date=r.cur_date}!e.val().length||e.hasClass("tribe-no-param")||e.is("#tribe-bar-date")||(e.is(":checkbox")?e.is(":checked")&&(n.params[e.attr("name")]=e.val(),"map"!==n.view&&(n.url_params[e.attr("name")]=e.val()),("month"===n.view||"day"===n.view||"week"===n.view||n.recurrence)&&n.pushcount++):(n.params[e.attr("name")]=e.val(),"map"!==n.view&&(n.url_params[e.attr("name")]=e.val()),"month"!==n.view&&"day"!==n.view&&"week"!==n.view||n.pushcount++))})});var D=a('#tribe-events-bar [class^="tribe-bar-button-"]'),x=D.next(".tribe-bar-drop-content");D.click(function(){var e=a(this);return e.toggleClass("open"),e.next(".tribe-bar-drop-content").toggle(),!1}),a(t).click(function(e){o.hasClass("tribe-bar-views-open")&&!a.contains(t.getElementById("tribe-bar-views"),e.target)&&(w(),g.focus());var r=a("#tribe-bar-collapse-toggle");o.hasClass("tribe-bar-collapse")&&r.hasClass("tribe-bar-filters-open")&&!a.contains(t.getElementById("tribe-bar-filters-wrap"),e.target)&&(y(r),r.focus()),D.hasClass("open")&&(D.removeClass("open"),x.hide())}),x.click(function(e){e.stopPropagation()}),l&&tec_debug.info("TEC Debug: tribe-events-bar.js successfully loaded")})}(window,document,jQuery,tribe_ev.data,tribe_ev.events,tribe_ev.fn,tribe_ev.state,tribe_ev.tests,tribe_debug);
!function(a,b,c,d){c.swipebox=function(e,f){var g,h,i={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},j=this,k=[],l=e.selector,m=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),n=null!==m||b.createTouch!==d||"ontouchstart"in a||"onmsgesturechange"in a||navigator.msMaxTouchPoints,o=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p=a.innerWidth?a.innerWidth:c(a).width(),q=a.innerHeight?a.innerHeight:c(a).height(),r=0,s='';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click",l,function(a){if("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?c(l).filter("["+d+'="'+f+'"]'):c(l),h.each(function(){var a=null,b=null;c(this).attr("title")&&(a=c(this).attr("title")),c(this).attr("href")&&(b=c(this).attr("href")),k.push({href:b,title:a})}),b=h.index(c(this)),a.preventDefault(),a.stopPropagation(),g.target=c(a.target),g.init(b)})},g={init:function(a){j.settings.beforeOpen&&j.settings.beforeOpen(),this.target.trigger("swipebox-start"),c.swipebox.isOpen=!0,this.build(),this.openSlide(a),this.openMedia(a),this.preloadMedia(a+1),this.preloadMedia(a-1),j.settings.afterOpen&&j.settings.afterOpen(a)},build:function(){var a,b=this;c("body").append(s),o&&j.settings.useSVG===!0&&(a=c("#swipebox-close").css("background-image"),a=a.replace("png","svg"),c("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":a})),m&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('
')}),b.setDim(),b.actions(),n&&b.gesture(),b.keyboard(),b.animBars(),b.resize()},setDim:function(){var b,d,e={};"onorientationchange"in a?a.addEventListener("orientationchange",function(){0===a.orientation?(b=p,d=q):(90===a.orientation||-90===a.orientation)&&(b=q,d=p)},!1):(b=a.innerWidth?a.innerWidth:c(a).width(),d=a.innerHeight?a.innerHeight:c(a).height()),e={width:b,height:d},c("#swipebox-overlay").css(e)},resize:function(){var b=this;c(a).resize(function(){b.setDim()}).resize()},supportTransition:function(){var a,c="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(a=0;a=m||i)){var q=.75-Math.abs(d)/s.height();s.css({top:d+"px"}),s.css({opacity:q}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/p,!j&&!i&&Math.abs(b)>=l&&(c("#swipebox-slider").css({"-webkit-transition":"",transition:""}),j=!0),j&&(b>0?0===a?c("#swipebox-overlay").addClass("leftSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"})):0>b&&(k.length===a+1?c("#swipebox-overlay").addClass("rightSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(a){if(a.preventDefault(),a.stopPropagation(),c("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),d=o.pageY-n.pageY,b=o.pageX-n.pageX,g=100*b/p,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?s.height():-s.height();s.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else s.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):q.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(j.settings.hideBarsDelay>0){var b=this;b.clearTimeout(),b.timeout=a.setTimeout(function(){b.hideBars()},j.settings.hideBarsDelay)}},clearTimeout:function(){a.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.addClass("visible-bars"):(c("#swipebox-top-bar").animate({top:0},500),c("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){a.addClass("visible-bars")},1e3))},hideBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.removeClass("visible-bars"):(c("#swipebox-top-bar").animate({top:"-50px"},500),c("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){a.removeClass("visible-bars")},1e3))},animBars:function(){var a=this,b=c("#swipebox-top-bar, #swipebox-bottom-bar");b.addClass("visible-bars"),a.setTimeout(),c("#swipebox-slider").click(function(){b.hasClass("visible-bars")||(a.showBars(),a.setTimeout())}),c("#swipebox-bottom-bar").hover(function(){a.showBars(),b.addClass("visible-bars"),a.clearTimeout()},function(){j.settings.hideBarsDelay>0&&(b.removeClass("visible-bars"),a.setTimeout())})},keyboard:function(){var b=this;c(a).bind("keyup",function(a){a.preventDefault(),a.stopPropagation(),37===a.keyCode?b.getPrev():39===a.keyCode?b.getNext():27===a.keyCode&&b.closeSlide()})},actions:function(){var a=this,b="touchend click";k.length<2?(c("#swipebox-bottom-bar").hide(),d===k[1]&&c("#swipebox-top-bar").hide()):(c("#swipebox-prev").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getPrev(),a.setTimeout()}),c("#swipebox-next").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getNext(),a.setTimeout()})),c("#swipebox-close").bind(b,function(){a.closeSlide()})},setSlide:function(a,b){b=b||!1;var d=c("#swipebox-slider");r=100*-a,this.doCssTrans()?d.css({"-webkit-transform":"translate3d("+100*-a+"%, 0, 0)",transform:"translate3d("+100*-a+"%, 0, 0)"}):d.animate({left:100*-a+"%"}),c("#swipebox-slider .slide").removeClass("current"),c("#swipebox-slider .slide").eq(a).addClass("current"),this.setTitle(a),b&&d.fadeIn(),c("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===a?c("#swipebox-prev").addClass("disabled"):a===k.length-1&&j.settings.loopAtEnd!==!0&&c("#swipebox-next").addClass("disabled")},openSlide:function(b){c("html").addClass("swipebox-html"),n?(c("html").addClass("swipebox-touch"),j.settings.hideCloseButtonOnMobile&&c("html").addClass("swipebox-no-close-button")):c("html").addClass("swipebox-no-touch"),c(a).trigger("resize"),this.setSlide(b,!0)},preloadMedia:function(a){var b=this,c=null;k[a]!==d&&(c=k[a].href),b.isVideo(c)?b.openMedia(a):setTimeout(function(){b.openMedia(a)},1e3)},openMedia:function(a){var b,e,f=this;return k[a]!==d&&(b=k[a].href),0>a||a>=k.length?!1:(e=c("#swipebox-slider .slide").eq(a),void(f.isVideo(b)?(e.html(f.getVideo(b)),j.settings.afterMedia&&j.settings.afterMedia(a)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this),j.settings.afterMedia&&j.settings.afterMedia(a)}))))},setTitle:function(a){var b=null;c("#swipebox-title").empty(),k[a]!==d&&(b=k[a].title),b?(c("#swipebox-top-bar").show(),c("#swipebox-title").append(b)):c("#swipebox-top-bar").hide()},isVideo:function(a){if(a){if(a.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||a.match(/vimeo\.com\/([0-9]*)/)||a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(a.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(a,d){var e=b.createElement("a"),f={};return e.href=decodeURIComponent(a),e.search&&(f=JSON.parse('{"'+e.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),c.isPlainObject(d)&&(f=c.extend(f,d,j.settings.queryStringData)),c.map(f,function(a,b){return a&&a>""?encodeURIComponent(b)+"="+encodeURIComponent(a):void 0}).join("&")},getVideo:function(a){var b="",c=a.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),d=a.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),e=a.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),f="";return c||d?(d&&(c=d),f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",v:""}),b=''):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b=''):b='','"},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("
").on("load",function(){b.call(d)});d.attr("src",a)}},getNext:function(){var a,b=this,d=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));d+1
0?(a=c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src",a),b--,this.setSlide(b),this.preloadMedia(b-1),j.settings.prevSlide&&j.settings.prevSlide(b)):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(a){},prevSlide:function(a){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery);
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,l){function a(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,a){var h=l.data(a,i);if(!h)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var c=h[e];if(!c||"_"==e.charAt(0))return void s(r+" is not a valid method");var u=c.apply(h,n);o=void 0===o?u:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=l.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),l.data(n,i,o))})}l=l||e||t.jQuery,l&&(r.prototype.option||(r.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return a(this,t,e)}return h(this,t),this},n(l))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},s.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},s.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/scroll-watch",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},n.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();t<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),n.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},n.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,i=t.pageYOffset+this.windowHeight;return e-i},n.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},n.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/history",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;e.defaults.history="replace";var o=document.createElement("a");return e.create.history=function(){if(this.options.history){o.href=this.getAbsolutePath();var t=o.origin||o.protocol+"//"+o.host,e=t==location.origin;return e?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+o.origin+" on "+location.origin+" . History behavior disabled.")}},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler),t[i]("unload",this.unloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=n.destroyHistory=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(t,e,i){if(i&&i.length){var n=i[0],r=this.getElementScrollY(n);o.href=e,this.scrollPages.push({top:r,path:o.href,title:t.title})}},n.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},n.getElementWindowScrollY=function(e){var i=e.getBoundingClientRect();return i.top+t.pageYOffset},n.getElementElementScrollY=function(t){return t.offsetTop-this.top},n.onScrollHistory=function(){for(var t,e,i=this.getScrollViewY(),n=0;n=i)break;t=n,e=o}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},i.debounceMethod(e,"onScrollHistory",150),n.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},n.setHistory=function(t,e){var i=this.options.history,n=i&&history[i+"State"];n&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},n.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var i=this.scrollPages[e],n=t.pageYOffset-i.top+this.top;this.destroyHistory(),scrollTo(0,n)}},n.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/button",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=i.getQueryElement(this.options.button);if(t)return void(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},n.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},n.prototype.enable=function(){this.element.removeAttribute("disabled")},n.prototype.disable=function(){this.element.disabled="disabled"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=n,e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/status",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t){r(t,"none")}function o(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}var s=e.prototype;return e.create.status=function(){var t=i.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},s.bindHideStatus=function(t){var e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},s.showRequestStatus=function(){this.showStatus("request")},s.showErrorStatus=function(){this.showStatus("error")},s.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},s.showStatus=function(t){o(this.statusElement),this.hideStatusEventElements();var e=this.statusEventElements[t];o(e)},s.hideAllStatus=function(){n(this.statusElement),this.hideStatusEventElements()},s.hideStatusEventElements=function(){for(var t in this.statusEventElements){var e=this.statusEventElements[t];n(e)}},e}),function(t,e){"function"==typeof define&&define.amd?define(["infinite-scroll/js/core","infinite-scroll/js/page-load","infinite-scroll/js/scroll-watch","infinite-scroll/js/history","infinite-scroll/js/button","infinite-scroll/js/status"],e):"object"==typeof module&&module.exports&&(module.exports=e(require("./core"),require("./page-load"),require("./scroll-watch"),require("./history"),require("./button"),require("./status")))}(window,function(t){return t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){if(Array.isArray(t))return t;var e="object"==typeof t&&"number"==typeof t.length;return e?h.call(t):[t]}function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);var s=t;return"string"==typeof t&&(s=document.querySelectorAll(t)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||t))}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var l=t.jQuery,a=t.console,h=Array.prototype.slice;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var i=t.querySelectorAll("img"),n=0;n