function validateForm(){$("form").validate()}function replaceAll(n,t,i){var r=t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");return n.replace(new RegExp(r,"g"),i)}function toggleReviewText(n){var t=document.getElementById("Less"+n),i=document.getElementById("More"+n);t.style.display!="none"?(t.style.display="none",i.style.display="block"):(t.style.display="block",i.style.display="none")}function TrackGoogleEvent(n,t,i,r,u){try{dataLayer&&dataLayer.push({event:n,eventCategory:t,eventAction:i,eventLabel:r,eventValue:u})}catch(f){GolfNow.Web.Utils.ConsoleLog(f)}}function TrackGoogleClickEvent(n,t,i,r,u,f){try{if(dataLayer){var e=!1;dataLayer.push({event:n,eventCategory:t,eventAction:i,eventLabel:r,eventValue:u,eventCallback:function(){e=!0;window.location.href=f}});window.setTimeout(function(){e||(window.location.href=f)},250)}else window.location.href=f}catch(o){GolfNow.Web.Utils.ConsoleLog(o);window.location.href=f}}var _activeDateCacheName,GolfNow;(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)})(function(n){function i(t){return n.isFunction(t)||typeof t=="object"?t:{top:t,left:t}}var t=n.scrollTo=function(t,i,r){return n(window).scrollTo(t,i,r)};return t.defaults={axis:"xy",duration:parseFloat(n.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(){return n(window)._scrollable()},n.fn._scrollable=function(){return this.map(function(){var t=this,r=!t.nodeName||n.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1,i;return r?(i=(t.contentWindow||t).document||t.ownerDocument||t,/webkit/i.test(navigator.userAgent)||i.compatMode=="BackCompat"?i.body:i.documentElement):t})},n.fn.scrollTo=function(r,u,f){return typeof u=="object"&&(f=u,u=0),typeof f=="function"&&(f={onAfter:f}),r=="max"&&(r=9e9),f=n.extend({},t.defaults,f),u=u||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(u/=2),f.offset=i(f.offset),f.over=i(f.over),this._scrollable().each(function(){function v(n){h.animate(o,u,f.easing,n&&function(){n.call(this,e,f)})}var a;if(r!=null){var s=this,h=n(s),e=r,c,o={},l=h.is("html,body");switch(typeof e){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e=i(e);break}if(e=l?n(e):n(e,this),!e.length)return;case"object":(e.is||e.style)&&(c=(e=n(e)).offset())}a=n.isFunction(f.offset)&&f.offset(s,e)||f.offset;n.each(f.axis.split(""),function(n,i){var p=i=="x"?"Left":"Top",u=p.toLowerCase(),r="scroll"+p,w=s[r],b=t.max(s,i),y;c?(o[r]=c[u]+(l?0:w-h.offset()[u]),f.margin&&(o[r]-=parseInt(e.css("margin"+p))||0,o[r]-=parseInt(e.css("border"+p+"Width"))||0),o[r]+=a[u]||0,f.over[u]&&(o[r]+=e[i=="x"?"width":"height"]()*f.over[u])):(y=e[u],o[r]=y.slice&&y.slice(-1)=="%"?parseFloat(y)/100*b:y);f.limit&&/^\d+$/.test(o[r])&&(o[r]=o[r]<=0?0:Math.min(o[r],b));!n&&f.queue&&(w!=o[r]&&v(f.onAfterFirst),delete o[r])});v(f.onAfter)}}).end()},t.max=function(t,i){var r=i=="x"?"Width":"Height",u="scroll"+r;if(!n(t).is("html,body"))return t[u]-n(t)[r.toLowerCase()]();var f="client"+r,e=t.ownerDocument.documentElement,o=t.ownerDocument.body;return Math.max(e[u],o[u])-Math.min(e[f],o[f])},t}),function(n){typeof define=="function"&&define.amd?define("picker",["jquery"],n):this.Picker=n(jQuery)}(function(n){function t(e,o,h,c){function k(){return t._.node("div",t._.node("div",t._.node("div",t._.node("div",l.component.nodes(a.open),y.box),y.wrap),y.frame),y.holder)}function g(){p.data(o,l).addClass(y.input).val(p.data("value")?l.get("select",v.format):e.value).on("focus."+a.id+" click."+a.id,d);if(!v.editable)p.on("keydown."+a.id,function(n){var t=n.keyCode,i=/^(8|46)$/.test(t);if(t==27)return l.close(),!1;(t==32||i||!a.open&&l.component.key[t])&&(n.preventDefault(),n.stopPropagation(),i?l.clear().close():l.open())});i(e,{haspopup:!0,expanded:!1,readonly:!1,owns:e.id+"_root"+(l._hidden?" "+l._hidden.id:"")})}function nt(){l.$root.on({focusin:function(n){l.$root.removeClass(y.focused);n.stopPropagation()},"mousedown click":function(t){var i=t.target;i!=l.$root.children()[0]&&(t.stopPropagation(),t.type!="mousedown"||n(i).is(":input")||i.nodeName=="OPTION"||(t.preventDefault(),e.focus()))}}).on("click","[data-pick], [data-nav], [data-clear]",function(){var u=n(this),r=u.data(),f=u.hasClass(y.navDisabled)||u.hasClass(y.disabled),i=document.activeElement;i=i&&(i.type||i.href)&&i;(f||i&&!n.contains(l.$root[0],i))&&e.focus();r.nav&&!f?l.set("highlight",l.component.item.highlight,{nav:r.nav}):t._.isInteger(r.pick)&&!f?l.set("select",r.pick).close(!0):r.clear&&l.clear().close(!0)});i(l.$root[0],"hidden",!0)}function tt(){var i,t;v.hiddenName===!0?(i=e.name+"_hidden",t=e.name,e.name=""):(t=[typeof v.hiddenPrefix=="string"?v.hiddenPrefix:"",typeof v.hiddenSuffix=="string"?v.hiddenSuffix:"_submit"],t=i=t[0]+e.name+t[1]);l._hidden=n('<input type=hidden name="'+t+'"id="'+i+'"'+(p.data("value")||e.value?' value="'+l.get("select",v.formatSubmit)+'"':"")+">")[0];p.on("change."+a.id,function(){l._hidden.value=e.value?l.get("select",v.formatSubmit):""}).after(l._hidden)}function d(n){n.stopPropagation();n.type=="focus"&&l.$root.addClass(y.focused);l.open()}if(!e)return t;var w=!1,a={id:e.id||"P"+Math.abs(~~(Math.random()*new Date))},v=h?n.extend(!0,{},h.defaults,c):c||{},y=n.extend({},t.klasses(),v.klass),p=n(e),b=function(){return this.start()},l=b.prototype={constructor:b,$node:p,start:function(){if(a&&a.start)return l;a.methods={};a.start=!0;a.open=!1;a.type=e.type;e.autofocus=e==document.activeElement;e.type="text";e.readOnly=!v.editable;e.id=e.id||a.id;l.component=new h(l,v);l.$root=n(t._.node("div",k(),y.picker,'id="'+e.id+'_root"'));nt();v.formatSubmit&&tt();g();v.container?n(v.container).append(l.$root):p.after(l.$root);l.on({start:l.component.onStart,render:l.component.onRender,stop:l.component.onStop,open:l.component.onOpen,close:l.component.onClose,set:l.component.onSet}).on({start:v.onStart,render:v.onRender,stop:v.onStop,open:v.onOpen,close:v.onClose,set:v.onSet});return w=s(l.$root.children()[0]),e.autofocus&&l.open(),l.trigger("start").trigger("render")},render:function(n){return n?l.$root.html(k()):l.$root.find("."+y.box).html(l.component.nodes(a.open)),l.trigger("render")},stop:function(){return a.start?(l.close(),l._hidden&&l._hidden.parentNode.removeChild(l._hidden),l.$root.remove(),p.removeClass(y.input).removeData(o),setTimeout(function(){p.off("."+a.id)},0),e.type=a.type,e.readOnly=!1,l.trigger("stop"),a.methods={},a.start=!1,l):l},open:function(o){if(a.open)return l;if(p.addClass(y.active),i(e,"expanded",!0),setTimeout(function(){l.$root.addClass(y.opened);i(l.$root[0],"hidden",!1)},0),o!==!1){a.open=!0;w&&r.css("overflow","hidden").css("padding-right","+="+f());p.trigger("focus");u.on("click."+a.id+" focusin."+a.id,function(n){var t=n.target;t!=e&&t!=document&&n.which!=3&&l.close(t===l.$root.children()[0])}).on("keydown."+a.id,function(i){var r=i.keyCode,u=l.component.key[r],f=i.target;r==27?l.close(!0):f==e&&(u||r==13)?(i.preventDefault(),u?t._.trigger(l.component.key.go,l,[t._.trigger(u)]):l.$root.find("."+y.highlighted).hasClass(y.disabled)||l.set("select",l.component.item.highlight).close()):n.contains(l.$root[0],f)&&r==13&&(i.preventDefault(),f.click())})}return l.trigger("open")},close:function(n){return(n&&(p.off("focus."+a.id).trigger("focus"),setTimeout(function(){p.on("focus."+a.id,d)},0)),p.removeClass(y.active),i(e,"expanded",!1),setTimeout(function(){l.$root.removeClass(y.opened+" "+y.focused);i(l.$root[0],"hidden",!0)},0),!a.open)?l:(a.open=!1,w&&r.css("overflow","").css("padding-right","-="+f()),u.off("."+a.id),l.trigger("close"))},clear:function(){return l.set("clear")},set:function(t,i,r){var u,f,o=n.isPlainObject(t),e=o?t:{};if(r=o&&n.isPlainObject(i)?i:r||{},t){o||(e[t]=i);for(u in e)f=e[u],u in l.component.item&&(f===undefined&&(f=null),l.component.set(u,f,r)),(u=="select"||u=="clear")&&p.val(u=="clear"?"":l.get(u,v.format)).trigger("change");l.render()}return r.muted?l:l.trigger("set",e)},get:function(n,i){if(n=n||"value",a[n]!=null)return a[n];if(n=="value")return e.value;if(n in l.component.item){if(typeof i=="string"){var r=l.component.get(n);return r?t._.trigger(l.component.formats.toString,l.component,[i,r]):""}return l.component.get(n)}},on:function(t,i){var r,f,e=n.isPlainObject(t),u=e?t:{};if(t){e||(u[t]=i);for(r in u)f=u[r],a.methods[r]=a.methods[r]||[],a.methods[r].push(f)}return l},off:function(){var n,t,i=arguments;for(n=0,namesCount=i.length;n<namesCount;n+=1)t=i[n],t in a.methods&&delete a.methods[t];return l},trigger:function(n,i){var r=a.methods[n];return r&&r.map(function(n){t._.trigger(n,l,[i])}),l}};return new b}function s(n){var t,i="position";return n.currentStyle?t=n.currentStyle[i]:window.getComputedStyle&&(t=getComputedStyle(n)[i]),t=="fixed"}function f(){var t,i,u,f;return r.height()<=o.height()?0:(t=n('<div style="visibility:hidden;width:100px" />').appendTo("body"),i=t[0].offsetWidth,t.css("overflow","scroll"),u=n('<div style="width:100%" />').appendTo(t),f=u[0].offsetWidth,t.remove(),i-f)}function i(t,i,r){if(n.isPlainObject(i))for(var u in i)e(t,u,i[u]);else e(t,i,r)}function e(n,t,i){n.setAttribute((t=="role"?"":"aria-")+t,i)}function h(t,i){var r,u,f;n.isPlainObject(t)||(t={attribute:i});i="";for(r in t)u=(r=="role"?"":"aria-")+r,f=t[r],i+=f==null?"":u+'="'+t[r]+'"';return i}var o=n(window),u=n(document),r=n(document.documentElement);return t.klasses=function(n){return n=n||"picker",{picker:n,opened:n+"--opened",focused:n+"--focused",input:n+"__input",active:n+"__input--active",holder:n+"__holder",frame:n+"__frame",wrap:n+"__wrap",box:n+"__box"}},t._={group:function(n){for(var i,u="",r=t._.trigger(n.min,n);r<=t._.trigger(n.max,n,[r]);r+=n.i)i=t._.trigger(n.item,n,[r]),u+=t._.node(n.node,i[0],i[1],i[2]);return u},node:function(t,i,r,u){return i?(i=n.isArray(i)?i.join(""):i,r=r?' class="'+r+'"':"",u=u?" "+u:"","<"+t+r+u+">"+i+"<\/"+t+">"):""},lead:function(n){return(n<10?"0":"")+n},trigger:function(n,t,i){return typeof n=="function"?n.apply(t,i||[]):n},digits:function(n){return/\d/.test(n[1])?2:1},isDate:function(n){return{}.toString.call(n).indexOf("Date")>-1&&this.isInteger(n.getDate())},isInteger:function(n){return{}.toString.call(n).indexOf("Number")>-1&&n%1==0},ariaAttr:h},t.extend=function(i,r){n.fn[i]=function(u,f){var e=this.data(i);return u=="picker"?e:e&&typeof u=="string"?t._.trigger(e[u],e,[f]):this.each(function(){var f=n(this);f.data(i)||new t(this,i,r,u)})};n.fn[i].defaults=r.defaults},t});Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(n){for(var i=Date.CultureInfo.monthNames,u=Date.CultureInfo.abbreviatedMonthNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1};Date.getDayNumberFromName=function(n){for(var i=Date.CultureInfo.dayNames,u=Date.CultureInfo.abbreviatedDayNames,f=Date.CultureInfo.shortestDayNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1};Date.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0};Date.getDaysInMonth=function(n,t){return[31,Date.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]};Date.getTimezoneOffset=function(n,t){return t||!1?Date.CultureInfo.abbreviatedTimeZoneDST[n.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[n.toUpperCase()]};Date.getTimezoneAbbreviation=function(n,t){var i=t||!1?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard;for(var r in i)if(i[r]===n)return r;return null};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.compareTo=function(n){if(isNaN(this))throw new Error(this);if(n instanceof Date&&!isNaN(n))return this>n?1:this<n?-1:0;throw new TypeError(n);};Date.prototype.equals=function(n){return this.compareTo(n)===0};Date.prototype.between=function(n,t){var i=this.getTime();return i>=n.getTime()&&i<=t.getTime()};Date.prototype.addMilliseconds=function(n){return this.setMilliseconds(this.getMilliseconds()+n),this};Date.prototype.addSeconds=function(n){return this.addMilliseconds(n*1e3)};Date.prototype.addMinutes=function(n){return this.addMilliseconds(n*6e4)};Date.prototype.addHours=function(n){return this.addMilliseconds(n*36e5)};Date.prototype.addDays=function(n){return this.addMilliseconds(n*864e5)};Date.prototype.addWeeks=function(n){return this.addMilliseconds(n*6048e5)};Date.prototype.addMonths=function(n){var t=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+n),this.setDate(Math.min(t,this.getDaysInMonth())),this};Date.prototype.addYears=function(n){return this.addMonths(n*12)};Date.prototype.add=function(n){if(typeof n=="number")return this._orient=n,this;var t=n;return(t.millisecond||t.milliseconds)&&this.addMilliseconds(t.millisecond||t.milliseconds),(t.second||t.seconds)&&this.addSeconds(t.second||t.seconds),(t.minute||t.minutes)&&this.addMinutes(t.minute||t.minutes),(t.hour||t.hours)&&this.addHours(t.hour||t.hours),(t.month||t.months)&&this.addMonths(t.month||t.months),(t.year||t.years)&&this.addYears(t.year||t.years),(t.day||t.days)&&this.addDays(t.day||t.days),this};Date._validate=function(n,t,i,r){if(typeof n!="number")throw new TypeError(n+" is not a Number.");else if(n<t||n>i)throw new RangeError(n+" is not a valid value for "+r+".");return!0};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds")};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds")};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes")};Date.validateHour=function(n){return Date._validate(n,0,23,"hours")};Date.validateDay=function(n,t,i){return Date._validate(n,1,Date.getDaysInMonth(t,i),"days")};Date.validateMonth=function(n){return Date._validate(n,0,11,"months")};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds")};Date.prototype.set=function(n){var t=n;return t.millisecond||t.millisecond===0||(t.millisecond=-1),t.second||t.second===0||(t.second=-1),t.minute||t.minute===0||(t.minute=-1),t.hour||t.hour===0||(t.hour=-1),t.day||t.day===0||(t.day=-1),t.month||t.month===0||(t.month=-1),t.year||t.year===0||(t.year=-1),t.millisecond!=-1&&Date.validateMillisecond(t.millisecond)&&this.addMilliseconds(t.millisecond-this.getMilliseconds()),t.second!=-1&&Date.validateSecond(t.second)&&this.addSeconds(t.second-this.getSeconds()),t.minute!=-1&&Date.validateMinute(t.minute)&&this.addMinutes(t.minute-this.getMinutes()),t.hour!=-1&&Date.validateHour(t.hour)&&this.addHours(t.hour-this.getHours()),t.month!==-1&&Date.validateMonth(t.month)&&this.addMonths(t.month-this.getMonth()),t.year!=-1&&Date.validateYear(t.year)&&this.addYears(t.year-this.getFullYear()),t.day!=-1&&Date.validateDay(t.day,this.getFullYear(),this.getMonth())&&this.addDays(t.day-this.getDate()),t.timezone&&this.setTimezone(t.timezone),t.timezoneOffset&&this.setTimezoneOffset(t.timezoneOffset),this};Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.isLeapYear=function(){var n=this.getFullYear();return n%4==0&&n%100!=0||n%400==0};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun())};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};Date.prototype.moveToDayOfWeek=function(n,t){var i=(n-this.getDay()+7*(t||1))%7;return this.addDays(i===0?i+=7*(t||1):i)};Date.prototype.moveToMonth=function(n,t){var i=(n-this.getMonth()+12*(t||1))%12;return this.addMonths(i===0?i+=12*(t||1):i)};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/864e5)};Date.prototype.getWeekOfYear=function(n){var t=this.getFullYear(),e=this.getMonth(),o=this.getDate(),s=n||Date.CultureInfo.firstDayOfWeek,r=8-new Date(t,0,1).getDay(),f,i,u;return r==8&&(r=1),f=(Date.UTC(t,e,o,0,0,0)-Date.UTC(t,0,1,0,0,0))/864e5+1,i=Math.floor((f-r+7)/7),i===s&&(t--,u=8-new Date(t,0,1).getDay(),i=u==2||u==8?53:52),i};Date.prototype.isDST=function(){return console.log("isDST"),this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};Date.prototype.setTimezoneOffset=function(n){var t=this.getTimezoneOffset(),i=Number(n)*-6/10;return this.addMinutes(i-t),this};Date.prototype.setTimezone=function(n){return this.setTimezoneOffset(Date.getTimezoneOffset(n))};Date.prototype.getUTCOffset=function(){var t=this.getTimezoneOffset()*-10/6,n;return t<0?(n=(t-1e4).toString(),n[0]+n.substr(2)):(n=(t+1e4).toString(),"+"+n.substr(1))};Date.prototype.getDayName=function(n){return n?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};Date.prototype.getMonthName=function(n){return n?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(n){var t=this,i=function(n){return n.toString().length==1?"0"+n:n};return n?n.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(n){switch(n){case"hh":return i(t.getHours()<13?t.getHours():t.getHours()-12);case"h":return t.getHours()<13?t.getHours():t.getHours()-12;case"HH":return i(t.getHours());case"H":return t.getHours();case"mm":return i(t.getMinutes());case"m":return t.getMinutes();case"ss":return i(t.getSeconds());case"s":return t.getSeconds();case"yyyy":return t.getFullYear();case"yy":return t.getFullYear().toString().substring(2,4);case"dddd":return t.getDayName();case"ddd":return t.getDayName(!0);case"dd":return i(t.getDate());case"d":return t.getDate().toString();case"MMMM":return t.getMonthName();case"MMM":return t.getMonthName(!0);case"MM":return i(t.getMonth()+1);case"M":return t.getMonth()+1;case"t":return t.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return t.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return""}}):this._toString()};Date.now=function(){return new Date};Date.today=function(){return Date.now().clearTime()};Date.prototype._orient=1;Date.prototype.next=function(){return this._orient=1,this};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){return this._orient=-1,this};Date.prototype._is=!1;Date.prototype.is=function(){return this._is=!0,this};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var n={};return n[this._dateElement]=this,Date.now().add(n)};Number.prototype.ago=function(){var n={};return n[this._dateElement]=this*-1,Date.now().add(n)},function(){for(var h,i,c,l,u,n=Date.prototype,s=Number.prototype,f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),e="january february march april may june july august september october november december".split(/\s/),o="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),t,a=function(n){return function(){return this._is?(this._is=!1,this.getDay()==n):this.moveToDayOfWeek(n,this._orient)}},r=0;r<f.length;r++)n[f[r]]=n[f[r].substring(0,3)]=a(r);for(h=function(n){return function(){return this._is?(this._is=!1,this.getMonth()===n):this.moveToMonth(n,this._orient)}},i=0;i<e.length;i++)n[e[i]]=n[e[i].substring(0,3)]=h(i);for(c=function(n){return function(){return n.substring(n.length-1)!="s"&&(n+="s"),this["add"+n](this._orient)}},l=function(n){return function(){return this._dateElement=n,this}},u=0;u<o.length;u++)t=o[u].toLowerCase(),n[t]=n[t+"s"]=c(o[u]),s[t]=s[t+"s"]=l(t)}();Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},function(){var i,o,f,u;Date.Parsing={Exception:function(n){this.message="Parse error at '"+n.substring(0,10)+" ...'"}};var t=Date.Parsing,n=t.Operators={rtoken:function(n){return function(i){var r=i.match(n);if(r)return[r[0],i.substring(r[0].length)];throw new t.Exception(i);}},token:function(){return function(t){return n.rtoken(new RegExp("^s*"+t+"s*"))(t)}},stoken:function(t){return n.rtoken(new RegExp("^"+t))},until:function(n){return function(t){for(var r=[],i=null;t.length;){try{i=n.call(this,t)}catch(u){r.push(i[0]);t=i[1];continue}break}return[r,t]}},many:function(n){return function(t){for(var i=[],r=null;t.length;){try{r=n.call(this,t)}catch(u){return[i,t]}i.push(r[0]);t=r[1]}return[i,t]}},optional:function(n){return function(t){var i=null;try{i=n.call(this,t)}catch(r){return[null,t]}return[i[0],i[1]]}},not:function(n){return function(i){try{n.call(this,i)}catch(r){return[null,i]}throw new t.Exception(i);}},ignore:function(n){return n?function(t){var i=null;return i=n.call(this,t),[null,i[1]]}:null},product:function(){for(var i=arguments[0],u=Array.prototype.slice.call(arguments,1),r=[],t=0;t<i.length;t++)r.push(n.each(i[t],u));return r},cache:function(n){var r={},i=null;return function(u){try{i=r[u]=r[u]||n.call(this,u)}catch(f){i=r[u]=f}if(i instanceof t.Exception)throw i;else return i}},any:function(){var n=arguments;return function(i){for(var r=null,u=0;u<n.length;u++)if(n[u]!=null){try{r=n[u].call(this,i)}catch(f){r=null}if(r)return r}throw new t.Exception(i);}},each:function(){var n=arguments;return function(i){for(var f=[],u=null,r=0;r<n.length;r++)if(n[r]!=null){try{u=n[r].call(this,i)}catch(e){throw new t.Exception(i);}f.push(u[0]);i=u[1]}return[f,i]}},all:function(){var t=arguments,n=n;return n.each(n.optional(t))},sequence:function(i,r,u){return(r=r||n.rtoken(/^\s*/),u=u||null,i.length==1)?i[0]:function(n){for(var f=null,e=null,s=[],o=0;o<i.length;o++){try{f=i[o].call(this,n)}catch(h){break}s.push(f[0]);try{e=r.call(this,f[1])}catch(c){e=null;break}n=e[1]}if(!f)throw new t.Exception(n);if(e)throw new t.Exception(e[1]);if(u)try{f=u.call(this,f[1])}catch(l){throw new t.Exception(f[1]);}return[s,f?f[1]:n]}},between:function(t,i,u){u=u||t;var f=n.each(n.ignore(t),i,n.ignore(u));return function(n){var t=f.call(this,n);return[[t[0][0],r[0][2]],t[1]]}},list:function(t,i,r){return i=i||n.rtoken(/^\s*/),r=r||null,t instanceof Array?n.each(n.product(t.slice(0,-1),n.ignore(i)),t.slice(-1),n.ignore(r)):n.each(n.many(n.each(t,n.ignore(i))),px,n.ignore(r))},set:function(i,r,u){return r=r||n.rtoken(/^\s*/),u=u||null,function(f){for(var y,a,s=null,l=null,h=null,c=null,e=[[],f],o=!1,v=0;v<i.length;v++){h=null;l=null;s=null;o=i.length==1;try{s=i[v].call(this,f)}catch(p){continue}if(c=[[s[0]],s[1]],s[1].length>0&&!o)try{h=r.call(this,s[1])}catch(w){o=!0}else o=!0;if(o||h[1].length!==0||(o=!0),!o){for(y=[],a=0;a<i.length;a++)v!=a&&y.push(i[a]);l=n.set(y,r).call(this,h[1]);l[0].length>0&&(c[0]=c[0].concat(l[0]),c[1]=l[1])}if(c[1].length<e[1].length&&(e=c),e[1].length===0)break}if(e[0].length===0)return e;if(u){try{h=u.call(this,e[1])}catch(b){throw new t.Exception(e[1]);}e[1]=h[1]}return e}},forward:function(n,t){return function(i){return n[t].call(this,i)}},replace:function(n,t){return function(i){var r=n.call(this,i);return[t,r[1]]}},process:function(n,t){return function(i){var r=n.call(this,i);return[t.call(this,r[0]),r[1]]}},min:function(n,i){return function(r){var u=i.call(this,r);if(u[0].length<n)throw new t.Exception(r);return u}}},s=function(n){return function(){var t=null,u=[],i,r;if(arguments.length>1?t=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(t=arguments[0]),t)for(i=0,r=t.shift();i<r.length;i++)return t.unshift(r[i]),u.push(n.apply(null,t)),t.shift(),u;else return n.apply(null,arguments)}},e="optional not ignore cache".split(/\s/);for(i=0;i<e.length;i++)n[e[i]]=s(n[e[i]]);for(o=function(n){return function(){return arguments[0]instanceof Array?n.apply(null,arguments[0]):n.apply(null,arguments)}},f="each any all".split(/\s/),u=0;u<f.length;u++)n[f[u]]=o(n[f[u]])}(),function(){var o=function(n){for(var i=[],t=0;t<n.length;t++)n[t]instanceof Array?i=i.concat(o(n[t])):n[t]&&i.push(n[t]);return i},u,f,e;Date.Grammar={};Date.Translator={hour:function(n){return function(){this.hour=Number(n)}},minute:function(n){return function(){this.minute=Number(n)}},second:function(n){return function(){this.second=Number(n)}},meridian:function(n){return function(){this.meridian=n.slice(0,1).toLowerCase()}},timezone:function(n){return function(){var t=n.replace(/[^\d\+\-]/g,"");t.length?this.timezoneOffset=Number(t):this.timezone=n.toLowerCase()}},day:function(n){var t=n[0];return function(){this.day=Number(t.match(/\d+/)[0])}},month:function(n){return function(){this.month=n.length==3?Date.getMonthNumberFromName(n):Number(n)-1}},year:function(n){return function(){var t=Number(n);this.year=n.length>2?t:t+(t+2e3<Date.CultureInfo.twoDigitYearMax?2e3:1900)}},rday:function(n){return function(){switch(n){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=!0}}},finishExact:function(n){var r,t,i;for(n=n instanceof Array?n:[n],r=new Date,this.year=r.getFullYear(),this.month=r.getMonth(),this.day=1,this.hour=0,this.minute=0,this.second=0,t=0;t<n.length;t++)n[t]&&n[t].call(this);if(this.hour=this.meridian=="p"&&this.hour<13?this.hour+12:this.hour,this.day>Date.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return i=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second),this.timezone?i.set({timezone:this.timezone}):this.timezoneOffset&&i.set({timezoneOffset:this.timezoneOffset}),i},finish:function(n){var f,r,t,u;if(n=n instanceof Array?o(n):[n],n.length===0)return null;for(f=0;f<n.length;f++)typeof n[f]=="function"&&n[f].call(this);if(this.now)return new Date;var i=Date.today(),e=!!(this.days!=null||this.orient||this.operator);return e?(u=this.orient=="past"||this.operator=="subtract"?-1:1,this.weekday&&(this.unit="day",r=Date.getDayNumberFromName(this.weekday)-i.getDay(),t=7,this.days=r?(r+u*t)%t:u*t),this.month&&(this.unit="month",r=this.month-i.getMonth(),t=12,this.months=r?(r+u*t)%t:u*t,this.month=null),this.unit||(this.unit="day"),(this[this.unit+"s"]==null||this.operator!=null)&&(this.value||(this.value=1),this.unit=="week"&&(this.unit="day",this.value=this.value*7),this[this.unit+"s"]=this.value*u),i.add(this)):(this.meridian&&this.hour&&(this.hour=this.hour<13&&this.meridian=="p"?this.hour+12:this.hour),this.weekday&&!this.day&&(this.day=i.addDays(Date.getDayNumberFromName(this.weekday)-i.getDay()).getDate()),this.month&&!this.day&&(this.day=1),i.set(this))}};var t=Date.Parsing.Operators,n=Date.Grammar,i=Date.Translator,r;n.datePartDelimiter=t.rtoken(/^([\s\-\.\,\/\x27]+)/);n.timePartDelimiter=t.stoken(":");n.whiteSpace=t.rtoken(/^\s*/);n.generalDelimiter=t.rtoken(/^(([\s\,]|at|on)+)/);u={};n.ctoken=function(n){var r=u[n],i;if(!r){var o=Date.CultureInfo.regexPatterns,f=n.split(/\s+/),e=[];for(i=0;i<f.length;i++)e.push(t.replace(t.rtoken(o[f[i]]),f[i]));r=u[n]=t.any.apply(null,e)}return r};n.ctoken2=function(n){return t.rtoken(Date.CultureInfo.regexPatterns[n])};n.h=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),i.hour));n.hh=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2])/),i.hour));n.H=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),i.hour));n.HH=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3])/),i.hour));n.m=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.minute));n.mm=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.minute));n.s=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.second));n.ss=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.second));n.hms=t.cache(t.sequence([n.H,n.mm,n.ss],n.timePartDelimiter));n.t=t.cache(t.process(n.ctoken2("shortMeridian"),i.meridian));n.tt=t.cache(t.process(n.ctoken2("longMeridian"),i.meridian));n.z=t.cache(t.process(t.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),i.timezone));n.zz=t.cache(t.process(t.rtoken(/^(\+|\-)\s*\d\d\d\d/),i.timezone));n.zzz=t.cache(t.process(n.ctoken2("timezone"),i.timezone));n.timeSuffix=t.each(t.ignore(n.whiteSpace),t.set([n.tt,n.zzz]));n.time=t.each(t.optional(t.ignore(t.stoken("T"))),n.hms,n.timeSuffix);n.d=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1]|\d)/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.dd=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1])/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.ddd=n.dddd=t.cache(t.process(n.ctoken("sun mon tue wed thu fri sat"),function(n){return function(){this.weekday=n}}));n.M=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d|\d)/),i.month));n.MM=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d)/),i.month));n.MMM=n.MMMM=t.cache(t.process(n.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),i.month));n.y=t.cache(t.process(t.rtoken(/^(\d\d?)/),i.year));n.yy=t.cache(t.process(t.rtoken(/^(\d\d)/),i.year));n.yyy=t.cache(t.process(t.rtoken(/^(\d\d?\d?\d?)/),i.year));n.yyyy=t.cache(t.process(t.rtoken(/^(\d\d\d\d)/),i.year));r=function(){return t.each(t.any.apply(null,arguments),t.not(n.ctoken2("timeContext")))};n.day=r(n.d,n.dd);n.month=r(n.M,n.MMM);n.year=r(n.yyyy,n.yy);n.orientation=t.process(n.ctoken("past future"),function(n){return function(){this.orient=n}});n.operator=t.process(n.ctoken("add subtract"),function(n){return function(){this.operator=n}});n.rday=t.process(n.ctoken("yesterday tomorrow today now"),i.rday);n.unit=t.process(n.ctoken("minute hour day week month year"),function(n){return function(){this.unit=n}});n.value=t.process(t.rtoken(/^\d\d?(st|nd|rd|th)?/),function(n){return function(){this.value=n.replace(/\D/g,"")}});n.expression=t.set([n.rday,n.operator,n.value,n.unit,n.orientation,n.ddd,n.MMM]);r=function(){return t.set(arguments,n.datePartDelimiter)};n.mdy=r(n.ddd,n.month,n.day,n.year);n.ymd=r(n.ddd,n.year,n.month,n.day);n.dmy=r(n.ddd,n.day,n.month,n.year);n.date=function(t){return(n[Date.CultureInfo.dateElementOrder]||n.mdy).call(this,t)};n.format=t.process(t.many(t.any(t.process(t.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(t){if(n[t])return n[t];throw Date.Parsing.Exception(t);}),t.process(t.rtoken(/^[^dMyhHmstz]+/),function(n){return t.ignore(t.stoken(n))}))),function(n){return t.process(t.each.apply(null,n),i.finishExact)});f={};e=function(t){return f[t]=f[t]||n.format(t)[0]};n.formats=function(n){var r,i;if(n instanceof Array){for(r=[],i=0;i<n.length;i++)r.push(e(n[i]));return t.any.apply(null,r)}return e(n)};n._formats=n.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);n._start=t.process(t.set([n.date,n.time,n.expression],n.generalDelimiter,n.whiteSpace),i.finish);n.start=function(t){try{var i=n._formats.call({},t);if(i[1].length===0)return i}catch(r){}return n._start.call({},t)}}();Date._parse=Date.parse;Date.parse=function(n){var t=null;if(!n)return null;try{t=Date.Grammar.start.call({},n)}catch(i){return null}return t[1].length===0?t[0]:null};Date.getParseFunction=function(n){var t=Date.Grammar.formats(n);return function(n){var i=null;try{i=t.call({},n)}catch(r){return null}return i[1].length===0?i[0]:null}};Date.parseExact=function(n,t){return Date.getParseFunction(t)(n)},function(n){typeof define=="function"&&define.amd?define(["picker","jquery"],n):n(Picker,jQuery)}(function(n,t){function r(n,t){var i=this,e=n.$node[0].value,r=n.$node.data("value"),u=r||e,o=r?t.formatSubmit:t.format,f=function(){return getComputedStyle(n.$root[0]).direction==="rtl"};i.settings=t;i.$node=n.$node;i.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"};i.item={};i.item.clear=null;i.item.disable=(t.disable||[]).slice(0);i.item.enable=-function(n){return n[0]===!0?n.shift():-1}(i.item.disable);i.set("min",t.min).set("max",t.max).set("now");u?i.set("select",u,{format:o}):i.set("select",null).set("highlight",i.item.now);i.key={40:7,38:-7,39:function(){return f()?-1:1},37:function(){return f()?1:-1},go:function(n){var t=i.item.highlight,r=new Date(t.year,t.month,t.date+n);i.set("highlight",[r.getFullYear(),r.getMonth(),r.getDate()],{interval:n});this.render()}};n.on("render",function(){n.$root.find("."+t.klass.selectMonth).on("change",function(){var i=this.value;i&&(n.set("highlight",[n.get("view").year,i,n.get("highlight").date]),n.$root.find("."+t.klass.selectMonth).trigger("focus"))});n.$root.find("."+t.klass.selectYear).on("change",function(){var i=this.value;i&&(n.set("highlight",[i,n.get("view").month,n.get("highlight").date]),n.$root.find("."+t.klass.selectYear).trigger("focus"))})}).on("open",function(){n.$root.find("button, select").attr("disabled",!1)}).on("close",function(){n.$root.find("button, select").attr("disabled",!0)})}var u=7,f=6,i=n._;r.prototype.set=function(n,t,i){var r=this,u=r.item;return t===null?(n=="clear"&&(n="select"),u[n]=t,r):(u[n=="enable"?"disable":n=="flip"?"enable":n]=r.queue[n].split(" ").map(function(u){return t=r[u](n,t,i)}).pop(),n=="select"?r.set("highlight",u.select,i):n=="highlight"?r.set("view",u.highlight,i):n.match(/^(flip|min|max|disable|enable)$/)&&(u.select&&r.disabled(u.select)&&r.set("select",u.select,i),u.highlight&&r.disabled(u.highlight)&&r.set("highlight",u.highlight,i)),r)};r.prototype.get=function(n){return this.item[n]};r.prototype.create=function(n,r,u){var f,e=this;return r=r===undefined?n:r,r==-Infinity||r==Infinity?f=r:t.isPlainObject(r)&&i.isInteger(r.pick)?r=r.obj:t.isArray(r)?(r=new Date(r[0],r[1],r[2]),r=i.isDate(r)?r:e.create().obj):r=i.isInteger(r)||i.isDate(r)?e.normalize(new Date(r),u):e.now(n,r,u),{year:f||r.getFullYear(),month:f||r.getMonth(),date:f||r.getDate(),day:f||r.getDay(),obj:f||r,pick:f||r.getTime()}};r.prototype.createRange=function(n,r){var f=this,u=function(n){return n===!0||t.isArray(n)||i.isDate(n)?f.create(n):n};return i.isInteger(n)||(n=u(n)),i.isInteger(r)||(r=u(r)),i.isInteger(n)&&t.isPlainObject(r)?n=[r.year,r.month,r.date+n]:i.isInteger(r)&&t.isPlainObject(n)&&(r=[n.year,n.month,n.date+r]),{from:u(n),to:u(r)}};r.prototype.withinRange=function(n,t){return n=this.createRange(n.from,n.to),t.pick>=n.from.pick&&t.pick<=n.to.pick};r.prototype.overlapRanges=function(n,t){var i=this;return n=i.createRange(n.from,n.to),t=i.createRange(t.from,t.to),i.withinRange(n,t.from)||i.withinRange(n,t.to)||i.withinRange(t,n.from)||i.withinRange(t,n.to)};r.prototype.now=function(n,t,i){return t=new Date,i&&i.rel&&t.setDate(t.getDate()+i.rel),this.normalize(t,i)};r.prototype.navigate=function(n,i,r){var s,f,u,e,c=t.isArray(i),h=t.isPlainObject(i),o=this.item.view;if(c||h){for(h?(f=i.year,u=i.month,e=i.date):(f=+i[0],u=+i[1],e=+i[2]),r&&r.nav&&o&&o.month!==u&&(f=o.year,u=o.month),s=new Date(f,u+(r&&r.nav?r.nav:0),1),f=s.getFullYear(),u=s.getMonth();new Date(f,u,e).getMonth()!==u;)e-=1;i=[f,u,e]}return i};r.prototype.normalize=function(n){return n.setHours(0,0,0,0),n};r.prototype.measure=function(n,t){var r=this;return t?i.isInteger(t)&&(t=r.now(n,t,{rel:t})):t=n=="min"?-Infinity:Infinity,t};r.prototype.viewset=function(n,t){return this.create([t.year,t.month,1])};r.prototype.validate=function(n,r,u){var f=this,c=r,e=u&&u.interval?u.interval:1,h=f.item.enable===-1,l,a,o=f.item.min,s=f.item.max,v,y,p=h&&f.item.disable.filter(function(n){if(t.isArray(n)){var u=f.create(n).pick;u<r.pick?l=!0:u>r.pick&&(a=!0)}return i.isInteger(n)}).length;if((!u||!u.nav)&&(!h&&f.disabled(r)||h&&f.disabled(r)&&(p||l||a)||!h&&(r.pick<=o.pick||r.pick>=s.pick)))for(h&&!p&&(!a&&e>0||!l&&e<0)&&(e*=-1);f.disabled(r);){if(Math.abs(e)>1&&(r.month<c.month||r.month>c.month)&&(r=c,e=e>0?1:-1),r.pick<=o.pick?(v=!0,e=1,r=f.create([o.year,o.month,o.date+(r.pick===o.pick?0:-1)])):r.pick>=s.pick&&(y=!0,e=-1,r=f.create([s.year,s.month,s.date+(r.pick===s.pick?0:1)])),v&&y)break;r=f.create([r.year,r.month,r.date+e])}return r};r.prototype.disabled=function(n){var r=this,u=r.item.disable.filter(function(u){return i.isInteger(u)?n.day===(r.settings.firstDay?u:u-1)%7:t.isArray(u)||i.isDate(u)?n.pick===r.create(u).pick:t.isPlainObject(u)?r.withinRange(u,n):void 0});return u=u.length&&!u.filter(function(n){return t.isArray(n)&&n[3]=="inverted"||t.isPlainObject(n)&&n.inverted}).length,r.item.enable===-1?!u:u||n.pick<r.item.min.pick||n.pick>r.item.max.pick};r.prototype.parse=function(n,t,r){var f=this,u={};return!t||typeof t!="string"?t:(r&&r.format||(r=r||{},r.format=f.settings.format),f.formats.toArray(r.format).map(function(n){var r=f.formats[n],e=r?i.trigger(r,f,[t,u]):n.replace(/^!/,"").length;r&&(u[n]=t.substr(0,e));t=t.substr(e)}),[u.yyyy||u.yy,+(u.mm||u.m)-1,u.dd||u.d])};r.prototype.formats=function(){function n(n,t,i){var r=n.match(/\w+/)[0];return i.mm||i.m||(i.m=t.indexOf(r)+1),r.length}function t(n){return n.match(/\w+/)[0].length}return{d:function(n,t){return n?i.digits(n):t.date},dd:function(n,t){return n?2:i.lead(t.date)},ddd:function(n,i){return n?t(n):this.settings.weekdaysShort[i.day]},dddd:function(n,i){return n?t(n):this.settings.weekdaysFull[i.day]},m:function(n,t){return n?i.digits(n):t.month+1},mm:function(n,t){return n?2:i.lead(t.month+1)},mmm:function(t,i){var r=this.settings.monthsShort;return t?n(t,r,i):r[i.month]},mmmm:function(t,i){var r=this.settings.monthsFull;return t?n(t,r,i):r[i.month]},yy:function(n,t){return n?2:(""+t.year).slice(2)},yyyy:function(n,t){return n?4:t.year},toArray:function(n){return n.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(n,t){var r=this;return r.formats.toArray(n).map(function(n){return i.trigger(r.formats[n],r,[0,t])||n.replace(/^!/,"")}).join("")}}}();r.prototype.isDateExact=function(n,r){var u=this;return i.isInteger(n)&&i.isInteger(r)||typeof n=="boolean"&&typeof r=="boolean"?n===r:(i.isDate(n)||t.isArray(n))&&(i.isDate(r)||t.isArray(r))?u.create(n).pick===u.create(r).pick:t.isPlainObject(n)&&t.isPlainObject(r)?u.isDateExact(n.from,r.from)&&u.isDateExact(n.to,r.to):!1};r.prototype.isDateOverlap=function(n,r){var u=this,f=u.settings.firstDay?1:0;return i.isInteger(n)&&(i.isDate(r)||t.isArray(r))?(n=n%7+f,n===u.create(r).day+1):i.isInteger(r)&&(i.isDate(n)||t.isArray(n))?(r=r%7+f,r===u.create(n).day+1):t.isPlainObject(n)&&t.isPlainObject(r)?u.overlapRanges(n,r):!1};r.prototype.flipEnable=function(n){var t=this.item;t.enable=n||(t.enable==-1?1:-1)};r.prototype.deactivate=function(n,r){var f=this,u=f.item.disable.slice(0);return r=="flip"?f.flipEnable():r===!1?(f.flipEnable(1),u=[]):r===!0?(f.flipEnable(-1),u=[]):r.map(function(n){for(var e,r=0;r<u.length;r+=1)if(f.isDateExact(n,u[r])){e=!0;break}e||(i.isInteger(n)||i.isDate(n)||t.isArray(n)||t.isPlainObject(n)&&n.from&&n.to)&&u.push(n)}),u};r.prototype.activate=function(n,r){var f=this,u=f.item.disable,e=u.length;return r=="flip"?f.flipEnable():r===!0?(f.flipEnable(1),u=[]):r===!1?(f.flipEnable(-1),u=[]):r.map(function(n){for(var o,s,h,r=0;r<e;r+=1)if(s=u[r],f.isDateExact(s,n)){o=u[r]=null;h=!0;break}else if(f.isDateOverlap(s,n)){t.isPlainObject(n)?(n.inverted=!0,o=n):t.isArray(n)?(o=n,o[3]||o.push("inverted")):i.isDate(n)&&(o=[n.getFullYear(),n.getMonth(),n.getDate(),"inverted"]);break}if(o)for(r=0;r<e;r+=1)if(f.isDateExact(u[r],n)){u[r]=null;break}if(h)for(r=0;r<e;r+=1)if(f.isDateOverlap(u[r],n)){u[r]=null;break}o&&u.push(o)}),u.filter(function(n){return n!=null})};r.prototype.nodes=function(n){var r=this,t=r.settings,o=r.item,c=o.now,l=o.select,a=o.highlight,e=o.view,w=o.disable,s=o.min,h=o.max,b=function(n,r){return t.firstDay&&(n.push(n.shift()),r.push(r.shift())),i.node("thead",i.node("tr",i.group({min:0,max:u-1,i:1,node:"th",item:function(i){return[n[i],t.klass.weekdays,'scope=col title="'+r[i]+'"']}})))}((t.showWeekdaysFull?t.weekdaysFull:t.weekdaysShort).slice(0),t.weekdaysFull.slice(0)),v=function(n){return i.node("div"," ",t.klass["nav"+(n?"Next":"Prev")]+(n&&e.year>=h.year&&e.month>=h.month||!n&&e.year<=s.year&&e.month<=s.month?" "+t.klass.navDisabled:""),"data-nav="+(n||-1)+" "+i.ariaAttr({role:"button",controls:r.$node[0].id+"_table"})+' title="'+(n?t.labelMonthNext:t.labelMonthPrev)+'"')},y=function(){var u=t.showMonthsShort?t.monthsShort:t.monthsFull;return t.selectMonths?i.node("select",i.group({min:0,max:11,i:1,node:"option",item:function(n){return[u[n],0,"value="+n+(e.month==n?" selected":"")+(e.year==s.year&&n<s.month||e.year==h.year&&n>h.month?" disabled":"")]}}),t.klass.selectMonth,(n?"":"disabled")+" "+i.ariaAttr({controls:r.$node[0].id+"_table"})+' title="'+t.labelMonthSelect+'"'):i.node("div",u[e.month],t.klass.month)},p=function(){var o=e.year,l=t.selectYears===!0?5:~~(t.selectYears/2),v,y;if(l){var c=s.year,a=h.year,u=o-l,f=o+l;return c>u&&(f+=c-u,u=c),a<f&&(v=u-c,y=f-a,u-=v>y?y:v,f=a),i.node("select",i.group({min:u,max:f,i:1,node:"option",item:function(n){return[n,0,"value="+n+(o==n?" selected":"")]}}),t.klass.selectYear,(n?"":"disabled")+" "+i.ariaAttr({controls:r.$node[0].id+"_table"})+' title="'+t.labelYearSelect+'"')}return i.node("div",o,t.klass.year)};return i.node("div",(t.selectYears?p()+y():y()+p())+v()+v(1),t.klass.header)+i.node("table",b+i.node("tbody",i.group({min:0,max:f-1,i:1,node:"tr",item:function(n){var f=t.firstDay&&r.create([e.year,e.month,1]).day===0?-7:0;return[i.group({min:u*n-e.day+f+1,max:function(){return this.min+u-1},i:1,node:"td",item:function(n){n=r.create([e.year,e.month,n+(t.firstDay?1:0)]);var u=l&&l.pick==n.pick,f=a&&a.pick==n.pick,o=w&&r.disabled(n)||n.pick<s.pick||n.pick>h.pick;return[i.node("div",n.date,function(i){return i.push(e.month==n.month?t.klass.infocus:t.klass.outfocus),c.pick==n.pick&&i.push(t.klass.now),u&&i.push(t.klass.selected),f&&i.push(t.klass.highlighted),o&&i.push(t.klass.disabled),i.join(" ")}([t.klass.day]),"data-pick="+n.pick+" "+i.ariaAttr({role:"gridcell",selected:u&&r.$node.val()===i.trigger(r.formats.toString,r,[t.format,n])?!0:null,activedescendant:f?!0:null,disabled:o?!0:null})),"",i.ariaAttr({role:"presentation"})]}})]}})),t.klass.table,'id="'+r.$node[0].id+'_table" '+i.ariaAttr({role:"grid",controls:r.$node[0].id,readonly:!0}))+i.node("div",i.node("button",t.today,t.klass.buttonToday,"type=button data-pick="+c.pick+(n?"":" disabled")+" "+i.ariaAttr({controls:r.$node[0].id}))+i.node("button",t.clear,t.klass.buttonClear,"type=button data-clear=1"+(n?"":" disabled")+" "+i.ariaAttr({controls:r.$node[0].id})),t.klass.footer)};r.defaults=function(n){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",format:"d mmmm, yyyy",klass:{table:n+"table",header:n+"header",navPrev:n+"nav--prev",navNext:n+"nav--next",navDisabled:n+"nav--disabled",month:n+"month",year:n+"year",selectMonth:n+"select--month",selectYear:n+"select--year",weekdays:n+"weekday",day:n+"day",disabled:n+"day--disabled",selected:n+"day--selected",highlighted:n+"day--highlighted",now:n+"day--today",infocus:n+"day--infocus",outfocus:n+"day--outfocus",footer:n+"footer",buttonClear:n+"button--clear",buttonToday:n+"button--today"}}}(n.klasses().picker+"__");n.extend("pickadate",r)});!function(n,t,i,r){"use strict";var u="prettyCheckable",f="plugin_"+u,o={label:"",labelPosition:"right",customClass:"",color:"blue"},s=function(i){t.ko&&n(i).on("change",function(t){if(t.preventDefault(),t.originalEvent===r){var u=n(this).closest(".clearfix"),i=n(u).find("a:first"),f=i.hasClass("checked");f===!0?i.addClass("checked"):i.removeClass("checked")}});i.find("a:first, label").on("touchstart click",function(i){i.preventDefault();var u=n(this).closest(".clearfix"),r=u.find("input"),f=u.find("a:first");f.hasClass("disabled")!==!0&&("radio"===r.prop("type")&&n('input[name="'+r.attr("name")+'"]').each(function(t,i){n(i).prop("checked",!1).parent().find("a:first").removeClass("checked")}),t.ko?ko.utils.triggerEvent(r[0],"click"):r.prop("checked")?r.prop("checked",!1).change():r.prop("checked",!0).change(),f.toggleClass("checked"))});i.find("a:first").on("keyup",function(t){32===t.keyCode&&n(this).click()})},e=function(t){this.element=t;this.options=n.extend({},o)};e.prototype={init:function(t){var i,e,u,o;n.extend(this.options,t);i=n(this.element);i.parent().addClass("has-pretty-child");i.css("display","none");var a=i.data("type")!==r?i.data("type"):i.attr("type"),f=null,h=i.attr("id");h!==r&&(e=n("label[for="+h+"]"),e.length>0&&(f=e.text(),e.remove()));""===this.options.label&&(this.options.label=f);f=i.data("label")!==r?i.data("label"):this.options.label;var c=i.data("labelposition")!==r?"label"+i.data("labelposition"):"label"+this.options.labelPosition,v=i.data("customclass")!==r?i.data("customclass"):this.options.customClass,y=i.data("color")!==r?i.data("color"):this.options.color,l=i.prop("disabled")===!0?"disabled":"",p=["pretty"+a,c,v,y].join(" ");i.wrap('<div class="clearfix '+p+'"><\/div>').parent().html();u=[];o=i.prop("checked")?"checked":"";"labelright"===c?(u.push('<a href="#" class="'+o+" "+l+'"><\/a>'),u.push('<label for="'+i.attr("id")+'">'+f+"<\/label>")):(u.push('<label for="'+i.attr("id")+'">'+f+"<\/label>"),u.push('<a href="#" class="'+o+" "+l+'"><\/a>'));i.parent().append(u.join("\n"));s(i.parent())},check:function(){"radio"===n(this.element).prop("type")&&n('input[name="'+n(this.element).attr("name")+'"]').each(function(t,i){n(i).prop("checked",!1).attr("checked",!1).parent().find("a:first").removeClass("checked")});n(this.element).prop("checked",!0).attr("checked",!0).parent().find("a:first").addClass("checked")},uncheck:function(){n(this.element).prop("checked",!1).attr("checked",!1).parent().find("a:first").removeClass("checked")},enable:function(){n(this.element).removeAttr("disabled").parent().find("a:first").removeClass("disabled")},disable:function(){n(this.element).attr("disabled","disabled").parent().find("a:first").addClass("disabled")},destroy:function(){var t=n(this.element),f=t.clone(),u=t.attr("id"),i;u!==r&&(i=n("label[for="+u+"]"),i.length>0&&i.insertBefore(t.parent()));f.removeAttr("style").insertAfter(i);t.parent().remove()}};n.fn[u]=function(t){var r,i;if(this.data(f)instanceof e||this.data(f,new e(this)),i=this.data(f),i.element=this,"undefined"==typeof t||"object"==typeof t)"function"==typeof i.init&&i.init(t);else{if("string"==typeof t&&"function"==typeof i[t])return r=Array.prototype.slice.call(arguments,1),i[t].apply(i,r);n.error("Method "+t+" does not exist on jQuery."+u)}}}(jQuery,window,document),function(n,t,i){function h(t,i){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=n(t);this.$elProxy;this.elProxyPosition;this.enabled=!0;this.options=n.extend({},f,i);this.mouseIsOverProxy=!1;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function e(t,i){var r=!0;return n.each(t,function(n){if(typeof i[n]=="undefined"||t[n]!==i[n])return r=!1,!1}),r}function o(){return!s&&r}function u(){var u=i.body||i.documentElement,r=u.style,n="transition",t;if(typeof r[n]=="string")return!0;for(v=["Moz","Webkit","Khtml","O","ms"],n=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<v.length;t++)if(typeof r[v[t]+n]=="string")return!0;return!1}var f={animation:"fade",arrow:!0,arrowColor:"",autoClose:!0,content:null,contentAsHTML:!1,contentCloning:!0,debug:!0,delay:200,minWidth:0,maxWidth:null,functionInit:function(){},functionBefore:function(n,t){t()},functionReady:function(){},functionAfter:function(){},icon:"(?)",iconCloning:!0,iconDesktop:!1,iconTouch:!1,iconTheme:"tooltipster-icon",interactive:!1,interactiveTolerance:350,multiple:!1,offsetX:0,offsetY:0,onlyOne:!1,position:"top",positionTracker:!1,speed:350,timer:0,theme:"tooltipster-default",touchDevices:!0,trigger:"hover",updateAnimation:!0},r,s;h.prototype={_init:function(){var t=this,u,f;if(i.querySelector)if(t.options.content!==null?t._content_set(t.options.content):(u=t.$el.attr("title"),typeof u=="undefined"&&(u=null),t._content_set(u)),f=t.options.functionInit.call(t.$el,t.$el,t.Content),typeof f!="undefined"&&t._content_set(f),t.$el.removeAttr("title").addClass("tooltipstered"),!r&&t.options.iconDesktop||r&&t.options.iconTouch?(typeof t.options.icon=="string"?(t.$elProxy=n('<span class="'+t.options.iconTheme+'"><\/span>'),t.$elProxy.text(t.options.icon)):t.$elProxy=t.options.iconCloning?t.options.icon.clone(!0):t.options.icon,t.$elProxy.insertAfter(t.$el)):t.$elProxy=t.$el,t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){(!o()||t.options.touchDevices)&&(t.mouseIsOverProxy=!0,t._show())}).on("mouseleave."+t.namespace,function(){(!o()||t.options.touchDevices)&&(t.mouseIsOverProxy=!1)});if(r&&t.options.touchDevices)t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}else if(t.options.trigger=="click")t.$elProxy.on("click."+t.namespace,function(){(!o()||t.options.touchDevices)&&t._show()})},_show:function(){var n=this;n.Status!="shown"&&n.Status!="appearing"&&(n.options.delay?n.timerShow=setTimeout(function(){(n.options.trigger=="click"||n.options.trigger=="hover"&&n.mouseIsOverProxy)&&n._showNow()},n.options.delay):n._showNow())},_showNow:function(i){var f=this;f.options.functionBefore.call(f.$el,f.$el,function(){var e,s,o;if(f.enabled&&f.Content!==null){if(i&&f.callbacks.show.push(i),f.callbacks.hide=[],clearTimeout(f.timerShow),f.timerShow=null,clearTimeout(f.timerHide),f.timerHide=null,f.options.onlyOne&&n(".tooltipstered").not(f.$el).each(function(t,i){var r=n(i),u=r.data("tooltipster-ns");n.each(u,function(n,t){var i=r.data(t),u=i.status(),f=i.option("autoClose");u!=="hidden"&&u!=="disappearing"&&f&&i.hide()})}),e=function(){f.Status="shown";n.each(f.callbacks.show,function(n,t){t.call(f.$el)});f.callbacks.show=[]},f.Status!=="hidden")s=0,f.Status==="disappearing"?(f.Status="appearing",u()?(f.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+f.options.animation+"-show"),f.options.speed>0&&f.$tooltip.delay(f.options.speed),f.$tooltip.queue(e)):f.$tooltip.stop().fadeIn(e)):f.Status==="shown"&&e();else{f.Status="appearing";s=f.options.speed;f.bodyOverflowX=n("body").css("overflow-x");n("body").css("overflow-x","hidden");var h="tooltipster-"+f.options.animation,c="-webkit-transition-duration: "+f.options.speed+"ms; -webkit-animation-duration: "+f.options.speed+"ms; -moz-transition-duration: "+f.options.speed+"ms; -moz-animation-duration: "+f.options.speed+"ms; -o-transition-duration: "+f.options.speed+"ms; -o-animation-duration: "+f.options.speed+"ms; -ms-transition-duration: "+f.options.speed+"ms; -ms-animation-duration: "+f.options.speed+"ms; transition-duration: "+f.options.speed+"ms; animation-duration: "+f.options.speed+"ms;",l=f.options.minWidth?"min-width:"+Math.round(f.options.minWidth)+"px;":"",a=f.options.maxWidth?"max-width:"+Math.round(f.options.maxWidth)+"px;":"",v=f.options.interactive?"pointer-events: auto;":"";f.$tooltip=n('<div class="tooltipster-base '+f.options.theme+'" style="'+l+" "+a+" "+v+" "+c+'"><div class="tooltipster-content"><\/div><\/div>');u()&&f.$tooltip.addClass(h);f._content_insert();f.$tooltip.appendTo("body");f.reposition();f.options.functionReady.call(f.$el,f.$el,f.$tooltip);u()?(f.$tooltip.addClass(h+"-show"),f.options.speed>0&&f.$tooltip.delay(f.options.speed),f.$tooltip.queue(e)):f.$tooltip.css("display","none").fadeIn(f.options.speed,e);f._interval_set();n(t).on("scroll."+f.namespace+" resize."+f.namespace,function(){f.reposition()});if(f.options.autoClose)if(n("body").off("."+f.namespace),f.options.trigger=="hover")if(r&&setTimeout(function(){n("body").on("touchstart."+f.namespace,function(){f.hide()})},0),f.options.interactive){if(r)f.$tooltip.on("touchstart."+f.namespace,function(n){n.stopPropagation()});o=null;f.$elProxy.add(f.$tooltip).on("mouseleave."+f.namespace+"-autoClose",function(){clearTimeout(o);o=setTimeout(function(){f.hide()},f.options.interactiveTolerance)}).on("mouseenter."+f.namespace+"-autoClose",function(){clearTimeout(o)})}else f.$elProxy.on("mouseleave."+f.namespace+"-autoClose",function(){f.hide()});else if(f.options.trigger=="click"&&(setTimeout(function(){n("body").on("click."+f.namespace+" touchstart."+f.namespace,function(){f.hide()})},0),f.options.interactive))f.$tooltip.on("click."+f.namespace+" touchstart."+f.namespace,function(n){n.stopPropagation()})}f.options.timer>0&&(f.timerHide=setTimeout(function(){f.timerHide=null;f.hide()},f.options.timer+s))}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(n("body").find(t.$el).length===0||n("body").find(t.$elProxy).length===0||t.Status=="hidden"||n("body").find(t.$tooltip).length===0)(t.Status=="shown"||t.Status=="appearing")&&t.hide(),t._interval_cancel();else if(t.options.positionTracker){var i=t._repositionInfo(t.$elProxy),r=!1;e(i.dimension,t.elProxyPosition.dimension)&&(t.$elProxy.css("position")==="fixed"?e(i.position,t.elProxyPosition.position)&&(r=!0):e(i.offset,t.elProxyPosition.offset)&&(r=!0));r||t.reposition()}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(n){typeof n=="object"&&n!==null&&this.options.contentCloning&&(n=n.clone(!0));this.Content=n},_content_insert:function(){var n=this,t=this.$tooltip.find(".tooltipster-content");typeof n.Content!="string"||n.options.contentAsHTML?t.empty().append(n.Content):t.text(n.Content)},_update:function(n){var t=this;t._content_set(n);t.Content!==null?t.Status!=="hidden"&&(t._content_insert(),t.reposition(),t.options.updateAnimation&&(u()?(t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing"),setTimeout(function(){t.Status!="hidden"&&(t.$tooltip.removeClass("tooltipster-content-changing"),setTimeout(function(){t.Status!=="hidden"&&t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})},t.options.speed))},t.options.speed)):t.$tooltip.fadeTo(t.options.speed,.5,function(){t.Status!="hidden"&&t.$tooltip.fadeTo(t.options.speed,1)}))):t.hide()},_repositionInfo:function(n){return{dimension:{height:n.outerHeight(!1),width:n.outerWidth(!1)},offset:n.offset(),position:{left:parseInt(n.css("left")),top:parseInt(n.css("top"))}}},hide:function(i){var r=this,f,e;return i&&r.callbacks.hide.push(i),r.callbacks.show=[],clearTimeout(r.timerShow),r.timerShow=null,clearTimeout(r.timerHide),r.timerHide=null,f=function(){n.each(r.callbacks.hide,function(n,t){t.call(r.$el)});r.callbacks.hide=[]},r.Status=="shown"||r.Status=="appearing"?(r.Status="disappearing",e=function(){r.Status="hidden";typeof r.Content=="object"&&r.Content!==null&&r.Content.detach();r.$tooltip.remove();r.$tooltip=null;n(t).off("."+r.namespace);n("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);n("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);f()},u()?(r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying"),r.options.speed>0&&r.$tooltip.delay(r.options.speed),r.$tooltip.queue(e)):r.$tooltip.stop().fadeOut(r.options.speed,e)):r.Status=="hidden"&&f(),r},show:function(n){return this._showNow(n),this},update:function(n){return this.content(n)},content:function(n){return typeof n=="undefined"?this.Content:(this._update(n),this)},reposition:function(){var r=this,k,y,vt,p,ut,ft,w,dt,a,nt,kt,tt,gt,ni;if(n("body").find(r.$tooltip).length!==0){r.$tooltip.css("width","");r.elProxyPosition=r._repositionInfo(r.$elProxy);var o=null,b=n(t).width(),i=r.elProxyPosition,e=r.$tooltip.outerWidth(!1),ui=r.$tooltip.innerWidth()+1,c=r.$tooltip.outerHeight(!1);if(r.$elProxy.is("area")){var yt=r.$elProxy.attr("shape"),ti=r.$elProxy.parent().attr("name"),et=n('img[usemap="#'+ti+'"]'),ot=et.offset().left,st=et.offset().top,v=r.$elProxy.attr("coords")!==undefined?r.$elProxy.attr("coords").split(","):undefined;if(yt=="circle"){var pt=parseInt(v[0]),wt=parseInt(v[1]),ht=parseInt(v[2]);i.dimension.height=ht*2;i.dimension.width=ht*2;i.offset.top=st+wt-ht;i.offset.left=ot+pt-ht}else if(yt=="rect"){var pt=parseInt(v[0]),wt=parseInt(v[1]),ii=parseInt(v[2]),ri=parseInt(v[3]);i.dimension.height=ri-wt;i.dimension.width=ii-pt;i.offset.top=st+wt;i.offset.left=ot+pt}else if(yt=="poly"){var it=0,rt=0,ct=0,lt=0,bt="even";for(k=0;k<v.length;k++)y=parseInt(v[k]),bt=="even"?(y>ct&&(ct=y,k===0&&(it=ct)),y<it&&(it=y),bt="odd"):(y>lt&&(lt=y,k==1&&(rt=lt)),y<rt&&(rt=y),bt="even");i.dimension.height=lt-rt;i.dimension.width=ct-it;i.offset.top=st+rt;i.offset.left=ot+it}else i.dimension.height=et.outerHeight(!1),i.dimension.width=et.outerWidth(!1),i.offset.top=st,i.offset.left=ot}var u=0,at=0,l=0,s=parseInt(r.options.offsetY),h=parseInt(r.options.offsetX),f=r.options.position;function d(){var i=n(t).scrollLeft();u-i<0&&(o=u-i,u=i);u+e-i>b&&(o=u-(b+i-e),u=b+i-e)}function g(r,u){i.offset.top-n(t).scrollTop()-c-s-12<0&&u.indexOf("top")>-1&&(f=r);i.offset.top+i.dimension.height+c+12+s>n(t).scrollTop()+n(t).height()&&u.indexOf("bottom")>-1&&(f=r,l=i.offset.top-c-s-12)}f=="top"&&(vt=i.offset.left+e-(i.offset.left+i.dimension.width),u=i.offset.left+h-vt/2,l=i.offset.top-c-s-12,d(),g("bottom","top"));f=="top-left"&&(u=i.offset.left+h,l=i.offset.top-c-s-12,d(),g("bottom-left","top-left"));f=="top-right"&&(u=i.offset.left+i.dimension.width+h-e,l=i.offset.top-c-s-12,d(),g("bottom-right","top-right"));f=="bottom"&&(vt=i.offset.left+e-(i.offset.left+i.dimension.width),u=i.offset.left-vt/2+h,l=i.offset.top+i.dimension.height+s+12,d(),g("top","bottom"));f=="bottom-left"&&(u=i.offset.left+h,l=i.offset.top+i.dimension.height+s+12,d(),g("top-left","bottom-left"));f=="bottom-right"&&(u=i.offset.left+i.dimension.width+h-e,l=i.offset.top+i.dimension.height+s+12,d(),g("top-right","bottom-right"));f=="left"&&(u=i.offset.left-h-e-12,at=i.offset.left+h+i.dimension.width+12,p=i.offset.top+c-(i.offset.top+i.dimension.height),l=i.offset.top-p/2-s,u<0&&at+e>b?(ut=parseFloat(r.$tooltip.css("border-width"))*2,ft=e+u-ut,r.$tooltip.css("width",ft+"px"),c=r.$tooltip.outerHeight(!1),u=i.offset.left-h-ft-12-ut,p=i.offset.top+c-(i.offset.top+i.dimension.height),l=i.offset.top-p/2-s):u<0&&(u=i.offset.left+h+i.dimension.width+12,o="left"));f=="right"&&(u=i.offset.left+h+i.dimension.width+12,at=i.offset.left-h-e-12,p=i.offset.top+c-(i.offset.top+i.dimension.height),l=i.offset.top-p/2-s,u+e>b&&at<0?(ut=parseFloat(r.$tooltip.css("border-width"))*2,ft=b-u-ut,r.$tooltip.css("width",ft+"px"),c=r.$tooltip.outerHeight(!1),p=i.offset.top+c-(i.offset.top+i.dimension.height),l=i.offset.top-p/2-s):u+e>b&&(u=i.offset.left-h-e-12,o="right"));r.options.arrow&&(w="tooltipster-arrow-"+f,dt=r.options.arrowColor.length<1?r.$tooltip.css("background-color"):r.options.arrowColor,o?o=="left"?(w="tooltipster-arrow-right",o=""):o=="right"?(w="tooltipster-arrow-left",o=""):o="left:"+Math.round(o)+"px;":o="",f=="top"||f=="top-left"||f=="top-right"?(a=parseFloat(r.$tooltip.css("border-bottom-width")),nt=r.$tooltip.css("border-bottom-color")):f=="bottom"||f=="bottom-left"||f=="bottom-right"?(a=parseFloat(r.$tooltip.css("border-top-width")),nt=r.$tooltip.css("border-top-color")):f=="left"?(a=parseFloat(r.$tooltip.css("border-right-width")),nt=r.$tooltip.css("border-right-color")):f=="right"?(a=parseFloat(r.$tooltip.css("border-left-width")),nt=r.$tooltip.css("border-left-color")):(a=parseFloat(r.$tooltip.css("border-bottom-width")),nt=r.$tooltip.css("border-bottom-color")),a>1&&a++,kt="",a!==0&&(tt="",gt="border-color: "+nt+";",w.indexOf("bottom")!==-1?tt="margin-top: -"+Math.round(a)+"px;":w.indexOf("top")!==-1?tt="margin-bottom: -"+Math.round(a)+"px;":w.indexOf("left")!==-1?tt="margin-right: -"+Math.round(a)+"px;":w.indexOf("right")!==-1&&(tt="margin-left: -"+Math.round(a)+"px;"),kt='<span class="tooltipster-arrow-border" style="'+tt+" "+gt+';"><\/span>'),r.$tooltip.find(".tooltipster-arrow").remove(),ni='<div class="'+w+' tooltipster-arrow" style="'+o+'">'+kt+'<span style="border-color:'+dt+';"><\/span><\/div>',r.$tooltip.append(ni));r.$tooltip.css({top:Math.round(l)+"px",left:Math.round(u)+"px"})}return r},enable:function(){return this.enabled=!0,this},disable:function(){return this.hide(),this.enabled=!1,this},destroy:function(){var t=this,i,r;return t.hide(),t.$el[0]!==t.$elProxy[0]&&t.$elProxy.remove(),t.$el.removeData(t.namespace).off("."+t.namespace),i=t.$el.data("tooltipster-ns"),i.length===1?(r=typeof t.Content=="string"?t.Content:n("<div><\/div>").append(t.Content).html(),t.$el.removeClass("tooltipstered").attr("title",r).removeData(t.namespace).removeData("tooltipster-ns").off("."+t.namespace)):(i=n.grep(i,function(n){return n!==t.namespace}),t.$el.data("tooltipster-ns",i)),t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(n,t){return typeof t=="undefined"?this.options[n]:(this.options[n]=t,this)},status:function(){return this.Status}};n.fn["tooltipster"]=function(){var t=arguments,r,i;if(this.length===0){if(typeof t[0]=="string"){r=!0;switch(t[0]){case"setDefaults":n.extend(f,t[1]);break;default:r=!1}return r?!0:this}return this}if(typeof t[0]=="string")return i="#*$~&",this.each(function(){var f=n(this).data("tooltipster-ns"),r=f?n(this).data(f[0]):null,u;if(r){if(typeof r[t[0]]=="function")u=r[t[0]](t[1],t[2]);else throw new Error('Unknown method .tooltipster("'+t[0]+'")');if(u!==r)return i=u,!1}else throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');}),i!=="#*$~&"?i:this;var u=[],e=t[0]&&typeof t[0].multiple!="undefined",o=e&&t[0].multiple||!e&&f.multiple,s=t[0]&&typeof t[0].debug!="undefined",c=s&&t[0].debug||!s&&f.debug;return this.each(function(){var f=!1,i=n(this).data("tooltipster-ns"),r=null;i?o?f=!0:c&&console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.'):f=!0;f&&(r=new h(this,t[0]),i||(i=[]),i.push(r.namespace),n(this).data("tooltipster-ns",i),n(this).data(r.namespace,r));u.push(r)}),o?u:this};r=!!("ontouchstart"in t);s=!1;n("body").one("mousemove",function(){s=!0})}(jQuery,window,document),function(n,t){typeof define=="function"&&define.amd?define(["jquery"],t):t(n.jQuery)}(this,function(n){function u(){var i=document.createElement("smartbanner"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}var t=navigator.userAgent,r=/Edge/i.test(t),i=function(i){var e,u,f;if((this.origHtmlMargin=parseFloat(n("html").css("margin-top")),this.options=n.extend({},n.smartbanner.defaults,i),e=navigator.standalone,this.options.force?this.type=this.options.force:t.match(/Windows Phone/i)!==null&&t.match(/Edge|Touch/i)!==null?this.type="windows":t.match(/iPhone|iPod/i)!==null||t.match(/iPad/)&&this.options.iOSUniversalApp?t.match(/Safari/i)!==null&&(t.match(/CriOS/i)!==null||t.match(/FxiOS/i)!=null||window.Number(t.substr(t.indexOf("OS ")+3,3).replace("_","."))<6)&&(this.type="ios"):t.match(/\bSilk\/(.*\bMobile Safari\b)?/)||t.match(/\bKF\w/)||t.match("Kindle Fire")?this.type="kindle":t.match(/Android/i)!==null&&(this.type="android"),this.type&&!e&&!this.getCookie("sb-closed")&&!this.getCookie("sb-installed"))&&(this.scale=this.options.scale=="auto"?n(window).width()/window.screen.width:this.options.scale,this.scale<1&&(this.scale=1),u=n(this.type=="android"?'meta[name="google-play-app"]':this.type=="ios"?'meta[name="apple-itunes-app"]':this.type=="kindle"?'meta[name="kindle-fire-app"]':'meta[name="msApplication-ID"]'),u.length)){if(this.type=="windows")r&&(this.appId=n('meta[name="msApplication-PackageEdgeName"]').attr("content")),this.appId||(this.appId=n('meta[name="msApplication-PackageFamilyName"]').attr("content"));else if(f=/app-id=([^\s,]+)/.exec(u.attr("content")),f)this.appId=f[1];else return;this.title=this.options.title?this.options.title:u.data("title")||n("title").text().replace(/\s*[|\-·].*$/,"");this.author=this.options.author?this.options.author:u.data("author")||(n('meta[name="author"]').length?n('meta[name="author"]').attr("content"):window.location.hostname);this.iconUrl=u.data("icon-url");this.price=u.data("price");this.options.onInstall=typeof this.options.onInstall=="function"?this.options.onInstall:function(){};this.options.onClose=typeof this.options.onClose=="function"?this.options.onClose:function(){};this.create();this.show();this.listen()}};(i.prototype={constructor:i,create:function(){var t,u=this.price||this.options.price,f=this.options.url||function(){switch(this.type){case"android":return"market://details?id=";case"kindle":return"amzn://apps/android?asin=";case"windows":return r?"ms-windows-store://pdp/?productid=":"ms-windows-store:navigate?appid="}return"https://itunes.apple.com/"+this.options.appStoreLanguage+"/app/id"}.call(this)+this.appId,o=u?function(){var n=u+" - ";switch(this.type){case"android":return n+this.options.inGooglePlay;case"kindle":return n+this.options.inAmazonAppStore;case"windows":return n+this.options.inWindowsStore}return n+this.options.inAppStore}.call(this):"",e=this.options.iconGloss==null?this.type=="ios":this.options.iconGloss,i;this.type=="android"&&this.options.GooglePlayParams&&(f+="&referrer="+this.options.GooglePlayParams);i='<div id="smartbanner" class="'+this.type+'"><div class="sb-container"><a href="#" class="sb-close">&times;<\/a><span class="sb-icon"><\/span><div class="sb-info"><strong>'+this.title+"<\/strong><span>"+this.author+"<\/span><span>"+o+'<\/span><\/div><a href="'+f+'" class="sb-button"><span>'+this.options.button+"<\/span><\/a><\/div><\/div>";this.options.layer?n(this.options.appendToSelector).append(i):n(this.options.appendToSelector).prepend(i);this.options.icon?t=this.options.icon:this.iconUrl?t=this.iconUrl:n('link[rel="apple-touch-icon-precomposed"]').length>0?(t=n('link[rel="apple-touch-icon-precomposed"]').attr("href"),this.options.iconGloss==null&&(e=!1)):n('link[rel="apple-touch-icon"]').length>0?t=n('link[rel="apple-touch-icon"]').attr("href"):n('meta[name="msApplication-TileImage"]').length>0?t=n('meta[name="msApplication-TileImage"]').attr("content"):n('meta[name="msapplication-TileImage"]').length>0&&(t=n('meta[name="msapplication-TileImage"]').attr("content"));t?(n("#smartbanner .sb-icon").css("background-image","url("+t+")"),e&&n("#smartbanner .sb-icon").addClass("gloss")):n("#smartbanner").addClass("no-icon");this.bannerHeight=n("#smartbanner").outerHeight()+2;this.scale>1&&(n("#smartbanner").css("top",parseFloat(n("#smartbanner").css("top"))*this.scale).css("height",parseFloat(n("#smartbanner").css("height"))*this.scale).hide(),n("#smartbanner .sb-container").css("-webkit-transform","scale("+this.scale+")").css("-msie-transform","scale("+this.scale+")").css("-moz-transform","scale("+this.scale+")").css("width",n(window).width()/this.scale));n("#smartbanner").css("position",this.options.layer?"absolute":"static")},listen:function(){n("#smartbanner .sb-close").on("click",n.proxy(this.close,this));n("#smartbanner .sb-button").on("click",n.proxy(this.install,this))},show:function(t){var i=n("#smartbanner"),r;i.stop();this.options.layer?(i.animate({top:0,display:"block"},this.options.speedIn).addClass("shown").show(),n(this.pushSelector).animate({paddingTop:this.origHtmlMargin+this.bannerHeight*this.scale},this.options.speedIn,"swing",t)):n.support.transition?(i.animate({top:0},this.options.speedIn).addClass("shown"),r=function(){n("html").removeClass("sb-animation");t&&t()},n(this.pushSelector).addClass("sb-animation").one(n.support.transition.end,r).emulateTransitionEnd(this.options.speedIn).css("margin-top",this.origHtmlMargin+this.bannerHeight*this.scale)):i.slideDown(this.options.speedIn).addClass("shown")},hide:function(t){var i=n("#smartbanner"),r;i.stop();this.options.layer?(i.animate({top:-1*this.bannerHeight*this.scale,display:"block"},this.options.speedIn).removeClass("shown"),n(this.pushSelector).animate({paddingTop:this.origHtmlMargin},this.options.speedIn,"swing",t)):n.support.transition?(this.type!=="android"?i.css("top",-1*this.bannerHeight*this.scale).removeClass("shown"):i.css({display:"none"}).removeClass("shown"),r=function(){n("html").removeClass("sb-animation");t&&t()},n(this.pushSelector).addClass("sb-animation").one(n.support.transition.end,r).emulateTransitionEnd(this.options.speedOut).css("margin-top",this.origHtmlMargin)):i.slideUp(this.options.speedOut).removeClass("shown")},close:function(n){n.preventDefault();this.hide();this.setCookie("sb-closed","true",this.options.daysHidden);this.options.onClose(n)},install:function(n){this.options.hideOnInstall&&this.hide();this.setCookie("sb-installed","true",this.options.daysReminder);this.options.onInstall(n)},setCookie:function(n,t,i){var r=new Date;r.setDate(r.getDate()+i);t=encodeURI(t)+(i==null?"":"; expires="+r.toUTCString());document.cookie=n+"="+t+"; path=/;"},getCookie:function(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return decodeURI(u);return null},switchType:function(){var t=this;this.hide(function(){t.type=t.type=="android"?"ios":"android";var i=n(t.type=="android"?'meta[name="google-play-app"]':'meta[name="apple-itunes-app"]').attr("content");t.appId=/app-id=([^\s,]+)/.exec(i)[1];n("#smartbanner").detach();t.create();t.show()})}},n.smartbanner=function(t){var u=n(window),r=u.data("smartbanner"),f=typeof t=="object"&&t;r||u.data("smartbanner",r=new i(f));typeof t=="string"&&r[t]()},n.smartbanner.defaults={title:null,author:null,price:"FREE",appStoreLanguage:"us",inAppStore:"On the App Store",inGooglePlay:"In Google Play",inAmazonAppStore:"In the Amazon Appstore",inWindowsStore:"In the Windows Store",GooglePlayParams:null,icon:null,iconGloss:null,button:"VIEW",url:null,scale:"auto",speedIn:300,speedOut:400,daysHidden:15,daysReminder:90,force:null,hideOnInstall:!0,layer:!1,iOSUniversalApp:!0,appendToSelector:"body",pushSelector:"html"},n.smartbanner.Constructor=i,n.support.transition===undefined)&&(n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this},n(function(){n.support.transition=u()}))});!function(n,t){function v(n,t,r){var e=n.children(),o=!1,u,s,f;for(n.empty(),u=0,s=e.length;s>u;u++){if(f=e.eq(u),n.append(f),r&&n.append(r),i(n,t)){f.remove();o=!0;break}r&&r.detach()}return o}function f(t,r,u,e,o){var s=!1,h="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",c="script, .dotdotdot-keep";return t.contents().detach().each(function(){var a=this,l=n(a);if("undefined"==typeof a||3==a.nodeType&&0==n.trim(a.data).length)return!0;if(l.is(c))t.append(l);else{if(s)return!0;t.append(l);o&&t[t.is(h)?"after":"append"](o);i(u,e)&&(s=3==a.nodeType?y(l,r,u,e,o):f(l,r,u,e,o),s||(l.detach(),s=!0));s||o&&o.detach()}}),s}function y(t,f,o,h,c){var l=t[0],nt,k,d;if(!l)return!1;var y=s(l),tt=-1!==y.indexOf(" ")?" ":"　",p="letter"==h.wrap?"":tt,a=y.split(p),g=-1,w=-1,b=0,v=a.length-1;for(h.fallbackToLetter&&0==b&&0==v&&(p="",a=y.split(p),v=a.length-1);v>=b&&(0!=b||0!=v);){if(nt=Math.floor((b+v)/2),nt==w)break;w=nt;u(l,a.slice(0,w+1).join(p)+h.ellipsis);i(o,h)?(v=w,h.fallbackToLetter&&0==b&&0==v&&(p="",a=a[0].split(p),g=-1,w=-1,b=0,v=a.length-1)):(g=w,b=w)}return-1==g||1==a.length&&0==a[0].length?(k=t.parent(),t.detach(),d=c&&c.closest(k).length?c.length:0,k.contents().length>d?l=r(k.contents().eq(-1-d),f):(l=r(k,f,!0),d||k.detach()),l&&(y=e(s(l),h),u(l,y),d&&c&&n(l).parent().append(c))):(y=e(a.slice(0,g+1).join(p),h),u(l,y)),!0}function i(n,t){return n.innerHeight()>t.maxHeight}function e(t,i){for(;n.inArray(t.slice(-1),i.lastCharacter.remove)>-1;)t=t.slice(0,-1);return n.inArray(t.slice(-1),i.lastCharacter.noEllipsis)<0&&(t+=i.ellipsis),t}function o(n){return{width:n.innerWidth(),height:n.innerHeight()}}function u(n,t){n.innerText?n.innerText=t:n.nodeValue?n.nodeValue=t:n.textContent&&(n.textContent=t)}function s(n){return n.innerText?n.innerText:n.nodeValue?n.nodeValue:n.textContent?n.textContent:""}function h(n){do n=n.previousSibling;while(n&&1!==n.nodeType&&3!==n.nodeType);return n}function r(t,i,u){var f,e=t&&t[0];if(e){if(!u){if(3===e.nodeType)return e;if(n.trim(t.text()))return r(t.contents().last(),i)}for(f=h(e);!f;){if(t=t.parent(),t.is(i)||!t.length)return!1;f=h(t[0])}if(f)return r(n(f),i)}return!1}function p(t,i){return t?"string"==typeof t?(t=n(t,i),t.length?t:!1):t.jquery?t:!1:!1}function w(n){for(var t,r=n.innerHeight(),u=["paddingTop","paddingBottom"],i=0,f=u.length;f>i;i++)t=parseInt(n.css(u[i]),10),isNaN(t)&&(t=0),r-=t;return r}var c,l,a;n.fn.dotdotdot||(n.fn.dotdotdot=function(t){var r;if(0==this.length)return n.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){n(this).dotdotdot(t)});r=this;r.data("dotdotdot")&&r.trigger("destroy.dot");r.data("dotdotdot-style",r.attr("style")||"");r.css("word-wrap","break-word");"nowrap"===r.css("white-space")&&r.css("white-space","normal");r.bind_events=function(){return r.bind("update.dot",function(t,o){t.preventDefault();t.stopPropagation();u.maxHeight="number"==typeof u.height?u.height:w(r);u.maxHeight+=u.tolerance;"undefined"!=typeof o&&(("string"==typeof o||o instanceof HTMLElement)&&(o=n("<div />").append(o).contents()),o instanceof n&&(h=o));s=r.wrapInner('<div class="dotdotdot" />').children();s.contents().detach().end().append(h.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,l=!1;return e.afterElement&&(c=e.afterElement.clone(!0),c.show(),e.afterElement.detach()),i(s,u)&&(l="children"==u.wrap?v(s,u,c):f(s,r,s,u,c)),s.replaceWith(s.contents()),s=null,n.isFunction(u.callback)&&u.callback.call(r[0],l,h),e.isTruncated=l,l}).bind("isTruncated.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),"function"==typeof t&&t.call(r[0],e.isTruncated),e.isTruncated}).bind("originalContent.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),"function"==typeof t&&t.call(r[0],h),h}).bind("destroy.dot",function(n){n.preventDefault();n.stopPropagation();r.unwatch().unbind_events().contents().detach().end().append(h).attr("style",r.data("dotdotdot-style")||"").data("dotdotdot",!1)}),r};r.unbind_events=function(){return r.unbind(".dot"),r};r.watch=function(){if(r.unwatch(),"window"==u.watch){var t=n(window),i=t.width(),f=t.height();t.bind("resize.dot"+e.dotId,function(){i==t.width()&&f==t.height()&&u.windowResizeFix||(i=t.width(),f=t.height(),l&&clearInterval(l),l=setTimeout(function(){r.trigger("update.dot")},100))})}else a=o(r),l=setInterval(function(){if(r.is(":visible")){var n=o(r);(a.width!=n.width||a.height!=n.height)&&(r.trigger("update.dot"),a=n)}},500);return r};r.unwatch=function(){return n(window).unbind("resize.dot"+e.dotId),l&&clearInterval(l),r};var h=r.contents(),u=n.extend(!0,{},n.fn.dotdotdot.defaults,t),e={},a={},l=null,s=null;return u.lastCharacter.remove instanceof Array||(u.lastCharacter.remove=n.fn.dotdotdot.defaultArrays.lastCharacter.remove),u.lastCharacter.noEllipsis instanceof Array||(u.lastCharacter.noEllipsis=n.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),e.afterElement=p(u.after,r),e.isTruncated=!1,e.dotId=c++,r.data("dotdotdot",!0).bind_events().trigger("update.dot"),u.watch&&r.watch(),r},n.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},n.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" ","　",",",";",".","!","?"],noEllipsis:[]}},n.fn.dotdotdot.debug=function(){},c=1,l=n.fn.html,n.fn.html=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?this.trigger("update",[i]):l.apply(this,arguments)},a=n.fn.text,n.fn.text=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?(i=n("<div />").text(i).html(),this.trigger("update",[i])):a.apply(this,arguments)})}(jQuery),function(n,t,i){"use strict";function rt(n,t){for(var i in t.props)si.test(i)&&(n[i]=t.props[i])}function ut(n){return n}function ai(n){return n}function yt(n){s._dbgMode=n;oi=n?"Unavailable (nested view): use #getIndex()":"";it("dbg",li.dbg=tt.dbg=n?ai:ut)}function ft(n){this.name=(u.link?"JsViews":"JsRender")+" Error";this.message=n||this.name}function f(n,t){for(var i in t)n[i]=t[i];return n}function y(n){return typeof n=="function"}function pt(n,t,i){return(!o.rTag||n)&&(b=n?n.charAt(0):b,k=n?n.charAt(1):k,h=t?t.charAt(0):h,v=t?t.charAt(1):v,nt=i||nt,n="\\"+b+"(\\"+nt+")?\\"+k,t="\\"+h+"\\"+v,w="(?:(?:(\\w+(?=[\\/\\s\\"+h+"]))|(?:(\\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\\*)))\\s*((?:[^\\"+h+"]|\\"+h+"(?!\\"+v+"))*?)",o.rTag=w+")",w=new RegExp(n+w+"(\\/)?|(?:\\/(\\w+)))"+t,"g"),ei=new RegExp("<.*>|([^\\\\]|^)[{}]|"+n+".*"+t)),[b,k,h,v,nt]}function vi(n,t){t||(t=n,n=i);var e,f,o,u,r=this,s=!t||t==="root";if(n){if(u=r.type===t?r:i,!u)if(e=r.views,r._.useKey){for(f in e)if(u=e[f].get(n,t))break}else for(f=0,o=e.length;!u&&f<o;f++)u=e[f].get(n,t)}else if(s)while(r.parent.parent)u=r=r.parent;else while(r&&!u)u=r.type===t?r:i,r=r.parent;return u}function wt(){var n=this.get("item");return n?n.index:i}function bt(){return this.index}function yi(t){var u,e=this,o=e.linkCtx,r=(e.ctx||{})[t];return r===i&&o&&o.ctx&&(r=o.ctx[t]),r===i&&(r=li[t]),r&&y(r)&&!r._wrp&&(u=function(){return r.apply(!this||this===n?e:this,arguments)},u._wrp=!0,f(u,r)),u||r}function pi(n,t,u,f){var e,s,c=+u===u&&t.tmpl.bnds[u-1],h=t.linkCtx;return f=f!==i&&{props:{},args:[f]},u=f||(c?c(t.data,t,r):u),s=u.args[0],(n||c)&&(e=h&&h.tag,e||(e={_:{inline:!h,bnd:c},tagName:":",cvt:n,flow:!0,tagCtx:u,_is:"tag"},h&&(h.tag=e,e.linkCtx=h,u.ctx=a(u.ctx,h.view.ctx)),o._lnk(e)),e._er=f&&s,rt(e,u),u.view=t,e.ctx=u.ctx||{},delete u.ctx,t._.tag=e,s=et(e,e.convert||n!=="true"&&n)[0],s=c&&t._.onRender?t._.onRender(s,t,c):s,t._.tag=i),s!=i?s:""}function et(n,t){var r=n.tagCtx,u=r.view,i=r.args;return t=t&&(""+t===t?u.getRsc("converters",t)||c("Unknown converter: '"+t+"'"):t),i=!i.length&&!r.index?[u.data]:t?i.slice():i,t&&(t.depends&&(n.depends=o.getDeps(n.depends,n,t.depends,t)),i[0]=t.apply(n,i)),i}function wi(n,t){for(var f,e,u=this;f===i&&u;)e=u.tmpl[n],f=e&&e[t],u=u.parent;return f||r[n][t]}function bi(n,t,u,s,h,l){var v,lt,at,st,p,vt,nt,y,ht,ut,it,yt,pt,k,b,ct,wt,g="",w=t.linkCtx||0,ft=t.ctx,bt=u||t.tmpl,ot=+s===s&&bt.bnds[s-1];for(n._is==="tag"&&(v=n,n=v.tagName,s=v.tagCtxs),v=v||w.tag,l=l!==i&&(g+=l,[{props:{},args:[]}]),s=l||(ot?ot(t.data,t,r):s),vt=s.length,p=0;p<vt;p++)p||u&&v||(it=t.getRsc("tags",n)||c("Unknown tag: {{"+n+"}}")),y=s[p],(!w.tag||v._er)&&(ut=y.tmpl,ut=y.content=ut&&bt.tmpls[ut-1],f(y,{tmpl:(v?v:it).template||ut,render:ti,index:p,view:t,ctx:a(y.ctx,ft)})),(u=y.props.tmpl)&&(u=""+u===u?t.getRsc("templates",u)||e(u):u,y.tmpl=u),v||(it._ctr?(v=new it._ctr,yt=!!v.init):o._lnk(v={render:it.render}),v._={inline:!w},w&&(w.tag=v,v.linkCtx=w),(v._.bnd=ot||w.fn)?v._.arrVws={}:v.dataBoundOnly&&c("{^{"+n+"}} tag must be data-bound"),v.tagName=n,v.parent=st=ft&&ft.tag,v._is="tag",v._def=it,v.tagCtxs=s),y.tag=v,v.dataMap&&v.tagCtxs&&(y.map=v.tagCtxs[p].map),v.flow||(ht=y.ctx=y.ctx||{},lt=v.parents=ht.parentTags=ft&&a(ht.parentTags,ft.parentTags)||{},st&&(lt[st.tagName]=st),lt[v.tagName]=ht.tag=v);if(t._.tag=v,!(v._er=l)){for(rt(v,s[0]),v.rendering={},p=0;p<vt;p++)y=v.tagCtx=v.tagCtxs[p],ct=y.props,b=et(v,v.convert),(pt=ct.dataMap||v.dataMap)&&(b.length||ct.dataMap)&&(k=y.map,(!k||k.src!==b[0]||h)&&(k&&k.src&&k.unmap(),k=y.map=pt.map(b[0],ct)),b=[k.tgt]),v.ctx=y.ctx,!p&&yt&&(wt=v.template,v.init(y,w,v.ctx),yt=i,v.template!==wt&&(v._.tmpl=v.template),w&&(w.attr=v.attr=w.attr||v.attr)),nt=i,v.render&&(nt=v.render.apply(v,b)),b=b.length?b:[t],nt=nt!==i?nt:y.render(b[0],!0)||(h?i:""),g=g?g+(nt||""):nt;delete v.rendering}return v.tagCtx=v.tagCtxs[0],v.ctx=v.tagCtx.ctx,v._.inline&&(at=v.attr)&&at!==d&&(g=at==="text"?tt.html(g):""),ot&&t._.onRender?t._.onRender(g,t,ot):g}function p(n,t,i,r,u,f,e,o){var a,h,c,s=this,v=t==="array",l={key:0,useKey:v?0:1,id:""+vr++,onRender:o,bnds:{}};s.data=r;s.tmpl=u;s.content=e;s.views=v?[]:{};s.parent=i;s.type=t||"top";s._=l;s.linked=!!o;i?(a=i.views,h=i._,h.useKey?(a[l.key="_"+h.useKey++]=s,s.index=oi,s.getIndex=wt,c=h.tag,l.bnd=v&&(!c||!!c._.bnd&&c)):a.splice(l.key=s.index=f,0,s),s.ctx=n||i.ctx):s.ctx=n}function ki(n){var i,r,t,u,e,f,s;for(i in g)if(e=g[i],(f=e.compile)&&(r=n[i+"s"]))for(t in r)u=r[t]=f(t,r[t],n),u&&(s=o.onStore[i])&&s(t,u,f)}function di(n,t,r){var o,u;return y(t)?t={depends:t.depends,render:t}:(t.baseTag&&(t.flow=!!t.flow,t=f(f({},t.baseTag),t)),(u=t.template)!==i&&(t.template=""+u===u?e[u]||e(u):u),t.init!==!1&&(o=t._ctr=function(){},(o.prototype=t).constructor=o)),r&&(t._parentTmpl=r),t}function kt(r,u,f,o){function c(u){if(""+u===u||u.nodeType>0){try{h=u.nodeType>0?u:!ei.test(u)&&t&&t(n.document).find(u)[0]}catch(s){}return h&&(u=e[r=r||h.getAttribute(vt)],u||(r=r||"_"+ar++,h.setAttribute(vt,r),u=e[r]=kt(r,h.innerHTML,f,o)),h=i),u}}var s,h;return u=u||"",s=c(u),o=o||(u.markup?u:{}),o.tmplName=r,f&&(o._parentTmpl=f),!s&&u.markup&&(s=c(u.markup))&&s.fn&&(s.debug!==u.debug||s.allowCode!==u.allowCode)&&(s=s.markup),s!==i?(r&&!f&&(ci[r]=function(){return u.render.apply(u,arguments)}),s.fn||u.fn?s.fn&&(u=r&&r!==s.tmplName?a(o,s):s):(u=gt(s,o),st(s.replace(er,"\\$&"),u)),ki(o),u):void 0}function dt(n){function t(t,i){this.tgt=n.getTgt(t,i)}return y(n)&&(n={getTgt:n}),n.baseMap&&(n=f(f({},n.baseMap),n)),n.map=function(n,i){return new t(n,i)},n}function gt(n,t){var i,e=s.wrapMap||{},r=f({markup:n,tmpls:[],links:{},tags:{},bnds:[],_is:"template",render:ni},t);return t.htmlTag||(i=hr.exec(n),r.htmlTag=i?i[1].toLowerCase():""),i=e[r.htmlTag],i&&i!==e.div&&(r.markup=u.trim(r.markup)),r}function gi(n,t){function u(e,s,h){var v,c,l,a;if(e&&typeof e=="object"&&!e.nodeType&&!e.markup&&!e.getTgt){for(l in e)u(l,e[l],s);return r}return s===i&&(s=e,e=i),e&&""+e!==e&&(h=s,s=e,e=i),a=h?h[f]=h[f]||{}:u,c=t.compile,s===null?e&&delete a[e]:(s=c?s=c(e,s,h):s,e&&(a[e]=s)),c&&s&&(s._is=n),s&&(v=o.onStore[n])&&v(e,s,c),s}var f=n+"s";r[f]=u;g[n]=t}function nr(n,t,i){var r=this.jquery&&(this[0]||c('Unknown template: "'+this.selector+'"')),u=r.getAttribute(vt);return ni.call(u?e[u]:e(r),n,t,i)}function ot(n,t,i){if(s._dbgMode)try{return n.fn(t,i,r)}catch(u){return c(u,i)}return n.fn(t,i,r)}function ni(n,t,i,r,f,e){var o=this;return!r&&o.fn._nvw&&!u.isArray(n)?ot(o,n,{tmpl:o}):ti.call(o,n,t,i,r,f,e)}function ti(n,t,r,f,o,s){var y,ut,g,l,nt,tt,it,w,v,rt,b,ft,h,et,c=this,k="";if(!!t===t&&(r=t,t=i),o===!0&&(it=!0,o=0),c.tag?(w=c,c=c.tag,rt=c._,ft=c.tagName,h=rt.tmpl||w.tmpl,et=c.attr&&c.attr!==d,t=a(t,c.ctx),v=w.content,w.props.link===!1&&(t=t||{},t.link=!1),f=f||w.view,n=arguments.length?n:f):h=c,h&&(!f&&n&&n._is==="view"&&(f=n),f&&(v=v||f.content,s=s||f._.onRender,n===f&&(n=f.data),t=a(t,f.ctx)),f&&f.type!=="top"||((t=t||{}).root=n),h.fn||(h=e[h]||e(h)),h)){if(s=(t&&t.link)!==!1&&!et&&s,b=s,s===!0&&(b=i,s=f._.onRender),t=h.helpers?a(h.helpers,t):t,u.isArray(n)&&!r)for(l=it?f:o!==i&&f||new p(t,"array",f,n,h,o,v,s),y=0,ut=n.length;y<ut;y++)g=n[y],nt=new p(t,"item",l,g,h,(o||0)+y,v,s),tt=ot(h,g,nt),k+=l._.onRender?l._.onRender(tt,nt):tt;else(f||!h.fn._nvw)&&(l=it?f:new p(t,ft||"data",f,n,h,o,v,s),rt&&!c.flow&&(l.tag=c)),k+=ot(h,n,l);return b?b(k,l):k}return""}function c(n,t,i){var r=s.onError(n,t,i);if(""+n===n)throw new o.Err(r);return!t.linkCtx&&t.linked?tt.html(r):r}function l(n){c("Syntax error\n"+n)}function st(n,t,i,r){function p(t){t-=f;t&&h.push(n.substr(f,t).replace(at,"\\n"))}function c(t){t&&l('Unmatched or missing tag: "{{/'+t+'}}" in template:\n'+n)}function k(e,o,v,w,b,k,nt,tt,it,rt,ut,ft){k&&(b=":",w=d);rt=rt||i;var et=(o||i)&&[[]],st="",ht="",ct="",lt="",vt="",yt="",pt="",wt="",ot=!rt&&!b&&!nt;v=v||(it=it||"#data",b);p(ft);f=ft+e.length;tt?g&&h.push(["*","\n"+it.replace(fr,"$1")+"\n"]):v?(v==="else"&&(sr.test(it)&&l('for "{{else if expr}}" use "{{else expr}}"'),et=u[7],u[8]=n.substring(u[8],ft),u=s.pop(),h=u[2],ot=!0),it&&(ui(it.replace(at," "),et,t).replace(or,function(n,t,i,r,u,f,e,o){return e?(ht+=f+",",lt+="'"+o+"',"):i?(ct+=r+f+",",yt+=r+"'"+o+"',"):t?pt+=f:(u==="trigger"&&(wt+=f),st+=r+f+",",vt+=r+"'"+o+"',",y=y||si.test(u)),""}).slice(0,-1),et&&et[0]&&et.pop()),a=[v,w||!!r||y||"",ot&&[],ii(lt,vt,yt),ii(ht,st,ct),pt,wt,et||0],h.push(a),ot&&(s.push(u),u=a,u[8]=f)):ut&&(c(ut!==u[0]&&u[0]!=="else"&&ut),u[8]=n.substring(u[8],ft),u=s.pop());c(!u&&ut);h=u[2]}var o,a,y,g=t&&t.allowCode,e=[],f=0,s=[],h=e,u=[,,e];return i&&(n=b+n+v),c(s[0]&&s[0][2].pop()[0]),n.replace(w,k),p(n.length),(f=e[e.length-1])&&c(""+f!==f&&+f[8]===f[8]&&f[0]),i?(o=ct(e,n,i),ht(o,e[0][7])):o=ct(e,t),o._nvw&&(o._nvw=!/[~#]/.test(n)),o}function ht(n,t){n.deps=[];for(var i in t)i!=="_jsvto"&&t[i].length&&(n.deps=n.deps.concat(t[i]));n.paths=t}function ii(n,t,i){return[n.slice(0,-1),t.slice(0,-1),i.slice(0,-1)]}function ri(n,t){return"\n\t"+(t?t+":{":"")+"args:["+n[0]+"]"+(n[1]||!t?",\n\tprops:{"+n[1]+"}":"")+(n[2]?",\n\tctx:{"+n[2]+"}":"")}function ui(n,t,i){function w(w,b,d,g,nt,tt,it,rt,ut,ft,et,ot,ht,ct,lt,at,vt,yt,pt,wt){function dt(n,i,u,e,o,h,c,l){if(u&&(r&&(f==="linkTo"&&(s=t._jsvto=t._jsvto||[],s.push(nt)),(!f||a)&&r.push(nt.slice(i.length))),u!==".")){var v=(e?'view.hlp("'+e+'")':o?"view":"data")+(l?(h?"."+h:e?"":o?"":"."+u)+(c||""):(l=e?"":o?h||"":u,""));return v=v+(l?"."+l:""),i+(v.slice(0,9)==="view.data"?v.slice(5):v)}return n}tt=tt||"";d=d||b||ot;nt=nt||ut;ft=ft||vt||"";var kt,gt,bt,ni=wt.length-1;if(!it||o||e)return r&&at&&!o&&!e&&(!f||a||s)&&(kt=p[u],ni>pt-kt&&(kt=wt.slice(kt,pt+1),at=k+":"+kt+" onerror=''"+h,bt=y[at],bt||(y[at]=!0,y[at]=bt=st(at,i||r,!0),bt.paths.push({_jsvOb:bt})),bt!==!0&&(s||r).push({_jsvOb:bt}))),o?(o=!ht,o?w:'"'):e?(e=!ct,e?w:'"'):(d?(u++,p[u]=pt++,d):"")+(yt?u?"":(c=wt.slice(c,pt),f?(f=a=s=!1,"\b"):"\b,")+c+(c=pt+w.length,r&&t.push(r=[]),"\b"):rt?(u&&l(n),r&&t.pop(),f=nt,a=g,c=pt+w.length,g&&(r=t[f]=[]),nt+":"):nt?nt.split("^").join(".").replace(rr,dt)+(ft?(v[++u]=!0,nt.charAt(0)!=="."&&(p[u]=pt),gt?"":ft):tt):tt?tt:lt?(v[u--]=!1,lt)+(ft?(v[++u]=!0,ft):""):et?(v[u]||l(n),","):b?"":(o=ht,e=ct,'"'));l(n)}var f,s,a,e,o,r=t&&t[0],c=0,y=i?i.links:r&&(r.links=r.links||{}),v={},p={0:-1},u=0;return(n+(i?" ":"")).replace(/\)\^/g,").").replace(ur,w)}function ct(n,t,r){var p,f,e,c,g,yt,pt,ti,wt,nt,et,w,s,ot,tt,it,v,st,y,rt,b,ut,bt,k,kt,dt,lt,h,a,vt,ni,o=0,u="",ft={},ii=n.length;for(""+t===t?(y=r?'data-link="'+t.replace(at," ").slice(1,-1)+'"':t,t=0):(y=t.tmplName||"unnamed",t.allowCode&&(ft.allowCode=!0),t.debug&&(ft.debug=!0),w=t.bnds,st=t.tmpls),p=0;p<ii;p++)if(f=n[p],""+f===f)u+='\n+"'+f+'"';else if(e=f[0],e==="*")u+=";\n"+f[1]+"\nret=ret";else{if(c=f[1],ut=f[2],g=ri(f[3],"params")+"},"+ri(ot=f[4]),a=f[5],ni=f[6],bt=f[8],(dt=e==="else")||(o=0,w&&(s=f[7])&&(o=w.push(s))),(lt=e===":")?c&&(e=c===d?">":c+e):(ut&&(rt=gt(bt,ft),rt.tmplName=y+"/"+e,ct(ut,rt),st.push(rt)),dt||(b=e,kt=u,u=""),k=n[p+1],k=k&&k[0]==="else"),vt=a?";\ntry{\nret+=":"\n+",tt="",it="",lt&&(s||ni||c&&c!==d)){if(h="return {"+g+"};",v='c("'+c+'",view,',h=new Function("data,view,j,u"," // "+y+" "+o+" "+e+"\n"+h),h._er=a,tt=v+o+",",it=")",h._tag=e,r)return h;ht(h,s);et=!0}if(u+=lt?(r?(a?"\ntry{\n":"")+"return ":vt)+(et?(et=i,nt=wt=!0,v+(s?(w[o-1]=h,o):"{"+g+"}")+")"):e===">"?(pt=!0,"h("+ot[0]+")"):(ti=!0,"((v="+ot[0]+')!=null?v:"")')):(nt=yt=!0,"\n{view:view,tmpl:"+(ut?st.length:"0")+","+g+"},"),b&&!k){if(u="["+u.slice(0,-1)+"]",v='t("'+b+'",view,this,',r||s){if(u=new Function("data,view,j,u"," // "+y+" "+o+" "+b+"\nreturn "+u+";"),u._er=a,u._tag=e,s&&ht(w[o-1]=u,s),r)return u;tt=v+o+",undefined,";it=")"}u=kt+vt+v+(o||u)+")";s=0;b=0}a&&(nt=!0,u+=";\n}catch(e){ret"+(r?"urn ":"+=")+tt+"j._err(e,view,"+a+")"+it+";}\n"+(r?"":"ret=ret"))}u="// "+y+"\nvar v"+(yt?",t=j._tag":"")+(wt?",c=j._cnvt":"")+(pt?",h=j.converters.html":"")+(r?";\n":',ret=""\n')+(ft.debug?"debugger;":"")+u+(r?"\n":";\nreturn ret;");try{u=new Function("data,view,j,u",u)}catch(ui){l("Compiled template code:\n\n"+u+'\n: "'+ui.message+'"')}return t&&(t.fn=u),nt||(u._nvw=!0),u}function a(n,t){return n&&n!==t?t?f(f({},t),n):n:t&&f({},t)}function tr(n){return hi[n]||(hi[n]="&#"+n.charCodeAt(0)+";")}function ir(n){var i,t,r=[];if(typeof n=="object")for(i in n)t=n[i],t&&t.toJSON&&!t.toJSON()||y(t)||r.push({key:i,prop:t});return r}function fi(n){return n!=null?cr.test(n)&&(""+n).replace(lr,tr)||n:""}if((!t||!t.render)&&!n.jsviews){var u,lt,w,ei,oi,b="{",k="{",h="}",v="}",nt="^",rr=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,ur=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*\.|\s*\^|\s*$)|[)\]])([([]?))|(\s+)/g,at=/[ \t]*(\r\n|\n|\r)/g,fr=/\\(['"])/g,er=/['"\\]/g,or=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,sr=/^if\s/,hr=/<(\w+)[>\s]/,cr=/[\x00`><\"'&]/,si=/^on[A-Z]|^convert(Back)?$/,lr=/[\x00`><"'&]/g,ar=0,vr=0,hi={"&":"&amp;","<":"&lt;",">":"&gt;","\x00":"&#0;","'":"&#39;",'"':"&#34;","`":"&#96;"},d="html",vt="data-jsv-tmpl",ci={},g={template:{compile:kt},tag:{compile:di},helper:{},converter:{}},r={jsviews:"v1.0.0-beta",settings:function(n){f(s,n);yt(s._dbgMode);s.jsv&&s.jsv()},sub:{View:p,Err:ft,tmplFn:st,cvt:et,parse:ui,extend:f,syntaxErr:l,onStore:{},_lnk:ut,_ths:rt},map:dt,_cnvt:pi,_tag:bi,_err:c};(ft.prototype=new Error).constructor=ft;wt.depends=function(){return[this.get("item"),"index"]};bt.depends=function(){return["index"]};p.prototype={get:vi,getIndex:bt,getRsc:wi,hlp:yi,_is:"view"};for(lt in g)gi(lt,g[lt]);var e=r.templates,tt=r.converters,li=r.helpers,it=r.tags,o=r.sub,s=r.settings;t?(u=t,u.fn.render=nr,u.observable&&(f(o,u.views.sub),r.map=u.views.map)):(u=n.jsviews={},u.isArray=Array&&Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"});u.render=ci;u.views=r;u.templates=e=r.templates;s({debugMode:yt,delimiters:pt,onError:function(n,t,r){return t&&(n=r===i?"{Error: "+n+"}":y(r)?r(n,t):r),n==i?"":n},_dbgMode:!0});it({"else":function(){},"if":{render:function(n){var t=this;return t.rendering.done||!n&&(arguments.length||!t.tagCtx.index)?"":(t.rendering.done=!0,t.selected=t.tagCtx.index,t.tagCtx.render(t.tagCtx.view,!0))},onUpdate:function(n,t,i){for(var r,u,f=0;(r=this.tagCtxs[f])&&r.args.length;f++)if(r=r.args[0],u=!r!=!i[f].args[0],!this.convert&&!!r||u)return u;return!1},flow:!0},"for":{render:function(n){var f,t=this,r=t.tagCtx,e="",o=0;return t.rendering.done||((f=!arguments.length)&&(n=r.view.data),n!==i&&(e+=r.render(n,f),o+=u.isArray(n)?n.length:1),(t.rendering.done=o)&&(t.selected=r.index)),e},flow:!0},include:{flow:!0},"*":{render:ut,flow:!0}});it("props",{baseTag:it["for"],dataMap:dt(ir)});tt({html:fi,attr:fi,url:function(n){return n!=i?encodeURI(""+n):n===null?n:""}});pt()}}(this,this.jQuery),function(n,t,i){"use strict";function r(n){return u(n)?new p(n):new y(n)}function y(n){return this._data=n,this}function p(n){return this._data=n,this}function ht(n){return u(n)?[n]:n}function g(n,t){n=u(n)?n:[n];for(var i,e=t,o=e,h=n.length,r=[],s=0;s<h;s++){if(i=n[s],f(i)){r=r.concat(g(i.call(t,t),t));continue}else if(""+i!==i){t=o=i;o!==e&&r.push(e=o);continue}o!==e&&r.push(e=o);r.push(i)}return r}function nt(n,t){var r,i;for(r in n){i=!0;break}i||delete v[t]}function w(n,t){if(!(n.data&&n.data.off)){var v,y,p,w,b,c=t.oldValue,l=t.value,r=n.data,f=r.observeAll,o=!r.cb.noArray,h=r.paths;n.type===a?(r.cb.array||r.cb).call(r,n,t):(r.prop===t.path||r.prop==="*")&&(w=typeof c===s&&(h[0]||o&&u(c)),b=typeof l===s&&(h[0]||o&&u(l)),f?(v=f._path+"."+t.path,y=f.filter,p=[n.target].concat(f.parents()),w&&e(o,f.ns,[c],h,r.cb,!0,y,[p],v),b&&e(o,f.ns,[l],h,r.cb,i,y,[p],v)):(w&&e(o,[c],h,r.cb,!0),b&&e(o,[l],h,r.cb)),r.cb(n,t))}}function l(){function gt(i,r,u,f){var s,e,p=ot(n),b=ht(n);if(i=st?i+"."+st:i,tt||f)p&&t(b).off(i,w);else{if(h=p&&t._data(n))for(h=h&&h.events,h=h&&h[u?a:c],dt=h&&h.length;dt--;)if((it=h[dt].data)&&it.cb._cId===o._cId&&it.ns===st){if(u)return;(r==="*"&&it.prop!==r||it.prop===y)&&t(n).off(i,w)}e=u?{}:{fullPath:l,paths:r?[r]:[],prop:y};e.ns=st;e.cb=o;et&&(e.observeAll={_path:et,path:function(){return s=kt.length,et.replace(/[[.]/g,function(n){return s--,n==="["?"["+t.inArray(kt[s-1],kt[s]):"."})},parents:function(){return kt},filter:oi,ns:st});t(b).on(i,null,e,w);ti&&((v[o._cId]=ti)[t.data(n,"obId")||t.data(n,"obId",vt++)]=n)}}function vi(n,t){n._ob=yt(n,ut);var i=ut;return function(r,f){var h=n._ob,c=t.length;typeof h===s&&(ni(h,!0),(c||ct&&u(h))&&e(ct,[h],t,o,yt,!0));h=n._ob=yt(n,i);typeof h===s&&(ni(h),(c||ct&&u(h))&&e(ct,[h],t,o,yt,[i]));o(r,f)}}function ni(t,f,e,s){if(ct){var h=n,c=et;n=t;s&&(n=t[s],et+="."+s);oi&&n&&(n=r._fltr(et,n,s?[t].concat(kt):kt,oi));n&&(e||u(n))&&gt(a+".observe"+(o?".obs"+(bt=o._cId=o._cId||d++):""),i,!0,f);n=h;et=c}}var wt,fi,si,ft,y,l,ei,tt,o,bt,dt,it,h,yt,hi,ti,ii,ri,kt,et,oi,st,ci,li,ct=this!=!1,ai=!0,ui=at,p=Array.apply(0,arguments),b=p.pop(),ut=p.shift(),pt=ut,n=pt,rt=p.length;for(ut+""===ut&&ct&&(st=ut,ut=n=pt=p.shift(),rt--),f(b)?o=b:(b+""===b&&(et=b,kt=p.pop(),oi=p.pop(),b=p.pop(),rt=rt-3),b===!0?tt=b:b&&(ut=b,ai=i),b=p[rt-1],(rt&&b===i||f(b))&&(o=p.pop(),rt--)),rt&&f(p[rt-1])&&(yt=o,o=p.pop(),rt--),ui+=tt?o?".obs"+o._cId:"":".obs"+(bt=o._cId=o._cId||d++),tt||(ti=v[bt]=v[bt]||{}),ci=st&&st.match(lt)||[""],li=ci.length;li--;)for(st=ci[li],u(pt)?ni(pt,tt,!0):tt&&rt===0&&pt&&gt(ui,""),ii=0,wt=0;wt<rt;wt++)if(l=p[wt],l!==""){if(n=pt,""+l===l){if(ft=l.split("^"),ft[1]&&(ii=ft[0].split(".").length,l=ft.join("."),ii=l.split(".").length-ii),yt&&(hi=yt(l,pt))){rt+=hi.length-1;k.apply(p,[wt--,1].concat(hi));continue}ft=l.split(".")}else ai&&!f(l)&&(l&&l._jsvOb&&(ri=vi(l,p.slice(wt+1)),ri.noArray=!ct,ri._cId=o._cId,e(ct,[ut],p.slice(0,wt),ri,yt),ri=i,l=l._ob),n=l),pt=l,ft=[pt];while(n&&(y=ft.shift())!==i)if(typeof n===s){if(""+y===y){if(y==="")continue;if(ft.length<ii+1&&!n.nodeType){if(!tt&&(h=ot(n)&&t._data(n))){for(h=h.events,h=h&&h[c],dt=h&&h.length,si=0;dt--;)it=h[dt].data,it&&it.cb===o&&it.ns===st&&(it.prop===y||it.prop==="*")&&((fi=ft.join("."))&&it.paths.push(fi),si++);if(si){n=n[y];continue}}if(y==="*"){!tt&&h&&h.length&&gt(ui,"",!1,!0);f(n)?(ei=n.depends)&&e(ct,[ei],o,tt||ut):gt(ui,"");for(fi in n)ni(n,tt,i,fi);break}else y&&gt(ui+"."+y,ft.join("^"))}et&&(et+="."+y);y=n[y]}if(f(y)){(ei=y.depends)&&e(ct,[n],g(ei,n),o,yt,tt||[ut]);break}n=y}ni(n,tt)}return bt&&nt(ti,bt),{cbId:bt,bnd:ti}}function ct(){return[].push.call(arguments,!0),l.apply(this,arguments)}function e(){var n=[].concat.apply([],arguments);return l.apply(n.shift(),n)}function b(n,t,i,r){n+""!==n&&(i=t,t=n,n="");it(n,this._data,t,i,[],"root",r)}function tt(n,t,i){b.call(this,n,t,i,!0)}function it(n,t,f,e,o,h,c){function y(n,t){for(a=n.length,v=[[n]].concat(v),w=h+"[]";a--;)b(n,a,t,1)}function b(t,u,o,s){var h;u!==et&&(h=r._fltr(w,t[u],v,e))&&it(n,h,f,e||(s?i:0),v.slice(),w,o)}function k(n,t){var i=o;h=n.data.observeAll._path;v=[n.target].concat(o);switch(t.change){case"insert":y(t.items);break;case"remove":y(t.items,!0);break;case"refresh":y(t.oldItems,!0);y(n.target);break;case"set":w=h+"."+t.path;b(t,"oldValue",!0);b(t,"value")}f.apply(this,arguments);o=i}var a,p,w,v;if(typeof t===s)if(p=u(t)?"":"*",f?(p||e!==0)&&(k._cId=f._cId=f._cId||d++,l(n,t,p,k,c,e,o,h)):l(n,t,p,i,c,e,o,h),p){v=[t].concat(o);for(a in t)w=h+"."+a,b(t,a,c)}else y(t,c)}function rt(n){return n.indexOf(".")<0&&n.indexOf("[")<0}if(!t)throw"jsViews/jsObservable require jQuery";if(!t.observable){var ut=t.views=t.views||{jsviews:"v1.0.0-alpha",sub:{}},o=ut.sub,ft=t.event.special,k=[].splice,u=t.isArray,et=t.expando,s="object",h=parseInt,lt=/\S+/g,c=o.propChng=o.propChng||"propertyChange",a=o.arrChng=o.arrChng||"arrayChange",v=o._cbBnds=o._cbBnds||{},at=c+".observe",f=t.isFunction,vt=1,d=1,ot=t.hasData,st={};o.getDeps=function(){var n=arguments;return function(){for(var i,t,r=[],u=n.length;u--;)i=n[u--],t=n[u],t&&(r=r.concat(f(t)?t(i,i):t));return r}};t.observable=r;r._fltr=function(n,t,i,r){if(r&&f(r)?r(n,t,i):!0)return t=f(t)?t.set&&t.call(i[0]):t,typeof t===s&&t};r.Object=y;r.Array=p;t.observe=r.observe=l;t.unobserve=r.unobserve=ct;r._apply=e;y.prototype={_data:null,observeAll:b,unobserveAll:tt,data:function(){return this._data},setProperty:function(n,t,r){var f,h,s,o=this,e=o._data;if(n=n||"",e)if(u(n))for(f=n.length;f--;)h=n[f],o.setProperty(h.name,h.value,r===i||r);else if(""+n!==n)for(f in n)o.setProperty(f,n[f],t);else if(n!==et){for(s=n.split(".");e&&s.length>1;)e=e[s.shift()];e&&o._setProperty(e,s[0],t,r)}return o},removeProperty:function(n){return this.setProperty(n,st),this},_setProperty:function(n,t,r,u){var o,s,h,e=t?n[t]:n;f(e)&&e.set&&(s=e,o=e.set===!0?e:e.set,e=e.call(n));(e!==r||u&&e!=r)&&(!(e instanceof Date)||e>r||e<r)&&(o?(o.call(n,r),r=s.call(n)):(h=r===st)?(delete n[t],r=i):t&&(n[t]=r),this._trigger(n,{change:"set",path:t,value:r,oldValue:e,remove:h}))},_trigger:function(n,i){t(n).triggerHandler(c,i)}};p.prototype={_data:null,observeAll:b,unobserveAll:tt,data:function(){return this._data},insert:function(n,t){var i=this._data;return arguments.length===1&&(t=n,n=i.length),n=h(n),n>-1&&n<=i.length&&(t=u(t)?t:[t],t.length&&this._insert(n,t)),this},_insert:function(n,t){var i=this._data,r=i.length;k.apply(i,[n,0].concat(t));this._trigger({change:"insert",index:n,items:t},r)},remove:function(n,t){var r,u=this._data;return n===i&&(n=u.length-1),n=h(n),t=t?h(t):t===0?0:1,t>-1&&n>-1&&(r=u.slice(n,n+t),t=r.length,t&&this._remove(n,t,r)),this},_remove:function(n,t,i){var r=this._data,u=r.length;r.splice(n,t);this._trigger({change:"remove",index:n,items:i},u)},move:function(n,t,i){if(i=i?h(i):i===0?0:1,n=h(n),t=h(t),i>0&&n>-1&&t>-1&&n!==t){var r=this._data.slice(n,n+i);i=r.length;i&&this._move(n,t,i,r)}return this},_move:function(n,t,i,r){var u=this._data,f=u.length;u.splice(n,i);u.splice.apply(u,[t,0].concat(r));this._trigger({change:"move",oldIndex:n,index:t,items:r},f)},refresh:function(n){var t=this._data.slice();return this._refresh(t,n),this},_refresh:function(n,t){var i=this._data,r=i.length;k.apply(i,[0,i.length].concat(t));this._trigger({change:"refresh",oldItems:n},r)},_trigger:function(n,i){var r=this._data,u=r.length,f=t([r]);f.triggerHandler(a,n);u!==i&&f.triggerHandler(c,{change:"set",path:"length",value:u,oldValue:i})}};ft[c]=ft[a]={remove:function(n){var r,u,f,e,o,i=n.data;if(i&&(i.off=!0,i=i.cb)&&(r=v[i._cId])){for(f=t._data(this).events[n.type],e=f.length;e--&&!u;)u=(o=f[e].data)&&o.cb===i;u||(delete r[t.data(this,"obId")],nt(r,i._cId))}}};ut.map=function(n){function u(t,u,f){var o,e=this;this.src&&this.unmap();typeof t=="object"&&(e.src=t,e.tgt=f||e.tgt||[],e.options=u||e.options,e.update(),n.obsSrc&&r(e.src).observeAll(e.obs=function(t,r){o||(o=!0,n.obsSrc(e,t,r),o=i)},e.srcFlt),n.obsTgt&&r(e.tgt).observeAll(e.obt=function(t,r){o||(o=!0,n.obsTgt(e,t,r),o=i)},e.tgtFlt))}return f(n)&&(n={getTgt:n}),n.baseMap&&(n=t.extend({},n.baseMap,n)),n.map=function(n,t,i){return new u(n,t,i)},(u.prototype={srcFlt:n.srcFlt||rt,tgtFlt:n.tgtFlt||rt,update:function(t){var i=this;r(i.tgt).refresh(n.getTgt(i.src,i.options=t||i.options))},unmap:function(){var n=this;n.src&&(n.obs&&r(n.src).unobserveAll(n.obs,n.srcFlt),n.obt&&r(n.tgt).unobserveAll(n.obt,n.tgtFlt),n.src=i)},map:u,_def:n}).constructor=u,n}}}(this,this.jQuery),function(n,t,i){"use strict";function d(n,r,u){var b,tt,a,o,k,v,s,d,h,y,it,g,nt,e,l,p,w=n.target,rt=w._jsvBnd,ut=/&(\d+)\+?/g;if(rt)while(y=ut.exec(rt))if((y=c[y[1]])&&(l=y.to)){if(o=y.linkCtx,h=o.view,e=o.tag,d=t(w),g=h.hlp(oi),nt=h.hlp(si),a=st(w),b=li[a],u===i&&(u=ot(a)?a(w):b?d[b]():d.attr(a)),v=l[1],l=l[0],v&&(k=ot(v)?v:h.getRsc("converters",v)),k&&(u=k.call(e,u)),it=h.linkCtx,h.linkCtx=o,p={change:"change",oldValue:o._val,value:u},(!g||!(tt=g.call(o,n,p)===!1))&&(!e||!e.onBeforeChange||!(tt=e.onBeforeChange(n,p)===!1))&&u!==i&&(s=l[0],u!==i&&s)){if(s=s._jsvOb?s._ob:s,e&&(e._.chging=!0),f(s).setProperty(l[2]||l[1],u),nt&&nt.call(o,n,p),e){if(e.onAfterChange)e.onAfterChange(n,p);delete e._.chging}o._val=u}h.linkCtx=it}}function tu(n,t,r){var h,o,k,b,a,v,e=this,f=e.tag,l=e.data,p=e.elem,c=e.convert,nt=p.parentNode,s=e.view,d=s.linkCtx,w=s.hlp(oi);if(s.linkCtx=e,nt&&(!w||!(t&&w.call(e,n,t)===!1))&&!(t&&n.data.prop!=="*"&&n.data.prop!==t.path)){if(t&&(e.eventArgs=t),t||e._initVal){if(delete e._initVal,r._er)try{o=r(l,s)}catch(tt){a=r._er;v=g(tt,s,new Function("data,view","return "+a+";")(l,s));o=[{props:{},args:[v]}]}else o=r(l,s,u);if(h=iu(o,e,f=e.tag,e.attr||st(p,!0,c!==i)),f){if(b=a||f._er,o=o[0]?o:[o],k=!b&&t&&f.onUpdate&&f.onUpdate(n,t,o)===!1,ur(f,o,b),k||h===bt){h===y&&f.onBeforeLink&&f.onBeforeLink();at(f,f.tagCtx);gt(e,l,p);s.linkCtx=d;return}if(f._.chging)return;o=f.tagName===":"?u._cnvt(f.cvt,s,o[0]):u._tag(f,s,s.tmpl,o,!0,v)}else r._tag&&(c=c===""?kt:c,o=c?u._cnvt(c,s,o[0]||o):u._tag(r._tag,s,s.tmpl,o,!0,v),f=e.tag,h=e.attr||h);bi(o,e,h,f)&&t&&(w=s.hlp(si))&&w.call(e,n,t);f&&(f._er=a,at(f,f.tagCtx))}gt(e,l,p);s.linkCtx=d}}function iu(n,r,u,f){var e,h,c,o,s=u&&u.parentElem||r.elem;if(n!==i){if(o=t(s),f=u&&u.attr||f,ot(n)&&g(r.expr+": missing parens"),c=/^css-/.test(f)&&f.slice(4))e=t.style(s,c),+n===n&&(e=parseInt(e));else if(f!=="link"){if(f==="value")s.type===hi&&(e=o.prop(f=nt));else if(f===wt)if(s.value===""+n)e=o.prop(nt);else return f;e===i&&(h=li[f],e=h?o[h]():o.attr(f))}r._val=e}return f}function l(n,t){n._df=t;n[(t?"set":"remove")+"Attribute"](yr,"")}function bi(r,u,f,e){var ot,h,c,tt,st,d,v,g,p,b,k,it,rt,ut=r!==i,ht=u.data,s=e&&e.parentElem||u.elem,ft=t(s),w=u.view,et=u._val,ct=w.linkCtx,a=e||f===y;if(e&&(e.parentElem=e.parentElem||u.expr||e._elCnt?s:s.parentNode,h=e._prv,c=e._nxt),!ut){f===y&&e&&e.onBeforeLink&&e.onBeforeLink();return}if(f==="visible"&&(f="css-display"),/^css-/.test(f))u.attr==="visible"&&(rt=(s.currentStyle||nu.call(n,s,"")).display,r?(r=s._jsvd||rt,r!==bt||(r=br[it=s.nodeName])||(k=o.createElement(it),o.body.appendChild(k),r=br[it]=(k.currentStyle||nu.call(n,k,"")).display,o.body.removeChild(k))):(s._jsvd=rt,r=bt)),(a=a||et!==r)&&t.style(s,f.slice(4),r);else if(f!=="link"){if(f===nt)d=!0,r=r&&r!=="false";else if(f===wt)if(s.value===""+r)r=d=!0,f=nt;else{gt(u,ht,s);return}else(f==="selected"||f==="disabled"||f==="multiple"||f==="readonly")&&(r=r&&r!=="false"?f:null);(ot=li[f])?f===y?(w.linkCtx=u,e&&e._.inline?(st=e.nodes(!0),e._elCnt&&(h&&h!==c?ri(h,c,s,e._tgId,"^",!0):(v=s._df)&&(g=e._tgId+"^",p=v.indexOf("#"+g)+1,b=v.indexOf("/"+g),p&&b>0&&(p+=g.length,b>p&&(l(s,v.slice(0,p)+v.slice(b)),er(v.slice(p,b))))),h=h?h.previousSibling:c?c.previousSibling:s.lastChild),t(st).remove(),e&&e.onBeforeLink&&e.onBeforeLink(),tt=w.link(w.data,s,h,c,r,e&&{tag:e._tgId,lazyLink:e.tagCtx.props.lazyLink})):(ut&&ft.empty(),e&&e.onBeforeLink&&e.onBeforeLink(),ut&&(tt=w.link(ht,s,h,c,r,e&&{tag:e._tgId}))),w.linkCtx=ct):(a=a||et!==r)&&(f==="text"&&s.children&&!s.children[0]?s.textContent!==i?s.textContent=r:s.innerText=r===null?"":r:ft[ot](r)):(a=a||et!==r)&&ft[d?"prop":"attr"](f,r===i&&!d?null:r);u._val=r}return tt||a}function ki(n,t){var i=this,r=i.hlp(oi),u=i.hlp(si);if(!r||r.call(this,n,t)!==!1){if(t){var o=t.change,f=t.index,e=t.items;switch(o){case"insert":i.addViews(f,e);break;case"remove":i.removeViews(f,e.length);break;case"move":i.refresh();break;case"refresh":i.refresh()}}u&&u.call(this,n,t)}}function dt(n){var u,f,o=n.type,e=n.data,r=n._.bnd;if(!n._.useKey&&r)if((f=n._.bndArr)&&(t([f[1]]).off(ei,f[0]),n._.bndArr=i),r!==!!r&&r._.inline)o?r._.arrVws[n._.id]=n:delete r._.arrVws[n._.id];else if(o&&e){u=function(t){t.data&&t.data.off||ki.apply(n,arguments)};t([e]).on(ei,u);n._.bndArr=[u,e]}}function st(n,t,i){var u=n.nodeName.toLowerCase(),r=v.merge[u]||n.contentEditable===kt&&{to:y,from:y};return r?t?u==="input"&&n.type===wt?wt:r.to:r.from:t?i?"text":y:""}function di(n,r,u,f,e,o,s){var p,c,v,w,b,l=n.parentElem,h=n._prv,a=n._nxt,y=n._elCnt;if(h&&h.parentNode!==l&&g("Missing parentNode"),s){w=n.nodes();y&&h&&h!==a&&ri(h,a,l,n._.id,"_",!0);n.removeViews(i,i,!0);c=a;y&&(h=h?h.previousSibling:a?a.previousSibling:l.lastChild);t(w).remove();for(b in n._.bnds)yt(b)}else{if(r){if(v=f[r-1],!v)return!1;h=v._nxt}y?(c=h,h=c?c.previousSibling:l.lastChild):c=h.nextSibling}p=u.render(e,o,n._.useKey&&s,n,s||r,!0);n.link(e,l,h,c,p,v)}function ht(n,t,r){var u,f,e;return r?(e="^`",f=t._.tag,u=f._tgId,u||(c[u=kr++]=f,f._tgId=""+u)):(e="_`",w[u=t._.id]=t),"#"+u+e+(n!=i?n:"")+"/"+u+e}function gt(n,t,r){var o,a,e,u=n.tag,v=n.convertBack,h=[],l=n._bndId||""+kr++,y=n._hdlr;if(delete n._bndId,u&&(h=u.depends||h,h=ot(h)?u.depends(u):h,e=u.linkedElem),(!n._depends||""+n._depends!=""+h)&&(n._depends&&f._apply(!1,[t],n._depends,y,!0),o=f._apply(!1,[t],n.fn.deps,h,y,n._ctxCb),o.elem=r,o.linkCtx=n,o._tgId=l,r._jsvBnd=r._jsvBnd||"",r._jsvBnd+="&"+l,n._depends=h,n.view._.bnds[l]=l,c[l]=o,e&&(o.to=[[],v]),(e||v!==i)&&rr(o,u&&u.convertBack||v),u)){if(u.onAfterBind)u.onAfterBind(o);u.flow||u._.inline||(r.setAttribute(s,(r.getAttribute(s)||"")+"#"+l+"^/"+l+"^"),u._tgId=""+l)}if(e&&e[0])for(u._.radio&&(e=e.children("input[type=radio]")),a=e.length;a--;)e[a]._jsvBnd=e[a]._jsvBnd||r._jsvBnd+"+",e[a]._jsvLkEl=u}function gi(n,t,i,r,u,f,e){return ni(this,n,t,i,r,u,f,e)}function ni(n,r,u,f,s,h,c,v){if(n&&r){if(r=r.jquery?r:t(r),!tt){tt=o.body;t(tt).on(lr,d).on("blur","[contenteditable]",d)}for(var b,nt,rt,g,p,k,y,ut,ft=ht,ot=f&&f.target==="replace",et=r.length;et--;)if(y=r[et],""+n===n)ct(n,y,it(y),i,!0,u,f);else{if(h=h||it(y),n.markup!==i)h.link===!1&&(f=f||{},f.link=ft=!1),ot&&(k=y.parentNode),rt=n.render(u,f,s,h,i,ft),k?(c=y.previousSibling,v=y.nextSibling,t.cleanData([y],!0),k.removeChild(y),y=k):(c=v=i,t(y).empty());else if(n===!0&&h===a)ut={lnk:1};else break;if(y._df&&!v){for(g=e(y._df,!0,dr),b=0,nt=g.length;b<nt;b++)p=g[b],(p=w[p.id])&&p.data!==i&&p.parent.removeViews(p._.key,i,!0);l(y)}h.link(u,y,c,v,rt,ut,f)}}return r}function ru(n,r,u,f,a,y,b,k){function cu(n,t,r,u,f,e,o,h,c,l,v,y,p){var w,b="";return p?(fi=0,n):(nt=h||c||"",u=u||l,r=r||y,si&&!r&&(u||nt||e)&&(si=i,ft=gt.shift()),u=u||r,u&&(fi=0,si=i,br&&(r||y?wi[ft]||/;svg;|;math;/.test(";"+gt.join(";")+";")||(w="'<"+ft+".../"):wi[u]?w="'<\/"+u:gt.length&&u===ft||(w="Mismatch: '<\/"+u),w&&vi(w+">' in:\n"+a)),fr=et,ft=gt.shift(),et=pi[ft],l=l?"<\/"+l+">":"",fr&&(vt+=pt,pt="",et?vt+="-":(b=l+vr+"@"+vt+ar+(v||""),vt=su.shift()))),et?(e?pt+=e:t=l||y||"",nt&&(t+=nt,pt&&(t+=" "+s+'="'+pt+'"',pt=""))):t=e?t+b+f+vr+e+ar+o+nt:b||n,fi&&e&&vi(" No {^{ tags within elem markup ("+fi+' ). Use data-link="..."'),nt&&(fi=nt,gt.unshift(ft),ft=nt.slice(1),gt[0]&&gt[0]===du[ft]&&g("Parent of <tr> must be <tbody>"),si=wi[ft],(et=pi[ft])&&!fr&&(su.unshift(vt),vt=""),fr=et,vt&&et&&(vt+="+")),t)}function ai(n,t){var o,a,u,e,f,v,s,h=[];if(n){for(n._tkns.charAt(0)==="@"&&(t=d.previousSibling,d.parentNode.removeChild(d),d=i),wt=n.length;wt--;){if(ut=n[wt],u=ut.ch,o=ut.path)for(ot=o.length-1;a=o.charAt(ot--);)a==="+"?o.charAt(ot)==="-"?(ot--,t=t.previousSibling):t=t.parentNode:t=t.lastChild;u==="^"?(nt=c[f=ut.id])&&(s=t&&(!d||d.parentNode!==t),(!d||s)&&(nt.parentElem=t),ut.elCnt&&s&&l(t,(ut.open?"#":"/")+f+u+(t._df||"")),h.push([s?null:d,ut])):(tt=w[f=ut.id])&&(tt.parentElem||(tt.parentElem=t||d&&d.parentNode||r,tt._.onRender=ht,tt._.onArrayChange=ki,dt(tt)),e=tt.parentElem,ut.open?(tt._elCnt=ut.elCnt,t&&!d?l(t,"#"+f+u+(t._df||"")):(tt._prv||l(e,lt(e._df,"#"+f+u)),tt._prv=d)):(t&&(!d||d.parentNode!==t)?(l(t,"/"+f+u+(t._df||"")),tt._nxt=i):d&&(tt._nxt||l(e,lt(e._df,"/"+f+u)),tt._nxt=d),ei=tt.linkCtx,(v=tt.ctx&&tt.ctx.onAfterCreate||lu)&&v.call(ei,tt)))}for(wt=h.length;wt--;)li.push(h[wt])}return!n||n.elCnt}function tu(n){var t,i;if(n)for(wt=n.length,ot=0;ot<wt;ot++)if(ut=n[ot],i=nt=c[ut.id].linkCtx.tag,!nt.flow){if(!cr){for(t=1;i=i.parent;)t++;rr=rr||t}(cr||t===rr)&&(!lr||nt.tagName===lr)&&ru.push(nt)}}function iu(){var h,l,o="",y={},v=hr+(st?",["+yr+"]":"");for(bi=yi?r.querySelectorAll(v):t(v,r).get(),ni=bi.length,u&&u.innerHTML&&(di=yi?u.querySelectorAll(v):t(v,u).get(),u=di.length?di[di.length-1]:u),rr=0,yt=0;yt<ni;yt++)if(d=bi[yt],u&&!eu)eu=d===u;else if(f&&d===f){st&&(o+=rt(d));break}else if(d.parentNode)if(st){if(o+=rt(d),d._df){for(h=yt+1;h<ni&&d.contains(bi[h]);)h++;y[h-1]=d._df}y[yt]&&(o+=y[yt]||"")}else dr&&(ut=e(d,i,gr))&&(ut=ut[0])&&(ci=ci?ut.id!==ci&&ci:ut.open&&ut.id),!ci&&hu(e(d))&&d.getAttribute(p)&&li.push([d]);if(st&&(o+=r._df||"",(l=o.indexOf("#"+st.id)+1)&&(o=o.slice(l+st.id.length)),l=o.indexOf("/"+st.id),l+1&&(o=o.slice(0,l)),tu(e(o,i,rf))),a===i&&r.getAttribute(p)&&li.push([r]),tr(u,et),tr(f,et),st){bt&&bt.resolve();return}for(et&&vt+pt&&(d=f,vt&&(f?ai(e(vt+"+",!0),f):ai(e(vt,!0),r)),ai(e(pt,!0),r),f&&(o=f.getAttribute(s),(ni=o.indexOf(er)+1)&&(o=o.slice(ni+er.length-1)),f.setAttribute(s,pt+o))),ni=li.length,yt=0;yt<ni;yt++)d=li[yt],ti=d[1],d=d[0],ti?(nt=c[ti.id])&&((ei=nt.linkCtx)&&(nt=ei.tag,nt.linkCtx=ei),ti.open?(d&&(nt.parentElem=d.parentNode,nt._prv=d),nt._elCnt=ti.elCnt,!nt||nt.onBeforeLink&&nt.onBeforeLink()===!1||nt._.bound||(nt._.bound=!0,tt=nt.tagCtx.view,ct(i,nt._prv,tt,ti.id)),nt._.linking=!0):(nt._nxt=d,nt._.linking&&(pr=nt.tagCtx,tt=pr.view,delete nt._.linking,nt._.bound||(nt._.bound=!0,ct(i,nt._prv,tt,ti.id)),at(nt,pr)))):ct(d.getAttribute(p),d,it(d),i,dr,n,b);bt&&bt.resolve()}var fi,ei,nt,yt,ni,ot,wt,bi,d,tt,ut,ti,di,gi,or,nr,ri,ru,cr,lr,pr,br,rr,uu,kr,fu,oi,ft,si,hi,ur,ii,et,fr,ui,pt,er,eu,ci,bt,dr,st,nu=this,ou=nu._.id+"_",vt="",li=[],gt=[],su=[],lu=nu.hlp(yu),hu=ai;if(y&&(bt=y.lazyLink&&t.Deferred(),y.tmpl?or="/"+y._.id+"_":(dr=y.lnk,y.tag&&(ou=y.tag+"^",y=!0),(st=y.get)&&(hu=tu,ru=st.tags,cr=st.deep,lr=st.name)),y=y===!0),r=r?""+r===r?t(r)[0]:r.jquery?r[0]:r:nu.parentElem||o.body,br=!v.noValidate&&r.contentEditable!==kt,ft=r.tagName.toLowerCase(),et=!!pi[ft],u=u&&ir(u,et),f=f&&ir(f,et)||null,a!=i){if(ur=o.createElement("div"),hi=ur,er=pt="",ui=r.namespaceURI==="http://www.w3.org/2000/svg"?"svg_ns":(oi=bu.exec(a))&&oi[1]||"",sr&&oi&&oi[2]&&g("Unsupported: "+oi[2]),et){for(ri=f;ri&&!(nr=e(ri));)ri=ri.nextSibling;(ii=nr?nr._tkns:r._df)&&(gi=or||"",(y||!or)&&(gi+="#"+ou),ot=ii.indexOf(gi),ot+1&&(ot+=gi.length,er=pt=ii.slice(0,ot),ii=ii.slice(ot),nr?ri.setAttribute(s,ii):l(r,ii)))}if(si=i,a=(""+a).replace(nf,cu),br&&gt.length&&vi("Mismatched '<"+ft+"...>' in:\n"+a),k)return;for(wr.appendChild(ur),ui=h[ui]||h.div,uu=ui[0],hi.innerHTML=ui[1]+a+ui[2];uu--;)hi=hi.lastChild;for(wr.removeChild(ur),kr=o.createDocumentFragment();fu=hi.firstChild;)kr.appendChild(fu);r.insertBefore(kr,f)}return bt?setTimeout(iu,0):iu(),bt&&bt.promise()}function ct(n,t,u,f,e,o,s){var k,v,w,h,d,g,p,b,a,l,nt;if(f)l=c[f],l=l.linkCtx?l.linkCtx.tag:l,a=l.linkCtx||{data:u.data,elem:l._elCnt?l.parentElem:t,view:u,ctx:u.ctx,attr:y,fn:l._.bnd,tag:l,_bndId:f},nr(a,a.fn);else if(n&&t)for(o=e?o:u.data,k=u.tmpl,n=uu(n,st(t)),ut.lastIndex=0;v=ut.exec(n);)nt=ut.lastIndex,w=v[1],p=v[3],d=v[10],h=i,a={data:o,elem:t,view:u,ctx:s,attr:w,isLk:e,_initVal:!v[2]},v[6]&&(!w&&(h=/:([\w$]*)$/.exec(d))&&(h=h[1],h!==i&&(g=-h.length-1,p=p.slice(0,g-1)+ft)),h===null&&(h=i),a.convert=v[5]||""),a.expr=w+p,b=k.links[p],b||(k.links[p]=b=r.tmplFn(p,k,!0,h)),a.fn=b,w||h===i||(a.convertBack=h),nr(a,b),ut.lastIndex=nt}function nr(n,t){function u(i,r){tu.call(n,i,r,t)}u.noArray=!0;n.isLk&&(n.view=new r.View(n.ctx,"link",a,n.data,a.tmpl,i,i,ht));n._ctxCb=eu(n.view);n._hdlr=u;u(!0)}function lt(n,t){var i;return n?(i=n.indexOf(t),i+1?n.slice(0,i)+n.slice(i+t.length):n):""}function rt(n){return n&&(""+n===n?n:n.tagName==="SCRIPT"?n.type.slice(3):n.nodeType===1&&n.getAttribute(s)||"")}function e(n,t,i){function e(n,t,i,r,e,o){u.push({elCnt:f,id:r,ch:e,open:t,close:i,path:o,token:n})}var f,r,u=[];if(r=t?n:rt(n))return u.elCnt=!n.type,f=r.charAt(0)==="@"||!n.type,u._tkns=r,r.replace(i||uf,e),u}function tr(n,t){n&&(n.type==="jsv"?n.parentNode.removeChild(n):t&&n.getAttribute(p)===""&&n.removeAttribute(p))}function ir(n,t){for(var i=n;t&&i&&i.nodeType!==1;)i=i.previousSibling;return i&&(i.nodeType!==1?(i=o.createElement("SCRIPT"),i.type="jsv",n.parentNode.insertBefore(i,n)):rt(i)||i.getAttribute(p)||i.setAttribute(p,"")),i}function uu(n,i){return n=t.trim(n).replace(ku,"\\$&"),n.slice(-1)!==ft?n=fi+":"+n+(i?":":"")+ft:n}function at(n,u){var e,f,l,o,s,y,p,a,w,v,b=u.view,h=n.linkCtx=n.linkCtx||{tag:n,data:b.data,view:b,ctx:b.ctx};if(n.onAfterLink)n.onAfterLink(u,h);if(e=n.targetTag?n.targetTag.linkedElem:n.linkedElem,(f=e&&e[0])&&((l=n._.radio)&&(e=e.children("input[type=radio]")),l||!n._.chging)){if(o=r.cvt(n,n.convert)[0],l||f!==h.elem){for(p=e.length;p--;){if(f=e[p],a=f._jsvLkEl,n._.inline&&(!a||a!==n&&a.targetTag!==n))for(f._jsvLkEl=n,s=h.elem?h.elem._jsvBnd:n._prv._jsvBnd,f._jsvBnd=s+"+",s=s.slice(1).split("&"),y=s.length;y--;)rr(c[s[y]],n.convertBack);l&&(f[nt]=o===f.value)}h._val=o}o!==i&&(l||f.value===i?f.contentEditable===kt&&(f.innerHTML=o):f.type===hi?f[nt]=o&&o!=="false":e.val(o))}(f=f||n.tagName===":"&&h.elem)&&(w=f._jsvTr,v=u.props.trigger,w!==v&&(f._jsvTr=v,e=e||t(f),ti(e,w,"off"),ti(e,v,"on")))}function fu(n){setTimeout(function(){d(n)},0)}function ti(n,t,i){t&&n[i](t===!0?"keydown":t,t===!0?fu:d)}function rr(n,t){var o,f,s,r,e,u=n.linkCtx,h=u.data,i=u.fn.paths;if(n&&i){for(i=(o=i._jsvto)||i[0],f=i&&i.length;f&&""+(r=i[--f])!==r;);r&&(!u.tag||u.tag.tagCtx.args.length)?(r=r.split("^").join("."),n.to=r.charAt(0)==="."?[[e=i[f-1],r.slice(1)],t]:[u._ctxCb(s=f?i[0].split("^").join("."):r)||[h,s],t],o&&e&&(n.to[0][0]=u._ctxCb(e,h))):n.to=[[],t]}}function ur(n,t,i){var o,s,h=n.tagCtx.view,e=n.tagCtxs||[n.tagCtx],c=e.length,l=!t;if(t=t||n._.bnd.call(h.tmpl,(n.linkCtx||h).data,h,u),i)e=n.tagCtxs=t,n.tagCtx=e[0];else while(c--)o=e[c],s=t[c],f(o.props).setProperty(s.props),b(o.ctx,s.ctx),o.args=s.args,l&&(o.tmpl=s.tmpl);return r._ths(n,e[0]),e}function vt(n){for(var u,t,i,f=[],e=n.length,r=e;r--;)f.push(n[r]);for(r=e;r--;)if(t=f[r],t.parentNode){if(i=t._jsvBnd)for(i=i.slice(1).split("&"),t._jsvBnd="",u=i.length;u--;)yt(i[u],t._jsvLkEl,t);er(rt(t)+(t._df||""))}}function yt(n,u,f){var y,h,e,l,a,p,w,b,v,s,k,o=c[n];if(u)f===u.linkedElem[0]&&(delete f._jsvLkEl,delete u.linkedElem);else if(o){delete c[n];for(y in o.bnd)l=o.bnd[y],a=".obs"+o.cbId,t.isArray(l)?t([l]).off(ei+a).off(cr+a):t(l).off(cr+a),delete o.bnd[y];if(h=o.linkCtx){if(e=h.tag){if(p=e.tagCtxs)for(w=p.length;w--;)(b=p[w].map)&&b.unmap();v=e.linkedElem;s=v&&v[0]||h.elem;(k=s&&s._jsvTr)&&(ti(v||t(s),k,"off"),s._jsvTr=i);e.onDispose&&e.onDispose();e._elCnt||(e._prv&&e._prv.parentNode.removeChild(e._prv),e._nxt&&e._nxt.parentNode.removeChild(e._nxt))}delete h.view._.bnds[n]}delete r._cbBnds[o.cbId]}}function ii(n,r){return n===i?(tt&&(t(tt).off(lr,d).off("blur","[contenteditable]",d),tt=i),n=!0,a.removeViews(),vt(o.body.getElementsByTagName("*"))):r&&n===!0&&(r=r.jquery?r:t(r),r.each(function(){for(var n;(n=it(this,!0))&&n.parent;)n.parent.removeViews(n._.key,i,!0);vt(this.getElementsByTagName("*"));vt([this])})),r}function fr(n,t){return ii(this,n,t)}function eu(n){return function(t,i){var f,r,e=[i];if(n&&t){if(t._jsvOb)return t._jsvOb.call(n.tmpl,i,n,u);if(t.charAt(0)==="~")return t.slice(0,4)==="~tag"&&(r=n.ctx,t.charAt(4)==="."&&(f=t.slice(5).split("."),r=r.tag),f)?r?[r,f.join("."),i]:[]:(t=t.slice(1).split("."),(i=n.hlp(t.shift()))&&(t.length&&e.unshift(t.join(".")),e.unshift(i)),i?e:[]);if(t.charAt(0)==="#")return t==="#data"?[]:[n,t.replace(gu,""),i]}}}function ou(n){return n.type===hi?n[nt]:n.value}function ri(n,t,i,r,u,f){var y,a,p,h,k,v,o,b=0,d=n===t;if(n){for(p=e(n)||[],y=0,a=p.length;y<a;y++){if(h=p[y],v=h.id,v===r&&h.ch===u)if(f)a=0;else break;d||(k=h.ch==="_"?w[v]:c[v].linkCtx.tag,h.open?k._prv=t:h.close&&(k._nxt=t));b+=v.length+2}b&&n.setAttribute(s,n.getAttribute(s).slice(b));o=t?t.getAttribute(s):i._df;(a=o.indexOf("/"+r+u)+1)&&(o=p._tkns.slice(0,b)+o.slice(a+(f?-1:r.length+1)));o&&(t?t.setAttribute(s,o):l(i,o))}else l(i,lt(i._df,"#"+r+u)),f||t||l(i,lt(i._df,"/"+r+u))}function er(n){var r,f,t,u;if(u=e(n,!0,tf))for(r=0,f=u.length;r<f;r++)t=u[r],t.ch==="_"?(t=w[t.id])&&t.type&&t.parent.removeViews(t._.key,i,!0):yt(t.id)}function su(n,t,i){if(i.change==="set"){for(var r=n.tgt,u=r.length;u--;)if(r[u].key===i.path)break;u===-1?i.path&&f(r).insert({key:i.path,prop:i.value}):i.remove?f(r).remove(u):f(r[u]).setProperty("prop",i.value)}}function hu(n,t,i){var r,u=n.src,e=i.change;e==="set"?i.path==="prop"?f(u).setProperty(t.target.key,i.value):(f(u).setProperty(i.oldValue,null),delete u[i.oldValue],f(u).setProperty(i.value,t.target.prop)):e==="remove"?(r=i.items[0],f(u).removeProperty(r.key),delete u[r.key]):e==="insert"&&(r=i.items[0],r.key&&f(u).setProperty(r.key,r.prop))}function cu(n){return n.indexOf(".")<0}var ui="JsViews requires ",tt,it,ut,lu,fi,ft,au,or,sr,g,p,et,hr,h,a,w,o=n.document,u=t.views,r=u.sub,v=u.settings,b=r.extend,ot=t.isFunction,vu=u.converters,k=u.tags,f=t.observable,pt=f.observe,s="data-jsv",cr=r.propChng=r.propChng||"propertyChange",ei=r.arrChng=r.arrChng||"arrayChange",lr="change.jsv",oi="onBeforeChange",si="onAfterChange",yu="onAfterCreate",nt="checked",hi="checkbox",wt="radio",bt="none",kt="true",ar='"><\/script>',vr='<script type="jsv',yr=s+"-df",ci="script,["+s+"]",y="html",li={value:"val",input:"val",html:y,text:"text"},pr={from:"value",to:"value"},ai=0,pu=t.cleanData,wu=v.delimiters,vi=r.syntaxErr,bu=/<(?!script)(\w+)(?:[^>]*(on\w+)\s*=)?[^>]*>/,ku=/['"\\]/g,wr=o.createDocumentFragment(),yi=o.querySelector,pi={ol:1,ul:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,colgroup:1,dl:1,select:1,optgroup:1,svg:1,svg_ns:1},du={tr:"table"},wi={br:1,img:1,input:1,hr:1,area:1,base:1,col:1,link:1,meta:1,command:1,embed:1,keygen:1,param:1,source:1,track:1,wbr:1},br={},c={},kr=1,gu=/^#(view\.?)?/,nf=/(^|(\/>)|<\/(\w+)>|)(\s*)([#\/]\d+[_^])`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>))/g,dr=/(#)()(\d+)(_)/g,tf=/(#)()(\d+)([_^])/g,gr=/(?:(#)|(\/))(\d+)(_)/g,rf=/(#)()(\d+)(\^)/g,uf=/(?:(#)|(\/))(\d+)([_^])([-+@\d]+)?/g,nu=n.getComputedStyle;if(!t)throw ui+"jQuery";if(!u)throw ui+"JsRender";if(!f)throw ui+"jquery.observable";t.link||(et={contents:function(n,r){n!==!!n&&(r=n,n=i);var f,u=t(this.nodes());return u[0]&&(f=r?u.filter(r):u,u=n&&r?f.add(u.find(r)):f),u},nodes:function(n,t,i){var r,u=this,f=u._elCnt,o=!t&&f,e=[];for(t=t||u._prv,i=i||u._nxt,r=o?t===u._nxt?u.parentElem.lastSibling:t:u._.inline===!1?t||u.linkCtx.elem.firstChild:t&&t.nextSibling;r&&(!i||r!==i);)(n||f||r.tagName!=="SCRIPT")&&e.push(r),r=r.nextSibling;return e},childTags:function(n,t){n!==!!n&&(t=n,n=i);var r=this,e=r.link?r:r.tagCtx.view,u=r._prv,o=r._elCnt,f=[];return e.link(i,r.parentElem,o?u&&u.previousSibling:u,r._nxt,i,{get:{tags:f,deep:n,name:t,id:r.link?r._.id+"_":r._tgId+"^"}}),f},refresh:function(n){var r,f,t=this,e=t.linkCtx,o=t.tagCtx.view;return t.disposed&&g("Removed tag"),n===i&&(n=u._tag(t,o,o.tmpl,ur(t),!0)),n+""===n&&(f=t._.inline?y:e.attr||st(t.parentElem,!0),r=bi(n,e,f,t)),at(t,t.tagCtx),r||t},update:function(n){var t=this.linkedElem;t&&d({target:t[0]},i,n)}},r.onStore.template=function(n,i){i.link=gi;i.unlink=fr;n&&(t.link[n]=function(){return gi.apply(i,arguments)},t.unlink[n]=function(){return fr.apply(i,arguments)})},r.onStore.tag=function(n,t){r._lnk(t)},r._lnk=function(n){return b(n,et)},r.viewInfos=e,(v.delimiters=function(){var n=wu.apply(u,arguments);return lu=n[0],fi=n[1],ft=n[2],au=n[3],or=n[4],ut=new RegExp("(?:^|\\s*)([\\w-]*)(\\"+or+")?(\\"+fi+r.rTag+"\\"+ft+")","g"),this})(),b(r._lnk(r.View.prototype),{addViews:function(n,t,i){var u,s,r=this,e=t.length,o=r.views;if(!r._.useKey&&e&&(i=r.tmpl)&&(s=o.length+e,di(r,n,i,o,t,r.ctx)!==!1))for(u=n+e;u<s;u++)f(o[u]).setProperty("index",u);return r},removeViews:function(n,r,u){function s(n){var s,h,c,f,o,l,r=e[n];if(r&&r.link){if(s=r._.id,u||(l=r.nodes()),r.removeViews(i,i,!0),r.type=i,f=r._prv,o=r._nxt,c=r.parentElem,u||(r._elCnt&&ri(f,o,c,s,"_"),t(l).remove()),!r._elCnt)try{f.parentNode.removeChild(f);o.parentNode.removeChild(o)}catch(a){}dt(r);for(h in r._.bnds)yt(h);delete w[s]}}var o,a,h,c=this,l=!c._.useKey,e=c.views;if(l&&(h=e.length),n===i)if(l){for(o=h;o--;)s(o);c.views=[]}else{for(a in e)s(a);c.views={}}else if(r===i&&(l?r=1:(s(n),delete e[n])),l&&r){for(o=n+r;o-->n;)s(o);if(e.splice(n,r),h=e.length)while(n<h)f(e[n]).setProperty("index",n++)}return this},refresh:function(n){var t=this,i=t.parent;return i&&(di(t,t.index,t.tmpl,i.views,t.data,n,!0),dt(t)),t},link:ru}),w={0:a=new r.View},vu.merge=function(n){var t,i=this.linkCtx._val||"",r=this.tagCtx.props.toggle;return r&&(t=r.replace(/[\\^$.|?*+()[{]/g,"\\$&"),t="(\\s(?="+t+"$)|(\\s)|^)("+t+"(\\s|$))",i=i.replace(new RegExp(t),"$2"),n=i+(n?(i&&" ")+r:"")),n},k("on",{attr:bt,onAfterLink:function(n,u){for(var l,o,s=this,h=0,f=n.args,v=f.length,a=n.props.data,c=n.view,e=n.props.context;h<v&&!(o=ot(l=f[h++])););if(o){o=f.slice(h);f=f.slice(0,h-1);e||(e=/^(.*)[\.^][\w$]+$/.exec(n.params.args.slice(-o.length-1)[0]),e=e&&r.tmplFn("{:"+e[1]+"}",c.tmpl,!0)(u.data,c));s._evs&&s.onDispose();t(u.elem).on(s._evs=f[0]||"click",s._sel=f[1],a==i?null:a,s._hlr=function(n){return l.apply(e||u.data,[].concat(o,n,{change:n.type,view:c,linkCtx:u}))})}},onDispose:function(){t(this.parentElem).off(this._evs,this._sel,this._hlr)},flow:!0}),b(k["for"],{onArrayChange:function(n,t){var i,r=this,u=t.change;if(r.tagCtxs[1]&&(u==="insert"&&n.target.length===t.items.length||u==="remove"&&!n.target.length||u==="refresh"&&!t.oldItems.length!=!n.target.length))r.refresh();else for(i in r._.arrVws)i=r._.arrVws[i],i.data===n.target&&i._.onArrayChange.apply(i,arguments);n.done=!0},onAfterLink:function(){for(var u,o,i,f,e=this,r=e._ars||{},s=e.tagCtxs,c=s.length,h=e.selected||0,n=0;n<=h;n++)u=s[n],f=u.map?u.map.tgt:u.args.length?u.args[0]:u.view.data,(i=r[n])&&f!==i[0]&&(pt(i[0],i[1],!0),delete r[n]),!r[n]&&t.isArray(f)&&(pt(f,o=function(n,t){e.onArrayChange(n,t)}),r[n]=[f,o]);for(n=h+1;n<c;n++)(i=r[n])&&(pt(i[0],i[1],!0),delete r[n]);e._ars=r},onDispose:function(){var n,t=this;for(n in t._ars)pt(t._ars[n][0],t._ars[n][1],!0)}}),b(k["for"],et),b(k["if"],et),b(k.include,et),k("props",{baseTag:k["for"],dataMap:u.map({getTgt:k.props.dataMap.getTgt,obsSrc:su,obsTgt:hu,tgtFlt:cu})}),b(t,{view:u.view=it=function(n,r,u){function p(n,t){if(n)for(s=e(n,t,dr),l=0,b=s.length;l<b;l++)if((f=w[s[l].id])&&(f=f&&u?f.get(!0,u):f))break}r!==!!r&&(u=r,r=i);var f,s,c,l,b,h,v,y=0,k=o.body;if(n&&n!==k&&a._.useKey>1&&(n=""+n===n?t(n)[0]:n.jquery?n[0]:n,n)){if(r){if(p(n._df,!0),!f)for(v=yi?n.querySelectorAll(ci):t(ci,n).get(),h=v.length,c=0;!f&&c<h;c++)p(v[c]);return f}while(n){if(s=e(n,i,gr))for(h=s.length;h--;)if(f=s[h],f.open){if(y<1)return f=w[f.id],f&&u?f.get(u):f||a;y--}else y++;n=n.previousSibling||n.parentNode}}return a},link:u.link=ni,unlink:u.unlink=ii,cleanData:function(n){n.length&&ai&&vt(n);pu.apply(t,arguments)}}),u.utility={validate:function(n){try{a.link(i,o.createElement("div"),i,i,n,i,i,1)}catch(t){return t.message}}},b(t.fn,{link:function(n,t,i,r,u,f,e){return ni(n,this,t,i,r,u,f,e)},unlink:function(n){return ii(n,this)},view:function(n){return it(this[0],n)}}),t.each([y,"replaceWith","empty","remove"],function(n,i){var r=t.fn[i];t.fn[i]=function(){var n;ai=1;try{n=r.apply(this,arguments)}finally{ai=0}return n}}),b(a,{tmpl:{links:{},tags:{}}}),a._.onRender=ht,v({wrapMap:h={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],svg_ns:[1,"<svg>","<\/svg>"],div:jQuery.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},linkAttr:p="data-link",merge:{input:{from:ou,to:"value"},textarea:pr,select:pr,optgroup:{to:"label"}},jsrDbgMode:v.debugMode,debugMode:function(t){v.jsrDbgMode(t);t?n._jsv={views:w,bindings:c}:delete n._jsv},jsv:function(){v.debugMode(v._dbgMode);p=v.linkAttr;g=u._err;hr=ci+",["+p+"]";sr=v.noDomLevel0;h.optgroup=h.option;h.tbody=h.tfoot=h.colgroup=h.caption=h.thead;h.th=h.td}}))}(this,this.jQuery),function(n){var i=[].slice,t={},r=n.amplify={publish:function(n){if(typeof n!="string")throw new Error("You must provide a valid topic to publish.");var s=i.call(arguments,1),r,u,o,f=0,e;if(!t[n])return!0;for(r=t[n].slice(),o=r.length;f<o;f++)if(u=r[f],e=u.callback.apply(u.context,s),e===!1)break;return e!==!1},subscribe:function(n,i,r,u){var f,s;if(typeof n!="string")throw new Error("You must provide a valid topic to create a subscription.");arguments.length===3&&typeof r=="number"&&(u=r,r=i,i=null);arguments.length===2&&(r=i,i=null);u=u||10;for(var e=0,h=n.split(/\s/),c=h.length,o;e<c;e++){for(n=h[e],o=!1,t[n]||(t[n]=[]),f=t[n].length-1,s={callback:r,context:i,priority:u};f>=0;f--)if(t[n][f].priority<=u){t[n].splice(f+1,0,s);o=!0;break}o||t[n].unshift(s)}return r},unsubscribe:function(n,i,r){if(typeof n!="string")throw new Error("You must provide a valid topic to remove a subscription.");if(arguments.length===2&&(r=i,i=null),t[n])for(var f=t[n].length,u=0;u<f;u++)t[n][u].callback!==r||i&&t[n][u].context!==i||(t[n].splice(u,1),u--,f--)}}}(this),function(n,t){function f(n,r){i.addType(n,function(f,e,o){var c,s,v,l,h=e,a=(new Date).getTime();if(!f){h={};l=[];v=0;try{for(f=r.length;f=r.key(v++);)u.test(f)&&(s=JSON.parse(r.getItem(f)),s.expires&&s.expires<=a?l.push(f):h[f.replace(u,"")]=s.data);while(f=l.pop())r.removeItem(f)}catch(y){}return h}if(f="__amplify__"+f,e===t){if(c=r.getItem(f),s=c?JSON.parse(c):{expires:-1},!(s.expires&&s.expires<=a))return s.data;r.removeItem(f)}else if(e===null)r.removeItem(f);else{s=JSON.stringify({data:e,expires:o.expires?a+o.expires:null});try{r.setItem(f,s)}catch(y){i[n]();try{r.setItem(f,s)}catch(y){throw i.error();}}}return h})}var i=n.store=function(n,t,r){var u=i.type;return r&&r.type&&r.type in i.types&&(u=r.type),i.types[u](n,t,r||{})},u,r;i.types={};i.type=null;i.addType=function(n,t){i.type||(i.type=n);i.types[n]=t;i[n]=function(t,r,u){return u=u||{},u.type=n,i(t,r,u)}};i.error=function(){return"amplify.store quota exceeded"};u=/^__amplify__/;for(r in{localStorage:1,sessionStorage:1})try{window[r].setItem("__amplify__","x");window[r].removeItem("__amplify__");f(r,window[r])}catch(e){}if(!i.types.localStorage&&window.globalStorage)try{f("globalStorage",window.globalStorage[window.location.hostname]);i.type==="sessionStorage"&&(i.type="globalStorage")}catch(e){}(function(){if(!i.types.localStorage){var n=document.createElement("div"),r="amplify";n.style.display="none";document.getElementsByTagName("head")[0].appendChild(n);try{n.addBehavior("#default#userdata");n.load(r)}catch(u){n.parentNode.removeChild(n);return}i.addType("userData",function(u,f,e){n.load(r);var s,o,h,v,l,c=f,a=(new Date).getTime();if(!u){for(c={},l=[],v=0;s=n.XMLDocument.documentElement.attributes[v++];)o=JSON.parse(s.value),o.expires&&o.expires<=a?l.push(s.name):c[s.name]=o.data;while(u=l.pop())n.removeAttribute(u);return n.save(r),c}if(u=u.replace(/[^\-._0-9A-Za-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c-\u200d\u203f\u2040\u2070-\u218f]/g,"-"),u=u.replace(/^-/,"_-"),f===t){if(s=n.getAttribute(u),o=s?JSON.parse(s):{expires:-1},!(o.expires&&o.expires<=a))return o.data;n.removeAttribute(u)}else f===null?n.removeAttribute(u):(h=n.getAttribute(u),o=JSON.stringify({data:f,expires:e.expires?a+e.expires:null}),n.setAttribute(u,o));try{n.save(r)}catch(y){h===null?n.removeAttribute(u):n.setAttribute(u,h);i.userData();try{n.setAttribute(u,o);n.save(r)}catch(y){throw h===null?n.removeAttribute(u):n.setAttribute(u,h),i.error();}}return c})}})(),function(){function u(n){return n===t?t:JSON.parse(JSON.stringify(n))}var n={},r={};i.addType("memory",function(i,f,e){return i?f===t?u(n[i]):(r[i]&&(clearTimeout(r[i]),delete r[i]),f===null?(delete n[i],null):(n[i]=f,e.expires&&(r[i]=setTimeout(function(){delete n[i];delete r[i]},e.expires)),f)):u(n)})}()}(this.amplify=this.amplify||{}),function(n){"use strict";function t(){}function r(n){return{}.toString.call(n)==="[object Function]"}function i(n){var t=!1;return setTimeout(function(){t=!0},1),function(){var i=this,r=arguments;t?n.apply(i,r):setTimeout(function(){n.apply(i,r)},1)}}n.request=function(u,f,e){var o=u||{};typeof o=="string"&&(r(f)&&(e=f,f={}),o={resourceId:u,data:f||{},success:e});var s={abort:t},h=n.request.resources[o.resourceId],c=o.success||t,l=o.error||t;if(o.success=i(function(t,i){i=i||"success";n.publish("request.success",o,t,i);n.publish("request.complete",o,t,i);c(t,i)}),o.error=i(function(t,i){i=i||"error";n.publish("request.error",o,t,i);n.publish("request.complete",o,t,i);l(t,i)}),!h)throw o.resourceId?"amplify.request: unknown resourceId: "+o.resourceId:"amplify.request: no resourceId provided";if(!n.publish("request.before",o)){o.error(null,"abort");return}return n.request.resources[o.resourceId](o,s),s};n.request.types={};n.request.resources={};n.request.define=function(t,i,r){if(typeof i=="string"){if(!(i in n.request.types))throw"amplify.request.define: unknown type: "+i;r.resourceId=t;n.request.resources[t]=n.request.types[i](r)}else n.request.resources[t]=i}}(amplify),function(n,t,i){"use strict";var u=["status","statusText","responseText","responseXML","readyState"],f=/\{([^\}]+)\}/g,r;n.request.types.ajax=function(r){return r=t.extend({type:"GET"},r),function(f,e){var h,c,v=r.url,a=e.abort,o=t.extend(!0,{},r,{data:f.data}),l=!1,s={readyState:0,setRequestHeader:function(n,t){return h.setRequestHeader(n,t)},getAllResponseHeaders:function(){return h.getAllResponseHeaders()},getResponseHeader:function(n){return h.getResponseHeader(n)},overrideMimeType:function(n){return h.overrideMimeType(n)},abort:function(){l=!0;try{h.abort()}catch(n){}c(null,"abort")},success:function(n,t){f.success(n,t)},error:function(n,t){f.error(n,t)}};c=function(n,r){t.each(u,function(n,t){try{s[t]=h[t]}catch(i){}});/OK$/.test(s.statusText)&&(s.statusText="success");n===i&&(n=null);l&&(r="abort");/timeout|error|abort/.test(r)?s.error(n,r):s.success(n,r);c=t.noop};n.publish("request.ajax.preprocess",r,f,o,s);t.extend(o,{isJSONP:function(){return/jsonp/gi.test(this.dataType)},cacheURL:function(){var n,t;return this.isJSONP()?(n="callback",this.hasOwnProperty("jsonp")&&(this.jsonp!==!1?n=this.jsonp:this.hasOwnProperty("jsonpCallback")&&(n=this.jsonpCallback)),t=new RegExp("&?"+n+"=[^&]*&?","gi"),this.url.replace(t,"")):this.url},success:function(n,t){c(n,t)},error:function(n,t){c(null,t)},beforeSend:function(t,i){h=t;o=i;var u=r.beforeSend?r.beforeSend.call(this,s,o):!0;return u&&n.publish("request.before.ajax",r,f,o,s)}});o.cache&&o.isJSONP()&&t.extend(o,{cache:!0});t.ajax(o);e.abort=function(){s.abort();a.call(this)}}};n.subscribe("request.ajax.preprocess",function(n,i,r){var e=[],u=r.data;typeof u!="string"&&(u=t.extend(!0,{},n.data,u),r.url=r.url.replace(f,function(n,t){if(t in u)return e.push(t),u[t]}),t.each(e,function(n,t){delete u[t]}),r.data=u)});n.subscribe("request.ajax.preprocess",function(n,i,r){var u=r.data,f=n.dataMap;f&&typeof u!="string"&&(t.isFunction(f)?r.data=f(u):(t.each(n.dataMap,function(n,t){n in u&&(u[t]=u[n],delete u[n])}),r.data=u))});r=n.request.cache={_key:function(n,t,i){function u(){return i.charCodeAt(r++)<<24|i.charCodeAt(r++)<<16|i.charCodeAt(r++)<<8|i.charCodeAt(r++)<<0}i=t+i;for(var e=i.length,r=0,f=u();r<e;)f^=u();return"request-"+n+"-"+f},_default:function(){var n={};return function(t,i,u,f){var e=r._key(i.resourceId,u.cacheURL(),u.data),o=t.cache,s;if(e in n)return f.success(n[e]),!1;s=f.success;f.success=function(t){n[e]=t;typeof o=="number"&&setTimeout(function(){delete n[e]},o);s.apply(this,arguments)}}}()};n.store&&(t.each(n.store.types,function(t){r[t]=function(i,u,f,e){var o=r._key(u.resourceId,f.cacheURL(),f.data),s=n.store[t](o),h;if(s)return f.success(s),!1;h=e.success;e.success=function(r){n.store[t](o,r,{expires:i.cache.expires});h.apply(this,arguments)}}}),r.persist=r[n.store.type]);n.subscribe("request.before.ajax",function(n){var t=n.cache;if(t)return t=t.type||t,r[t in r?t:"_default"].apply(this,arguments)});n.request.decoders={jsend:function(n,t,i,r,u){n.status==="success"?r(n.data):n.status==="fail"?u(n.data,"fail"):n.status==="error"?(delete n.status,u(n,"error")):u(null,"error")}};n.subscribe("request.before.ajax",function(i,r,u,f){function o(n,t){h(n,t)}function s(n,t){c(n,t)}var h=f.success,c=f.error,e=t.isFunction(i.decoder)?i.decoder:i.decoder in n.request.decoders?n.request.decoders[i.decoder]:n.request.decoders._default;e&&(f.success=function(n,t){e(n,t,f,o,s)},f.error=function(n,t){e(n,t,f,o,s)})})}(amplify,jQuery),function(){"use strict";function n(t,r){function h(n,t){return function(){return n.apply(t,arguments)}}var o,f,e,u,s;if(r=r||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=r.touchBoundary||10,this.layer=t,this.tapDelay=r.tapDelay||200,!n.notNeeded(t)){for(f=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],e=this,u=0,s=f.length;u<s;u++)e[f[u]]=h(e[f[u]],e);i&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0));t.addEventListener("click",this.onClick,!0);t.addEventListener("touchstart",this.onTouchStart,!1);t.addEventListener("touchmove",this.onTouchMove,!1);t.addEventListener("touchend",this.onTouchEnd,!1);t.addEventListener("touchcancel",this.onTouchCancel,!1);Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(n,i,r){var u=Node.prototype.removeEventListener;n==="click"?u.call(t,n,i.hijacked||i,r):u.call(t,n,i,r)},t.addEventListener=function(n,i,r){var u=Node.prototype.addEventListener;n==="click"?u.call(t,n,i.hijacked||(i.hijacked=function(n){n.propagationStopped||i(n)}),r):u.call(t,n,i,r)});typeof t.onclick=="function"&&(o=t.onclick,t.addEventListener("click",function(n){o(n)},!1),t.onclick=null)}}var i=navigator.userAgent.indexOf("Android")>0,t=/iP(ad|hone|od)/.test(navigator.userAgent),r=t&&/OS 4_\d(_\d)?/.test(navigator.userAgent),u=t&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf("BB10")>0;n.prototype.needsClick=function(n){switch(n.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(n.disabled)return!0;break;case"input":if(t&&n.type==="file"||n.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(n.className)};n.prototype.needsFocus=function(n){switch(n.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!i;case"input":switch(n.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!n.disabled&&!n.readOnly;default:return/\bneedsfocus\b/.test(n.className)}};n.prototype.sendClick=function(n,t){var r,i;document.activeElement&&document.activeElement!==n&&document.activeElement.blur();i=t.changedTouches[0];r=document.createEvent("MouseEvents");r.initMouseEvent(this.determineEventType(n),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);r.forwardedTouchEvent=!0;n.dispatchEvent(r)};n.prototype.determineEventType=function(n){return i&&n.tagName.toLowerCase()==="select"?"mousedown":"click"};n.prototype.focus=function(n){var i;t&&n.setSelectionRange&&n.type.indexOf("date")!==0&&n.type!=="time"&&n.type!=="month"?(i=n.value.length,n.setSelectionRange(i,i)):n.focus()};n.prototype.updateScrollParent=function(n){var i,t;if(i=n.fastClickScrollParent,!i||!i.contains(n)){t=n;do{if(t.scrollHeight>t.offsetHeight){i=t;n.fastClickScrollParent=t;break}t=t.parentElement}while(t)}i&&(i.fastClickLastScrollTop=i.scrollTop)};n.prototype.getTargetElementFromEventTarget=function(n){return n.nodeType===Node.TEXT_NODE?n.parentNode:n};n.prototype.onTouchStart=function(n){var u,i,f;if(n.targetTouches.length>1)return!0;if(u=this.getTargetElementFromEventTarget(n.target),i=n.targetTouches[0],t){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!r){if(i.identifier&&i.identifier===this.lastTouchIdentifier)return n.preventDefault(),!1;this.lastTouchIdentifier=i.identifier;this.updateScrollParent(u)}}return this.trackingClick=!0,this.trackingClickStart=n.timeStamp,this.targetElement=u,this.touchStartX=i.pageX,this.touchStartY=i.pageY,n.timeStamp-this.lastClickTime<this.tapDelay&&n.preventDefault(),!0};n.prototype.touchHasMoved=function(n){var t=n.changedTouches[0],i=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>i||Math.abs(t.pageY-this.touchStartY)>i?!0:!1};n.prototype.onTouchMove=function(n){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(n.target)||this.touchHasMoved(n))&&(this.trackingClick=!1,this.targetElement=null),!0):!0};n.prototype.findControl=function(n){return n.control!==undefined?n.control:n.htmlFor?document.getElementById(n.htmlFor):n.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};n.prototype.onTouchEnd=function(n){var s,c,e,o,h,f=this.targetElement;if(!this.trackingClick)return!0;if(n.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=n.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,u&&(h=n.changedTouches[0],f=document.elementFromPoint(h.pageX-window.pageXOffset,h.pageY-window.pageYOffset)||f,f.fastClickScrollParent=this.targetElement.fastClickScrollParent),e=f.tagName.toLowerCase(),e==="label"){if(s=this.findControl(f),s){if(this.focus(f),i)return!1;f=s}}else if(this.needsFocus(f))return n.timeStamp-c>100||t&&window.top!==window&&e==="input"?(this.targetElement=null,!1):(this.focus(f),this.sendClick(f,n),t&&e==="select"||(this.targetElement=null,n.preventDefault()),!1);return t&&!r&&(o=f.fastClickScrollParent,o&&o.fastClickLastScrollTop!==o.scrollTop)?!0:(this.needsClick(f)||(n.preventDefault(),this.sendClick(f,n)),!1)};n.prototype.onTouchCancel=function(){this.trackingClick=!1;this.targetElement=null};n.prototype.onMouse=function(n){return this.targetElement?n.forwardedTouchEvent?!0:n.cancelable?!this.needsClick(this.targetElement)||this.cancelNextClick?(n.stopImmediatePropagation?n.stopImmediatePropagation():n.propagationStopped=!0,n.stopPropagation(),n.preventDefault(),!1):!0:!0:!0};n.prototype.onClick=function(n){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):n.target.type==="submit"&&n.detail===0?!0:(t=this.onMouse(n),t||(this.targetElement=null),t)};n.prototype.destroy=function(){var n=this.layer;i&&(n.removeEventListener("mouseover",this.onMouse,!0),n.removeEventListener("mousedown",this.onMouse,!0),n.removeEventListener("mouseup",this.onMouse,!0));n.removeEventListener("click",this.onClick,!0);n.removeEventListener("touchstart",this.onTouchStart,!1);n.removeEventListener("touchmove",this.onTouchMove,!1);n.removeEventListener("touchend",this.onTouchEnd,!1);n.removeEventListener("touchcancel",this.onTouchCancel,!1)};n.notNeeded=function(n){var t,r,u;if(typeof ontouchstart=="undefined")return!0;if(r=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r)if(i){if(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||r>31&&document.documentElement.scrollWidth<=window.outerWidth))return!0}else return!0;return f&&(u=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),u[1]>=10&&u[2]>=3&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))?!0:n.style.msTouchAction==="none"?!0:!1};n.attach=function(t,i){return new n(t,i)};typeof define=="function"&&typeof define.amd=="object"&&define.amd?define(function(){return n}):typeof module!="undefined"&&module.exports?(module.exports=n.attach,module.exports.FastClick=n):window.FastClick=n}(),function(){function nt(t){function r(n,i,r,u,f,e){for(;f>=0&&e>f;f+=t){var o=u?u[f]:f;r=i(r,n[o],o,n)}return r}return function(u,f,o,s){f=e(f,s,4);var h=!i(u)&&n.keys(u),l=(h||u).length,c=t>0?0:l-1;return arguments.length<3&&(o=u[h?h[c]:c],c+=t),r(u,f,o,h,c,l)}}function tt(n){return function(i,r,f){r=t(r,f);for(var o=u(i),e=n>0?0:o-1;e>=0&&o>e;e+=n)if(r(i[e],e,i))return e;return-1}}function it(t,i,f){return function(e,o,s){var c=0,h=u(e);if("number"==typeof s)t>0?c=s>=0?s:Math.max(s+h,c):h=s>=0?Math.min(s+1,h):s+h+1;else if(f&&s&&h)return s=f(e,o),e[s]===o?s:-1;if(o!==o)return s=i(r.call(e,c,h),n.isNaN),s>=0?s+c:-1;for(s=t>0?c:h-1;s>=0&&h>s;s+=t)if(e[s]===o)return s;return-1}}function rt(t,i){var u=d.length,f=t.constructor,e=n.isFunction(f)&&f.prototype||v,r="constructor";for(n.has(t,r)&&!n.contains(i,r)&&i.push(r);u--;)r=d[u],r in t&&t[r]!==e[r]&&!n.contains(i,r)&&i.push(r)}var a=this,lt=a._,s=Array.prototype,v=Object.prototype,at=Function.prototype,vt=s.push,r=s.slice,o=v.toString,yt=v.hasOwnProperty,pt=Array.isArray,ut=Object.keys,y=at.bind,ft=Object.create,p=function(){},n=function(t){return t instanceof n?t:this instanceof n?void(this._wrapped=t):new n(t)},e,t,h,f,b,k,d,c,ct,l;"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports._=n):a._=n;n.VERSION="1.8.3";e=function(n,t,i){if(t===void 0)return n;switch(null==i?3:i){case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return function(){return n.apply(t,arguments)}};t=function(t,i,r){return null==t?n.identity:n.isFunction(t)?e(t,i,r):n.isObject(t)?n.matcher(t):n.property(t)};n.iteratee=function(n,i){return t(n,i,1/0)};var w=function(n,t){return function(i){var e=arguments.length,r,u;if(2>e||null==i)return i;for(r=1;e>r;r++)for(var o=arguments[r],s=n(o),h=s.length,f=0;h>f;f++)u=s[f],t&&i[u]!==void 0||(i[u]=o[u]);return i}},et=function(t){if(!n.isObject(t))return{};if(ft)return ft(t);p.prototype=t;var i=new p;return p.prototype=null,i},ot=function(n){return function(t){if(null!=t)return t[n]}},wt=Math.pow(2,53)-1,u=ot("length"),i=function(n){var t=u(n);return"number"==typeof t&&t>=0&&wt>=t};n.each=n.forEach=function(t,r,u){var f,o,s;if(r=e(r,u),i(t))for(f=0,o=t.length;o>f;f++)r(t[f],f,t);else for(s=n.keys(t),f=0,o=s.length;o>f;f++)r(t[s[f]],s[f],t);return t};n.map=n.collect=function(r,u,f){var s;u=t(u,f);for(var o=!i(r)&&n.keys(r),h=(o||r).length,c=Array(h),e=0;h>e;e++)s=o?o[e]:e,c[e]=u(r[s],s,r);return c};n.reduce=n.foldl=n.inject=nt(1);n.reduceRight=n.foldr=nt(-1);n.find=n.detect=function(t,r,u){var f;return f=i(t)?n.findIndex(t,r,u):n.findKey(t,r,u),f!==void 0&&f!==-1?t[f]:void 0};n.filter=n.select=function(i,r,u){var f=[];return r=t(r,u),n.each(i,function(n,t,i){r(n,t,i)&&f.push(n)}),f};n.reject=function(i,r,u){return n.filter(i,n.negate(t(r)),u)};n.every=n.all=function(r,u,f){var s;u=t(u,f);for(var o=!i(r)&&n.keys(r),h=(o||r).length,e=0;h>e;e++)if(s=o?o[e]:e,!u(r[s],s,r))return!1;return!0};n.some=n.any=function(r,u,f){var s;u=t(u,f);for(var o=!i(r)&&n.keys(r),h=(o||r).length,e=0;h>e;e++)if(s=o?o[e]:e,u(r[s],s,r))return!0;return!1};n.contains=n.includes=n.include=function(t,r,u,f){return i(t)||(t=n.values(t)),("number"!=typeof u||f)&&(u=0),n.indexOf(t,r,u)>=0};n.invoke=function(t,i){var u=r.call(arguments,2),f=n.isFunction(i);return n.map(t,function(n){var t=f?i:n[i];return null==t?t:t.apply(n,u)})};n.pluck=function(t,i){return n.map(t,n.property(i))};n.where=function(t,i){return n.filter(t,n.matcher(i))};n.findWhere=function(t,i){return n.find(t,n.matcher(i))};n.max=function(r,u,f){var h,o,e=-1/0,c=-1/0,s,l;if(null==u&&null!=r)for(r=i(r)?r:n.values(r),s=0,l=r.length;l>s;s++)h=r[s],h>e&&(e=h);else u=t(u,f),n.each(r,function(n,t,i){o=u(n,t,i);(o>c||o===-1/0&&e===-1/0)&&(e=n,c=o)});return e};n.min=function(r,u,f){var h,o,e=1/0,c=1/0,s,l;if(null==u&&null!=r)for(r=i(r)?r:n.values(r),s=0,l=r.length;l>s;s++)h=r[s],e>h&&(e=h);else u=t(u,f),n.each(r,function(n,t,i){o=u(n,t,i);(c>o||1/0===o&&1/0===e)&&(e=n,c=o)});return e};n.shuffle=function(t){for(var u,e=i(t)?t:n.values(t),o=e.length,f=Array(o),r=0;o>r;r++)u=n.random(0,r),u!==r&&(f[r]=f[u]),f[u]=e[r];return f};n.sample=function(t,r,u){return null==r||u?(i(t)||(t=n.values(t)),t[n.random(t.length-1)]):n.shuffle(t).slice(0,Math.max(0,r))};n.sortBy=function(i,r,u){return r=t(r,u),n.pluck(n.map(i,function(n,t,i){return{value:n,index:t,criteria:r(n,t,i)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(r>i||r===void 0)return-1}return n.index-t.index}),"value")};h=function(i){return function(r,u,f){var e={};return u=t(u,f),n.each(r,function(n,t){var f=u(n,t,r);i(e,n,f)}),e}};n.groupBy=h(function(t,i,r){n.has(t,r)?t[r].push(i):t[r]=[i]});n.indexBy=h(function(n,t,i){n[i]=t});n.countBy=h(function(t,i,r){n.has(t,r)?t[r]++:t[r]=1});n.toArray=function(t){return t?n.isArray(t)?r.call(t):i(t)?n.map(t,n.identity):n.values(t):[]};n.size=function(t){return null==t?0:i(t)?t.length:n.keys(t).length};n.partition=function(i,r,u){r=t(r,u);var f=[],e=[];return n.each(i,function(n,t,i){(r(n,t,i)?f:e).push(n)}),[f,e]};n.first=n.head=n.take=function(t,i,r){if(null!=t)return null==i||r?t[0]:n.initial(t,t.length-i)};n.initial=function(n,t,i){return r.call(n,0,Math.max(0,n.length-(null==t||i?1:t)))};n.last=function(t,i,r){if(null!=t)return null==i||r?t[t.length-1]:n.rest(t,Math.max(0,t.length-i))};n.rest=n.tail=n.drop=function(n,t,i){return r.call(n,null==t||i?1:t)};n.compact=function(t){return n.filter(t,n.identity)};f=function(t,r,e,o){for(var s,l,a,h=[],v=0,c=o||0,y=u(t);y>c;c++)if(s=t[c],i(s)&&(n.isArray(s)||n.isArguments(s)))for(r||(s=f(s,r,e)),l=0,a=s.length,h.length+=a;a>l;)h[v++]=s[l++];else e||(h[v++]=s);return h};n.flatten=function(n,t){return f(n,t,!1)};n.without=function(t){return n.difference(t,r.call(arguments,1))};n.uniq=n.unique=function(i,r,f,e){var o,c;n.isBoolean(r)||(e=f,f=r,r=!1);null!=f&&(f=t(f,e));for(var s=[],l=[],h=0,a=u(i);a>h;h++)o=i[h],c=f?f(o,h,i):o,r?(h&&l===c||s.push(o),l=c):f?n.contains(l,c)||(l.push(c),s.push(o)):n.contains(s,o)||s.push(o);return s};n.union=function(){return n.uniq(f(arguments,!0,!0))};n.intersection=function(t){for(var r,i,f=[],o=arguments.length,e=0,s=u(t);s>e;e++)if(r=t[e],!n.contains(f,r)){for(i=1;o>i&&n.contains(arguments[i],r);i++);i===o&&f.push(r)}return f};n.difference=function(t){var i=f(arguments,!0,!0,1);return n.filter(t,function(t){return!n.contains(i,t)})};n.zip=function(){return n.unzip(arguments)};n.unzip=function(t){for(var r=t&&n.max(t,u).length||0,f=Array(r),i=0;r>i;i++)f[i]=n.pluck(t,i);return f};n.object=function(n,t){for(var r={},i=0,f=u(n);f>i;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r};n.findIndex=tt(1);n.findLastIndex=tt(-1);n.sortedIndex=function(n,i,r,f){var o;r=t(r,f,1);for(var h=r(i),e=0,s=u(n);s>e;)o=Math.floor((e+s)/2),r(n[o])<h?e=o+1:s=o;return e};n.indexOf=it(1,n.findIndex,n.sortedIndex);n.lastIndexOf=it(-1,n.findLastIndex);n.range=function(n,t,i){null==t&&(t=n||0,n=0);i=i||1;for(var u=Math.max(Math.ceil((t-n)/i),0),f=Array(u),r=0;u>r;r++,n+=i)f[r]=n;return f};b=function(t,i,r,u,f){if(!(u instanceof i))return t.apply(r,f);var e=et(t.prototype),o=t.apply(e,f);return n.isObject(o)?o:e};n.bind=function(t,i){if(y&&t.bind===y)return y.apply(t,r.call(arguments,1));if(!n.isFunction(t))throw new TypeError("Bind must be called on a function");var f=r.call(arguments,2),u=function(){return b(t,u,i,this,f.concat(r.call(arguments)))};return u};n.partial=function(t){var i=r.call(arguments,1),u=function(){for(var f=0,o=i.length,e=Array(o),r=0;o>r;r++)e[r]=i[r]===n?arguments[f++]:i[r];for(;f<arguments.length;)e.push(arguments[f++]);return b(t,u,this,this,e)};return u};n.bindAll=function(t){var i,r,u=arguments.length;if(1>=u)throw new Error("bindAll must be passed function names");for(i=1;u>i;i++)r=arguments[i],t[r]=n.bind(t[r],t);return t};n.memoize=function(t,i){var r=function(u){var f=r.cache,e=""+(i?i.apply(this,arguments):u);return n.has(f,e)||(f[e]=t.apply(this,arguments)),f[e]};return r.cache={},r};n.delay=function(n,t){var i=r.call(arguments,2);return setTimeout(function(){return n.apply(null,i)},t)};n.defer=n.partial(n.delay,n,1);n.throttle=function(t,i,r){var f,e,s,u=null,o=0,h;return r||(r={}),h=function(){o=r.leading===!1?0:n.now();u=null;s=t.apply(f,e);u||(f=e=null)},function(){var l=n.now(),c;return o||r.leading!==!1||(o=l),c=i-(l-o),f=this,e=arguments,0>=c||c>i?(u&&(clearTimeout(u),u=null),o=l,s=t.apply(f,e),u||(f=e=null)):u||r.trailing===!1||(u=setTimeout(h,c)),s}};n.debounce=function(t,i,r){var u,f,e,s,o,h=function(){var c=n.now()-s;i>c&&c>=0?u=setTimeout(h,i-c):(u=null,r||(o=t.apply(e,f),u||(e=f=null)))};return function(){e=this;f=arguments;s=n.now();var c=r&&!u;return u||(u=setTimeout(h,i)),c&&(o=t.apply(e,f),e=f=null),o}};n.wrap=function(t,i){return n.partial(i,t)};n.negate=function(n){return function(){return!n.apply(this,arguments)}};n.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}};n.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}};n.before=function(n,t){var i;return function(){return--n>0&&(i=t.apply(this,arguments)),1>=n&&(t=null),i}};n.once=n.partial(n.before,2);k=!{toString:null}.propertyIsEnumerable("toString");d=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];n.keys=function(t){var i,r;if(!n.isObject(t))return[];if(ut)return ut(t);i=[];for(r in t)n.has(t,r)&&i.push(r);return k&&rt(t,i),i};n.allKeys=function(t){var i,r;if(!n.isObject(t))return[];i=[];for(r in t)i.push(r);return k&&rt(t,i),i};n.values=function(t){for(var r=n.keys(t),u=r.length,f=Array(u),i=0;u>i;i++)f[i]=t[r[i]];return f};n.mapObject=function(i,r,u){r=t(r,u);for(var f,o=n.keys(i),h=o.length,s={},e=0;h>e;e++)f=o[e],s[f]=r(i[f],f,i);return s};n.pairs=function(t){for(var r=n.keys(t),u=r.length,f=Array(u),i=0;u>i;i++)f[i]=[r[i],t[r[i]]];return f};n.invert=function(t){for(var u={},r=n.keys(t),i=0,f=r.length;f>i;i++)u[t[r[i]]]=r[i];return u};n.functions=n.methods=function(t){var i=[];for(var r in t)n.isFunction(t[r])&&i.push(r);return i.sort()};n.extend=w(n.allKeys);n.extendOwn=n.assign=w(n.keys);n.findKey=function(i,r,u){r=t(r,u);for(var f,o=n.keys(i),e=0,s=o.length;s>e;e++)if(f=o[e],r(i[f],f,i))return f};n.pick=function(t,i,r){var c,o,l={},u=t,s,v,h,a;if(null==u)return l;for(n.isFunction(i)?(o=n.allKeys(u),c=e(i,r)):(o=f(arguments,!1,!1,1),c=function(n,t,i){return t in i},u=Object(u)),s=0,v=o.length;v>s;s++)h=o[s],a=u[h],c(a,h,u)&&(l[h]=a);return l};n.omit=function(t,i,r){if(n.isFunction(i))i=n.negate(i);else{var u=n.map(f(arguments,!1,!1,1),String);i=function(t,i){return!n.contains(u,i)}}return n.pick(t,i,r)};n.defaults=w(n.allKeys,!0);n.create=function(t,i){var r=et(t);return i&&n.extendOwn(r,i),r};n.clone=function(t){return n.isObject(t)?n.isArray(t)?t.slice():n.extend({},t):t};n.tap=function(n,t){return t(n),n};n.isMatch=function(t,i){var e=n.keys(i),o=e.length,f,r,u;if(null==t)return!o;for(f=Object(t),r=0;o>r;r++)if(u=e[r],i[u]!==f[u]||!(u in f))return!1;return!0};c=function(t,i,r,u){var h,a,e,s,f,l,v;if(t===i)return 0!==t||1/t==1/i;if(null==t||null==i)return t===i;if(t instanceof n&&(t=t._wrapped),i instanceof n&&(i=i._wrapped),h=o.call(t),h!==o.call(i))return!1;switch(h){case"[object RegExp]":case"[object String]":return""+t==""+i;case"[object Number]":return+t!=+t?+i!=+i:0==+t?1/+t==1/i:+t==+i;case"[object Date]":case"[object Boolean]":return+t==+i}if(a="[object Array]"===h,!a&&("object"!=typeof t||"object"!=typeof i||(e=t.constructor,s=i.constructor,e!==s&&!(n.isFunction(e)&&e instanceof e&&n.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in i)))return!1;for(r=r||[],u=u||[],f=r.length;f--;)if(r[f]===t)return u[f]===i;if(r.push(t),u.push(i),a){if(f=t.length,f!==i.length)return!1;for(;f--;)if(!c(t[f],i[f],r,u))return!1}else{if(v=n.keys(t),f=v.length,n.keys(i).length!==f)return!1;for(;f--;)if(l=v[f],!n.has(i,l)||!c(t[l],i[l],r,u))return!1}return r.pop(),u.pop(),!0};n.isEqual=function(n,t){return c(n,t)};n.isEmpty=function(t){return null==t?!0:i(t)&&(n.isArray(t)||n.isString(t)||n.isArguments(t))?0===t.length:0===n.keys(t).length};n.isElement=function(n){return!(!n||1!==n.nodeType)};n.isArray=pt||function(n){return"[object Array]"===o.call(n)};n.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n};n.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){n["is"+t]=function(n){return o.call(n)==="[object "+t+"]"}});n.isArguments(arguments)||(n.isArguments=function(t){return n.has(t,"callee")});"function"!=typeof/./&&"object"!=typeof Int8Array&&(n.isFunction=function(n){return"function"==typeof n||!1});n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};n.isNaN=function(t){return n.isNumber(t)&&t!==+t};n.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===o.call(n)};n.isNull=function(n){return null===n};n.isUndefined=function(n){return n===void 0};n.has=function(n,t){return null!=n&&yt.call(n,t)};n.noConflict=function(){return a._=lt,this};n.identity=function(n){return n};n.constant=function(n){return function(){return n}};n.noop=function(){};n.property=ot;n.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}};n.matcher=n.matches=function(t){return t=n.extendOwn({},t),function(i){return n.isMatch(i,t)}};n.times=function(n,t,i){var u=Array(Math.max(0,n)),r;for(t=e(t,i,1),r=0;n>r;r++)u[r]=t(r);return u};n.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};n.now=Date.now||function(){return(new Date).getTime()};var st={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},bt=n.invert(st),ht=function(t){var r=function(n){return t[n]},i="(?:"+n.keys(t).join("|")+")",u=RegExp(i),f=RegExp(i,"g");return function(n){return n=null==n?"":""+n,u.test(n)?n.replace(f,r):n}};n.escape=ht(st);n.unescape=ht(bt);n.result=function(t,i,r){var u=null==t?void 0:t[i];return u===void 0&&(u=r),n.isFunction(u)?u.call(t):u};ct=0;n.uniqueId=function(n){var t=++ct+"";return n?n+t:t};n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var g=/(.)^/,kt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},dt=/\\|'|\r|\n|\u2028|\u2029/g,gt=function(n){return"\\"+kt[n]};n.template=function(t,i,r){var o,f,h;!i&&r&&(i=r);i=n.defaults({},i,n.templateSettings);var c=RegExp([(i.escape||g).source,(i.interpolate||g).source,(i.evaluate||g).source].join("|")+"|$","g"),e=0,u="__p+='";t.replace(c,function(n,i,r,f,o){return u+=t.slice(e,o).replace(dt,gt),e=o+n.length,i?u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":f&&(u+="';\n"+f+"\n__p+='"),n});u+="';\n";i.variable||(u="with(obj||{}){\n"+u+"}\n");u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{o=new Function(i.variable||"obj","_",u)}catch(s){throw s.source=u,s;}return f=function(t){return o.call(this,t,n)},h=i.variable||"obj",f.source="function("+h+"){\n"+u+"}",f};n.chain=function(t){var i=n(t);return i._chain=!0,i};l=function(t,i){return t._chain?n(i).chain():i};n.mixin=function(t){n.each(n.functions(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return vt.apply(t,arguments),l(this,r.apply(n,t))}})};n.mixin(n);n.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=s[t];n.prototype[t]=function(){var n=this._wrapped;return i.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],l(this,n)}});n.each(["concat","join","slice"],function(t){var i=s[t];n.prototype[t]=function(){return l(this,i.apply(this._wrapped,arguments))}});n.prototype.value=function(){return this._wrapped};n.prototype.valueOf=n.prototype.toJSON=n.prototype.value;n.prototype.toString=function(){return""+this._wrapped};"function"==typeof define&&define.amd&&define("underscore",[],function(){return n})}.call(this),function(n,t,i,r){"use strict";function f(n){return(typeof n=="string"||n instanceof String)&&(n=n.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,"")),n}var e=function(t){for(var i=t.length,r=n("head");i--;)r.has("."+t[i]).length===0&&r.append('<meta class="'+t[i]+'" />')};e(["foundation-mq-small","foundation-mq-small-only","foundation-mq-medium","foundation-mq-medium-only","foundation-mq-large","foundation-mq-large-only","foundation-mq-xlarge","foundation-mq-xlarge-only","foundation-mq-xxlarge","foundation-data-attribute-namespace"]);n(function(){typeof FastClick!="undefined"&&typeof i.body!="undefined"&&FastClick.attach(i.body)});var u=function(t,r){if(typeof t=="string"){if(r){var u;if(r.jquery){if(u=r[0],!u)return r}else u=r;return n(u.querySelectorAll(t))}return n(i.querySelectorAll(t))}return n(t,r)},o=function(n){var t=[];return n||t.push("data"),this.namespace.length>0&&t.push(this.namespace),t.push(this.name),t.join("-")},s=function(n){for(var i=n.split("-"),t=i.length,r=[];t--;)t!==0?r.push(i[t]):this.namespace.length>0?r.push(this.namespace,i[t]):r.push(i[t]);return r.reverse().join("-")},h=function(t,i){var r=this,f=function(){var f=u(this),e=!f.data(r.attr_name(!0)+"-init");f.data(r.attr_name(!0)+"-init",n.extend({},r.settings,i||t,r.data_options(f)));e&&r.events(this)};return u(this.scope).is("["+this.attr_name()+"]")?f.call(this.scope):u("["+this.attr_name()+"]",this.scope).each(f),typeof t=="string"?this[t].call(this,i):void 0},c=function(n,t){function i(){t(n[0])}function r(){this.one("load",i);if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var n=this.attr("src"),t=n.match(/\?/)?"&":"?";t+="random="+(new Date).getTime();this.attr("src",n+t)}}if(!n.attr("src")){i();return}n[0].complete||n[0].readyState===4?i():r.call(n)};t.matchMedia=t.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=t.offsetWidth===42,i.removeChild(r),{matches:u,media:n}}}(i),function(n){function o(){u&&(r(o),s&&n.fx.tick())}for(var u,i=0,f=["webkit","moz"],r=t.requestAnimationFrame,e=t.cancelAnimationFrame,s="undefined"!=typeof n.fx;i<f.length&&!r;i++)r=t[f[i]+"RequestAnimationFrame"],e=e||t[f[i]+"CancelAnimationFrame"]||t[f[i]+"CancelRequestAnimationFrame"];r?(t.requestAnimationFrame=r,t.cancelAnimationFrame=e,s&&(n.fx.timer=function(t){t()&&n.timers.push(t)&&!u&&(u=!0,o())},n.fx.stop=function(){u=!1})):(t.requestAnimationFrame=function(n){var r=(new Date).getTime(),u=Math.max(0,16-(r-i)),f=t.setTimeout(function(){n(r+u)},u);return i=r+u,f},t.cancelAnimationFrame=function(n){clearTimeout(n)})}(n);t.Foundation={name:"Foundation",version:"5.5.1",media_queries:{small:u(".foundation-mq-small").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"small-only":u(".foundation-mq-small-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),medium:u(".foundation-mq-medium").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"medium-only":u(".foundation-mq-medium-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),large:u(".foundation-mq-large").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"large-only":u(".foundation-mq-large-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xlarge:u(".foundation-mq-xlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"xlarge-only":u(".foundation-mq-xlarge-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xxlarge:u(".foundation-mq-xxlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,"")},stylesheet:n("<style><\/style>").appendTo("head")[0].sheet,global:{namespace:r},init:function(n,i,r,f,e){var h=[n,r,f,e],o=[],s;if(this.rtl=/rtl/i.test(u("html").attr("dir")),this.scope=n||this.scope,this.set_namespace(),i&&typeof i=="string"&&!/reflow/i.test(i))this.libs.hasOwnProperty(i)&&o.push(this.init_lib(i,h));else for(s in this.libs)o.push(this.init_lib(s,i));return u(t).load(function(){u(t).trigger("resize.fndtn.clearing").trigger("resize.fndtn.dropdown").trigger("resize.fndtn.equalizer").trigger("resize.fndtn.interchange").trigger("resize.fndtn.joyride").trigger("resize.fndtn.magellan").trigger("resize.fndtn.topbar").trigger("resize.fndtn.slider")}),n},init_lib:function(t,i){return this.libs.hasOwnProperty(t)?(this.patch(this.libs[t]),i&&i.hasOwnProperty(t))?(typeof this.libs[t].settings!="undefined"?n.extend(!0,this.libs[t].settings,i[t]):typeof this.libs[t].defaults!="undefined"&&n.extend(!0,this.libs[t].defaults,i[t]),this.libs[t].init.apply(this.libs[t],[this.scope,i[t]])):(i=i instanceof Array?i:new Array(i),this.libs[t].init.apply(this.libs[t],i)):function(){}},patch:function(n){n.scope=this.scope;n.namespace=this.global.namespace;n.rtl=this.rtl;n.data_options=this.utils.data_options;n.attr_name=o;n.add_namespace=s;n.bindings=h;n.S=this.utils.S},inherit:function(n,t){for(var i=t.split(" "),r=i.length;r--;)this.utils.hasOwnProperty(i[r])&&(n[i[r]]=this.utils[i[r]])},set_namespace:function(){var t=this.global.namespace===r?n(".foundation-data-attribute-namespace").css("font-family"):this.global.namespace;this.global.namespace=t===r||/false/i.test(t)?"":t},libs:{},utils:{S:u,throttle:function(n,t){var i=null;return function(){var r=this,u=arguments;i==null&&(i=setTimeout(function(){n.apply(r,u);i=null},t))}},debounce:function(n,t,i){var r,u;return function(){var f=this,e=arguments,o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r;return clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},data_options:function(t,i){function h(n){return!isNaN(+n)&&n!==null&&n!==""&&n!==!1&&n!==!0}function o(t){return typeof t=="string"?n.trim(t):t}i=i||"options";var s={},u,r,f,c=function(n){var t=Foundation.global.namespace;return t.length>0?n.data(t+"-"+i):n.data(i)},e=c(t);if(typeof e=="object")return e;for(f=(e||":").split(";"),u=f.length;u--;)r=f[u].split(":"),r=[r[0],r.slice(1).join(":")],/true/i.test(r[1])&&(r[1]=!0),/false/i.test(r[1])&&(r[1]=!1),h(r[1])&&(r[1]=r[1].indexOf(".")===-1?parseInt(r[1],10):parseFloat(r[1])),r.length===2&&r[0].length>0&&(s[o(r[0])]=o(r[1]));return s},register_media:function(t,i){Foundation.media_queries[t]===r&&(n("head").append('<meta class="'+i+'"/>'),Foundation.media_queries[t]=f(n("."+i).css("font-family")))},add_custom_rule:function(n,t){if(t===r&&Foundation.stylesheet)Foundation.stylesheet.insertRule(n,Foundation.stylesheet.cssRules.length);else{var i=Foundation.media_queries[t];i!==r&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[t]+"{ "+n+" }")}},image_loaded:function(n,t){var r=this,i=n.length;i===0&&t(n);n.each(function(){c(r.S(this),function(){i-=1;i===0&&t(n)})})},random_str:function(){return this.fidx||(this.fidx=0),this.prefix=this.prefix||[this.name||"F",(+new Date).toString(36)].join("-"),this.prefix+(this.fidx++).toString(36)},match:function(n){return t.matchMedia(n).matches},is_small_up:function(){return this.match(Foundation.media_queries.small)},is_medium_up:function(){return this.match(Foundation.media_queries.medium)},is_large_up:function(){return this.match(Foundation.media_queries.large)},is_xlarge_up:function(){return this.match(Foundation.media_queries.xlarge)},is_xxlarge_up:function(){return this.match(Foundation.media_queries.xxlarge)},is_small_only:function(){return!this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_medium_only:function(){return this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_large_only:function(){return this.is_medium_up()&&this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xxlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&this.is_xxlarge_up()}}};n.fn.foundation=function(){var n=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(n)),this})}}(jQuery,window,window.document),function(n,t){"use strict";Foundation.libs.slider={name:"slider",version:"5.5.1",settings:{start:0,end:100,step:1,precision:null,initial:null,display_selector:"",vertical:!1,trigger_input_change:!1,on_change:function(){}},cache:{},init:function(n,t,i){Foundation.inherit(this,"throttle");this.bindings(t,i);this.reflow()},events:function(){var i=this;n(this.scope).off(".slider").on("mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider","["+i.attr_name()+"]:not(.disabled, [disabled]) .range-slider-handle",function(t){i.cache.active||(t.preventDefault(),i.set_active_slider(n(t.target)))}).on("mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider",function(r){if(!!i.cache.active)if(r.preventDefault(),n.data(i.cache.active[0],"settings").vertical){var u=0;r.pageY||(u=t.scrollY);i.calculate_position(i.cache.active,i.get_cursor_position(r,"y")+u)}else i.calculate_position(i.cache.active,i.get_cursor_position(r,"x"))}).on("mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider",function(){i.remove_active_slider()}).on("change.fndtn.slider",function(){i.settings.on_change()});i.S(t).on("resize.fndtn.slider",i.throttle(function(){i.reflow()},300))},get_cursor_position:function(n,t){var u="page"+t.toUpperCase(),r="client"+t.toUpperCase(),i;return typeof n[u]!="undefined"?i=n[u]:typeof n.originalEvent[r]!="undefined"?i=n.originalEvent[r]:n.originalEvent.touches&&n.originalEvent.touches[0]&&typeof n.originalEvent.touches[0][r]!="undefined"?i=n.originalEvent.touches[0][r]:n.currentPoint&&typeof n.currentPoint[t]!="undefined"&&(i=n.currentPoint[t]),i},set_active_slider:function(n){this.cache.active=n},remove_active_slider:function(){this.cache.active=null},calculate_position:function(t,i){var u=this,r=n.data(t[0],"settings"),o=n.data(t[0],"handle_l"),s=n.data(t[0],"handle_o"),f=n.data(t[0],"bar_l"),e=n.data(t[0],"bar_o");requestAnimationFrame(function(){var n,o;n=Foundation.rtl&&!r.vertical?u.limit_to((e+f-i)/f,0,1):u.limit_to((i-e)/f,0,1);n=r.vertical?1-n:n;o=u.normalized_value(n,r.start,r.end,r.step,r.precision);u.set_ui(t,o)})},set_ui:function(t,i){var r=n.data(t[0],"settings"),f=n.data(t[0],"handle_l"),e=n.data(t[0],"bar_l"),o=this.normalized_percentage(i,r.start,r.end),u=o*(e-f)-1,s=o*100,c=t.parent(),h=t.parent().children("input[type=hidden]");Foundation.rtl&&!r.vertical&&(u=-u);u=r.vertical?-u+e-f+1:u;this.set_translate(t,u,r.vertical);r.vertical?t.siblings(".range-slider-active-segment").css("height",s+"%"):t.siblings(".range-slider-active-segment").css("width",s+"%");c.attr(this.attr_name(),i).trigger("change").trigger("change.fndtn.slider");h.val(i);r.trigger_input_change&&h.trigger("change");t[0].hasAttribute("aria-valuemin")||t.attr({"aria-valuemin":r.start,"aria-valuemax":r.end});t.attr("aria-valuenow",i);r.display_selector!=""&&n(r.display_selector).each(function(){this.hasOwnProperty("value")?n(this).val(i):n(this).text(i)})},normalized_percentage:function(n,t,i){return Math.min(1,(n-t)/(i-t))},normalized_value:function(n,t,i,r,u){var e=i-t,f=n*e,o=(f-f%r)/r,s=f%r,h=s>=r*.5?r:0;return(o*r+h+t).toFixed(u)},set_translate:function(t,i,r){r?n(t).css("-webkit-transform","translateY("+i+"px)").css("-moz-transform","translateY("+i+"px)").css("-ms-transform","translateY("+i+"px)").css("-o-transform","translateY("+i+"px)").css("transform","translateY("+i+"px)"):n(t).css("-webkit-transform","translateX("+i+"px)").css("-moz-transform","translateX("+i+"px)").css("-ms-transform","translateX("+i+"px)").css("-o-transform","translateX("+i+"px)").css("transform","translateX("+i+"px)")},limit_to:function(n,t,i){return Math.min(Math.max(n,t),i)},initialize_settings:function(t){var i=n.extend({},this.settings,this.data_options(n(t).parent())),r;i.precision===null&&(r=(""+i.step).match(/\.([\d]*)/),i.precision=r&&r[1]?r[1].length:0);i.vertical?(n.data(t,"bar_o",n(t).parent().offset().top),n.data(t,"bar_l",n(t).parent().outerHeight()),n.data(t,"handle_o",n(t).offset().top),n.data(t,"handle_l",n(t).outerHeight())):(n.data(t,"bar_o",n(t).parent().offset().left),n.data(t,"bar_l",n(t).parent().outerWidth()),n.data(t,"handle_o",n(t).offset().left),n.data(t,"handle_l",n(t).outerWidth()));n.data(t,"bar",n(t).parent());n.data(t,"settings",i)},set_initial_position:function(t){var i=n.data(t.children(".range-slider-handle")[0],"settings"),r=typeof i.initial=="number"&&!isNaN(i.initial)?i.initial:Math.floor((i.end-i.start)*.5/i.step)*i.step+i.start,u=t.children(".range-slider-handle");this.set_ui(u,r)},set_value:function(t){var i=this;n("["+i.attr_name()+"]",this.scope).each(function(){n(this).attr(i.attr_name(),t)});n(this.scope).attr(i.attr_name())&&n(this.scope).attr(i.attr_name(),t);i.reflow()},reflow:function(){var t=this;t.S("["+this.attr_name()+"]").each(function(){var i=n(this).children(".range-slider-handle")[0],r=n(this).attr(t.attr_name());t.initialize_settings(i);r?t.set_ui(n(i),parseFloat(r)):t.set_initial_position(n(this))})}}}(jQuery,window,window.document),function(n,t,i,r){"use strict";var u=u||!1;Foundation.libs.joyride={name:"joyride",version:"5.5.1",defaults:{expose:!1,modal:!0,keyboard:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,prev_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",abort_on_close:!0,tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">&times;<\/a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"><\/span><\/div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"><\/span><\/div>',wrapper:'<div class="joyride-content-wrapper"><\/div>',button:'<a href="#" class="small button joyride-next-tip"><\/a>',prev_button:'<a href="#" class="small button joyride-prev-tip"><\/a>',modal:'<div class="joyride-modal-bg"><\/div>',expose:'<div class="joyride-expose-wrapper"><\/div>',expose_cover:'<div class="joyride-expose-cover"><\/div>'},expose_add_class:""},init:function(t,i,r){Foundation.inherit(this,"throttle random_str");this.settings=this.settings||n.extend({},this.defaults,r||i);this.bindings(i,r)},go_next:function(){this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())},go_prev:function(){this.settings.$li.prev().length<1||(this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(null,!0),this.startTimer()):(this.hide(),this.show(null,!0)))},events:function(){var i=this;n(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(n){n.preventDefault();this.go_next()}.bind(this)).on("click.fndtn.joyride",".joyride-prev-tip",function(n){n.preventDefault();this.go_prev()}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(n){n.preventDefault();this.end(this.settings.abort_on_close)}.bind(this)).on("keyup.fndtn.joyride",function(n){if(this.settings.keyboard&&this.settings.riding)switch(n.which){case 39:n.preventDefault();this.go_next();break;case 37:n.preventDefault();this.go_prev();break;case 27:n.preventDefault();this.end(this.settings.abort_on_close)}}.bind(this));n(t).off(".joyride").on("resize.fndtn.joyride",i.throttle(function(){if(n("["+i.attr_name()+"]").length>0&&i.settings.$next_tip&&i.settings.riding){if(i.settings.exposed.length>0){var t=n(i.settings.exposed);t.each(function(){var t=n(this);i.un_expose(t);i.expose(t)})}i.is_phone()?i.pos_phone():i.pos_default(!1)}},100))},start:function(){var t=this,i=n("["+this.attr_name()+"]",this.scope),r=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],u=r.length;!i.length>0||(this.settings.init||this.events(),this.settings=i.data(this.attr_name(!0)+"-init"),this.settings.$content_el=i,this.settings.$body=n(this.settings.tip_container),this.settings.body_offset=n(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.riding=!0,typeof n.cookie!="function"&&(this.settings.cookie_monster=!1),this.settings.cookie_monster&&(!this.settings.cookie_monster||n.cookie(this.settings.cookie_name))||(this.settings.$tip_content.each(function(i){var e=n(this),f;for(this.settings=n.extend({},t.defaults,t.data_options(e)),f=u;f--;)t.settings[r[f]]=parseInt(t.settings[r[f]],10);t.create({$li:e,index:i})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li();this.show()},tip_template:function(t){var i,r;return t.tip_class=t.tip_class||"",i=n(this.settings.template.tip).addClass(t.tip_class),r=n.trim(n(t.li).html())+this.prev_button_text(t.prev_button_text,t.index)+this.button_text(t.button_text)+this.settings.template.link+this.timer_instance(t.index),i.append(n(this.settings.template.wrapper)),i.first().attr(this.add_namespace("data-index"),t.index),n(".joyride-content-wrapper",i).append(r),i[0]},timer_instance:function(t){return t===0&&this.settings.start_timer_on_click&&this.settings.timer>0||this.settings.timer===0?"":n(this.settings.template.timer)[0].outerHTML},button_text:function(t){return this.settings.tip_settings.next_button?(t=n.trim(t)||"Next",t=n(this.settings.template.button).append(t)[0].outerHTML):t="",t},prev_button_text:function(t,i){return this.settings.tip_settings.prev_button?(t=n.trim(t)||"Previous",t=i==0?n(this.settings.template.prev_button).append(t).addClass("disabled")[0].outerHTML:n(this.settings.template.prev_button).append(t)[0].outerHTML):t="",t},create:function(t){this.settings.tip_settings=n.extend({},this.settings,this.data_options(t.$li));var i=t.$li.attr(this.add_namespace("data-button"))||t.$li.attr(this.add_namespace("data-text")),r=t.$li.attr(this.add_namespace("data-button-prev"))||t.$li.attr(this.add_namespace("data-prev-text")),u=t.$li.attr("class"),f=n(this.tip_template({tip_class:u,index:t.index,button_text:i,prev_button_text:r,li:t.$li}));n(this.settings.tip_container).append(f)},show:function(t,i){var u=null,f;this.settings.$li===r||n.inArray(this.settings.$li.index(),this.settings.pause_after)===-1?(this.settings.paused?this.settings.paused=!1:this.set_li(t,i),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0?(t&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=n.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],/body/i.test(this.settings.$target.selector)||(f=n(".joyride-modal-bg"),/pop/i.test(this.settings.tipAnimation)?f.hide():f.fadeOut(this.settings.tipAnimationFadeSpeed),this.scroll_to()),this.is_phone()?this.pos_phone(!0):this.pos_default(!0),u=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?(u.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){u.animate({width:u.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&(u.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){u.animate({width:u.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip):this.settings.$li&&this.settings.$target.length<1?this.show(t,i):this.end()):this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose();this.settings.modal||n(".joyride-modal-bg").hide();this.settings.$current_tip.css("visibility","hidden");setTimeout(n.proxy(function(){this.hide();this.css("visibility","visible")},this.settings.$current_tip),0);this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(n,t){n?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(this.settings.$li=t?this.settings.$li.prev():this.settings.$li.next(),this.set_next_tip());this.set_target()},set_next_tip:function(){this.settings.$next_tip=n(".joyride-tip-guide").eq(this.settings.$li.index());this.settings.$next_tip.data("closed","")},set_target:function(){var t=this.settings.$li.attr(this.add_namespace("data-class")),r=this.settings.$li.attr(this.add_namespace("data-id")),u=function(){return r?n(i.getElementById(r)):t?n("."+t).first():n("body")};this.settings.$target=u()},scroll_to:function(){var r,i;r=n(t).height()/2;i=Math.ceil(this.settings.$target.offset().top-r+this.settings.$next_tip.outerHeight());i!=0&&n("html, body").stop().animate({scrollTop:i},this.settings.scroll_speed,"swing")},paused:function(){return n.inArray(this.settings.$li.index()+1,this.settings.pause_after)===-1},restart:function(){this.hide();this.settings.$li=r;this.show("init")},pos_default:function(n){var t=this.settings.$next_tip.find(".joyride-nub"),f=Math.ceil(t.outerWidth()/2),u=Math.ceil(t.outerHeight()/2),e=n||!1,i,r;e&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show());/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(t):(i=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,r=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0,this.bottom()?(this.rtl?this.settings.$next_tip.css({top:this.settings.$target.offset().top+u+this.settings.$target.outerHeight()+i,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()+r}):this.settings.$next_tip.css({top:this.settings.$target.offset().top+u+this.settings.$target.outerHeight()+i,left:this.settings.$target.offset().left+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"top")):this.top()?(this.rtl?this.settings.$next_tip.css({top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-u+i,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}):this.settings.$next_tip.css({top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-u+i,left:this.settings.$target.offset().left+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top+i,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+f+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top+i,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-f+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&(t.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default()));e&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(t){var f=this.settings.$next_tip.outerHeight(),o=this.settings.$next_tip.offset(),e=this.settings.$target.outerHeight(),i=n(".joyride-nub",this.settings.$next_tip),r=Math.ceil(i.outerHeight()/2),u=t||!1;i.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left");u&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show());/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(i):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-f-r}),i.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+e+r}),i.addClass("top"));u&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(n){this.center();n.hide();this.show_modal()},show_modal:function(){var t;this.settings.$next_tip.data("closed")||(t=n(".joyride-modal-bg"),t.length<1&&(t=n(this.settings.template.modal),t.appendTo("body")),/pop/i.test(this.settings.tip_animation)?t.show():t.fadeIn(this.settings.tip_animation_fade_speed))},expose:function(){var r,u,i,f,e,o="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof n)i=arguments[0];else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector))i=this.settings.$target;else return!1;if(i.length<1)return t.console&&console.error("element not valid",i),!1;r=n(this.settings.template.expose);this.settings.$body.append(r);r.css({top:i.offset().top,left:i.offset().left,width:i.outerWidth(!0),height:i.outerHeight(!0)});u=n(this.settings.template.expose_cover);f={zIndex:i.css("z-index"),position:i.css("position")};e=i.attr("class")==null?"":i.attr("class");i.css("z-index",parseInt(r.css("z-index"))+1);f.position=="static"&&i.css("position","relative");i.data("expose-css",f);i.data("orig-class",e);i.attr("class",e+" "+this.settings.expose_add_class);u.css({top:i.offset().top,left:i.offset().left,width:i.outerWidth(!0),height:i.outerHeight(!0)});this.settings.modal&&this.show_modal();this.settings.$body.append(u);r.addClass(o);u.addClass(o);i.data("expose",o);this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,i);this.add_exposed(i)},un_expose:function(){var u,i,f,r,e,o=!1;if(arguments.length>0&&arguments[0]instanceof n)i=arguments[0];else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector))i=this.settings.$target;else return!1;if(i.length<1)return t.console&&console.error("element not valid",i),!1;u=i.data("expose");f=n("."+u);arguments.length>1&&(o=arguments[1]);o===!0?n(".joyride-expose-wrapper,.joyride-expose-cover").remove():f.remove();r=i.data("expose-css");r.zIndex=="auto"?i.css("z-index",""):i.css("z-index",r.zIndex);r.position!=i.css("position")&&(r.position=="static"?i.css("position",""):i.css("position",r.position));e=i.data("orig-class");i.attr("class",e);i.removeData("orig-classes");i.removeData("expose");i.removeData("expose-z-index");this.remove_exposed(i)},add_exposed:function(t){this.settings.exposed=this.settings.exposed||[];t instanceof n||typeof t=="object"?this.settings.exposed.push(t[0]):typeof t=="string"&&this.settings.exposed.push(t)},remove_exposed:function(t){var r,i;for(t instanceof n?r=t[0]:typeof t=="string"&&(r=t),this.settings.exposed=this.settings.exposed||[],i=this.settings.exposed.length;i--;)if(this.settings.exposed[i]==r){this.settings.exposed.splice(i,1);return}},center:function(){var i=n(t);return this.settings.$next_tip.css({top:(i.height()-this.settings.$next_tip.outerHeight())/2+i.scrollTop(),left:(i.width()-this.settings.$next_tip.outerWidth())/2+i.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(i){var r=n(t),s=r.height()/2,u=Math.ceil(this.settings.$target.offset().top-s+this.settings.$next_tip.outerHeight()),h=r.width()+r.scrollLeft(),o=r.height()+u,f=r.height()+r.scrollTop(),e=r.scrollTop();return u<e&&(e=u<0?0:u),o>f&&(f=o),[i.offset().top<e,h<i.offset().left+i.outerWidth(),f<i.offset().top+i.outerHeight(),r.scrollLeft()>i.offset().left]},visible:function(n){for(var t=n.length;t--;)if(n[t])return!1;return!0},nub_position:function(n,t,i){t==="auto"?n.addClass(i):n.addClass(t)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide();this.show();this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(t){this.settings.cookie_monster&&n.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain});this.settings.timer>0&&clearTimeout(this.settings.automate);this.settings.modal&&this.settings.expose&&this.un_expose();n(this.scope).off("keyup.joyride");this.settings.$next_tip.data("closed",!0);this.settings.riding=!1;n(".joyride-modal-bg").hide();this.settings.$current_tip.hide();(typeof t=="undefined"||t===!1)&&(this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip));n(".joyride-tip-guide").remove()},off:function(){n(this.scope).off(".joyride");n(t).off(".joyride");n(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride");n(".joyride-tip-guide, .joyride-modal-bg").remove();clearTimeout(this.settings.automate);this.settings={}},reflow:function(){}}}(jQuery,window,window.document),function(n,t){"use strict";Foundation.libs.equalizer={name:"equalizer",version:"5.5.1",settings:{use_tallest:!0,before_height_change:n.noop,after_height_change:n.noop,equalize_on_stack:!1},init:function(n,t,i){Foundation.inherit(this,"image_loaded");this.bindings(t,i);this.reflow()},events:function(){this.S(t).off(".equalizer").on("resize.fndtn.equalizer",function(){this.reflow()}.bind(this))},equalize:function(t){var f=!1,r=t.find("["+this.attr_name()+"-watch]:visible"),i=t.data(this.attr_name(!0)+"-init")||this.settings,e,u,o,s;r.length!==0&&((e=r.first().offset().top,i&&i.before_height_change&&i.before_height_change(),t.trigger("before-height-change").trigger("before-height-change.fndth.equalizer"),r.height("inherit"),r.each(function(){var t=n(this);t.offset().top!==e&&(f=!0)}),i.equalize_on_stack===!1&&f)||(u=r.map(function(){return n(this).outerHeight(!1)}).get(),i&&i.use_tallest?(o=Math.max.apply(null,u),r.css("height",o)):(s=Math.min.apply(null,u),r.css("height",s)),i&&i.after_height_change(),t.trigger("after-height-change").trigger("after-height-change.fndtn.equalizer")))},reflow:function(){var t=this;this.S("["+this.attr_name()+"]",this.scope).each(function(){var i=n(this);t.image_loaded(t.S("img",this),function(){t.equalize(i)})})}}}(jQuery,window,window.document),function(n,t,i){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.5.1",settings:{active_class:"open",disabled_class:"disabled",mega_class:"mega",align:"bottom",is_hover:!1,hover_timeout:150,opened:function(){},closed:function(){}},init:function(t,i,r){Foundation.inherit(this,"throttle");n.extend(!0,this.settings,i,r);this.bindings(i,r)},events:function(){var r=this,u=r.S;u(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",function(t){var i=u(this).data(r.attr_name(!0)+"-init")||r.settings;(!i.is_hover||Modernizr.touch)&&(t.preventDefault(),u(this).parent("[data-reveal-id]")&&t.stopPropagation(),r.toggle(n(this)))}).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(n){var t=u(this),i,f,e;clearTimeout(r.timeout);t.data(r.data_attr())?(i=u("#"+t.data(r.data_attr())),f=t):(i=t,f=u("["+r.attr_name()+'="'+i.attr("id")+'"]'));e=f.data(r.attr_name(!0)+"-init")||r.settings;u(n.currentTarget).data(r.data_attr())&&e.is_hover&&r.closeall.call(r);e.is_hover&&r.open.apply(r,[i,f])}).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(){var n=u(this),i,t;n.data(r.data_attr())?t=n.data(r.data_attr(!0)+"-init")||r.settings:(i=u("["+r.attr_name()+'="'+u(this).attr("id")+'"]'),t=i.data(r.attr_name(!0)+"-init")||r.settings);r.timeout=setTimeout(function(){n.data(r.data_attr())?t.is_hover&&r.close.call(r,u("#"+n.data(r.data_attr()))):t.is_hover&&r.close.call(r,n)}.bind(this),t.hover_timeout)}).on("click.fndtn.dropdown",function(t){var f=u(t.target).closest("["+r.attr_name()+"-content]"),e=f.find("a");if((e.length>0&&f.attr("aria-autoclose")!=="false"&&r.close.call(r,u("["+r.attr_name()+"-content]")),t.target===i||n.contains(i.documentElement,t.target))&&!(u(t.target).closest("["+r.attr_name()+"]").length>0)){if(!u(t.target).data("revealId")&&f.length>0&&(u(t.target).is("["+r.attr_name()+"-content]")||n.contains(f.first()[0],t.target))){t.stopPropagation();return}r.close.call(r,u("["+r.attr_name()+"-content]"))}}).on("opened.fndtn.dropdown","["+r.attr_name()+"-content]",function(){r.settings.opened.call(this)}).on("closed.fndtn.dropdown","["+r.attr_name()+"-content]",function(){r.settings.closed.call(this)});u(t).off(".dropdown").on("resize.fndtn.dropdown",r.throttle(function(){r.resize.call(r)},50));this.resize()},close:function(t){var i=this;t.each(function(){var r=n("["+i.attr_name()+"="+t[0].id+"]")||n("aria-controls="+t[0].id+"]");r.attr("aria-expanded","false");i.S(this).hasClass(i.settings.active_class)&&(i.S(this).css(Foundation.rtl?"right":"left","-99999px").attr("aria-hidden","true").removeClass(i.settings.active_class).prev("["+i.attr_name()+"]").removeClass(i.settings.active_class).removeData("target"),i.S(this).trigger("closed").trigger("closed.fndtn.dropdown",[t]))});t.removeClass("f-open-"+this.attr_name(!0))},closeall:function(){var t=this;n.each(t.S(".f-open-"+this.attr_name(!0)),function(){t.close.call(t,t.S(this))})},open:function(n,t){this.css(n.addClass(this.settings.active_class),t);n.prev("["+this.attr_name()+"]").addClass(this.settings.active_class);n.data("target",t.get(0)).trigger("opened").trigger("opened.fndtn.dropdown",[n,t]);n.attr("aria-hidden","false");t.attr("aria-expanded","true");n.focus();n.addClass("f-open-"+this.attr_name(!0))},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(n){if(!n.hasClass(this.settings.disabled_class)){var t=this.S("#"+n.data(this.data_attr()));t.length!==0&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(t)),t.hasClass(this.settings.active_class)?(this.close.call(this,t),t.data("target")!==n.get(0)&&this.open.call(this,t,n)):this.open.call(this,t,n))}},resize:function(){var t=this.S("["+this.attr_name()+"-content].open"),i=n(t.data("target"));t.length&&i.length&&this.css(t,i)},css:function(n,t){var u=Math.max((t.width()-n.width())/2,8),i=t.data(this.attr_name(!0)+"-init")||this.settings,r;return this.clear_idx(),this.small()?(r=this.dirs.bottom.call(n,t,i),n.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:r.top}),n.css(Foundation.rtl?"right":"left",u)):this.style(n,t,i),n},style:function(t,i,r){var u=n.extend({position:"absolute"},this.dirs[r.align].call(t,i,r));t.attr("style","").css(u)},dirs:{_base:function(n){var s=this.offsetParent(),e=s.offset(),r=n.offset(),f,u,o;return r.top-=e.top,r.left-=e.left,r.missRight=!1,r.missTop=!1,r.missLeft=!1,r.leftRightFlag=!1,f=i.getElementsByClassName("row")[0]?i.getElementsByClassName("row")[0].clientWidth:t.outerWidth,u=(t.outerWidth-f)/2,o=f,this.hasClass("mega")||(n.offset().top<=this.outerHeight()&&(r.missTop=!0,o=t.outerWidth-u,r.leftRightFlag=!0),n.offset().left+this.outerWidth()>n.offset().left+u&&n.offset().left-u>this.outerWidth()&&(r.missRight=!0,r.missLeft=!1),n.offset().left-this.outerWidth()<=0&&(r.missLeft=!0,r.missRight=!1)),r},top:function(n,t){var r=Foundation.libs.dropdown,i=r.dirs._base.call(this,n);return(this.addClass("drop-top"),i.missTop==!0&&(i.top=i.top+n.outerHeight()+this.outerHeight(),this.removeClass("drop-top")),i.missRight==!0&&(i.left=i.left-this.outerWidth()+n.outerWidth()),(n.outerWidth()<this.outerWidth()||r.small()||this.hasClass(t.mega_menu))&&r.adjust_pip(this,n,t,i),Foundation.rtl)?{left:i.left-this.outerWidth()+n.outerWidth(),top:i.top-this.outerHeight()}:{left:i.left,top:i.top-this.outerHeight()}},bottom:function(n,t){var r=Foundation.libs.dropdown,i=r.dirs._base.call(this,n);return(i.missRight==!0&&(i.left=i.left-this.outerWidth()+n.outerWidth()),(n.outerWidth()<this.outerWidth()||r.small()||this.hasClass(t.mega_menu))&&r.adjust_pip(this,n,t,i),r.rtl)?{left:i.left-this.outerWidth()+n.outerWidth(),top:i.top+n.outerHeight()}:{left:i.left,top:i.top+n.outerHeight()}},left:function(n){var t=Foundation.libs.dropdown.dirs._base.call(this,n);return this.addClass("drop-left"),t.missLeft==!0&&(t.left=t.left+this.outerWidth(),t.top=t.top+n.outerHeight(),this.removeClass("drop-left")),{left:t.left-this.outerWidth(),top:t.top}},right:function(n,t){var i=Foundation.libs.dropdown.dirs._base.call(this,n),r;return this.addClass("drop-right"),i.missRight==!0?(i.left=i.left-this.outerWidth(),i.top=i.top+n.outerHeight(),this.removeClass("drop-right")):i.triggeredRight=!0,r=Foundation.libs.dropdown,(n.outerWidth()<this.outerWidth()||r.small()||this.hasClass(t.mega_menu))&&r.adjust_pip(this,n,t,i),{left:i.left+n.outerWidth(),top:i.top}}},adjust_pip:function(n,t,i,r){var f=Foundation.stylesheet,u=8;n.hasClass(i.mega_class)?u=r.left+t.outerWidth()/2-8:this.small()&&(u+=r.left-8);this.rule_idx=f.cssRules.length;var e=".f-dropdown.open:before",o=".f-dropdown.open:after",s="left: "+u+"px;",h="left: "+(u-1)+"px;";r.missRight==!0&&(u=n.outerWidth()-23,e=".f-dropdown.open:before",o=".f-dropdown.open:after",s="left: "+u+"px;",h="left: "+(u-1)+"px;");r.triggeredRight==!0&&(e=".f-dropdown.open:before",o=".f-dropdown.open:after",s="left:-12px;",h="left:-14px;");f.insertRule?(f.insertRule([e,"{",s,"}"].join(" "),this.rule_idx),f.insertRule([o,"{",h,"}"].join(" "),this.rule_idx+1)):(f.addRule(e,s,this.rule_idx),f.addRule(o,h,this.rule_idx+1))},clear_idx:function(){var n=Foundation.stylesheet;typeof this.rule_idx!="undefined"&&(n.deleteRule(this.rule_idx),n.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown");this.S("html, body").off(".fndtn.dropdown");this.S(t).off(".fndtn.dropdown");this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(jQuery,window,window.document),function(n,t,i,r){"use strict";Foundation.libs.clearing={name:"clearing",version:"5.5.1",settings:{templates:{viewing:'<a href="#" class="clearing-close">&times;<\/a><div class="visible-img" style="display: none"><div class="clearing-touch-label"><\/div><img src="https://r3c8b5x6.ssl.hwcdn.net/data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><p class="clearing-caption"><\/p><a href="#" class="clearing-main-prev"><span><\/span><\/a><a href="#" class="clearing-main-next"><span><\/span><\/a><\/div>'},close_selectors:".clearing-close, div.clearing-blackout",open_selectors:"",skip_selector:"",touch_label:"",init:!1,locked:!1},init:function(n,t,i){var r=this;Foundation.inherit(this,"throttle image_loaded");this.bindings(t,i);r.S(this.scope).is("["+this.attr_name()+"]")?this.assemble(r.S("li",this.scope)):r.S("["+this.attr_name()+"]",this.scope).each(function(){r.assemble(r.S("li",this))})},events:function(r){var u=this,f=u.S,e=n(".scroll-container");e.length>0&&(this.scope=e);f(this.scope).off(".clearing").on("click.fndtn.clearing","ul["+this.attr_name()+"] li "+this.settings.open_selectors,function(n,t,i){var t=t||f(this),i=i||t,r=t.next("li"),e=t.closest("["+u.attr_name()+"]").data(u.attr_name(!0)+"-init"),o=f(n.target);n.preventDefault();e||(u.init(),e=t.closest("["+u.attr_name()+"]").data(u.attr_name(!0)+"-init"));i.hasClass("visible")&&t[0]===i[0]&&r.length>0&&u.is_open(t)&&(i=r,o=f("img",i));u.open(o,t,i);u.update_paddles(i)}).on("click.fndtn.clearing",".clearing-main-next",function(n){u.nav(n,"next")}).on("click.fndtn.clearing",".clearing-main-prev",function(n){u.nav(n,"prev")}).on("click.fndtn.clearing",this.settings.close_selectors,function(n){Foundation.libs.clearing.close(n,this)});n(i).on("keydown.fndtn.clearing",function(n){u.keydown(n)});f(t).off(".clearing").on("resize.fndtn.clearing",function(){u.resize()});this.swipe_events(r)},swipe_events:function(){var t=this,n=t.S;n(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(t){t.touches||(t=t.originalEvent);var i={start_page_x:t.touches[0].pageX,start_page_y:t.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:r};n(this).data("swipe-transition",i);t.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(i){var r,u;(i.touches||(i=i.originalEvent),i.touches.length>1||i.scale&&i.scale!==1)||(r=n(this).data("swipe-transition"),typeof r=="undefined"&&(r={}),r.delta_x=i.touches[0].pageX-r.start_page_x,Foundation.rtl&&(r.delta_x=-r.delta_x),typeof r.is_scrolling=="undefined"&&(r.is_scrolling=!!(r.is_scrolling||Math.abs(r.delta_x)<Math.abs(i.touches[0].pageY-r.start_page_y))),r.is_scrolling||r.active||(i.preventDefault(),u=r.delta_x<0?"next":"prev",r.active=!0,t.nav(i,u)))}).on("touchend.fndtn.clearing",".visible-img",function(t){n(this).data("swipe-transition",{});t.stopPropagation()})},assemble:function(t){var i=t.parent(),r,u;if(!i.parent().hasClass("carousel")&&(i.after('<div id="foundationClearingHolder"><\/div>'),r=i.detach(),u="",r[0]!=null)){u=r[0].outerHTML;var o=this.S("#foundationClearingHolder"),s=i.data(this.attr_name(!0)+"-init"),e={grid:'<div class="carousel">'+u+"<\/div>",viewing:s.templates.viewing},f='<div class="clearing-assembled"><div>'+e.viewing+e.grid+"<\/div><\/div>",h=this.settings.touch_label;Modernizr.touch&&(f=n(f).find(".clearing-touch-label").html(h).end());o.after(f).remove()}},open:function(t,r,u){function h(){setTimeout(function(){this.image_loaded(o,function(){o.outerWidth()!==1||l?a.call(this,o):h.call(this)}.bind(this))}.bind(this),100)}function a(t){var i=n(t);i.css("visibility","visible");v.css("overflow","hidden");c.addClass("clearing-blackout");s.addClass("clearing-container");e.show();this.fix_height(u).caption(f.S(".clearing-caption",e),f.S("img",u)).center_and_label(t,y).shift(r,u,function(){u.closest("li").siblings().removeClass("visible");u.closest("li").addClass("visible")});e.trigger("opened.fndtn.clearing")}var f=this,v=n(i.body),c=u.closest(".clearing-assembled"),s=f.S("div",c).first(),e=f.S(".visible-img",s),o=f.S("img",e).not(t),y=f.S(".clearing-touch-label",s),l=!1;n("body").on("touchmove",function(n){n.preventDefault()});o.error(function(){l=!0});this.locked()||(e.trigger("open.fndtn.clearing"),o.attr("src",this.load(t)).css("visibility","hidden"),h.call(this))},close:function(t,r){t.preventDefault();var f=function(n){return/blackout/.test(n.selector)?n:n.closest(".clearing-blackout")}(n(r)),o=n(i.body),e,u;return r===t.target&&f&&(o.css("overflow",""),e=n("div",f).first(),u=n(".visible-img",e),u.trigger("close.fndtn.clearing"),this.settings.prev_index=0,n("ul["+this.attr_name()+"]",f).attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),e.removeClass("clearing-container"),u.hide(),u.trigger("closed.fndtn.clearing")),n("body").off("touchmove"),!1},is_open:function(n){return n.parent().prop("style").length>0},keydown:function(t){var i=n(".clearing-blackout ul["+this.attr_name()+"]"),r=this.rtl?37:39,u=this.rtl?39:37;t.which===r&&this.go(i,"next");t.which===u&&this.go(i,"prev");t.which===27&&this.S("a.clearing-close").trigger("click").trigger("click.fndtn.clearing")},nav:function(t,i){var r=n("ul["+this.attr_name()+"]",".clearing-blackout");t.preventDefault();this.go(r,i)},resize:function(){var t=n("img",".clearing-blackout .visible-img"),i=n(".clearing-touch-label",".clearing-blackout");t.length&&(this.center_and_label(t,i),t.trigger("resized.fndtn.clearing"))},fix_height:function(n){var t=n.parent().children(),i=this;return t.each(function(){var n=i.S(this),t=n.find("img");n.height()>t.outerHeight()&&n.addClass("fix-height")}).closest("ul").width(t.length*100+"%"),this},update_paddles:function(n){n=n.closest("li");var t=n.closest(".carousel").siblings(".visible-img");n.next().length>0?this.S(".clearing-main-next",t).removeClass("disabled"):this.S(".clearing-main-next",t).addClass("disabled");n.prev().length>0?this.S(".clearing-main-prev",t).removeClass("disabled"):this.S(".clearing-main-prev",t).addClass("disabled")},center_and_label:function(n,t){return!this.rtl&&t.length>0?t.css({marginLeft:-(t.outerWidth()/2),marginTop:-(n.outerHeight()/2)-t.outerHeight()-10}):t.css({marginRight:-(t.outerWidth()/2),marginTop:-(n.outerHeight()/2)-t.outerHeight()-10,left:"auto",right:"50%"}),this},load:function(n){var t;return(t=n[0].nodeName==="A"?n.attr("href"):n.closest("a").attr("href"),this.preload(n),t)?t:n.attr("src")},preload:function(n){this.img(n.closest("li").next()).img(n.closest("li").prev())},img:function(n){if(n.length){var i=new Image,t=this.S("a",n);i.src=t.length?t.attr("href"):this.S("img",n).attr("src")}return this},caption:function(n,t){var i=t.attr("data-caption");return i?n.html(i).show():n.text("").hide(),this},go:function(n,t){var r=this.S(".visible",n),i=r[t]();this.settings.skip_selector&&i.find(this.settings.skip_selector).length!=0&&(i=i[t]());i.length&&this.S("img",i).trigger("click",[r,i]).trigger("click.fndtn.clearing",[r,i]).trigger("change.fndtn.clearing")},shift:function(n,t,i){var u=t.parent(),c=this.settings.prev_index||t.index(),f=this.direction(u,n,t),e=this.rtl?"right":"left",h=parseInt(u.css("left"),10),o=t.outerWidth(),s,r={};t.index()===c||/skip/.test(f)?/skip/.test(f)&&(s=t.index()-this.settings.up_count,this.lock(),s>0?(r[e]=-(s*o),u.animate(r,300,this.unlock())):(r[e]=0,u.animate(r,300,this.unlock()))):/left/.test(f)?(this.lock(),r[e]=h+o,u.animate(r,300,this.unlock())):/right/.test(f)&&(this.lock(),r[e]=h-o,u.animate(r,300,this.unlock()));i()},direction:function(n,t,i){var u=this.S("li",n),o=u.outerWidth()+u.outerWidth()/4,f=Math.floor(this.S(".clearing-container").outerWidth()/o)-1,r=u.index(i),e;return this.settings.up_count=f,e=this.adjacent(this.settings.prev_index,r)?r>f&&r>this.settings.prev_index?"right":r>f-1&&r<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=r,e},adjacent:function(n,t){for(var i=t+1;i>=t-1;i--)if(i===n)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},off:function(){this.S(this.scope).off(".fndtn.clearing");this.S(t).off(".fndtn.clearing")},reflow:function(){this.init()}}}(jQuery,window,window.document),function(n,t,i,r){"use strict";var u=function(){},f=function(u,f){if(u.hasClass(f.slides_container_class))return this;var h=this,c,l=u,p,y,w,v=0,b,a,k=!1;h.slides=function(){return l.children(f.slide_selector)};h.slides().first().addClass(f.active_slide_class);h.update_slide_number=function(t){f.slide_number&&(p.find("span:first").text(parseInt(t)+1),p.find("span:last").text(h.slides().length));f.bullets&&(y.children().removeClass(f.bullets_active_class),n(y.children().get(t)).addClass(f.bullets_active_class))};h.update_active_link=function(t){var i=n('[data-orbit-link="'+h.slides().eq(t).attr("data-orbit-slide")+'"]');i.siblings().removeClass(f.bullets_active_class);i.addClass(f.bullets_active_class)};h.build_markup=function(){l.wrap('<div class="'+f.container_class+'"><\/div>');c=l.parent();l.addClass(f.slides_container_class);f.stack_on_small&&c.addClass(f.stack_on_small_class);f.navigation_arrows&&(c.append(n('<a href="#"><span><\/span><\/a>').addClass(f.prev_class)),c.append(n('<a href="#"><span><\/span><\/a>').addClass(f.next_class)));f.timer&&(w=n("<div>").addClass(f.timer_container_class),w.append("<span>"),w.append(n("<div>").addClass(f.timer_progress_class)),w.addClass(f.timer_paused_class),c.append(w));f.slide_number&&(p=n("<div>").addClass(f.slide_number_class),p.append("<span><\/span> "+f.slide_number_text+" <span><\/span>"),c.append(p));f.bullets&&(y=n("<ol>").addClass(f.bullets_container_class),c.append(y),y.wrap('<div class="orbit-bullets-container"><\/div>'),h.slides().each(function(t){var i=n("<li>").attr("data-orbit-slide",t).on("click",h.link_bullet);y.append(i)}))};h._goto=function(t,i){var r,o,e,u,s,c;if(t===v)return!1;if(typeof a=="object"&&a.restart(),r=h.slides(),o="next",k=!0,t<v&&(o="prev"),t>=r.length){if(!f.circular)return!1;t=0}else if(t<0){if(!f.circular)return!1;t=r.length-1}if(e=n(r.get(v)),u=n(r.get(t)),e.css("zIndex",2),e.removeClass(f.active_slide_class),u.css("zIndex",4).addClass(f.active_slide_class),l.trigger("before-slide-change.fndtn.orbit"),f.before_slide_change(),h.update_active_link(t),s=function(){var n=function(){v=t;k=!1;i===!0&&(a=h.create_timer(),a.start());h.update_slide_number(v);l.trigger("after-slide-change.fndtn.orbit",[{slide_number:v,total_slides:r.length}]);f.after_slide_change(v,r.length)};l.outerHeight()!=u.outerHeight()&&f.variable_height?l.animate({height:u.outerHeight()},250,"linear",n):n()},r.length===1)return s(),!1;c=function(){o==="next"&&b.next(e,u,s);o==="prev"&&b.prev(e,u,s)};u.outerHeight()>l.outerHeight()&&f.variable_height?l.animate({height:u.outerHeight()},250,"linear",c):c()};h.next=function(n){n.stopImmediatePropagation();n.preventDefault();h._goto(v+1)};h.prev=function(n){n.stopImmediatePropagation();n.preventDefault();h._goto(v-1)};h.link_custom=function(t){var i,r;t.preventDefault();i=n(this).attr("data-orbit-link");typeof i=="string"&&(i=n.trim(i))!=""&&(r=c.find("[data-orbit-slide="+i+"]"),r.index()!=-1&&h._goto(r.index()))};h.link_bullet=function(){var t=n(this).attr("data-orbit-slide"),i;typeof t=="string"&&(t=n.trim(t))!=""&&(isNaN(parseInt(t))?(i=c.find("[data-orbit-slide="+t+"]"),i.index()!=-1&&h._goto(i.index()+1)):h._goto(parseInt(t)))};h.timer_callback=function(){h._goto(v+1,!0)};h.compute_dimensions=function(){var i=n(h.slides().get(v)),t=i.outerHeight();f.variable_height||h.slides().each(function(){n(this).outerHeight()>t&&(t=n(this).outerHeight())});l.height(t)};h.create_timer=function(){return new e(c.find("."+f.timer_container_class),f,h.timer_callback)};h.stop_timer=function(){typeof a=="object"&&a.stop()};h.toggle_timer=function(){var n=c.find("."+f.timer_container_class);n.hasClass(f.timer_paused_class)?(typeof a=="undefined"&&(a=h.create_timer()),a.start()):typeof a=="object"&&a.stop()};h.init=function(){h.build_markup();f.timer&&(a=h.create_timer(),Foundation.utils.image_loaded(this.slides().children("img"),a.start));b=new s(f,l);f.animation==="slide"&&(b=new o(f,l));c.on("click","."+f.next_class,h.next);c.on("click","."+f.prev_class,h.prev);if(f.next_on_click)c.on("click","."+f.slides_container_class+" [data-orbit-slide]",h.link_bullet);c.on("click",h.toggle_timer);if(f.swipe)c.on("touchstart.fndtn.orbit",function(n){n.touches||(n=n.originalEvent);var t={start_page_x:n.touches[0].pageX,start_page_y:n.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:r};c.data("swipe-transition",t);n.stopPropagation()}).on("touchmove.fndtn.orbit",function(n){var t,i;(n.touches||(n=n.originalEvent),n.touches.length>1||n.scale&&n.scale!==1)||(t=c.data("swipe-transition"),typeof t=="undefined"&&(t={}),t.delta_x=n.touches[0].pageX-t.start_page_x,typeof t.is_scrolling=="undefined"&&(t.is_scrolling=!!(t.is_scrolling||Math.abs(t.delta_x)<Math.abs(n.touches[0].pageY-t.start_page_y))),t.is_scrolling||t.active||(n.preventDefault(),i=t.delta_x<0?v+1:v-1,t.active=!0,h._goto(i)))}).on("touchend.fndtn.orbit",function(n){c.data("swipe-transition",{});n.stopPropagation()});c.on("mouseenter.fndtn.orbit",function(){f.timer&&f.pause_on_hover&&h.stop_timer()}).on("mouseleave.fndtn.orbit",function(){f.timer&&f.resume_on_mouseout&&a.start()});n(i).on("click","[data-orbit-link]",h.link_custom);n(t).on("load resize",h.compute_dimensions);Foundation.utils.image_loaded(this.slides().children("img"),h.compute_dimensions);Foundation.utils.image_loaded(this.slides().children("img"),function(){c.prev("."+f.preloader_class).css("display","none");h.update_slide_number(0);h.update_active_link(0);l.trigger("ready.fndtn.orbit")})};h.init()},e=function(n,t,i){var f=this,o=t.timer_speed,u=n.find("."+t.timer_progress_class),s,e,r=-1;this.update_progress=function(n){var t=u.clone();t.attr("style","");t.css("width",n+"%");u.replaceWith(t);u=t};this.restart=function(){clearTimeout(e);n.addClass(t.timer_paused_class);r=-1;f.update_progress(0)};this.start=function(){if(!n.hasClass(t.timer_paused_class))return!0;r=r===-1?o:r;n.removeClass(t.timer_paused_class);s=(new Date).getTime();u.animate({width:"100%"},r,"linear");e=setTimeout(function(){f.restart();i()},r);n.trigger("timer-started.fndtn.orbit")};this.stop=function(){var i,u;if(n.hasClass(t.timer_paused_class))return!0;clearTimeout(e);n.addClass(t.timer_paused_class);i=(new Date).getTime();r=r-(i-s);u=100-r/o*100;f.update_progress(u);n.trigger("timer-stopped.fndtn.orbit")}},o=function(t){var i=t.animation_speed,f=n("html[dir=rtl]").length===1,r=f?"marginRight":"marginLeft",u={};u[r]="0%";this.next=function(n,t,f){n.animate({marginLeft:"-100%"},i);t.animate(u,i,function(){n.css(r,"100%");f()})};this.prev=function(n,t,f){n.animate({marginLeft:"100%"},i);t.css(r,"-100%");t.animate(u,i,function(){n.css(r,"100%");f()})}},s=function(t){var i=t.animation_speed,r=n("html[dir=rtl]").length===1,u=r?"marginRight":"marginLeft";this.next=function(n,t,r){t.css({margin:"0%",opacity:"0.01"});t.animate({opacity:"1"},i,"linear",function(){n.css("margin","100%");r()})};this.prev=function(n,t,r){t.css({margin:"0%",opacity:"0.01"});t.animate({opacity:"1"},i,"linear",function(){n.css("margin","100%");r()})}};Foundation.libs=Foundation.libs||{};Foundation.libs.orbit={name:"orbit",version:"5.5.1",settings:{animation:"slide",timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,next_on_click:!0,animation_speed:500,stack_on_small:!1,navigation_arrows:!0,slide_number:!0,slide_number_text:"of",container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",slides_container_class:"orbit-slides-container",preloader_class:"preloader",slide_selector:"*",bullets_container_class:"orbit-bullets",bullets_active_class:"active",slide_number_class:"orbit-slide-number",caption_class:"orbit-caption",active_slide_class:"active",orbit_transition_class:"orbit-transitioning",bullets:!0,circular:!0,timer:!0,variable_height:!1,swipe:!0,before_slide_change:u,after_slide_change:u},init:function(n,t,i){var r=this;this.bindings(t,i)},events:function(n){var t=new f(this.S(n),this.S(n).data("orbit-init"));this.S(n).data(this.name+"-instance",t)},reflow:function(){var n=this,t,i;n.S(n.scope).is("[data-orbit]")?(t=n.S(n.scope),i=t.data(n.name+"-instance"),i.compute_dimensions()):n.S("[data-orbit]",n.scope).each(function(t,i){var r=n.S(i),f=n.data_options(r),u=r.data(n.name+"-instance");u.compute_dimensions()})}}}(jQuery,window,window.document),function(n){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.5.1",settings:{open_method:"move",close_on_click:!1},init:function(n,t,i){this.bindings(t,i)},events:function(){var i=this,f=i.S,t="",r="",u="";this.settings.open_method==="move"?(t="move-",r="right",u="left"):this.settings.open_method==="overlap_single"?(t="offcanvas-overlap-",r="right",u="left"):this.settings.open_method==="overlap"&&(t="offcanvas-overlap");f(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",function(u){i.click_toggle_class(u,t+r);i.settings.open_method!=="overlap"&&f(".left-submenu").removeClass(t+r);n(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".left-off-canvas-menu a",function(u){var o=i.get_settings(u),e=f(this).parent();!o.close_on_click||e.hasClass("has-submenu")||e.hasClass("back")?f(this).parent().hasClass("has-submenu")?(u.preventDefault(),f(this).siblings(".left-submenu").toggleClass(t+r)):e.hasClass("back")&&(u.preventDefault(),e.parent().removeClass(t+r)):(i.hide.call(i,t+r,i.get_wrapper(u)),e.parent().removeClass(t+r));n(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-toggle",function(r){i.click_toggle_class(r,t+u);i.settings.open_method!=="overlap"&&f(".right-submenu").removeClass(t+u);n(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-menu a",function(r){var o=i.get_settings(r),e=f(this).parent();!o.close_on_click||e.hasClass("has-submenu")||e.hasClass("back")?f(this).parent().hasClass("has-submenu")?(r.preventDefault(),f(this).siblings(".right-submenu").toggleClass(t+u)):e.hasClass("back")&&(r.preventDefault(),e.parent().removeClass(t+u)):(i.hide.call(i,t+u,i.get_wrapper(r)),e.parent().removeClass(t+u));n(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(e){i.click_remove_class(e,t+u);f(".right-submenu").removeClass(t+u);r&&(i.click_remove_class(e,t+r),f(".left-submenu").removeClass(t+u));n(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(f){i.click_remove_class(f,t+u);n(".left-off-canvas-toggle").attr("aria-expanded","false");r&&(i.click_remove_class(f,t+r),n(".right-off-canvas-toggle").attr("aria-expanded","false"))})},toggle:function(n,t){t=t||this.get_wrapper();t.is("."+n)?this.hide(n,t):this.show(n,t)},show:function(n,t){t=t||this.get_wrapper();t.trigger("open").trigger("open.fndtn.offcanvas");t.addClass(n)},hide:function(n,t){t=t||this.get_wrapper();t.trigger("close").trigger("close.fndtn.offcanvas");t.removeClass(n)},click_toggle_class:function(n,t){n.preventDefault();var i=this.get_wrapper(n);this.toggle(t,i)},click_remove_class:function(n,t){n.preventDefault();var i=this.get_wrapper(n);this.hide(t,i)},get_settings:function(n){var t=this.S(n.target).closest("["+this.attr_name()+"]");return t.data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(n){var t=this.S(n?n.target:this.scope).closest(".off-canvas-wrap");return t.length===0&&(t=this.S(".off-canvas-wrap")),t},reflow:function(){}}}(jQuery,window,window.document),function(n){"use strict";Foundation.libs.alert={name:"alert",version:"5.5.1",settings:{callback:function(){}},init:function(n,t,i){this.bindings(t,i)},events:function(){var t=this,i=this.S;n(this.scope).off(".alert").on("click.fndtn.alert","["+this.attr_name()+"] .close",function(n){var r=i(this).closest("["+t.attr_name()+"]"),u=r.data(t.attr_name(!0)+"-init")||t.settings;if(n.preventDefault(),Modernizr.csstransitions){r.addClass("alert-close");r.on("transitionend webkitTransitionEnd oTransitionEnd",function(){i(this).trigger("close").trigger("close.fndtn.alert").remove();u.callback()})}else r.fadeOut(300,function(){i(this).trigger("close").trigger("close.fndtn.alert").remove();u.callback()})})},reflow:function(){}}}(jQuery,window,window.document),function(n,t,i,r){"use strict";function u(n){var t=/fade/i.test(n),i=/pop/i.test(n);return{animate:t||i,pop:i,fade:t}}Foundation.libs.reveal={name:"reveal",version:"5.5.1",locked:!1,settings:{animation:"fadeAndPop",animation_speed:250,close_on_background_click:!0,close_on_esc:!0,dismiss_modal_class:"close-reveal-modal",multiple_opened:!1,bg_class:"reveal-modal-bg",root_element:"body",open:function(){},opened:function(){},close:function(){},closed:function(){},bg:n(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(t,i,r){n.extend(!0,this.settings,i,r);this.bindings(i,r)},events:function(){var n=this,t=n.S;t(this.scope).off(".reveal").on("click.fndtn.reveal","["+this.add_namespace("data-reveal-id")+"]:not([disabled])",function(i){var r,u,f;i.preventDefault();n.locked||(r=t(this),u=r.data(n.data_attr("reveal-ajax")),n.locked=!0,typeof u=="undefined"?n.open.call(n,r):(f=u===!0?r.attr("href"):u,n.open.call(n,r,{url:f})))});t(i).on("click.fndtn.reveal",this.close_targets(),function(i){if(i.preventDefault(),!n.locked){var r=t("["+n.attr_name()+"].open").data(n.attr_name(!0)+"-init")||n.settings,u=t(i.target)[0]===t("."+r.bg_class)[0];if(u)if(r.close_on_background_click)i.stopPropagation();else return;n.locked=!0;n.close.call(n,u?t("["+n.attr_name()+"].open"):t(this).closest("["+n.attr_name()+"]"))}});if(t("["+n.attr_name()+"]",this.scope).length>0)t(this.scope).on("open.fndtn.reveal",this.settings.open).on("opened.fndtn.reveal",this.settings.opened).on("opened.fndtn.reveal",this.open_video).on("close.fndtn.reveal",this.settings.close).on("closed.fndtn.reveal",this.settings.closed).on("closed.fndtn.reveal",this.close_video);else t(this.scope).on("open.fndtn.reveal","["+n.attr_name()+"]",this.settings.open).on("opened.fndtn.reveal","["+n.attr_name()+"]",this.settings.opened).on("opened.fndtn.reveal","["+n.attr_name()+"]",this.open_video).on("close.fndtn.reveal","["+n.attr_name()+"]",this.settings.close).on("closed.fndtn.reveal","["+n.attr_name()+"]",this.settings.closed).on("closed.fndtn.reveal","["+n.attr_name()+"]",this.close_video);return!0},key_up_on:function(){var n=this;n.S("body").off("keyup.fndtn.reveal").on("keyup.fndtn.reveal",function(t){var i=n.S("["+n.attr_name()+"].open"),r=i.data(n.attr_name(!0)+"-init")||n.settings;r&&t.which===27&&r.close_on_esc&&!n.locked&&n.close.call(n,i)});return!0},key_up_off:function(){return this.S("body").off("keyup.fndtn.reveal"),!0},open:function(i,r){var f=this,u,e,o,s;if(i?typeof i.selector!="undefined"?u=f.S("#"+i.data(f.data_attr("reveal-id"))).first():(u=f.S(this.scope),r=i):u=f.S(this.scope),e=u.data(f.attr_name(!0)+"-init"),e=e||this.settings,u.hasClass("open")&&i.attr("data-reveal-id")==u.attr("id"))return f.close(u);u.hasClass("open")||(o=f.S("["+f.attr_name()+"].open"),typeof u.data("css-top")=="undefined"&&u.data("css-top",parseInt(u.css("top"),10)).data("offset",this.cache_offset(u)),this.key_up_on(u),u.on("open.fndtn.reveal").trigger("open.fndtn.reveal"),o.length<1&&this.toggle_bg(u,!0),typeof r=="string"&&(r={url:r}),typeof r!="undefined"&&r.url?(s=typeof r.success!="undefined"?r.success:null,n.extend(r,{success:function(t,i,r){if(n.isFunction(s)){var h=s(t,i,r);typeof h=="string"&&(t=h)}u.html(t);f.S(u).foundation("section","reflow");f.S(u).children().foundation();o.length>0&&(e.multiple_opened?this.to_back(o):this.hide(o,e.css.close));f.show(u,e.css.open)}}),n.ajax(r)):(o.length>0&&(e.multiple_opened?this.to_back(o):this.hide(o,e.css.close)),this.show(u,e.css.open)));f.S(t).trigger("resize")},close:function(t){var t=t&&t.length?t:this.S(this.scope),r=this.S("["+this.attr_name()+"].open"),i=t.data(this.attr_name(!0)+"-init")||this.settings;r.length>0&&(this.locked=!0,this.key_up_off(t),t.trigger("close").trigger("close.fndtn.reveal"),(i.multiple_opened&&r.length===1||!i.multiple_opened||t.length>1)&&(this.toggle_bg(t,!1),this.to_front(t)),i.multiple_opened?(this.hide(t,i.css.close,i),this.to_front(n(n.makeArray(r).reverse()[1]))):this.hide(r,i.css.close,i))},close_targets:function(){var n="."+this.settings.dismiss_modal_class;return this.settings.close_on_background_click?n+", ."+this.settings.bg_class:n},toggle_bg:function(t,i){this.S("."+this.settings.bg_class).length===0&&(this.settings.bg=n("<div />",{"class":this.settings.bg_class}).appendTo("body").hide());var u=this.settings.bg.filter(":visible").length>0;i!=u&&((i==r?u:!i)?this.hide(this.settings.bg):this.show(this.settings.bg))},show:function(i,r){var s,h,e,o,f;if(r){if(f=i.data(this.attr_name(!0)+"-init")||this.settings,s=f.root_element,i.parent(s).length===0){h=i.wrap('<div style="display: none;" />').parent();i.on("closed.fndtn.reveal.wrapped",function(){i.detach().appendTo(h);i.unwrap().unbind("closed.fndtn.reveal.wrapped")});i.detach().appendTo(s)}return(e=u(f.animation),e.animate||(this.locked=!1),e.pop)?(r.top=n(t).scrollTop()-i.data("offset")+"px",o={top:n(t).scrollTop()+i.data("css-top")+"px",opacity:1},setTimeout(function(){return i.css(r).animate(o,f.animation_speed,"linear",function(){this.locked=!1;i.trigger("opened").trigger("opened.fndtn.reveal")}.bind(this)).addClass("open")}.bind(this),f.animation_speed/2)):e.fade?(r.top=n(t).scrollTop()+i.data("css-top")+"px",o={opacity:1},setTimeout(function(){return i.css(r).animate(o,f.animation_speed,"linear",function(){this.locked=!1;i.trigger("opened").trigger("opened.fndtn.reveal")}.bind(this)).addClass("open")}.bind(this),f.animation_speed/2)):i.css(r).show().css({opacity:1}).addClass("open").trigger("opened").trigger("opened.fndtn.reveal")}return(f=this.settings,u(f.animation).fade)?i.fadeIn(f.animation_speed/2):(this.locked=!1,i.show())},to_back:function(n){n.addClass("toback")},to_front:function(n){n.removeClass("toback")},hide:function(i,r){var e,o,f;return r?(f=i.data(this.attr_name(!0)+"-init"),f=f||this.settings,e=u(f.animation),e.animate||(this.locked=!1),e.pop)?(o={top:-n(t).scrollTop()-i.data("offset")+"px",opacity:0},setTimeout(function(){return i.animate(o,f.animation_speed,"linear",function(){this.locked=!1;i.css(r).trigger("closed").trigger("closed.fndtn.reveal")}.bind(this)).removeClass("open")}.bind(this),f.animation_speed/2)):e.fade?(o={opacity:0},setTimeout(function(){return i.animate(o,f.animation_speed,"linear",function(){this.locked=!1;i.css(r).trigger("closed").trigger("closed.fndtn.reveal")}.bind(this)).removeClass("open")}.bind(this),f.animation_speed/2)):i.hide().css(r).removeClass("open").trigger("closed").trigger("closed.fndtn.reveal"):(f=this.settings,u(f.animation).fade)?i.fadeOut(f.animation_speed/2):i.hide()},close_video:function(t){var r=n(".flex-video",t.target),i=n("iframe",r);i.length>0&&(i.attr("data-src",i[0].src),i.attr("src",i.attr("src")),r.hide())},open_video:function(t){var u=n(".flex-video",t.target),i=u.find("iframe"),f,e;i.length>0&&(f=i.attr("data-src"),typeof f=="string"?i[0].src=i.attr("data-src"):(e=i[0].src,i[0].src=r,i[0].src=e),u.show())},data_attr:function(n){return this.namespace.length>0?this.namespace+"-"+n:n},cache_offset:function(n){var t=n.show().height()+parseInt(n.css("top"),10);return n.hide(),t},off:function(){n(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(jQuery,window,window.document),function(n,t){"use strict";Foundation.libs.interchange={name:"interchange",version:"5.5.1",cache:{},images_loaded:!1,nodes_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen",small:Foundation.media_queries.small,"small-only":Foundation.media_queries["small-only"],medium:Foundation.media_queries.medium,"medium-only":Foundation.media_queries["medium-only"],large:Foundation.media_queries.large,"large-only":Foundation.media_queries["large-only"],xlarge:Foundation.media_queries.xlarge,"xlarge-only":Foundation.media_queries["xlarge-only"],xxlarge:Foundation.media_queries.xxlarge,landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(t,i,r){var u,f,e;return/IMG/.test(t[0].nodeName)?(u=t[0].src,new RegExp(i,"i").test(u))?void 0:(t[0].src=i,r(t[0].src)):(f=t.data(this.data_attr+"-last-path"),e=this,f==i)?void 0:/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(i)?(n(t).css("background-image","url("+i+")"),t.data("interchange-last-path",i),r(i)):n.get(i,function(n){t.html(n);t.data(e.data_attr+"-last-path",i);r()})}}},init:function(t,i,r){Foundation.inherit(this,"throttle random_str");this.data_attr=this.set_data_attr();n.extend(!0,this.settings,i,r);this.bindings(i,r);this.load("images");this.load("nodes")},get_media_hash:function(){var n="";for(var t in this.settings.named_queries)n+=matchMedia(this.settings.named_queries[t]).matches.toString();return n},events:function(){var i=this,r;n(t).off(".interchange").on("resize.fndtn.interchange",i.throttle(function(){var n=i.get_media_hash();n!==r&&i.resize();r=n},50));return this},resize:function(){var r=this.cache,i,t;if(!this.images_loaded||!this.nodes_loaded){setTimeout(n.proxy(this.resize,this),50);return}for(i in r)r.hasOwnProperty(i)&&(t=this.results(i,r[i]),t&&this.settings.directives[t.scenario[1]].call(this,t.el,t.scenario[0],function(n){var t;return t=arguments[0]instanceof Array?arguments[0]:Array.prototype.slice.call(arguments,0),function(){n.el.trigger(n.scenario[1],t)}}(t)))},results:function(n,t){var i=t.length,u,f,r;if(i>0)for(u=this.S("["+this.add_namespace("data-uuid")+'="'+n+'"]');i--;)if(r=t[i][2],f=this.settings.named_queries.hasOwnProperty(r)?matchMedia(this.settings.named_queries[r]):matchMedia(r),f.matches)return{el:u,scenario:t[i]};return!1},load:function(n,t){return(typeof this["cached_"+n]=="undefined"||t)&&this["update_"+n](),this["cached_"+n]},update_images:function(){var n=this.S("img["+this.data_attr+"]"),i=n.length,t=i,r=0,f=this.data_attr,u;for(this.cache={},this.cached_images=[],this.images_loaded=i===0;t--;)r++,n[t]&&(u=n[t].getAttribute(f)||"",u.length>0&&this.cached_images.push(n[t])),r===i&&(this.images_loaded=!0,this.enhance("images"));return this},update_nodes:function(){var n=this.S("["+this.data_attr+"]").not("img"),t=n.length,i=t,r=0,f=this.data_attr,u;for(this.cached_nodes=[],this.nodes_loaded=t===0;i--;)r++,u=n[i].getAttribute(f)||"",u.length>0&&this.cached_nodes.push(n[i]),r===t&&(this.nodes_loaded=!0,this.enhance("nodes"));return this},enhance:function(i){for(var r=this["cached_"+i].length;r--;)this.object(n(this["cached_"+i][r]));return n(t).trigger("resize").trigger("resize.fndtn.interchange")},convert_directive:function(n){var t=this.trim(n);return t.length>0?t:"replace"},parse_scenario:function(n){var t=n[0].match(/(.+),\s*(\w+)\s*$/),u=n[1],i,r;if(t)i=t[1],r=t[2];else var f=n[0].split(/,\s*$/),i=f[0],r="";return[this.trim(i),this.convert_directive(r),this.trim(u)]},object:function(n){var r=this.parse_data_attr(n),u=[],t=r.length,i,f;if(t>0)while(t--)i=r[t].split(/\(([^\)]*?)(\))$/),i.length>1&&(f=this.parse_scenario(i),u.push(f));return this.store(n,u)},store:function(n,t){var i=this.random_str(),r=n.data(this.add_namespace("uuid",!0));return this.cache[r]?this.cache[r]:(n.attr(this.add_namespace("data-uuid"),i),this.cache[i]=t)},trim:function(t){return typeof t=="string"?n.trim(t):t},set_data_attr:function(n){return n?this.namespace.length>0?this.namespace+"-"+this.settings.load_attr:this.settings.load_attr:this.namespace.length>0?"data-"+this.namespace+"-"+this.settings.load_attr:"data-"+this.settings.load_attr},parse_data_attr:function(n){for(var t=n.attr(this.attr_name()).split(/\[(.*?)\]/),i=t.length,r=[];i--;)t[i].replace(/[\W\d]+/,"").length>4&&r.push(t[i]);return r},reflow:function(){this.load("images",!0);this.load("nodes",!0)}}}(jQuery,window,window.document),function(n,t){"use strict";Foundation.libs["magellan-expedition"]={name:"magellan-expedition",version:"5.5.1",settings:{active_class:"active",threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0,offset_by_height:!0,duration:700,easing:"swing"},init:function(n,t,i){Foundation.inherit(this,"throttle");this.bindings(t,i)},events:function(){var i=this,u=i.S,r=i.settings;i.set_expedition_position();u(i.scope).off(".magellan").on("click.fndtn.magellan","["+i.add_namespace("data-magellan-arrival")+'] a[href^="#"]',function(t){var r;t.preventDefault();var o=n(this).closest("["+i.attr_name()+"]"),u=o.data("magellan-expedition-init"),f=this.hash.split("#").join(""),e=n('a[name="'+f+'"]');e.length===0&&(e=n("#"+f));r=e.offset().top-u.destination_threshold+1;u.offset_by_height&&(r=r-o.outerHeight());n("html, body").stop().animate({scrollTop:r},u.duration,u.easing,function(){history.pushState?history.pushState(null,null,"#"+f):location.hash="#"+f})}).on("scroll.fndtn.magellan",i.throttle(this.check_for_arrivals.bind(this),r.throttle_delay));n(t).on("resize.fndtn.magellan",i.throttle(this.set_expedition_position.bind(this),r.throttle_delay))},check_for_arrivals:function(){var n=this;n.update_arrivals();n.update_expedition_positions()},set_expedition_position:function(){var t=this;n("["+this.attr_name()+"=fixed]",t.scope).each(function(){var i=n(this),f=i.data("magellan-expedition-init"),e=i.attr("styles"),u,r;i.attr("style","");u=i.offset().top+f.threshold;r=parseInt(i.data("magellan-fixed-top"));isNaN(r)||(t.settings.fixed_top=r);i.data(t.data_attr("magellan-top-offset"),u);i.attr("style",e)})},update_expedition_positions:function(){var i=this,r=n(t).scrollTop();n("["+this.attr_name()+"=fixed]",i.scope).each(function(){var t=n(this),f=t.data("magellan-expedition-init"),e=t.attr("style"),o=t.data("magellan-top-offset"),u;r+i.settings.fixed_top>=o?(u=t.prev("["+i.add_namespace("data-magellan-expedition-clone")+"]"),u.length===0&&(u=t.clone(),u.removeAttr(i.attr_name()),u.attr(i.add_namespace("data-magellan-expedition-clone"),""),t.before(u)),t.css({position:"fixed",top:f.fixed_top}).addClass("fixed")):(t.prev("["+i.add_namespace("data-magellan-expedition-clone")+"]").remove(),t.attr("style",e).css("position","").css("top","").removeClass("fixed"))})},update_arrivals:function(){var i=this,r=n(t).scrollTop();n("["+this.attr_name()+"]",i.scope).each(function(){var t=n(this),u=t.data(i.attr_name(!0)+"-init"),e=i.offsets(t,r),o=t.find("["+i.add_namespace("data-magellan-arrival")+"]"),f=!1;e.each(function(n,r){if(r.viewport_offset>=r.top_offset){var e=t.find("["+i.add_namespace("data-magellan-arrival")+"]");return e.not(r.arrival).removeClass(u.active_class),r.arrival.addClass(u.active_class),f=!0,!0}});f||o.removeClass(u.active_class)})},offsets:function(t,i){var r=this,u=t.data(r.attr_name(!0)+"-init"),f=i;return t.find("["+r.add_namespace("data-magellan-arrival")+"]").map(function(){var o=n(this).data(r.data_attr("magellan-arrival")),e=n("["+r.add_namespace("data-magellan-destination")+"="+o+"]"),i;if(e.length>0)return i=e.offset().top-u.destination_threshold,u.offset_by_height&&(i=i-t.outerHeight()),i=Math.floor(i),{destination:e,arrival:n(this),top_offset:i,viewport_offset:f}}).sort(function(n,t){return n.top_offset<t.top_offset?-1:n.top_offset>t.top_offset?1:0})},data_attr:function(n){return this.namespace.length>0?this.namespace+"-"+n:n},off:function(){this.S(this.scope).off(".magellan");this.S(t).off(".magellan")},reflow:function(){var t=this;n("["+t.add_namespace("data-magellan-expedition-clone")+"]",t.scope).remove()}}}(jQuery,window,window.document),function(n){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.5.1",settings:{content_class:"content",active_class:"active",multi_expand:!1,toggleable:!0,callback:function(){}},init:function(n,t,i){this.bindings(t,i)},events:function(){var t=this,i=this.S;i(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > .accordion-navigation > a",function(r){var e=i(this).closest("["+t.attr_name()+"]"),h=t.attr_name()+"="+e.attr(t.attr_name()),u=e.data(t.attr_name(!0)+"-init")||t.settings,f=i("#"+this.href.split("#")[1]),o=n("> .accordion-navigation",e),s=o.children("."+u.content_class),c=s.filter("."+u.active_class);if(r.preventDefault(),e.attr(t.attr_name())&&(s=s.add("["+h+"] dd > ."+u.content_class),o=o.add("["+h+"] .accordion-navigation")),u.toggleable&&f.is(c)){f.parent(".accordion-navigation").toggleClass(u.active_class,!1);f.toggleClass(u.active_class,!1);u.callback(f);f.triggerHandler("toggled",[e]);e.triggerHandler("toggled",[f]);return}u.multi_expand||(s.removeClass(u.active_class),o.removeClass(u.active_class));f.addClass(u.active_class).parent().addClass(u.active_class);u.callback(f);f.triggerHandler("toggled",[e]);e.triggerHandler("toggled",[f])})},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(n,t,i){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.5.1",settings:{index:0,sticky_class:"sticky",custom_back_text:!0,back_text:"Back",mobile_show_parent_link:!0,is_hover:!0,scrolltop:!0,sticky_on:"all"},init:function(t,i,r){Foundation.inherit(this,"add_custom_rule register_media throttle");var u=this;u.register_media("topbar","foundation-mq-topbar");this.bindings(i,r);u.S("["+this.attr_name()+"]",this.scope).each(function(){var t=n(this),r=t.data(u.attr_name(!0)+"-init"),f=u.S("section, .top-bar-section",this),i;t.data("index",0);i=t.parent();i.hasClass("fixed")||u.is_sticky(t,i,r)?(u.settings.sticky_class=r.sticky_class,u.settings.sticky_topbar=t,t.data("height",i.outerHeight()),t.data("stickyoffset",i.offset().top)):t.data("height",t.outerHeight());r.assembled||u.assemble(t);r.is_hover?u.S(".has-dropdown",t).addClass("not-click"):u.S(".has-dropdown",t).removeClass("not-click");u.add_custom_rule(".f-topbar-fixed { padding-top: "+t.data("height")+"px }");i.hasClass("fixed")&&u.S("body").addClass("f-topbar-fixed")})},is_sticky:function(n,t,i){var r=t.hasClass(i.sticky_class),u=matchMedia(Foundation.media_queries.small).matches,f=matchMedia(Foundation.media_queries.medium).matches,e=matchMedia(Foundation.media_queries.large).matches;return r&&i.sticky_on==="all"?!0:r&&this.small()&&i.sticky_on.indexOf("small")!==-1&&u&&!f&&!e?!0:r&&this.medium()&&i.sticky_on.indexOf("medium")!==-1&&u&&f&&!e?!0:r&&this.large()&&i.sticky_on.indexOf("large")!==-1&&u&&f&&e?!0:!1},toggle:function(i){var u=this,r,e,f;r=i?u.S(i).closest("["+this.attr_name()+"]"):u.S("["+this.attr_name()+"]");e=r.data(this.attr_name(!0)+"-init");f=u.S("section, .top-bar-section",r);u.breakpoint()&&(u.rtl?(f.css({right:"0%"}),n(">.name",f).css({right:"100%"})):(f.css({left:"0%"}),n(">.name",f).css({left:"100%"})),u.S("li.moved",f).removeClass("moved"),r.data("index",0),r.toggleClass("expanded").css("height",""));e.scrolltop?r.hasClass("expanded")?r.parent().hasClass("fixed")&&(e.scrolltop?(r.parent().removeClass("fixed"),r.addClass("fixed"),u.S("body").removeClass("f-topbar-fixed"),t.scrollTo(0,0)):r.parent().removeClass("expanded")):r.hasClass("fixed")&&(r.parent().addClass("fixed"),r.removeClass("fixed"),u.S("body").addClass("f-topbar-fixed")):(u.is_sticky(r,r.parent(),e)&&r.parent().addClass("fixed"),r.parent().hasClass("fixed")&&(r.hasClass("expanded")?(r.addClass("fixed"),r.parent().addClass("expanded"),u.S("body").addClass("f-topbar-fixed")):(r.removeClass("fixed"),r.parent().removeClass("expanded"),u.update_sticky_positioning())))},timer:null,events:function(){var i=this,r=this.S;r(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",function(n){n.preventDefault();i.toggle(this)}).on("click.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(){var t=n(this).closest("li");!i.breakpoint()||t.hasClass("back")||t.hasClass("has-dropdown")||i.toggle()}).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",function(t){var u=r(this),f=r(t.target),e=u.closest("["+i.attr_name()+"]"),o=e.data(i.attr_name(!0)+"-init");if(f.data("revealId")){i.toggle();return}i.breakpoint()||(!o.is_hover||Modernizr.touch)&&(t.stopImmediatePropagation(),u.hasClass("hover")?(u.removeClass("hover").find("li").removeClass("hover"),u.parents("li.hover").removeClass("hover")):(u.addClass("hover"),n(u).siblings().removeClass("hover"),f[0].nodeName==="A"&&f.parent().hasClass("has-dropdown")&&t.preventDefault()))}).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",function(n){if(i.breakpoint()){n.preventDefault();var u=r(this),t=u.closest("["+i.attr_name()+"]"),f=t.find("section, .top-bar-section"),o=u.next(".dropdown").outerHeight(),e=u.closest("li");t.data("index",t.data("index")+1);e.addClass("moved");i.rtl?(f.css({right:-(100*t.data("index"))+"%"}),f.find(">.name").css({right:100*t.data("index")+"%"})):(f.css({left:-(100*t.data("index"))+"%"}),f.find(">.name").css({left:100*t.data("index")+"%"}));t.css("height",u.siblings("ul").outerHeight(!0)+t.data("height"))}});r(t).off(".topbar").on("resize.fndtn.topbar",i.throttle(function(){i.resize.call(i)},50)).trigger("resize").trigger("resize.fndtn.topbar").load(function(){r(this).trigger("resize.fndtn.topbar")});r("body").off(".topbar").on("click.fndtn.topbar",function(n){var t=r(n.target).closest("li").closest("li.hover");t.length>0||r("["+i.attr_name()+"] li.hover").removeClass("hover")});r(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",function(n){n.preventDefault();var f=r(this),t=f.closest("["+i.attr_name()+"]"),u=t.find("section, .top-bar-section"),s=t.data(i.attr_name(!0)+"-init"),e=f.closest("li.moved"),o=e.parent();t.data("index",t.data("index")-1);i.rtl?(u.css({right:-(100*t.data("index"))+"%"}),u.find(">.name").css({right:100*t.data("index")+"%"})):(u.css({left:-(100*t.data("index"))+"%"}),u.find(">.name").css({left:100*t.data("index")+"%"}));t.data("index")===0?t.css("height",""):t.css("height",o.outerHeight(!0)+t.data("height"));setTimeout(function(){e.removeClass("moved")},300)});r(this.scope).find(".dropdown a").focus(function(){n(this).parents(".has-dropdown").addClass("hover")}).blur(function(){n(this).parents(".has-dropdown").removeClass("hover")})},resize:function(){var n=this;n.S("["+this.attr_name()+"]").each(function(){var t=n.S(this),e=t.data(n.attr_name(!0)+"-init"),r=t.parent("."+n.settings.sticky_class),u,f;n.breakpoint()||(f=t.hasClass("expanded"),t.css("height","").removeClass("expanded").find("li").removeClass("hover"),f&&n.toggle(t));n.is_sticky(t,r,e)&&(r.hasClass("fixed")?(r.removeClass("fixed"),u=r.offset().top,n.S(i.body).hasClass("f-topbar-fixed")&&(u-=t.data("height")),t.data("stickyoffset",u),r.addClass("fixed")):(u=r.offset().top,t.data("stickyoffset",u)))})},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(t){var i=this,r=t.data(this.attr_name(!0)+"-init"),u=i.S("section, .top-bar-section",t);u.detach();i.S(".has-dropdown>a",u).each(function(){var t=i.S(this),f=t.siblings(".dropdown"),e=t.attr("href"),u;f.find(".title.back").length||(u=r.mobile_show_parent_link==!0&&e?n('<li class="title back js-generated"><h5><a href="javascript:void(0)"><\/a><\/h5><\/li><li class="parent-link hide-for-large-up"><a class="parent-link js-generated" href="'+e+'">'+t.html()+"<\/a><\/li>"):n('<li class="title back js-generated"><h5><a href="javascript:void(0)"><\/a><\/h5>'),r.custom_back_text==!0?n("h5>a",u).html(r.back_text):n("h5>a",u).html("&laquo; "+t.html()),f.prepend(u))});u.appendTo(t);this.sticky();this.assembled(t)},assembled:function(t){t.data(this.attr_name(!0),n.extend({},t.data(this.attr_name(!0)),{assembled:!0}))},height:function(t){var i=0,r=this;return n("> li",t).each(function(){i+=r.S(this).outerHeight(!0)}),i},sticky:function(){var n=this;this.S(t).on("scroll",function(){n.update_sticky_positioning()})},update_sticky_positioning:function(){var i="."+this.settings.sticky_class,u=this.S(t),n=this,r;n.settings.sticky_topbar&&n.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)&&(r=this.settings.sticky_topbar.data("stickyoffset"),n.S(i).hasClass("expanded")||(u.scrollTop()>r?n.S(i).hasClass("fixed")||(n.S(i).addClass("fixed"),n.S("body").addClass("f-topbar-fixed")):u.scrollTop()<=r&&n.S(i).hasClass("fixed")&&(n.S(i).removeClass("fixed"),n.S("body").removeClass("f-topbar-fixed"))))},off:function(){this.S(this.scope).off(".fndtn.topbar");this.S(t).off(".fndtn.topbar")},reflow:function(){}}}(jQuery,window,window.document),function(n,t,i,r){"use strict";Foundation.libs.tab={name:"tab",version:"5.5.1",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0,is_hover:!1},default_tab_hashes:[],init:function(n,i,r){var u=this,f=this.S;this.bindings(i,r);u.entry_location=t.location.href;this.handle_location_hash_change();f("["+this.attr_name()+"] > .active > a",this.scope).each(function(){u.default_tab_hashes.push(this.hash)})},events:function(){var n=this,i=this.S,r=function(t){var r=i(this).closest("["+n.attr_name()+"]").data(n.attr_name(!0)+"-init");(!r.is_hover||Modernizr.touch)&&(t.preventDefault(),t.stopPropagation(),n.toggle_active_tab(i(this).parent()))};i(this.scope).off(".tab").on("focus.fndtn.tab","["+this.attr_name()+"] > * > a",r).on("click.fndtn.tab","["+this.attr_name()+"] > * > a",r).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",function(){var t=i(this).closest("["+n.attr_name()+"]").data(n.attr_name(!0)+"-init");t.is_hover&&n.toggle_active_tab(i(this).parent())});i(t).on("hashchange.fndtn.tab",function(t){t.preventDefault();n.handle_location_hash_change()})},handle_location_hash_change:function(){var t=this,i=this.S;i("["+this.attr_name()+"]",this.scope).each(function(){var s=i(this).data(t.attr_name(!0)+"-init"),u,f,o,e;if(s.deep_linking)if(u=s.scroll_to_content?t.scope.location.hash:t.scope.location.hash.replace("fndtn-",""),u!="")f=i(u),f.hasClass("content")&&f.parent().hasClass("tabs-content")?t.toggle_active_tab(n("["+t.attr_name()+"] > * > a[href="+u+"]").parent()):(o=f.closest(".content").attr("id"),o!=r&&t.toggle_active_tab(n("["+t.attr_name()+"] > * > a[href=#"+o+"]").parent(),u));else for(e=0;e<t.default_tab_hashes.length;e++)t.toggle_active_tab(n("["+t.attr_name()+"] > * > a[href="+t.default_tab_hashes[e]+"]").parent())})},toggle_active_tab:function(u,f){var c=this,s=c.S,a=u.closest("["+this.attr_name()+"]"),v=u.find("a"),p=u.children("a").first(),o="#"+p.attr("href").split("#")[1],h=s(o),y=u.siblings(),e=a.data(this.attr_name(!0)+"-init"),w=function(t){var u=n(this),f=n(this).parents("li").prev().children('[role="tab"]'),e=n(this).parents("li").next().children('[role="tab"]'),r;switch(t.keyCode){case 37:r=f;break;case 39:r=e;break;default:r=!1}r.length&&(u.attr({tabindex:"-1","aria-selected":null}),r.attr({tabindex:"0","aria-selected":!0}).focus());n('[role="tabpanel"]').attr("aria-hidden","true");n("#"+n(i.activeElement).attr("href").substring(1)).attr("aria-hidden",null)},l=function(n){var i=t.location.href===c.entry_location,r=e.scroll_to_content?c.default_tab_hashes[0]:i?t.location.hash:"fndtn-"+c.default_tab_hashes[0].replace("#","");i&&n===r||(t.location.hash=n)};s(this).data(this.data_attr("tab-content"))&&(o="#"+s(this).data(this.data_attr("tab-content")).split("#")[1],h=s(o));e.deep_linking&&(e.scroll_to_content?(l(f||o),f==r||f==o?u.parent()[0].scrollIntoView():s(o)[0].scrollIntoView()):f!=r?l("fndtn-"+f.replace("#","")):l("fndtn-"+o.replace("#","")));u.addClass(e.active_class).triggerHandler("opened");v.attr({"aria-selected":"true",tabindex:0});y.removeClass(e.active_class);y.find("a").attr({"aria-selected":"false",tabindex:-1});h.siblings().removeClass(e.active_class).attr({"aria-hidden":"true",tabindex:-1});h.addClass(e.active_class).attr("aria-hidden","false").removeAttr("tabindex");e.callback(u);h.triggerHandler("toggled",[u]);a.triggerHandler("toggled",[h]);v.off("keydown").on("keydown",w)},data_attr:function(n){return this.namespace.length>0?this.namespace+"-"+n:n},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(n,t,i){"use strict";Foundation.libs.abide={name:"abide",version:"5.5.1",settings:{live_validate:!0,validate_on_blur:!0,focus_on_invalid:!0,error_labels:!0,error_class:"error",timeout:1e3,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(n){var t=i.getElementById(n.getAttribute(this.add_namespace("data-equalto"))).value,r=n.value;return t===r}}},timer:null,init:function(n,t,i){this.bindings(t,i)},events:function(t){var i=this,u=i.S(t).attr("novalidate","novalidate"),r=u.data(this.attr_name(!0)+"-init")||{};this.invalid_attr=this.add_namespace("data-invalid");u.off(".abide").on("submit.fndtn.abide validate.fndtn.abide",function(n){var t=/ajax/i.test(i.S(this).attr(i.attr_name()));return i.validate(i.S(this).find("input, textarea, select").get(),n,t)}).on("reset",function(){return i.reset(n(this))}).find("input, textarea, select").off(".abide").on("blur.fndtn.abide change.fndtn.abide",function(n){r.validate_on_blur===!0&&i.validate([this],n)}).on("keydown.fndtn.abide",function(n){r.live_validate===!0&&n.which!=9&&(clearTimeout(i.timer),i.timer=setTimeout(function(){i.validate([this],n)}.bind(this),r.timeout))})},reset:function(t){t.removeAttr(this.invalid_attr);n(this.invalid_attr,t).removeAttr(this.invalid_attr);n("."+this.settings.error_class,t).not("small").removeClass(this.settings.error_class)},validate:function(n,t,i){for(var f=this.parse_patterns(n),o=f.length,u=this.S(n[0]).closest("form"),e=/submit/.test(t.type),r=0;r<o;r++)if(!f[r]&&(e||i))return this.settings.focus_on_invalid&&n[r].focus(),u.trigger("invalid").trigger("invalid.fndtn.abide"),this.S(n[r]).closest("form").attr(this.invalid_attr,""),!1;return((e||i)&&u.trigger("valid").trigger("valid.fndtn.abide"),u.removeAttr(this.invalid_attr),i)?!1:!0},parse_patterns:function(n){for(var t=n.length,i=[];t--;)i.push(this.pattern(n[t]));return this.check_validation_and_apply_styles(i)},pattern:function(n){var r=n.getAttribute("type"),i=typeof n.getAttribute("required")=="string",t=n.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(t)&&t.length>0?[n,this.settings.patterns[t],i]:t.length>0?[n,new RegExp(t),i]:this.settings.patterns.hasOwnProperty(r)?[n,this.settings.patterns[r],i]:(t=/.*/,[n,t,i])},check_validation_and_apply_styles:function(t){for(var e=t.length,a=[],y=this.S(t[0][0]).closest("[data-"+this.attr_name(!0)+"]"),d=y.data(this.attr_name(!0)+"-init")||{},s,h;e--;){var i=t[e][0],u=t[e][2],p=i.value.trim(),c=this.S(i).parent(),l=i.getAttribute(this.add_namespace("data-abide-validator")),w=i.type==="radio",b=i.type==="checkbox",o=this.S('label[for="'+i.getAttribute("id")+'"]'),k=u?i.value.length>0:!0,r=[],f,v;i.getAttribute(this.add_namespace("data-equalto"))&&(l="equalTo");f=c.is("label")?c.parent():c;l&&(v=this.settings.validators[l].apply(this,[i,u,f]),r.push(v));w&&u?r.push(this.valid_radio(i,u)):b&&u?r.push(this.valid_checkbox(i,u)):(t[e][1].test(p)&&k||!u&&i.value.length<1||n(i).attr("disabled")?r.push(!0):r.push(!1),r=[r.every(function(n){return n})],r[0]?(this.S(i).removeAttr(this.invalid_attr),i.setAttribute("aria-invalid","false"),i.removeAttribute("aria-describedby"),f.removeClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),n(i).triggerHandler("valid")):(this.S(i).attr(this.invalid_attr,""),i.setAttribute("aria-invalid","true"),s=f.find("small."+this.settings.error_class,"span."+this.settings.error_class),h=s.length>0?s[0].id:"",h.length>0&&i.setAttribute("aria-describedby",h),f.addClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),n(i).triggerHandler("invalid")));a.push(r[0])}return[a.every(function(n){return n})]},valid_checkbox:function(n,t){var n=this.S(n),i=n.is(":checked")||!t||n.get(0).getAttribute("disabled");return i?n.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class):n.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),i},valid_radio:function(n){for(var e=n.getAttribute("name"),i=this.S(n).closest("[data-"+this.attr_name(!0)+"]").find("[name='"+e+"']"),u=i.length,r=!1,f=!1,t=0;t<u;t++)i[t].getAttribute("disabled")?(f=!0,r=!0):i[t].checked?r=!0:f&&(r=!1);for(t=0;t<u;t++)r?this.S(i[t]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class):this.S(i[t]).attr(this.invalid_attr,"").parent().addClass(this.settings.error_class);return r},valid_equal:function(n,t,r){var f=i.getElementById(n.getAttribute(this.add_namespace("data-equalto"))).value,e=n.value,u=f===e;return u?(this.S(n).removeAttr(this.invalid_attr),r.removeClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.removeClass(this.settings.error_class)):(this.S(n).attr(this.invalid_attr,""),r.addClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.addClass(this.settings.error_class)),u},valid_oneof:function(n,t,i,r){var n=this.S(n),f=this.S("["+this.add_namespace("data-oneof")+"]"),e=f.filter(":checked").length>0,u;return e?n.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class):n.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),r||(u=this,f.each(function(){u.valid_oneof.call(u,this,null,null,!0)})),e}}}(jQuery,window,window.document),function(n,t){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.5.1",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,show_on:"all",tip_template:function(n,t){return'<span data-selector="'+n+'" id="'+n+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+t+'<span class="nub"><\/span><\/span>'}},cache:{},init:function(n,t,i){Foundation.inherit(this,"random_str");this.bindings(t,i)},should_show:function(t){var i=n.extend({},this.settings,this.data_options(t));return i.show_on==="all"?!0:this.small()&&i.show_on==="small"||this.medium()&&i.show_on==="medium"||this.large()&&i.show_on==="large"?!0:!1},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},events:function(t){var i=this,r=i.S;i.create(this.S(t));n(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",function(t){var u=r(this),f=n.extend({},i.settings,i.data_options(u)),e=!1;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type)&&r(t.target).is("a")||/mouse/i.test(t.type)&&i.ie_touch(t))return!1;if(u.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type)&&t.preventDefault(),i.hide(u);else{if(f.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type))return;!f.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(t.type)&&(t.preventDefault(),r(f.tooltip_class+".open").hide(),e=!0);/enter|over/i.test(t.type)?this.timer=setTimeout(function(){var n=i.showTip(u)}.bind(this),i.settings.hover_delay):t.type==="mouseout"||t.type==="mouseleave"?(clearTimeout(this.timer),i.hide(u)):i.showTip(u)}}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",function(t){if(/mouse/i.test(t.type)&&i.ie_touch(t))return!1;(n(this).data("tooltip-open-event-type")!="touch"||t.type!="mouseleave")&&(n(this).data("tooltip-open-event-type")=="mouse"&&/MSPointerDown|touchstart/i.test(t.type)?i.convert_to_touch(n(this)):i.hide(n(this)))}).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",function(){i.hide(r(this))})},ie_touch:function(){return!1},showTip:function(n){var t=this.getTip(n);if(this.should_show(n,t))return this.show(n)},getTip:function(t){var r=this.selector(t),u=n.extend({},this.settings,this.data_options(t)),i=null;return r&&(i=this.S('span[data-selector="'+r+'"]'+u.tooltip_class)),typeof i=="object"?i:!1},selector:function(n){var t=n.attr("id"),i=n.attr(this.attr_name())||n.attr("data-selector");return(t&&t.length<1||!t)&&typeof i!="string"&&(i=this.random_str(6),n.attr("data-selector",i).attr("aria-describedby",i)),t&&t.length>0?t:i},create:function(i){var o=this,r=n.extend({},this.settings,this.data_options(i)),f=this.settings.tip_template,u,e;if(typeof r.tip_template=="string"&&t.hasOwnProperty(r.tip_template)&&(f=t[r.tip_template]),u=n(f(this.selector(i),n("<div><\/div>").html(i.attr("title")).html())),e=this.inheritable_classes(i),u.addClass(e).appendTo(r.append_to),Modernizr.touch){u.append('<span class="tap-to-close">'+r.touch_close_text+"<\/span>");u.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",function(){o.hide(i)})}i.removeAttr("title").attr("title","")},reposition:function(t,i,r){var s,u,e,h,f,o;i.css("visibility","hidden").show();s=t.data("width");u=i.children(".nub");e=u.outerHeight();h=u.outerHeight();this.small()?i.css({width:"100%"}):i.css({width:s?s:"auto"});f=function(n,t,i,r,u){return n.css({top:t?t:"auto",bottom:r?r:"auto",left:u?u:"auto",right:i?i:"auto"}).end()};f(i,t.offset().top+t.outerHeight()+10,"auto","auto",t.offset().left);this.small()?(f(i,t.offset().top+t.outerHeight()+10,"auto","auto",12.5,n(this.scope).width()),i.addClass("tip-override"),f(u,-e,"auto","auto",t.offset().left)):(o=t.offset().left,Foundation.rtl&&(u.addClass("rtl"),o=t.offset().left+t.outerWidth()-i.outerWidth()),f(i,t.offset().top+t.outerHeight()+10,"auto","auto",o),i.removeClass("tip-override"),r&&r.indexOf("tip-top")>-1?(Foundation.rtl&&u.addClass("rtl"),f(i,t.offset().top-i.outerHeight(),"auto","auto",o).removeClass("tip-override")):r&&r.indexOf("tip-left")>-1?(f(i,t.offset().top+t.outerHeight()/2-i.outerHeight()/2,"auto","auto",t.offset().left-i.outerWidth()-e).removeClass("tip-override"),u.removeClass("rtl")):r&&r.indexOf("tip-right")>-1&&(f(i,t.offset().top+t.outerHeight()/2-i.outerHeight()/2,"auto","auto",t.offset().left+t.outerWidth()+e).removeClass("tip-override"),u.removeClass("rtl")));i.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},inheritable_classes:function(t){var r=n.extend({},this.settings,this.data_options(t)),u=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(r.additional_inheritable_classes),i=t.attr("class"),f=i?n.map(i.split(" "),function(t){if(n.inArray(t,u)!==-1)return t}).join(" "):"";return n.trim(f)},convert_to_touch:function(t){var i=this,r=i.getTip(t),u=n.extend({},i.settings,i.data_options(t));if(r.find(".tap-to-close").length===0){r.append('<span class="tap-to-close">'+u.touch_close_text+"<\/span>");r.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",function(){i.hide(t)})}t.data("tooltip-open-event-type","touch")},show:function(n){var t=this.getTip(n);n.data("tooltip-open-event-type")=="touch"&&this.convert_to_touch(n);this.reposition(n,t,n.attr("class"));n.addClass("open");t.fadeIn(150)},hide:function(n){var t=this.getTip(n);t.fadeOut(150,function(){t.find(".tap-to-close").remove();t.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose");n.removeClass("open")})},off:function(){var t=this;this.S(this.scope).off(".fndtn.tooltip");this.S(this.settings.tooltip_class).each(function(i){n("["+t.attr_name()+"]").eq(i).attr("title",n(this).text())}).remove()},reflow:function(){}}}(jQuery,window,window.document),function(n,t,i,r){"use strict";var u=u||!1;Foundation.libs.joyride={name:"joyride",version:"5.5.3",defaults:{expose:!1,modal:!0,keyboard:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,prev_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",abort_on_close:!0,tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">&times;<\/a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"><\/span><\/div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"><\/span><\/div>',wrapper:'<div class="joyride-content-wrapper"><\/div>',button:'<a href="#" class="small button joyride-next-tip"><\/a>',prev_button:'<a href="#" class="small button joyride-prev-tip"><\/a>',modal:'<div class="joyride-modal-bg"><\/div>',expose:'<div class="joyride-expose-wrapper"><\/div>',expose_cover:'<div class="joyride-expose-cover"><\/div>'},expose_add_class:""},init:function(t,i,r){Foundation.inherit(this,"throttle random_str");this.settings=this.settings||n.extend({},this.defaults,r||i);this.bindings(i,r)},go_next:function(){this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())},go_prev:function(){this.settings.$li.prev().length<1||(this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(null,!0),this.startTimer()):(this.hide(),this.show(null,!0)))},events:function(){var i=this;n(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(n){n.preventDefault();this.go_next()}.bind(this)).on("click.fndtn.joyride",".joyride-prev-tip",function(n){n.preventDefault();this.go_prev()}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(n){n.preventDefault();this.end(this.settings.abort_on_close)}.bind(this)).on("keyup.fndtn.joyride",function(n){if(this.settings.keyboard&&this.settings.riding)switch(n.which){case 39:n.preventDefault();this.go_next();break;case 37:n.preventDefault();this.go_prev();break;case 27:n.preventDefault();this.end(this.settings.abort_on_close)}}.bind(this));n(t).off(".joyride").on("resize.fndtn.joyride",i.throttle(function(){if(n("["+i.attr_name()+"]").length>0&&i.settings.$next_tip&&i.settings.riding){if(i.settings.exposed.length>0){var t=n(i.settings.exposed);t.each(function(){var t=n(this);i.un_expose(t);i.expose(t)})}i.is_phone()?i.pos_phone():i.pos_default(!1)}},100))},start:function(){var t=this,i=n("["+this.attr_name()+"]",this.scope),r=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],u=r.length;!i.length>0||(this.settings.init||this.events(),this.settings=i.data(this.attr_name(!0)+"-init"),this.settings.$content_el=i,this.settings.$body=n(this.settings.tip_container),this.settings.body_offset=n(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.riding=!0,typeof n.cookie!="function"&&(this.settings.cookie_monster=!1),this.settings.cookie_monster&&(!this.settings.cookie_monster||n.cookie(this.settings.cookie_name))||(this.settings.$tip_content.each(function(i){var e=n(this),f;for(this.settings=n.extend({},t.defaults,t.data_options(e)),f=u;f--;)t.settings[r[f]]=parseInt(t.settings[r[f]],10);t.create({$li:e,index:i})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li();this.show()},tip_template:function(t){var i,r;return t.tip_class=t.tip_class||"",i=n(this.settings.template.tip).addClass(t.tip_class),r=n.trim(n(t.li).html())+this.prev_button_text(t.prev_button_text,t.index)+this.button_text(t.button_text)+this.settings.template.link+this.timer_instance(t.index),i.append(n(this.settings.template.wrapper)),i.first().attr(this.add_namespace("data-index"),t.index),n(".joyride-content-wrapper",i).append(r),i[0]},timer_instance:function(t){return t===0&&this.settings.start_timer_on_click&&this.settings.timer>0||this.settings.timer===0?"":n(this.settings.template.timer)[0].outerHTML},button_text:function(t){return this.settings.tip_settings.next_button?(t=n.trim(t)||"Next",t=n(this.settings.template.button).append(t)[0].outerHTML):t="",t},prev_button_text:function(t,i){return this.settings.tip_settings.prev_button?(t=n.trim(t)||"Previous",t=i==0?n(this.settings.template.prev_button).append(t).addClass("disabled")[0].outerHTML:n(this.settings.template.prev_button).append(t)[0].outerHTML):t="",t},create:function(t){this.settings.tip_settings=n.extend({},this.settings,this.data_options(t.$li));var i=t.$li.attr(this.add_namespace("data-button"))||t.$li.attr(this.add_namespace("data-text")),r=t.$li.attr(this.add_namespace("data-button-prev"))||t.$li.attr(this.add_namespace("data-prev-text")),u=t.$li.attr("class"),f=n(this.tip_template({tip_class:u,index:t.index,button_text:i,prev_button_text:r,li:t.$li}));n(this.settings.tip_container).append(f)},show:function(t,i){var u=null,f;this.settings.$li===r||n.inArray(this.settings.$li.index(),this.settings.pause_after)===-1?(this.settings.paused?this.settings.paused=!1:this.set_li(t,i),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0?(t&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=n.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],/body/i.test(this.settings.$target.selector)||this.settings.expose||(f=n(".joyride-modal-bg"),/pop/i.test(this.settings.tipAnimation)?f.hide():f.fadeOut(this.settings.tipAnimationFadeSpeed),this.scroll_to()),this.is_phone()?this.pos_phone(!0):this.pos_default(!0),u=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?(u.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){u.animate({width:u.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&(u.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){u.animate({width:u.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip):this.settings.$li&&this.settings.$target.length<1?this.show(t,i):this.end()):this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose();this.settings.modal||n(".joyride-modal-bg").hide();this.settings.$current_tip.css("visibility","hidden");setTimeout(n.proxy(function(){this.hide();this.css("visibility","visible")},this.settings.$current_tip),0);this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(n,t){n?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(this.settings.$li=t?this.settings.$li.prev():this.settings.$li.next(),this.set_next_tip());this.set_target()},set_next_tip:function(){this.settings.$next_tip=n(".joyride-tip-guide").eq(this.settings.$li.index());this.settings.$next_tip.data("closed","")},set_target:function(){var t=this.settings.$li.attr(this.add_namespace("data-class")),r=this.settings.$li.attr(this.add_namespace("data-id")),u=function(){return r?n(i.getElementById(r)):t?n("."+t).first():n("body")};this.settings.$target=u()},scroll_to:function(){var r,i;r=n(t).height()/2;i=Math.ceil(this.settings.$target.offset().top-r+this.settings.$next_tip.outerHeight());i!=0&&n("html, body").stop().animate({scrollTop:i},this.settings.scroll_speed,"swing")},paused:function(){return n.inArray(this.settings.$li.index()+1,this.settings.pause_after)===-1},restart:function(){this.hide();this.settings.$li=r;this.show("init")},pos_default:function(n){var t=this.settings.$next_tip.find(".joyride-nub"),f=Math.ceil(t.outerWidth()/2),u=Math.ceil(t.outerHeight()/2),e=n||!1,i,r;e&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show());/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(t):(i=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,r=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0,this.bottom()?(this.rtl?this.settings.$next_tip.css({top:this.settings.$target.offset().top+u+this.settings.$target.outerHeight()+i,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()+r}):this.settings.$next_tip.css({top:this.settings.$target.offset().top+u+this.settings.$target.outerHeight()+i,left:this.settings.$target.offset().left+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"top")):this.top()?(this.rtl?this.settings.$next_tip.css({top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-u+i,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}):this.settings.$next_tip.css({top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-u+i,left:this.settings.$target.offset().left+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top+i,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+f+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top+i,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-f+r}),this.nub_position(t,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&(t.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default()));e&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(t){var f=this.settings.$next_tip.outerHeight(),o=this.settings.$next_tip.offset(),e=this.settings.$target.outerHeight(),i=n(".joyride-nub",this.settings.$next_tip),r=Math.ceil(i.outerHeight()/2),u=t||!1;i.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left");u&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show());/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(i):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-f-r}),i.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+e+r}),i.addClass("top"));u&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(n){this.center();n.hide();this.show_modal()},show_modal:function(){var t;this.settings.$next_tip.data("closed")||(t=n(".joyride-modal-bg"),t.length<1&&(t=n(this.settings.template.modal),t.appendTo("body")),/pop/i.test(this.settings.tip_animation)?t.show():t.fadeIn(this.settings.tip_animation_fade_speed))},expose:function(){var r,u,i,f,e,o="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof n)i=arguments[0];else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector))i=this.settings.$target;else return!1;if(i.length<1)return t.console&&console.error("element not valid",i),!1;r=n(this.settings.template.expose);this.settings.$body.append(r);r.css({top:i.offset().top,left:i.offset().left,width:i.outerWidth(!0),height:i.outerHeight(!0)});u=n(this.settings.template.expose_cover);f={zIndex:i.css("z-index"),position:i.css("position")};e=i.attr("class")==null?"":i.attr("class");i.css("z-index",parseInt(r.css("z-index"))+1);f.position=="static"&&i.css("position","relative");i.data("expose-css",f);i.data("orig-class",e);i.attr("class",e+" "+this.settings.expose_add_class);u.css({top:i.offset().top,left:i.offset().left,width:i.outerWidth(!0),height:i.outerHeight(!0)});this.settings.modal&&this.show_modal();this.settings.$body.append(u);r.addClass(o);u.addClass(o);i.data("expose",o);this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,i);this.add_exposed(i)},un_expose:function(){var u,i,f,r,e,o=!1;if(arguments.length>0&&arguments[0]instanceof n)i=arguments[0];else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector))i=this.settings.$target;else return!1;if(i.length<1)return t.console&&console.error("element not valid",i),!1;u=i.data("expose");f=n("."+u);arguments.length>1&&(o=arguments[1]);o===!0?n(".joyride-expose-wrapper,.joyride-expose-cover").remove():f.remove();r=i.data("expose-css");r.zIndex=="auto"?i.css("z-index",""):i.css("z-index",r.zIndex);r.position!=i.css("position")&&(r.position=="static"?i.css("position",""):i.css("position",r.position));e=i.data("orig-class");i.attr("class",e);i.removeData("orig-classes");i.removeData("expose");i.removeData("expose-z-index");this.remove_exposed(i)},add_exposed:function(t){this.settings.exposed=this.settings.exposed||[];t instanceof n||typeof t=="object"?this.settings.exposed.push(t[0]):typeof t=="string"&&this.settings.exposed.push(t)},remove_exposed:function(t){var r,i;for(t instanceof n?r=t[0]:typeof t=="string"&&(r=t),this.settings.exposed=this.settings.exposed||[],i=this.settings.exposed.length;i--;)if(this.settings.exposed[i]==r){this.settings.exposed.splice(i,1);return}},center:function(){var i=n(t);return this.settings.$next_tip.css({top:(i.height()-this.settings.$next_tip.outerHeight())/2+i.scrollTop(),left:(i.width()-this.settings.$next_tip.outerWidth())/2+i.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(i){if(i.length===0)return[!1,!1,!1,!1];var r=n(t),s=r.height()/2,u=Math.ceil(this.settings.$target.offset().top-s+this.settings.$next_tip.outerHeight()),h=r.width()+r.scrollLeft(),o=r.height()+u,f=r.height()+r.scrollTop(),e=r.scrollTop();return u<e&&(e=u<0?0:u),o>f&&(f=o),[i.offset().top<e,h<i.offset().left+i.outerWidth(),f<i.offset().top+i.outerHeight(),r.scrollLeft()>i.offset().left]},visible:function(n){for(var t=n.length;t--;)if(n[t])return!1;return!0},nub_position:function(n,t,i){t==="auto"?n.addClass(i):n.addClass(t)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide();this.show();this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(t){this.settings.cookie_monster&&n.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain});this.settings.timer>0&&clearTimeout(this.settings.automate);this.settings.modal&&this.settings.expose&&this.un_expose();n(this.scope).off("keyup.joyride");this.settings.$next_tip.data("closed",!0);this.settings.riding=!1;n(".joyride-modal-bg").hide();this.settings.$current_tip.hide();(typeof t=="undefined"||t===!1)&&(this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip));n(".joyride-tip-guide").remove()},off:function(){n(this.scope).off(".joyride");n(t).off(".joyride");n(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride");n(".joyride-tip-guide, .joyride-modal-bg").remove();clearTimeout(this.settings.automate)},reflow:function(){}}}(jQuery,window,window.document),function(n,t){function o(n){return!!(""===n||n&&n.charCodeAt&&n.substr)}function u(n){return v?v(n):"[object Array]"===y.call(n)}function s(n){return"[object Object]"===y.call(n)}function h(n,t){var i,n=n||{},t=t||{};for(i in t)t.hasOwnProperty(i)&&null==n[i]&&(n[i]=t[i]);return n}function r(n,t,i){var u=[],r,f;if(!n)return u;if(a&&n.map===a)return n.map(t,i);for(r=0,f=n.length;r<f;r++)u[r]=t.call(i,n[r],r,n);return u}function f(n,t){return n=Math.round(Math.abs(n)),isNaN(n)?t:n}function l(n){var t=i.settings.currency.format;return"function"==typeof n&&(n=n()),o(n)&&n.match("%v")?{pos:n,neg:n.replace("-","").replace("%v","-%v"),zero:n}:!n||!n.pos||!n.pos.match("%v")?o(t)?i.settings.currency.format={pos:t,neg:t.replace("%v","-%v"),zero:t}:t:n}var i={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},a=Array.prototype.map,v=Array.isArray,y=Object.prototype.toString,e=i.unformat=i.parse=function(n,t){if(u(n))return r(n,function(n){return e(n,t)});if(n=n||0,"number"==typeof n)return n;var t=t||".",i=RegExp("[^0-9-"+t+"]",["g"]),i=parseFloat((""+n).replace(/\((.*)\)/,"-$1").replace(i,"").replace(t,"."));return isNaN(i)?0:i},p=i.toFixed=function(n,t){var t=f(t,i.settings.number.precision),r=Math.pow(10,t);return(Math.round(i.unformat(n)*r)/r).toFixed(t)},c=i.formatNumber=i.format=function(n,t,o,l){if(u(n))return r(n,function(n){return c(n,t,o,l)});var n=e(n),a=h(s(t)?t:{precision:t,thousand:o,decimal:l},i.settings.number),y=f(a.precision),b=0>n?"-":"",v=parseInt(p(Math.abs(n||0),y),10)+"",w=3<v.length?v.length%3:0;return b+(w?v.substr(0,w)+a.thousand:"")+v.substr(w).replace(/(\d{3})(?=\d)/g,"$1"+a.thousand)+(y?a.decimal+p(Math.abs(n),y).split(".")[1]:"")},w=i.formatMoney=function(n,t,o,a,v,y){if(u(n))return r(n,function(n){return w(n,t,o,a,v,y)});var n=e(n),p=h(s(t)?t:{symbol:t,precision:o,thousand:a,decimal:v,format:y},i.settings.currency),b=l(p.format);return(0<n?b.pos:0>n?b.neg:b.zero).replace("%s",p.symbol).replace("%v",c(Math.abs(n),f(p.precision),p.thousand,p.decimal))};i.formatColumn=function(n,t,a,v,y,p){if(!n)return[];var w=h(s(t)?t:{symbol:t,precision:a,thousand:v,decimal:y,format:p},i.settings.currency),b=l(w.format),d=b.pos.indexOf("%s")<b.pos.indexOf("%v")?!0:!1,k=0,n=r(n,function(n){return u(n)?i.formatColumn(n,w):(n=e(n),n=(0<n?b.pos:0>n?b.neg:b.zero).replace("%s",w.symbol).replace("%v",c(Math.abs(n),f(w.precision),w.thousand,w.decimal)),n.length>k&&(k=n.length),n)});return r(n,function(n){return o(n)&&n.length<k?d?n.replace(w.symbol,w.symbol+Array(k-n.length+1).join(" ")):Array(k-n.length+1).join(" ")+n:n})};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=i),exports.accounting=i):"function"==typeof define&&define.amd?define([],function(){return i}):(i.noConflict=function(r){return function(){return n.accounting=r,i.noConflict=t,i}}(n.accounting),n.accounting=i)}(this);$(function(){function n(n){var i,r,t;try{i=n.selectionStart;r=n.selectionEnd}catch(u){}return(t=document.selection,t&&t.createRange().text.length!=0)?!0:!t&&n.value.substring(i,r).length!=0?!0:!1}$(".gn-form-buttons label").wrapInner("<div class='inner-fix form-control'><\/div>");var t=$(".gn-ehance");t.length>0&&$(".gn-ehance").prettyCheckable();$(".gn-password-textbox").after($('<div id="tooltip-requirements"><span>Requirements<\/span><ul><li>Must be 8 characters<\/li><li>No spaces<\/li><li>Must contain one letter<\/li><li>Must contain one number<\/li><li>No special characters: +@#$%^"&*()\\/<>\'<\/li><\/ul><\/div>'));$(".gn-password-textbox").focus(function(){var n=$(this),t=this.clientHeight+n.position().top,i=this.clientWidth+1+"px";$("#tooltip-requirements").css({display:"block",top:t})});$(".gn-password-textbox").focusout(function(){$("#tooltip-requirements").css("display","none")});$("input[type=text], input[type=password], input[type=number], input[type=tel],input[type=email], textarea").focus(function(){$(this).select()}).mouseup(function(n){n.preventDefault()}).mousedown(function(){if(n($(this)[0])){var t=window.getSelection?window.getSelection():document.selection;t&&(t.removeAllRanges?t.removeAllRanges():t.empty&&t.empty())}})}),function(n){Array.prototype.anyContains=function(n){for(var t=0;t<this.length;t++)if(n.toLocaleLowerCase().indexOf(this[t])>-1)return!0;return!1};n.fn.gnCookiePolicy=function(){var i=n.extend({cookiePolicyUrl:"/cookie-policy"}),t="GolfNow.Web.CookiePolicy",r=7776e6,u=GolfNow.Web.Cache.GetValue(t)||!1,f=GolfNow.Web.Domains.RequiresDomainCookiePolicy();if(!u&&f)return this.each(function(){var u=n(this);n(this).load(i.cookiePolicyUrl,null,function(){n(this).show("slow");n(this).find("a.agree").on("click",function(){GolfNow.Web.Cache.SetLocalStorageValue(t,!0,r);u.hide("fast")})})})}}(jQuery);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Currency=function(n,t){function i(n){var u=t.findWhere(r,{code:n}),i,f;return u===undefined?"$":(i="",f=u.font.split(","),t.forEach(f,function(n){i+=("000"+n.trim()).slice(-4)}),i.hexDecode())}var r=[{code:"AFN",font:"60b"},{code:"ARS",font:"24"},{code:"AWG",font:"192"},{code:"AUD",font:"24"},{code:"AZN",font:"43c, 430, 43d"},{code:"BSD",font:"24"},{code:"BBD",font:"24"},{code:"BYR",font:"70, 2e"},{code:"BZD",font:"42, 5a, 24"},{code:"BMD",font:"24"},{code:"BOB",font:"24, 62"},{code:"BAM",font:"4b, 4d"},{code:"BWP",font:"50"},{code:"BGN",font:"43b, 432"},{code:"BRL",font:"52, 24"},{code:"BND",font:"24"},{code:"KHR",font:"17db"},{code:"CAD",font:"24"},{code:"KYD",font:"24"},{code:"CLP",font:"24"},{code:"CNY",font:"a5"},{code:"COP",font:"24"},{code:"CRC",font:"20a1"},{code:"HRK",font:"6b, 6e"},{code:"CUP",font:"20b1"},{code:"CZK",font:"4b, 10d"},{code:"DKK",font:"6b, 72"},{code:"DOP",font:"52, 44, 24"},{code:"XCD",font:"24"},{code:"EGP",font:"a3"},{code:"SVC",font:"24"},{code:"EUR",font:"20ac"},{code:"FKP",font:"a3"},{code:"FJD",font:"24"},{code:"GHS",font:"a2"},{code:"GIP",font:"a3"},{code:"GTQ",font:"51"},{code:"GGP",font:"a3"},{code:"GYD",font:"24"},{code:"HNL",font:"4c"},{code:"HKD",font:"24"},{code:"HUF",font:"46, 74"},{code:"ISK",font:"6b, 72"},{code:"INR",font:""},{code:"IDR",font:"52, 70"},{code:"IRR",font:"fdfc"},{code:"IMP",font:"a3"},{code:"ILS",font:"20aa"},{code:"JMD",font:"4a, 24"},{code:"JPY",font:"a5"},{code:"JEP",font:"a3"},{code:"KZT",font:"43b, 432"},{code:"KPW",font:"20a9"},{code:"KRW",font:"20a9"},{code:"KGS",font:"43b, 432"},{code:"LAK",font:"20ad"},{code:"LBP",font:"a3"},{code:"LRD",font:"24"},{code:"MKD",font:"434, 435, 43d"},{code:"MYR",font:"52, 4d"},{code:"MUR",font:"20a8"},{code:"MXN",font:"24"},{code:"MNT",font:"20ae"},{code:"MZN",font:"4d, 54"},{code:"NAD",font:"24"},{code:"NPR",font:"20a8"},{code:"ANG",font:"192"},{code:"NZD",font:"24"},{code:"NIO",font:"43, 24"},{code:"NGN",font:"20a6"},{code:"KPW",font:"20a9"},{code:"NOK",font:"6b, 72"},{code:"OMR",font:"fdfc"},{code:"PKR",font:"20a8"},{code:"PAB",font:"42, 2f, 2e"},{code:"PYG",font:"47, 73"},{code:"PEN",font:"53, 2f, 2e"},{code:"PHP",font:"20b1"},{code:"PLN",font:"7a, 142"},{code:"QAR",font:"fdfc"},{code:"RON",font:"6c, 65, 69"},{code:"RUB",font:"440, 443, 431"},{code:"SHP",font:"a3"},{code:"SAR",font:"fdfc"},{code:"RSD",font:"414, 438, 43d, 2e"},{code:"SCR",font:"20a8"},{code:"SGD",font:"24"},{code:"SBD",font:"24"},{code:"SOS",font:"53"},{code:"ZAR",font:"52"},{code:"KRW",font:"20a9"},{code:"LKR",font:"20a8"},{code:"SEK",font:"6b, 72"},{code:"CHF",font:"43, 48, 46"},{code:"SRD",font:"24"},{code:"SYP",font:"a3"},{code:"TWD",font:"4e, 54, 24"},{code:"THB",font:"e3f"},{code:"TTD",font:"54, 54, 24"},{code:"TRY",font:""},{code:"TVD",font:"24"},{code:"UAH",font:"20b4"},{code:"GBP",font:"a3"},{code:"USD",font:"24"},{code:"UYU",font:"24, 55"},{code:"UZS",font:"43b, 432"},{code:"VEF",font:"42, 73"},{code:"VND",font:"20ab"},{code:"YER",font:"fdfc"},{code:"ZWD",font:"5a, 24"}];return{getSymbol:i}}(jQuery,_);String.prototype.hexEncode=function(){for(var t,i="",n=0;n<this.length;n++)t=this.charCodeAt(n).toString(16),i+=("000"+t).slice(-4);return i};String.prototype.hexDecode=function(){for(var t=this.match(/.{1,4}/g)||[],i="",n=0;n<t.length;n++)i+=String.fromCharCode(parseInt(t[n],16));return i},function(){"use strict";function t(n){return n.split("").reverse().join("")}function i(n,t){return n.substring(0,t.length)===t}function o(n,t){return n.slice(-1*t.length)===t}function r(n,t,i){if((n[t]||n[i])&&n[t]===n[i])throw new Error(t);}function f(n){return typeof n=="number"&&isFinite(n)}function s(n,t){var i=Math.pow(10,t);return(Math.round(n*i)/i).toFixed(t)}function h(n,i,r,u,e,o,h,c,l,a,v,y){var g=y,b,k,w,d="",p="";return(o&&(y=o(y)),!f(y))?!1:(n!==!1&&parseFloat(y.toFixed(n))===0&&(y=0),y<0&&(b=!0,y=Math.abs(y)),n!==!1&&(y=s(y,n)),y=y.toString(),y.indexOf(".")!==-1?(k=y.split("."),w=k[0],r&&(d=r+k[1])):w=y,i&&(w=t(w).match(/.{1,3}/g),w=t(w.join(t(i)))),b&&c&&(p+=c),u&&(p+=u),b&&l&&(p+=l),p+=w,p+=d,e&&(p+=e),a&&(p=a(p,g)),p)}function c(n,t,r,u,e,s,h,c,l,a,v,y){var b=y,w,p="";return(v&&(y=v(y)),!y||typeof y!="string")?!1:(c&&i(y,c)&&(y=y.replace(c,""),w=!0),u&&i(y,u)&&(y=y.replace(u,"")),l&&i(y,l)&&(y=y.replace(l,""),w=!0),e&&o(y,e)&&(y=y.slice(0,-1*e.length)),t&&(y=y.split(t).join("")),r&&(y=y.replace(r,".")),w&&(p+="-"),p+=y,p=p.replace(/[^0-9\.\-.]/g,""),p==="")?!1:(p=Number(p),h&&(p=h(p)),!f(p))?!1:p}function l(t){for(var i,f,u={},e=0;e<n.length;e+=1)if(i=n[e],f=t[i],f===undefined)u[i]=i!=="negative"||u.negativeBefore?i==="mark"&&u.thousand!=="."?".":!1:"-";else if(i==="decimals")if(f>=0&&f<8)u[i]=f;else throw new Error(i);else if(i==="encoder"||i==="decoder"||i==="edit"||i==="undo")if(typeof f=="function")u[i]=f;else throw new Error(i);else if(typeof f=="string")u[i]=f;else throw new Error(i);return r(u,"mark","thousand"),r(u,"prefix","negative"),r(u,"prefix","negativeBefore"),u}function e(t,i,r){for(var u=[],f=0;f<n.length;f+=1)u.push(t[n[f]]);return u.push(r),i.apply("",u)}function u(n){if(!(this instanceof u))return new u(n);typeof n=="object"&&(n=l(n),this.to=function(t){return e(n,h,t)},this.from=function(t){return e(n,c,t)})}var n=["decimals","thousand","mark","prefix","postfix","encoder","decoder","negativeBefore","negative","edit","undo"];window.wNumb=u}();!function(n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():window.noUiSlider=n()}(function(){"use strict";function v(n){return n.filter(function(n){return this[n]?!1:this[n]=!0},{})}function y(n,t){return Math.round(n/t)*t}function e(n){var i=n.getBoundingClientRect(),u=n.ownerDocument,r=u.documentElement,t=l();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(t.x=0),{top:i.top+t.y-r.clientTop,left:i.left+t.x-r.clientLeft}}function i(n){return"number"==typeof n&&!isNaN(n)&&isFinite(n)}function c(t,i,r){n(t,i);setTimeout(function(){u(t,i)},r)}function o(n){return Math.max(Math.min(n,100),0)}function r(n){return Array.isArray(n)?n:[n]}function p(n){var t=n.split(".");return t.length>1?t[1].length:0}function n(n,t){n.classList?n.classList.add(t):n.className+=" "+t}function u(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function w(n,t){return n.classList?n.classList.contains(t):new RegExp("\\b"+t+"\\b").test(n.className)}function l(){var n=void 0!==window.pageXOffset,t="CSS1Compat"===(document.compatMode||""),i=n?window.pageXOffset:t?document.documentElement.scrollLeft:document.body.scrollLeft,r=n?window.pageYOffset:t?document.documentElement.scrollTop:document.body.scrollTop;return{x:i,y:r}}function b(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function s(n,t){return 100/(t-n)}function h(n,t){return 100*t/(n[1]-n[0])}function k(n,t){return h(n,n[0]<0?t+Math.abs(n[0]):t-n[0])}function d(n,t){return t*(n[1]-n[0])/100+n[0]}function f(n,t){for(var i=1;n>=t[i];)i+=1;return i}function g(n,t,i){if(i>=n.slice(-1)[0])return 100;var e,o,u,h,r=f(i,n);return e=n[r-1],o=n[r],u=t[r-1],h=t[r],u+k([e,o],i)/s(u,h)}function nt(n,t,i){if(i>=100)return n.slice(-1)[0];var e,o,u,h,r=f(i,t);return e=n[r-1],o=n[r],u=t[r-1],h=t[r],d([e,o],(i-u)*s(u,h))}function tt(n,t,i,r){if(100===r)return r;var e,o,u=f(r,n);return i?(e=n[u-1],o=n[u],r-e>(o-e)/2?o:e):t[u-1]?n[u-1]+y(r-n[u-1],t[u-1]):r}function it(n,t,r){var u;if("number"==typeof t&&(t=[t]),"[object Array]"!==Object.prototype.toString.call(t))throw new Error("noUiSlider: 'range' contains invalid value.");if(u="min"===n?0:"max"===n?100:parseFloat(n),!i(u)||!i(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");r.xPct.push(u);r.xVal.push(t[0]);u?r.xSteps.push(isNaN(t[1])?!1:t[1]):isNaN(t[1])||(r.xSteps[0]=t[1])}function rt(n,t,i){return t?void(i.xSteps[n]=h([i.xVal[n],i.xVal[n+1]],t)/s(i.xPct[n],i.xPct[n+1])):!0}function t(n,t,i,r){this.xPct=[];this.xVal=[];this.xSteps=[r||!1];this.xNumSteps=[!1];this.snap=t;this.direction=i;var u,f=[];for(u in n)n.hasOwnProperty(u)&&f.push([n[u],u]);for(f.length&&"object"==typeof f[0][0]?f.sort(function(n,t){return n[0][0]-t[0][0]}):f.sort(function(n,t){return n[0]-t[0]}),u=0;u<f.length;u++)it(f[u][1],f[u][0],this);for(this.xNumSteps=this.xSteps.slice(0),u=0;u<this.xNumSteps.length;u++)rt(u,this.xNumSteps[u],this)}function ut(n,t){if(!i(t))throw new Error("noUiSlider: 'step' is not numeric.");n.singleStep=t}function ft(n,i){if("object"!=typeof i||Array.isArray(i))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===i.min||void 0===i.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(i.min===i.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");n.spectrum=new t(i,n.snap,n.dir,n.singleStep)}function et(n,t){if(t=r(t),!Array.isArray(t)||!t.length||t.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");n.handles=t.length;n.start=t}function ot(n,t){if(n.snap=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");}function st(n,t){if(n.animate=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");}function ht(n,t){if(n.animationDuration=t,"number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.");}function ct(n,t){if("lower"===t&&1===n.handles)n.connect=1;else if("upper"===t&&1===n.handles)n.connect=2;else if(t===!0&&2===n.handles)n.connect=3;else{if(t!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n.connect=0}}function lt(n,t){switch(t){case"horizontal":n.ort=0;break;case"vertical":n.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.");}}function at(n,t){if(!i(t))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==t&&(n.margin=n.spectrum.getMargin(t),!n.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.");}function vt(n,t){if(!i(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(n.limit=n.spectrum.getMargin(t),!n.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.");}function yt(n,t){switch(t){case"ltr":n.dir=0;break;case"rtl":n.dir=1;n.connect=[0,2,1,3][n.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.");}}function pt(n,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var u=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,f=t.indexOf("fixed")>=0,r=t.indexOf("snap")>=0,e=t.indexOf("hover")>=0;if(i&&!n.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");n.events={tap:u||r,drag:i,fixed:f,snap:r,hover:e}}function wt(n,t){var i;if(t!==!1)if(t===!0)for(n.tooltips=[],i=0;i<n.handles;i++)n.tooltips.push(!0);else{if(n.tooltips=r(t),n.tooltips.length!==n.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.tooltips.forEach(function(n){if("boolean"!=typeof n&&("object"!=typeof n||"function"!=typeof n.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.");})}}function bt(n,t){if(n.format=t,"function"==typeof t.to&&"function"==typeof t.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");}function kt(n,t){if(void 0!==t&&"string"!=typeof t&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");n.cssPrefix=t}function dt(n,t){if(void 0!==t&&"object"!=typeof t)throw new Error("noUiSlider: 'cssClasses' must be an object.");if("string"==typeof n.cssPrefix){n.cssClasses={};for(var i in t)t.hasOwnProperty(i)&&(n.cssClasses[i]=n.cssPrefix+t[i])}else n.cssClasses=t}function a(n){var i,t={margin:0,limit:0,animate:!0,animationDuration:300,format:ti},r;return i={step:{r:!1,t:ut},start:{r:!0,t:et},connect:{r:!0,t:ct},direction:{r:!0,t:yt},snap:{r:!1,t:ot},animate:{r:!1,t:st},animationDuration:{r:!1,t:ht},range:{r:!0,t:ft},orientation:{r:!1,t:lt},margin:{r:!1,t:at},limit:{r:!1,t:vt},behaviour:{r:!0,t:pt},format:{r:!1,t:bt},tooltips:{r:!1,t:wt},cssPrefix:{r:!1,t:kt},cssClasses:{r:!1,t:dt}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",stacking:"stacking",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"}},Object.keys(i).forEach(function(u){if(void 0===n[u]&&void 0===r[u]){if(i[u].r)throw new Error("noUiSlider: '"+u+"' is required.");return!0}i[u].t(t,void 0===n[u]?r[u]:n[u])}),t.pips=n.pips,t.style=t.ort?"top":"left",t}function gt(t,i,f){function yt(n,t,i){var r=n+t[0],u=n+t[1];return i?(0>r&&(u+=Math.abs(r)),u>100&&(r-=u-100),[o(r),o(u)]):[r,u]}function pt(n,t){n.preventDefault();var r,u,o=0===n.type.indexOf("touch"),e=0===n.type.indexOf("mouse"),f=0===n.type.indexOf("pointer"),i=n;return 0===n.type.indexOf("MSPointer")&&(f=!0),o&&(r=n.changedTouches[0].pageX,u=n.changedTouches[0].pageY),t=t||l(),(e||f)&&(r=n.clientX+t.x,u=n.clientY+t.y),i.pageOffset=t,i.points=[r,u],i.cursor=e||f,i}function wt(t,r){var u=document.createElement("div"),f=document.createElement("div"),e=[i.cssClasses.handleLower,i.cssClasses.handleUpper];return t&&e.reverse(),n(f,i.cssClasses.handle),n(f,e[r]),n(u,i.cssClasses.origin),u.appendChild(f),u}function bt(t,r,u){switch(t){case 1:n(r,i.cssClasses.connect);n(u[0],i.cssClasses.background);break;case 3:n(u[1],i.cssClasses.background);case 2:n(u[0],i.cssClasses.connect);case 0:n(r,i.cssClasses.background)}}function kt(n,t,i){for(var u=[],r=0;n>r;r+=1)u.push(i.appendChild(wt(t,r)));return u}function dt(t,r,u){n(u,i.cssClasses.target);0===t?n(u,i.cssClasses.ltr):n(u,i.cssClasses.rtl);0===r?n(u,i.cssClasses.horizontal):n(u,i.cssClasses.vertical);var f=document.createElement("div");return n(f,i.cssClasses.base),u.appendChild(f),f}function gt(n,t){if(!i.tooltips[t])return!1;var r=document.createElement("div");return r.className=i.cssClasses.tooltip,n.firstChild.appendChild(r)}function ni(){i.dir&&i.tooltips.reverse();var n=s.map(gt);i.dir&&(n.reverse(),i.tooltips.reverse());vt("update",function(t,r,u){n[r]&&(n[r].innerHTML=i.tooltips[r]===!0?t[r]:i.tooltips[r].to(u[r]))})}function ti(n,t,i){if("range"===n||"steps"===n)return h.xVal;if("count"===n){var r,u=100/(t-1),f=0;for(t=[];(r=f++*u)<=100;)t.push(r);n="positions"}return"positions"===n?t.map(function(n){return h.fromStepping(i?h.getStep(n):n)}):"values"===n?i?t.map(function(n){return h.fromStepping(h.getStep(h.toStepping(n)))}):t:void 0}function ii(n,t,i){function c(n,t){return(n+t).toFixed(7)/1}var l=h.direction,r={},f=h.xVal[0],e=h.xVal[h.xVal.length-1],o=!1,s=!1,u=0;return h.direction=0,i=v(i.slice().sort(function(n,t){return n-t})),i[0]!==f&&(i.unshift(f),o=!0),i[i.length-1]!==e&&(i.push(e),s=!0),i.forEach(function(f,e){var a,l,v,y,w,g,b,nt,k,tt,d=f,p=i[e+1];if("steps"===t&&(a=h.xNumSteps[e]),a||(a=p-d),d!==!1&&void 0!==p)for(l=d;p>=l;l=c(l,a)){for(y=h.toStepping(l),w=y-u,nt=w/n,k=Math.round(nt),tt=w/k,v=1;k>=v;v+=1)g=u+v*tt,r[g.toFixed(5)]=["x",0];b=i.indexOf(l)>-1?1:"steps"===t?2:0;!e&&o&&(b=0);l===p&&s||(r[y.toFixed(5)]=[l,b]);u=y}}),h.direction=l,r}function ri(t,r,u){function s(n,t){var r=t===i.cssClasses.value,u=r?v:y,f=r?l:a;return t+" "+u[i.ort]+" "+f[n]}function o(n,t,r){return'class="'+s(r[1],t)+'" style="'+i.style+": "+n+'%"'}function c(n,t){h.direction&&(n=100-n);t[1]=t[1]&&r?r(t[0],t[1]):t[1];e+="<div "+o(n,i.cssClasses.marker,t)+"><\/div>";t[1]&&(e+="<div "+o(n,i.cssClasses.value,t)+">"+u.to(t[0])+"<\/div>")}var f=document.createElement("div"),e="",l=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],a=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],v=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],y=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return n(f,i.cssClasses.pips),n(f,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(t).forEach(function(n){c(n,t[n])}),f.innerHTML=e,f}function lt(n){var t=n.mode,i=n.density||1,r=n.filter||!1,u=n.values||!1,f=n.stepped||!1,e=ti(t,u,f),o=ii(i,t,e),s=n.format||{to:Math.round};return y.appendChild(ri(o,r,s))}function et(){var n=g.getBoundingClientRect(),t="offset"+["Width","Height"][i.ort];return 0===i.ort?n.width||g[t]:n.height||g[t]}function k(n,t,u){for(var f=0;f<i.handles;f++)if(-1===d[f])return;void 0!==t&&1!==i.handles&&(t=Math.abs(t-i.dir));Object.keys(nt).forEach(function(i){var f=i.split(".")[0];n===f&&nt[i].forEach(function(n){n.call(ut,r(ct()),t,r(ot(Array.prototype.slice.call(ft))),u||!1,d)})})}function ot(n){return 1===n.length?n[0]:i.dir?n.reverse():n}function tt(n,t,r,u){var f=function(t){return y.hasAttribute("disabled")?!1:w(y,i.cssClasses.tap)?!1:(t=pt(t,u.pageOffset),n===it.start&&void 0!==t.buttons&&t.buttons>1?!1:u.hover&&t.buttons?!1:(t.calcPoint=t.points[i.ort],void r(t,u)))},e=[];return n.split(" ").forEach(function(n){t.addEventListener(n,f,!1);e.push([n,f])}),e}function ui(n,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===n.buttons&&0!==t.buttonsProperty)return st(n,t);var f,r,i=t.handles||s,u=!1,o=100*(n.calcPoint-t.start)/t.baseSize,e=i[0]===s[0]?0:1;if(f=yt(o,t.positions,i.length>1),u=rt(i[0],f[e],1===i.length),i.length>1){if(u=rt(i[1],f[e?0:1],!1)||u)for(r=0;r<t.handles.length;r++)k("slide",r)}else u&&k("slide",e)}function st(n,t){var f=g.querySelector("."+i.cssClasses.active),e=t.handles[0]===s[0]?0:1,r;null!==f&&u(f,i.cssClasses.active);n.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));r=document.documentElement;r.noUiListeners.forEach(function(n){r.removeEventListener(n[0],n[1])});u(y,i.cssClasses.drag);k("set",e);k("change",e);void 0!==t.handleNumber&&k("end",t.handleNumber)}function fi(n,t){"mouseout"===n.type&&"HTML"===n.target.nodeName&&null===n.relatedTarget&&st(n,t)}function ht(t,r){var u=document.documentElement,f;if(1===r.handles.length){if(r.handles[0].hasAttribute("disabled"))return!1;n(r.handles[0].children[0],i.cssClasses.active)}t.preventDefault();t.stopPropagation();var e=tt(it.move,u,ui,{start:t.calcPoint,baseSize:et(),pageOffset:t.pageOffset,handles:r.handles,handleNumber:r.handleNumber,buttonsProperty:t.buttons,positions:[d[0],d[s.length-1]]}),o=tt(it.end,u,st,{handles:r.handles,handleNumber:r.handleNumber}),h=tt("mouseout",u,fi,{handles:r.handles,handleNumber:r.handleNumber});(u.noUiListeners=e.concat(o,h),t.cursor)&&(document.body.style.cursor=getComputedStyle(t.target).cursor,s.length>1&&n(y,i.cssClasses.drag),f=function(){return!1},document.body.noUiListener=f,document.body.addEventListener("selectstart",f,!1));void 0!==r.handleNumber&&k("start",r.handleNumber)}function ei(n){var t,u,r=n.calcPoint,f=0;return n.stopPropagation(),s.forEach(function(n){f+=e(n)[i.style]}),t=f/2>r||1===s.length?0:1,s[t].hasAttribute("disabled")&&(t=t?0:1),r-=e(g)[i.style],u=100*r/et(),i.events.snap||c(y,i.cssClasses.tap,i.animationDuration),s[t].hasAttribute("disabled")?!1:(rt(s[t],u),k("slide",t,!0),k("set",t,!0),k("change",t,!0),void(i.events.snap&&ht(n,{handles:[s[t]]})))}function oi(n){var t=n.calcPoint-e(g)[i.style],r=h.getStep(100*t/et()),u=h.fromStepping(r);Object.keys(nt).forEach(function(n){"hover"===n.split(".")[0]&&nt[n].forEach(function(n){n.call(ut,u)})})}function si(t){if(t.fixed||s.forEach(function(n,t){tt(it.start,n.children[0],ht,{handles:[n],handleNumber:t})}),t.tap&&tt(it.start,g,ei,{handles:s}),t.hover&&tt(it.move,g,oi,{hover:!0}),t.drag){var r=[g.querySelector("."+i.cssClasses.connect)];n(r[0],i.cssClasses.draggable);t.fixed&&r.push(s[r[0]===s[0]?1:0].children[0]);r.forEach(function(n){tt(it.start,n,ht,{handles:s})})}}function rt(t,r,f){var e=t!==s[0]?1:0,c=d[0]+i.margin,l=d[1]-i.margin,a=d[0]+i.limit,v=d[1]-i.limit;return s.length>1&&(r=e?Math.max(r,c):Math.min(r,l)),f!==!1&&i.limit&&s.length>1&&(r=e?Math.min(r,a):Math.max(r,v)),r=h.getStep(r),r=o(r),r===d[e]?!1:(window.requestAnimationFrame?window.requestAnimationFrame(function(){t.style[i.style]=r+"%"}):t.style[i.style]=r+"%",t.previousSibling||(u(t,i.cssClasses.stacking),r>50&&n(t,i.cssClasses.stacking)),d[e]=r,ft[e]=h.fromStepping(r),k("update",e),!0)}function hi(n,t){var u,f,r;for(i.limit&&(n+=1),u=0;n>u;u+=1)f=u%2,r=t[f],null!==r&&r!==!1&&("number"==typeof r&&(r=String(r)),r=i.format.from(r),(r===!1||isNaN(r)||rt(s[f],h.toStepping(r),u===3-i.dir)===!1)&&k("update",f))}function at(n,t){var e,u,f=r(n);for(t=void 0===t?!0:!!t,i.dir&&i.handles>1&&f.reverse(),i.animate&&-1!==d[0]&&c(y,i.cssClasses.tap,i.animationDuration),e=s.length>1?3:1,1===f.length&&(e=1),hi(e,f),u=0;u<s.length;u++)null!==f[u]&&t&&k("set",u)}function ct(){for(var t=[],n=0;n<i.handles;n+=1)t[n]=i.format.to(ft[n]);return ot(t)}function ci(){for(var n in i.cssClasses)i.cssClasses.hasOwnProperty(n)&&u(y,i.cssClasses[n]);for(;y.firstChild;)y.removeChild(y.firstChild);delete y.noUiSlider}function li(){var n=d.map(function(n,t){var i=h.getApplicableStep(n),r=p(String(i[2])),u=ft[t],f=100===n?null:i[2],e=Number((u-i[2]).toFixed(r)),o=0===n?null:e>=i[1]?i[2]:i[0]||!1;return[o,f]});return ot(n)}function vt(n,t){nt[n]=nt[n]||[];nt[n].push(t);"update"===n.split(".")[0]&&s.forEach(function(n,t){k("update",t)})}function ai(n){var t=n&&n.split(".")[0],i=t&&n.substring(t.length);Object.keys(nt).forEach(function(n){var r=n.split(".")[0],u=n.substring(r.length);t&&t!==r||i&&i!==u||delete nt[n]})}function vi(n,t){var u=ct(),r=a({start:[0,0],margin:n.margin,limit:n.limit,step:void 0===n.step?i.singleStep:n.step,range:n.range,animate:n.animate,snap:void 0===n.snap?i.snap:n.snap});["margin","limit","range","animate"].forEach(function(t){void 0!==n[t]&&(i[t]=n[t])});r.spectrum.direction=h.direction;h=r.spectrum;d=[-1,-1];at(n.start||u,t)}var g,s,ut,it=b(),y=t,d=[-1,-1],h=i.spectrum,ft=[],nt={};if(y.noUiSlider)throw new Error("Slider was already initialized.");return g=dt(i.dir,i.ort,y),s=kt(i.handles,i.dir,g),bt(i.connect,y,s),i.pips&&lt(i.pips),i.tooltips&&ni(),ut={destroy:ci,steps:li,on:vt,off:ai,get:ct,set:at,updateOptions:vi,options:f,target:y,pips:lt},si(i.events),ut}function ni(n,t){if(!n.nodeName)throw new Error("noUiSlider.create requires a single element.");var r=a(t,n),i=gt(n,r,t);return i.set(r.start),n.noUiSlider=i,i}t.prototype.getMargin=function(n){return 2===this.xPct.length?h(this.xVal,n):!1};t.prototype.toStepping=function(n){return n=g(this.xVal,this.xPct,n),this.direction&&(n=100-n),n};t.prototype.fromStepping=function(n){return this.direction&&(n=100-n),nt(this.xVal,this.xPct,n)};t.prototype.getStep=function(n){return this.direction&&(n=100-n),n=tt(this.xPct,this.xSteps,this.snap,n),this.direction&&(n=100-n),n};t.prototype.getApplicableStep=function(n){var t=f(n,this.xPct),i=100===n?2:1;return[this.xNumSteps[t-2],this.xVal[t-i],this.xNumSteps[t-i]]};t.prototype.convert=function(n){return this.getStep(this.toStepping(n))};var ti={to:function(n){return void 0!==n&&n.toFixed(2)},from:Number};return{create:ni}});GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};Date.prototype.toDateDisplayString=function(){return this.toString(GolfNow.Web.Utils.GetDefaultDateFormatString())};String.prototype.toDateDisplayString=function(){var n=Date.parse(this);return n?n.toDateDisplayString():(new Date).toDateDisplayString()};GolfNow.Web.Date=function(n,t){var r=this,i=7;return{IsToday:function(n){return _.isDate(n)||(n=t.parse(n).clearTime()),t.today().equals(n)},DaysBetween:function(n,i){if(!_.isDate(n))try{n=t.parse(n).clearTime()}catch(e){n=new t(n).clearTime()}if(!_.isDate(i))try{i=t.parse(i).clearTime()}catch(e){i=new t(i).clearTime()}var r=n.getTime(),u=i.getTime(),f=u-r;return Math.round(f/864e5)},DaysFromToday:function(n){var r=t.today(),n=t.parse(n).clearTime(),u=this.DaysBetween?this.DaysBetween(r,n.clearTime()):GolfNow.Web.Date.DaysBetween(r,n.clearTime());return u<0?i:u}}}(jQuery,Date);var defaultListSort=defaultListSort||"",defaultListView=defaultListView||"",siteCode=siteCode||"gn",defaultUnits=defaultUnits||"mi",nonPostalCodeCountries=nonPostalCodeCountries||["ie","bm","fj"],_googWcmGet=_googWcmGet||function(n,t,i,r,u,f,e){var o={ak:"1051557068",cl:"2uRHCO_372sQzPm19QM"};n[i]=n[i]||function(){(n[i].q=n[i].q||[]).push(arguments)};n[r]||(n[r]=o.ak);f=t.createElement(u);f.async=!0;f.type="text/javascript";f.src="//www.gstatic.com/wcm/loader.js";e=t.getElementsByTagName(u)[0];e.parentNode.insertBefore(f,e);n._googWcmGet=function(t,r,u){n[i](2,t,o,r,null,new Date,u)}}(window,document,"_googWcmImpl","_googWcmAk","script"),GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};Date.prototype.toDateDisplayString=function(){return this.toString(GolfNow.Web.Utils.GetDefaultDateFormatString())};String.prototype.toDateDisplayString=function(){var n=Date.parse(this);return n?n.toDateDisplayString():(new Date).toDateDisplayString()};String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return t=t||0,this.lastIndexOf(n,t)===t});GolfNow.Web.Utils=function(n){function k(n,t){n=typeof n=="undefined"||n===null?defaultUnits:n;var i=1;switch(n){case"km":i=1.609}return Number(Math.round(t*i).toFixed(0))}var t=null,u=defaultUnits==="mi"?25:40,l=defaultUnits==="mi"?255:410,f=defaultListSort,e=defaultListView,a=366,v="all",o=defaultUnits,y=1e4,p=0,s=!1,i="GolfNow.RewardsAvailable",r="GolfNow.TeeTimeOffer",w="MMM dd, yyyy",h=["12 AM","12:30 AM","1 AM","1:30 AM","2 AM","2:30 AM","3 AM","3:30 AM","4 AM","4:30 AM","5 AM","5:30 AM","6 AM","6:30 AM","7 AM","7:30 AM","8 AM","8:30 AM","9 AM","9:30 AM","10 AM","10:30 AM","11 AM","11:30 AM","12 PM","12:30 PM","1 PM","1:30 PM","2 PM","2:30 PM","3 PM","3:30 PM","4 PM","4:30 PM","5 PM","5:30 PM","6 PM","6:30 PM","7 PM","7:30 PM","8 PM","8:30 PM","9 PM+","9:30 PM+","10 PM+","10:30 PM+","11 PM+","11:30 PM+","12 AM"],b=_.range(0,49,6),c;return Foundation.utils.register_media("medium-only-landscape","gn-mq-medium-only-landscape"),Foundation.utils.register_media("retina","gn-mq-retina"),c={GetDateString:function(n){return n=n instanceof Date?Date.parse(n.toDateString()):Date.parse(n),n?n.toDateString():(new Date).toDateString()},CountryRequiresPostalCode:function(t){return t=typeof t=="undefined"?"":t,n.inArray(t.toLowerCase(),nonPostalCodeCountries)==-1?!0:!1},LogOutOfAmazonSession:function(t){return typeof amazon=="undefined"&&n.when(n.getScript("https://api-cdn.amazon.com/sdk/login1.js")).then(function(){amazon.Login.logout();t()}),!1},LogOutOfQantasSession:function(){typeof qff_auth!="undefined"&&window.qff_auth.logout()},GetDefaultUnitOfMeasure:function(){return o},GetDefaultDateFormatString:function(){return w},GetDefaultSearchRadius:function(){return u},GetMaximumSearchRadius:function(){return l},SetDefaultSearchRadius:function(n){u=n},GetServerDisplayMode:function(){return t===null&&(t=Foundation.utils.is_small_only()?"small":Foundation.utils.is_medium_only()?"medium":"large"),t.toLowerCase()},SetServerDisplayMode:function(n){t=n.toLowerCase()},GetTimePeriodString:function(n){return n=typeof n=="undefined"||n===null?0:Number(n),h[n]},GetMinTimePeriodValue:function(){return 10},GetMaxTimePeriodValue:function(){return h.length-7},GetStartTimePeriodValue:function(n){return this.CalcStartTimePeriod(n)},GetEndTimePeriodValue:function(n){var t=this.CalcStartTimePeriod(n)+4;return t>this.GetMaxTimePeriodValue()&&(t=this.GetMaxTimePeriodValue()),t},GetTimePeriodOptions:function(){return b},CalcStartTimePeriod:function(n){var t=10,i,r;return n=_.isDate(n)?n:Date.parse(n)||Date.today(),Date.today().toShortDateString()===n.toShortDateString()&&(i=Date.now().getHours(),r=Date.now().getMinutes(),t=i*2,r>=30&&(t+=1)),t},GetPriceFloor:function(){return p},GetPriceCeiling:function(){return y},GetDefaultSearchView:function(){return e},GetDefaultSearchSort:function(){return f},SetDefaultSearchView:function(n){e=n},SetDefaultSearchSort:function(n){f=n},GetMaximumCalendarDays:function(){return a},GetDefaultRateType:function(){return v},GetAllowedRateTypes:function(){return[{text:"All Rate Types",value:"all"},{text:"Ladies",value:"ladies"},{text:"Resident",value:"resident"},{text:"Senior",value:"senior"},{text:"Twilight",value:"twilight"},{text:"Walking",value:"walking"}]},GetRefineDefaults:function(n){return{HotDealsOnly:null,PriceMin:null,PriceMax:null,Players:null,TimeMin:this.GetMinTimePeriodValue(),TimeMax:this.GetMaxTimePeriodValue(),TimePeriod:null,Radius:this.GetDefaultSearchRadius(n),Holes:null,SearchType:null,Date:GolfNow.Web.Cache.GetActiveDate(),View:this.GetDefaultSearchView(),SortBy:this.GetDefaultSearchSort(),RateType:this.GetDefaultRateType(),Q:null,QC:null}},GetRefineDefaultsLower:function(n){return{hotdealsonly:null,pricemin:null,pricemax:null,players:null,timemin:this.GetMinTimePeriodValue(),timemax:this.GetMaxTimePeriodValue(),timeperiod:null,radius:this.GetDefaultSearchRadius(n),holes:null,searchtype:null,date:GolfNow.Web.Cache.GetActiveDate(),view:this.GetDefaultSearchView(),sortby:this.GetDefaultSearchSort(),ratetype:this.GetDefaultRateType(),q:null,qc:null}},UrlDecodeString:function(t){return n("<div/>").html(decodeURIComponent(t).replace(/\+/g," ")).text()},GetSearchTypeName:function(n){var t=n;switch(n){case"GeoLocation":case"0":case 0:t="GeoLocation";break;case"Facility":case"1":case 1:t="Facility";break;case"Market":case"2":case 2:t="Market";break;case"Destination":case"3":case 3:t="Destination";break;case"GoPlay":case"4":case 4:t="GoPlay"}return t},ConsoleLog:function(n){try{console&&console.log(n)}catch(t){}},ConsoleWarn:function(n){try{console&&console.warn(n)}catch(t){}},ConsoleError:function(n){try{console&&console.error(n)}catch(t){}},GetGooglePlacesAutoCompleteResults_Geo:function(t){var i=n.Deferred(),r=[];return autoCompleteService.getPlacePredictions({input:t,types:[]},function(t,u){u!=google.maps.places.PlacesServiceStatus.OK?i.resolve({}):(r=n.map(t,function(t){if(n.inArray("street_address",t.types)<0)return{label:t.description,value:t.description,type:"places",id:t.place_id}}),i.resolve(r))}),i.promise()},GetGooglePlacesAutoCompleteResults_Regions:function(t){var i=n.Deferred(),r=[];return autoCompleteService.getPlacePredictions({input:t,types:["(regions)"]},function(t,u){u!=google.maps.places.PlacesServiceStatus.OK?i.resolve({}):(r=n.map(t,function(n){return{label:n.description,value:n.description,type:"places",id:n.place_id}}),i.resolve(r))}),i.promise()},ShowAvailableCustomerRewards:function(t){var r=parseInt(GolfNow.Web.Cache.GetValue(i));isNaN(r)?n.ajax({url:t,success:function(t){t&&t.rewardsAvailable?(GolfNow.Web.Cache.SetSessionStorageValue(i,t.rewardsAvailable,18e5),n("a[data-rewards]").parent("li").addClass("badge1").attr("data-badge",t.rewardsAvailable)):GolfNow.Web.Cache.SetSessionStorageValue(i,0,18e5)}}):r>0&&n("a[data-rewards]").parent("li").addClass("badge1").attr("data-badge",r)},ClearAvailableCustomerRewards:function(){GolfNow.Web.Cache.SetSessionStorageValue(i,null)},ShowCustomerVIPBadge:function(){var t=" &ndash; VIP",i=n("a#large-customer-welcome[data-vip]"),r=n("a#subNavLink[data-vip]"),u=n("h2#my-account-welcome[data-vip]"),f=i.html(),e=r.html(),o=u.html();i.html(f+'<span class="vip-badge vip-blue">'+t+"<\/span>");r.html(e+' <span class="vip-badge">'+t+"<\/span>");u.html(o+' <span class="vip-badge">'+t+"<\/span>")},SetHomePageSearch:function(n){n=typeof n!="boolean"?!1:n;s=n},IsHomePageSearch:function(){return s},GetTeeTimeOfferExpiration:function(){return GolfNow.Web.Cache.GetValue(r)},SetTeeTimeOfferExpiration:function(n,t,i){var u={offerId:n,offerTeeTimeId:t,expirationDate:i};GolfNow.Web.Cache.SetSessionStorageValue(r,u,18e5)},RemoveTeeTimeOfferExpiration:function(){GolfNow.Web.Cache.SetSessionStorageValue(r,null,-1)},GetSiteCode:function(){return siteCode},HandleUnitsConversion:k,AppendRadiusUnits:function(n){return n+o}},n.validator.addMethod("gnRegexValidate",function(n,t,i){var r=i[0],u=new RegExp(r);return this.optional(t)||u.test(n)},n.validator.format("{1}")),n.validator.addMethod("gnPostalCodeFormat",function(t,i,r){var u=r,f;return u=n(u).val(),GolfNow.Web.Utils.CountryRequiresPostalCode(u.toLowerCase())?"us"==u.toLowerCase()?(f=/^(\d{5}|\d{9})$/,f.test(t)):"ca"==u.toLowerCase()?(f=/^[ABCEGHJ-NPRSTVXY]{1}[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}[ ]?[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}[0-9]{1}$/i,f.test(t)):!0:!0},"Invalid Postal Code"),n.validator.addMethod("gnPostalCodeRequired",function(t,i,r){var u=r;return u=n(u).val(),GolfNow.Web.Utils.CountryRequiresPostalCode(u.toLowerCase())?!this.optional(i):!0},"Postal Code is Required"),n.validator.addMethod("gnValidateField",function(t,i,r){var u=n(r);return u.valid(),!0}),n.validator.addMethod("gnPasswordValidate",function(n){return/^(?=.*[A-Za-z])(?=.*\d)(?!.*[\^/\\#$%@^&*+<(>)""'])[\S]{8,}$/.test(n)},n.validator.format("{0}")),n.validator.addMethod("gnUserNameValidate",function(n){return/^[a-zA-Z0-9]+$/g.test(n)},n.validator.format("{0}")),n.validator.addMethod("gnEmailValidate",function(n){return/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(n)},n.validator.format("{0}")),n.validator.addMethod("gnDateValidate",function(n,t,i){var r=i[0],u=i[1],e=i[2],f=new Date(n,r,0).getDate();if(u>f)return Date.validateDay(u,n,r)},n.validator.format("{3}")),n.validator.addMethod("le",function(t,i,r){var u=n(r).val();return this.optional(i)||!u||parseInt(t)<=parseInt(u)},"Invalid Value"),n.validator.addMethod("slt",function(t,i,r){var u=n(r).val();return this.optional(i)||!u||parseInt(t)<parseInt(u)},"Invalid Value"),n.validator.addMethod("ge",function(t,i,r){var u=n(r).val();return this.optional(i)||!u||parseInt(t)>=parseInt(u)},"Invalid Value"),n.validator.addMethod("sgt",function(t,i,r){var u=n(r).val();return this.optional(i)||!u||parseInt(t)>parseInt(u)},"Invalid Value"),n.validator.addMethod("equalToIgnoreCase",function(t,i,r){return this.optional(i)||t.toLowerCase()==n(r).val().toLowerCase()}),n.fn.phoneAndHours=function(){function r(t,i,r){arguments.length===2&&(r=i,i=t,t=n(".golfnow-care-phone"));t.each(function(n,t){Foundation.utils.is_large_up()||t.tagName!=="A"||(t.href="tel:"+r.replace(/\s|-/g,""));t.innerHTML="";t.appendChild(document.createTextNode(i))})}function u(t,i,r){arguments.length===2&&(r=i,i=t,t=n(".booking-center-phone"));t.each(function(n,t){Foundation.utils.is_large_up()||t.tagName!=="A"||(t.href="tel:"+r.replace(/\s|-/g,""));t.innerHTML="";t.appendChild(document.createTextNode(i))})}function e(t,i,r){arguments.length===2&&(r=i,i=t,t=n(".golfnow-vip-phone"));t.each(function(n,t){Foundation.utils.is_large_up()||t.tagName!=="A"||(t.href="tel:"+r.replace(/\s|-/g,""));t.innerHTML="";t.appendChild(document.createTextNode(i))})}var i=n(".top-bar-section #login-link"),t=GolfNow.Web.Domains,f=this;t.Init().done(function(){var l,a;if(i.length&&/%2Fcms%2Fheader-footer/.test(i.attr("href"))){var s=i.attr("href"),h=s.indexOf("/customer/login"),o=s.substr(0,h),c=o.indexOf("%3F");o=o===""?"/":c>-1?o.substr(0,c):o;l=t.GetDomainHost();a=s.indexOf("returnUrl");h>-1&&i.attr("href","https://www."+l+"/customer/login?returnUrl="+encodeURIComponent(o))}return f.each(function(i,f){var s=n(f),o;s.hasClass("golfnow-care-phone")&&(o=s,n.when(t.GolfNowCarePhone()).done(function(n){r(o,n,n);try{_googWcmGet(r,n,{timeout:300,cache:!1})}catch(t){}}));s.hasClass("golfnow-care-hours")&&(o=s,n.when(t.GolfNowCareHours()).done(function(n){o.html("");o.append(document.createTextNode(n))}));s.hasClass("booking-center-phone")&&(o=s,n.when(t.BookingCenterPhone()).done(function(n){u(o,n,n);try{_googWcmGet(u,n,{timeout:300,cache:!1})}catch(t){}}));s.hasClass("booking-center-hours")&&(o=s,n.when(t.BookingCenterHours()).done(function(n){o.html("");o.append(document.createTextNode(n))}));s.hasClass("golfnow-vip-phone")&&(o=s,t.VIPPhone().done(function(n){e(o,n,n)}))})})},c}(jQuery);jQuery(function(n){function t(n){n.find("i").first().toggleClass("fa-angle-up").toggleClass("fa-angle-down");n.find(".subMenu").toggleClass("showMenu")}function i(){n(".off-canvas-wrap").height(n(".off-canvas-list").height()+n(".creditMenuWrapper").outerHeight())}n(document).foundation({offcanvas:{open_method:"overlap_single",close_on_click:!1},equalizer:{before_height_change:function(){},after_height_change:function(){},act_on_hidden_el:!1}});n(".right-off-canvas-menu").on("click",".has-submenu > a",function(r){r.preventDefault();t(n(this).parent());i()});var r=n(document).height();n(".exit-off-canvas").click(function(){n(".off-canvas-wrap").css("height","auto");n(".subMenu").removeClass("showMenu")});n(".right-off-canvas-toggle").click(function(){var t=n(".off-canvas-list").height()+n(".creditMenuWrapper").outerHeight();t>n(window).height()?n(".off-canvas-wrap").height(t):n(".off-canvas-wrap").height(n(window).height())});n("#logoutAccountMenu, #logoutAccountPage, #logoutHamburgerMenu").click(function(t){t.preventDefault();GolfNow.Web.Utils.ClearAvailableCustomerRewards();var i=n(this).attr("href");GolfNow.Web.Utils.LogOutOfAmazonSession(function(){window.location.href=i});GolfNow.Web.Utils.LogOutOfQantasSession()});n(".golfnow-care-hours,.golfnow-care-phone,.booking-center-hours,.booking-center-phone,.golfnow-vip-phone").phoneAndHours()});GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Request=GolfNow.Web.Request||{};GolfNow.Web.Request=function(n,t){function i(t,i){return t=n.extend(t||{},{dataType:t.dataType||"json",contentType:t.contentType||"application/json; charset=UTF-8",url:i,headers:{"X-Requested-With":"XMLHttpRequest"},timeout:t.timeout||3e4}),n.ajax(t)}function r(n){switch(n.status){case 400:case 401:case 403:case 404:case 500:case 501:case 502:case 503:case 504:case 505:case 506:case 507:case 509:case 510:GolfNow.Web.Utils.ConsoleWarn("Known Request Error - Status: "+n.status+"-"+n.statusText);break;default:GolfNow.Web.Utils.ConsoleError("Unknown Request Error - Status: "+n.status+"-"+n.statusText)}}return{Get:function(u,f,e,o){var s=new n.Deferred;return o=o===undefined?3e4:o,i({method:"GET",url:f,cache:e,timeout:o}).done(function(n){s.resolve(n)}).fail(function(n){r(n);s.reject(n)}).always(function(n,i){t.publish("xhr_get_always_"+u,{requestStatus:i})}),s.promise()},Post:function(u,f,e,o){var s=n.Deferred();return o=n.extend(o||{},{method:"POST",data:e,url:f}),i(o).done(function(n){s.resolve(n)}).fail(function(n){r(n);s.reject(n)}).always(function(n,i){t.publish("xhr_post_always_"+u,{requestStatus:i})}),s.promise()},LoadScript:function(i,r){var e=n.Deferred(),u=document.createElement("script"),f="";return u.async="async",u.type="text/javascript",u.src=r,u.onload=u.onreadystatechange=function(n,r){(!u.readyState||/loaded|complete/.test(u.readyState))&&(f=u.readyState,r?(f="aborted",e.reject()):(f="success",e.resolve()),t.publish("xhr_loadscript_always_"+i,{requestStatus:f}))},u.onerror=function(){f="failed";e.reject()},n("head")[0].appendChild(u),e.promise()},GetContent:function(u,f,e){var o=new n.Deferred;return e=n.extend(e||{},{dataType:"html",cache:!1,url:f}),i(e).done(function(n){o.resolve(n)}).fail(function(n){n.status===200?o.resolve(n.responseText):(r(n),o.reject(n))}).always(function(n,i){t.publish("xhr_getcontent_always_"+u,{requestStatus:i})}),o.promise()},PostWidget:function(u,f,e){var o=n.Deferred();return i({method:"POST",dataType:"html",data:JSON.stringify(e),url:f}).done(function(n){o.resolve(n)}).fail(function(n){r(n);o.reject(n)}).always(function(n,i){t.publish("xhr_post_widget_always_"+u,{requestStatus:i})}),o.promise()}}}(jQuery,amplify,_,GolfNow.Web.Utils);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Domains=GolfNow.Web.Domains||{};GolfNow.Web.Domains=function(){function i(){var r=$.Deferred(),n=this,u,i,f;if(!_.isEmpty(n.siteConfigSettings))return r.resolve(n.siteConfigSettings);for(u=_defaultDomain,i=0;i<t.length;i++)if(location.hostname.toLocaleLowerCase().indexOf(t[i].domain)>-1){u=t[i];break}return f="/api/config/getsitesettings",/promotions|blog/.test(location.hostname)&&(f="https://www."+u.domain+f),GolfNow.Web.Request.Get("settingsRequest",f,!0).done(function(t){n.siteConfigSettings=t;r.resolve(n.siteConfigSettings)}).fail(function(){n.siteConfigSettings=u;r.resolve(n.siteConfigSettings)}),r.promise()}function r(){var i=siteConfigSettings,n;if(_.isEmpty(i)||location.hostname.toLocaleLowerCase().indexOf(i.domain)===-1)for(n=0;n<t.length;n++)if(location.hostname.toLocaleLowerCase().indexOf(t[n].domain)>-1){i=t[n];break}return i}function u(){var i=_defaultDomain.location.lat,r=_defaultDomain.location.long,t;return n!==null&&n.hasOwnProperty("location")&&(t=n.location,t.hasOwnProperty("lat")&&t.lat&&t.hasOwnProperty("long")&&t.long&&(i=t.lat,r=t.long)),{latitude:i,longitude:r}}function f(){return n!==null&&n.hasOwnProperty("cookiePolicy")&&n.cookiePolicy?n.cookiePolicy:_defaultDomain.requiresCookiePolicy}function e(){var t=this,n=$.Deferred();return i().done(function(){n.resolve(siteConfigSettings.bookingCenter.phone)}),n.promise()}function o(){var t=this,n=$.Deferred();return i().done(function(){n.resolve(siteConfigSettings.bookingCenter.hours)}),n.promise()}function s(){var t=this,n=$.Deferred();return i().done(function(){n.resolve(siteConfigSettings.golferCares.phone)}),n.promise()}function h(){var t=this,n=$.Deferred();return i().done(function(){n.resolve(siteConfigSettings.golferCares.hours)}),n.promise()}function c(){var t=this,n=$.Deferred();return i().done(function(){n.resolve(siteConfigSettings.vipPhone)}),n.promise()}function l(){return siteConfigSettings.domain}function a(){var t=this,n=$.Deferred();return i().done(function(){n.resolve(siteConfigSettings)}),n.promise()}var t,n;return this.siteConfigSettings={},_defaultDomain={domain:"golfnow.com",location:{lat:28.5383355,long:-81.37923649999999},cookiePolicy:!1,golferCares:{phone:"1-800-767-3574",hours:"8AM - 8PM ET"},bookingCenter:{phone:"800-752-9020",hours:"8AM - 8PM ET"},vipPhone:"800-278-9702"},t=[{domain:"golfnow.ie",location:{lat:53.3498053,long:-6.2603096999999934},cookiePolicy:!0,golferCares:{phone:"00800 3639 3639",hours:"9AM - 5PM"},bookingCenter:{phone:"00800 3639 3639",hours:"9AM - 5PM"},vipPhone:""},{domain:"golfnow.co.uk",location:{lat:51.50859,long:-.125649},cookiePolicy:!0,golferCares:{phone:"00800 3639 3639",hours:"9AM - 5PM"},bookingCenter:{phone:"00800 3639 3639",hours:"9AM - 5PM"},vipPhone:""},{domain:"teeofftimes.co.uk",location:{lat:51.50859,long:-.125649},cookiePolicy:!0,golferCares:{phone:"00800 3639 3639",hours:"9AM - 5PM"},bookingCenter:{phone:"00800 3639 3639",hours:"9AM - 5PM"},vipPhone:""},{domain:"qantasgolfclub.com",location:{lat:-27.470125,long:153.021072},cookiePolicy:!0,golferCares:{phone:"1300 733 465",hours:"8AM - 8PM AET"},bookingCenter:{phone:"1300 733 465",hours:"8AM - 8PM AET"},vipPhone:""}],n=r(),{Init:a,GetDomainLocation:u,GetDomainHost:l,RequiresDomainCookiePolicy:f,GolfNowCarePhone:s,GolfNowCareHours:h,BookingCenterPhone:e,BookingCenterHours:o,VIPPhone:c}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Client=GolfNow.Web.Client||{};GolfNow.Web.Cache=GolfNow.Web.Cache||{};_activeDateCacheName="GolfNow.Web.Client.ActiveDate";GolfNow.Web.Cache.SetSessionStorageValue=function(n,t,i){GolfNow.Web.Cache.SetValue(n,t,!1,i)};GolfNow.Web.Cache.SetLocalStorageValue=function(n,t,i){GolfNow.Web.Cache.SetValue(n,t,!0,i)};GolfNow.Web.Cache.SetValue=function(n,t,i,r){typeof r=="undefined"&&(r=null);i?amplify.store.types.localStorage?r===null?amplify.store.localStorage(n,t):amplify.store.localStorage(n,t,{expires:r}):amplify.store.types.sessionStorage?r===null?amplify.store.sessionStorage(n,t):amplify.store.sessionStorage(n,t,{expires:r}):this.Fallback.setItem(n,t):amplify.store.types.sessionStorage?r===null?amplify.store.sessionStorage(n,t):amplify.store.sessionStorage(n,t,{expires:r}):amplify.store.types.localStorage?r===null?amplify.store.localStorage(n,t):amplify.store.localStorage(n,t,{expires:r}):this.Fallback.setItem(n,t)};GolfNow.Web.Cache.GetValue=function(n){var t=amplify.store(n);return typeof t=="undefined"&&(t=null,t=amplify.store.types.sessionStorage?amplify.store.sessionStorage(n):this.Fallback.getItem(n),typeof t=="undefined"&&(t=null)),t};GolfNow.Web.Cache.SetActiveDate=function(n){GolfNow.Web.Cache.SetLocalStorageValue(_activeDateCacheName,n,864e5)};GolfNow.Web.Cache.GetActiveDate=function(){var t=Date.today(),i=GolfNow.Web.Cache.GetValue(_activeDateCacheName),n=i==null?null:new Date(i);return(n==null||n!=null&&n<t)&&(n=t),GolfNow.Web.Utils.GetDateString(n)};GolfNow.Web.Cache.Fallback=function(){function n(){return siteCode||"gn"}function t(){var n=i();return n===""&&(n=u()),n}function i(){var i="; "+n()+"_userId=",r="; "+document.cookie,t=r.split(i);return t.length>1?t[1]:""}function r(t){var i=new Date,r;i.setTime(i.getTime()+864e5);r="expires="+i.toUTCString();document.cookie=n()+"_userId="+t+"; "+r}function u(){var n=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?i:i&3|8).toString(16)});return r(t),t}function f(n,i){var r=t()+"__"+n;amplify.store(n,i);$.ajax({method:"POST",async:!1,url:"/api/utilities/setcacheitem",data:JSON.stringify({key:r,value:i}),contentType:"application/json; charset=UTF-8",dataType:"json"})}function e(n){var i=amplify.store(n),r;return(i===undefined||i===null)&&(r=t()+"__"+n,response=$.ajax({method:"GET",dataType:"json",contentType:"application/json; charset=UTF-8",async:!1,url:"/api/getcacheitem/"+r}).responseJSON,i=response&&response.result==="success"&&!$.isEmptyObject(response.data)?JSON.parse(response.data):null),i}return{setItem:f,getItem:e}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.RecentSearches=function(){this._recentSearchesCacheName="GolfNow.Web.RecentSearches";this._maxRecentSearches=3;this._maxStoredSearches=30;this._searches=this.GetFromCache(!1)};GolfNow.Web.RecentSearches.prototype.GetFromCache=function(n){n=typeof n=="undefined"?!0:n;var t=GolfNow.Web.Cache.GetValue(this._recentSearchesCacheName);return t===null?[]:(n&&(t=t.slice(0,this._maxRecentSearches)),t)};GolfNow.Web.RecentSearches.prototype.Get=function(){return this._searches.slice(0,this._maxRecentSearches)};GolfNow.Web.RecentSearches.prototype.Add=function(n,t,i,r,u,f){var e,o;for(r=r||null,u=u||null,f=f||null,e=0;e<this._searches.length;e++)if(this._searches[e].id===n||this._searches[e].label===t){this._searches.splice(e,1);GolfNow.Web.Cache.SetLocalStorageValue(this._recentSearchesCacheName,this._searches,2592e6);break}while(this._searches.length>=this._maxStoredSearches)this._searches.pop();o={id:n,label:t,searchType:i};i&&i==="GEOLOCATION"&&r!==null&&u!==null&&(o.lat=r,o.long=u,o.geometryViewPort=f);this._searches.unshift(o);GolfNow.Web.Cache.SetLocalStorageValue(this._recentSearchesCacheName,this._searches,2592e6)};GolfNow.Web.RecentSearches.prototype.Find=function(n,t,i){var r;i=i||!1;var u=$.Deferred(),f=!1,e=this._searches;return($.isEmptyObject(e)||(r=_.findWhere(e,{searchType:"GEOLOCATION",lat:Number(n),long:Number(t)}),$.isEmptyObject(r)||i?!$.isEmptyObject(r)&&i&&(f=!0,u.resolve(r)):(f=!0,u.resolve(r.label))),!f&&$.isNumeric(n)&&$.isNumeric(t))?GolfNow.Web.LocationServices.GoogleLookUp(n,t):u.promise()};GolfNow.Web.RecentSearches.prototype.FindById=function(n,t){var r=$.Deferred(),u=!1,f=this._searches,i;return($.isEmptyObject(f)||(i=_.findWhere(f,{searchType:"GEOLOCATION",id:n}),$.isEmptyObject(i)||(u=!0,r.resolve(i))),!u)?GolfNow.Web.Request.Get("find-location-byid",t,!0):r.promise()};GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.LocationServices=function(){function g(){c(!0,function(){},function(){})}function c(t,e,o,c){var a,l,y;c=c||!1;a=setTimeout(function(){f({code:3,message:s},o);GolfNow.Web.Utils.ConsoleLog("LocateMe time out")},4500);l=GolfNow.Web.Cache.GetValue(v)||null;l!==null&&(l=new Date(l),_.isDate(l)&&(y=120..minutes().fromNow(),l.compareTo(y)===-1&&(t=!1)));n=GolfNow.Web.Cache.GetValue(r);n&&n.State&&_.isObject(n.State)&&!n.Status&&(n.Status=n.State);(!t||n&&n.Status&&n.Status.code&&n.Status.code===6)&&!c?(clearTimeout(a),n&&n.Latitude&&n.Longitude?(n.Status=n.Status||{code:0},n.Status.message=n.Status.message&&n.Status.message!=s?n.Status.message:i,u=n.Status.code,GolfNow.Web.Cache.SetLocalStorageValue(r,n,h.expires),e(n),GolfNow.Web.Utils.ConsoleLog(n.Latitude+"::"+n.Longitude+"::Location Cache")):f({code:0},o)):navigator.geolocation?(GolfNow.Web.Cache.SetSessionStorageValue(v,Date.now()),navigator.geolocation.getCurrentPosition(function(n){clearTimeout(a);nt(n,e);GolfNow.Web.Utils.ConsoleLog(n.coords.latitude+"::"+n.coords.longitude+"::W3C Navigator")},function(n){clearTimeout(a);GolfNow.Web.Utils.ConsoleLog(n.message+":: W3C Navigator");f(n,o)},d)):(clearTimeout(a),GolfNow.Web.Utils.ConsoleLog("No Geo available :: W3C Navigator"),f({code:5},o))}function nt(t,r){u=4;n=n||{};n.Status=n.Status||{};n.Latitude=t.coords.latitude;n.Longitude=t.coords.longitude;n.Status.message=i;n.Status.code=u;e(t.coords.latitude,t.coords.longitude,function(i){i.Latitude=t.coords.latitude;i.Longitude=t.coords.longitude;i.Status=n.Status;l(i);r&&r(n)})}function f(t,f){n=GolfNow.Web.Cache.GetValue(r)||{};n.Status=n.Status||{};n.Status.message=n.City?"Search Near "+n.City:i;GolfNow.Web.Utils.ConsoleLog(t.code);switch(t.code){case 1:case 2:u=t.code;break;case 3:u=t.code;break;default:u=t.code}n.Status.code=u;n.Latitude||n.Longitude||(n.Latitude=y.latitude,n.Longitude=y.longitude);e(n.Latitude,n.Longitude,function(t){t.Latitude=n.Latitude;t.Longitude=n.Longitude;t.Status=n.Status;l(t);f&&f(n)})}function l(t){var f,u;n=n?n:GolfNow.Web.Cache.GetValue(r)||{};n.Status=t.Status?t.Status:n.Status||{};n.City&&n.Status&&n.Status.message&&_.isString(n.Status.message)&&n.Status.code&&_.isNumber(n.Status.code)?(f=[0,4,6],_.contains(f,n.Status.code)?n.Status.message!==i&&(n.Status.message=i):n.Status.message!=="Search Near "+t.City&&(n.Status.message="Search Near "+t.City)):(n.Status.code=0,n.Status.message=i);n.Country=t.Country||null;n.City=t.City||null;n.State=t.State||null;n.PostalCode=t.PostalCode||null;t.Latitude&&(n.Latitude=t.Latitude);t.Longitude&&(n.Longitude=t.Longitude);t.Country==="US"||t.Country==="CA"?(n.Address=t.City,t.State&&(n.Address+=", "+t.State),t.PostalCode&&(n.Address+=" "+t.PostalCode),t.Country&&(n.Address+=", "+t.Country)):(u="",t&&t.City&&(u+=t.City),t&&t.PostalCode&&(u+=" "+t.PostalCode),t&&t.Country&&(u+=u.length>0?", "+t.Country:t.Country),n.Address=u);GolfNow.Web.Cache.SetLocalStorageValue(r,n,h.expires)}function tt(t,r,u){e(t,r,function(f){f.Latitude=t;f.Longitude=r;f.Status={code:6,message:i};l(f);u&&u(n)})}function it(t){var i=$.Deferred();return t=t===undefined?!1:t,!t&&n&&n.Status?i.resolve(n.Status):c(t,function(){i.resolve(n.Status||{})},function(){i.resolve(n.Status||{})}),i.promise()}function rt(){var t=$.Deferred();return n&&!$.isEmptyObject(n)&&n.State?t.resolve(n.State):t.resolve(""),t.promise()}function ut(){var t=$.Deferred();return n&&!$.isEmptyObject(n)&&n.Address?t.resolve(n.Address):t.resolve(""),t.promise()}function ft(){var t=$.Deferred();return n&&!$.isEmptyObject(n)&&n.Country?t.resolve(n.Country):t.resolve(""),t.promise()}function et(){var t=$.Deferred();return n&&!$.isEmptyObject(n)&&n.Latitude&&n.Longitude?t.resolve({Lat:n.Latitude,Long:n.Longitude}):t.resolve(null),t.promise()}function ot(){var t=$.Deferred(),i,r;return n&&!$.isEmptyObject(n)&&n.City?t.resolve(n.City):n&&!$.isEmptyObject(n)&&n.Address?n.Country==="US"||n.Country==="CA"?(i=n.Address,r=n.Address.indexOf(","),r>-1&&(i=n.Address.substr(0,r)),t.resolve(i)):t.resolve(n.Address):t.resolve(""),t.promise()}function st(){var t=$.Deferred();return n&&!$.isEmptyObject(n)&&n.PostalCode?t.resolve(n.PostalCode):t.resolve(""),t.promise()}function ht(n,t){var r=$.Deferred(),i="",u=Number(n),f=Number(t),e=new GolfNow.Web.RecentSearches;return p(u,f,function(n){n&&n.Country.toLowerCase()==="us"||n.Country.toLowerCase()==="ca"?(n.City&&(i+=n.City),n.State&&(i+=i.length>0?", "+n.State:n.State),n.PostalCode&&(i+=" "+n.PostalCode)):n&&(n.City&&(i+=n.City),n.Country&&(i+=i.length>0?", "+n.Country:n.Country));e.Add(n.Id,i,"GEOLOCATION",u,f);r.resolve(i)}),r.promise()}function ct(){return GolfNow.Web.Domains.GetDomainLocation()}function p(n,t,i){var r={},u,f;n&&t?typeof google!="undefined"&&typeof google.maps!="undefined"?(u=new google.maps.LatLng(n,t),f=new google.maps.Geocoder,f.geocode({latLng:u},function(n,t){if(t==google.maps.GeocoderStatus.OK){var f=!1,u={};u=w(n,r,f,!1);r=u.location_data;f=u.finished;i(r)}else GolfNow.Web.Utils.ConsoleWarn("Geocoder failed due to: "+t)})):GolfNow.Web.Utils.ConsoleWarn("Geocoder failed due to: Missing Google dependency"):i(r)}function e(n,t,i){var r={},u,f;n&&t?typeof google!="undefined"&&typeof google.maps!="undefined"?(u=new google.maps.LatLng(n,t),f=new google.maps.Geocoder,f.geocode({location:u},function(n,t){var o,s;if(t==google.maps.GeocoderStatus.OK){var f=!1,e={},u=_.without(_.map(n,function(n){return _.indexOf(n.types,"locality")>-1||_.indexOf(n.types,"postal_code")>-1?n:null}),null);u.length===1?(o=u[0],e=a(o,r,f,!1)):(e=w(u,r,f,!1),f||(s=u.length>2?u[1]:u[0],e=a(s,r,f,!0)));r=e.location_data;f=e.finished;i(r)}else GolfNow.Web.Utils.ConsoleWarn("Geocoder failed due to: "+t)})):GolfNow.Web.Utils.ConsoleWarn("Geocoder failed due to: Missing Google dependency"):i(r)}function w(n,t,i,r){var u={};return $.each(n,function(n,f){i||(u=a(f,t,i,r),i=u.finished)}),u}function a(n,t,i,r){return $.each(n.address_components,function(u,f){i||(t.Formatted_Address=n.formatted_address,t.Geometry=n.geometry,$.each(f.types,function(u,e){if(t.PostalCode||e!="postal_code")if(t.Neighborhood||e!="neighborhood"&&e!="administrative_area_level_2")if(t.State||e!="administrative_area_level_1")if(t.Country||e!="country")if(t.City||e!="locality"&&e!="sublocality"&&e!="administrative_area_level_3"){if(r){i=!0;t.Id=n.place_id;return}if(t.PostalCode&&t.State&&t.Neighborhood&&t.Country&&t.City){i=!0;t.Id=n.place_id;b(t);return}}else t.City=f.long_name,t.Id=n.place_id;else t.Country=f.short_name,t.Id=n.place_id;else t.State=f.short_name,t.Id=n.place_id;else t.Neighborhood=f.short_name,t.Id=n.place_id;else t.PostalCode=f.short_name,t.Id=n.place_id}))}),b(t),{location_data:t,finished:i}}function b(n){n&&(n.City&&(n.Formatted_Address=n.City),n.State&&(n.Formatted_Address+=", "+n.State),n.PostalCode&&(n.Formatted_Address+=" "+n.PostalCode),n.Country&&(n.Formatted_Address+=", "+n.Country))}function k(n,t){var i={},r=new google.maps.Geocoder;r.geocode({address:n},function(n,r){var f,e,u;r==google.maps.GeocoderStatus.OK?(f=!1,e=_.uniq(_.without(_.map(n,function(n){return _.indexOf(n.types,"locality")>-1||_.indexOf(n.types,"postal_code")>-1?n:null}),null),!1,function(n){return n.Id}),e.length&&(u=e[0],i.Formatted_Address=u.formatted_address,i.Geometry=u.geometry,$.each(u.address_components,function(n,t){f||$.each(t.types,function(n,r){if(i.PostalCode||r!="postal_code"){if(r=="neighborhood")i.Neighborhood=t.short_name,i.Id=u.place_id;else if(r=="administrative_area_level_1")i.State=t.short_name,i.Id=u.place_id;else if(r=="country")i.Country=t.short_name,i.Id=u.place_id;else if(r=="locality")i.City=t.long_name,i.Id=u.place_id;else if(i.PostalCode&&i.State&&i.Neighborhood&&i.Country&&i.City){f=!0;i.Id=u.place_id;return}}else i.PostalCode=t.short_name,i.Id=u.place_id})})),t(i)):GolfNow.Web.Utils.ConsoleWarn("Geocoder failed due to: "+r)})}function lt(n){var i=$.Deferred(),r=[];return t&&t.readystate!=4&&t.abort(),t=$.ajax({url:"/api/autocomplete/geocity/"+n,method:"GET",dataType:"json",contentType:"application/json; charset=utf-8",success:function(n){r=_.map(n.hits,function(n){return{label:n.displayName,value:n.displayName,type:"places",id:n.mongoId,lat:n.geo.lat,long:n.geo.lon}});i.resolve(_.take(r,5))},error:function(n,t){t=="abort"?i.reject():i.resolve({})},always:function(){t=null}}),i.promise()}function at(n){var t=$.Deferred(),i=[];return autoCompleteService.getPlacePredictions({input:n,types:["geocode"]},function(n,r){r!=google.maps.places.PlacesServiceStatus.OK?t.resolve({}):(i=$.map(n,function(n){return{label:n.description,value:n.description,type:"places",id:n.place_id}}),t.resolve(i))}),t.promise()}function vt(n){var r=$.Deferred(),i=[];return t&&t.readystate!=4&&t.resolve(i),t=k(n,function(n){GolfNow.Web.Utils.ConsoleLog(n);_.isArray(n)?i=$.map(n,function(n){return{label:n.Formatted_Address,value:n.Formatted_Address,type:"places",id:n.Id}}):_.isEmpty(n)||i.push({label:n.Formatted_Address,value:n.Formatted_Address,type:"places",id:n.Id,lat:n.Geometry.location.lat(),long:n.Geometry.location.lng()});r.resolve(i)}),r.promise()}function yt(n){var t=n.getSouthWest(),i=n.getNorthEast();GolfNow.Web.Utils.ConsoleLog("SouthWestLat:"+t.lat()+"::SouthWestLng:"+t.lng());GolfNow.Web.Utils.ConsoleLog("NorthEastLat:"+i.lat()+"::NortEastLng:"+i.lng());var u=google.maps.geometry.spherical.computeDistanceBetween(t,i),f=u*.000621371192,e=u*.001,o=GolfNow.Web.Utils.GetDefaultUnitOfMeasure(),r=Math.min(f,GolfNow.Web.Utils.GetMaximumSearchRadius("mi"));return r=Math.max(r,GolfNow.Web.Utils.GetDefaultSearchRadius("mi")),Number(Math.round(r).toFixed(0))}var r="GolfNow.Web.Client.CurrentPosition",v="GolfNow.Web.Client.LastLocationCheck",i="Find tee times near you",s="Help us find tee times near you",d={timeout:900,enableHighAccuracy:!1,maximumAge:36e5*.5},n={},h={expires:2592e6},u=0,y=ct(),t=null;return $(document).ready(function(){if(n=GolfNow.Web.Cache.GetValue(r),n==null&&(typeof google=="undefined"||typeof google.maps=="undefined")){var t=document.createElement("script");t.type="text/javascript";t.src="//maps.googleapis.com/maps/api/js?libraries=geometry&callback=GolfNow.Web.LocationServices.UpdateUsersLocation";document.body.appendChild(t)}else GolfNow.Web.LocationServices.UpdateUsersLocation()}),{Address:ut,Country:ft,HasGPS:navigator.geolocation!==null,OffMessage:s,OnMessage:i,LocateMe:c,State:rt,Status:it,UpdateUsersLocation:g,SetUsersLocation:tt,GeoCoordinates:et,Address_City:ot,GoogleLookUp:ht,CalculateRadius:yt,GetGeographicDetails:p,GetGeographicDetails2:e,GetGeocodeDetails:k,GetGooglePlaceAutoCompleteResults:at,GetGoogleGeocodeResults:vt,GetGeoCitySearch:lt,PostalCode:st}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Analytics=GolfNow.Web.Analytics||{};GolfNow.Web.Analytics.ExactTarget=function(n,t){this.searchData={source:{searchType:""},searchFilters:"",SortSelection:"",ResultsView:""};this.cartData={item:"",price:"",quantity:"",unique_id:""};this._customPageViewSent=!1;this._orgId=n;this._userId=t};GolfNow.Web.Analytics.ExactTarget.prototype.TrackSearch=function(n){if(typeof _etmc!="undefined"){this.SetUserInfo();this.SetCustomPageView();var t=n.Holes?this._getHolesParse(n.Holes):"Any",i={display:n.HotDealsOnly?"HotDeals":"All",price:!n.MinPrice&&!n.MaxPrice?"Any":n.MinPrice+"-"+n.MaxPrice,distance:n.Radius?n.Radius:GolfNow.Web.Utils.GetDefaultSearchRadius(),golfers:n.Players?n.Players:"Any",time:n.TimePeriod?n.TimePeriod:"Any",holes:t},r=n.View?n.View:"",u=this._getSortDesignation(n.View==="Course"?n.SortByRollup:n.SortBy,n.SortDirection.toString());this.searchData.searchFilters=i;this.searchData.SortSelection=u;this.searchData.ResultsView=r;switch(GolfNow.Web.Utils.GetSearchTypeName(n.SearchType)){case searchType_GeoLocation:case searchType_GoPlay:this.searchData.source.searchType="GeoLocation";this.searchData.source.latitude=n.Latitude;this.searchData.source.longitude=n.Longitude;break;case searchType_Destination:this.searchData.source.searchType="Destination";this.searchData.source.destination=n.MarketName;break;case searchType_Market:this.searchData.source.searchType="Area";this.searchData.source.areaId=n.MarketId;break;case searchType_Facility:this.searchData.source.searchType="Facility";this.searchData.source.facilityId=n.FacilityId}_etmc.push(["trackPageView",{search:this.searchData}])}};GolfNow.Web.Analytics.ExactTarget.prototype.TrackCategory=function(n,t,i){if(typeof _etmc!="undefined"){this.SetCustomPageView();this.SetUserInfo();var r=t!=""?t:"",u=i!=""?", "+i:"";r=r+u;_etmc.push(["trackPageView",{category:r,item:n}])}};GolfNow.Web.Analytics.ExactTarget.prototype.TrackCheckout=function(n,t,i){typeof _etmc!="undefined"&&(this.SetUserInfo(),this.TrackPageView(),this.SetCustomPageView(),this.cartData.item=n,this.cartData.price=t,this.cartData.quantity=i,this.cartData.unique_id=n,_etmc.push(["trackCart",{cart:[this.cartData]}]))};GolfNow.Web.Analytics.ExactTarget.prototype.TrackConfirmation=function(n,t,i,r){typeof _etmc!="undefined"&&(this.SetUserInfo(),this.TrackPageView(),this.SetCustomPageView(),this.cartData.item=n,this.cartData.order_number=t,this.cartData.price=i,this.cartData.quantity=r,this.cartData.unique_id=n,_etmc.push(["trackConversion",{cart:[this.cartData]}]))};GolfNow.Web.Analytics.ExactTarget.prototype.SetUserInfo=function(){typeof _etmc!="undefined"&&(_etmc.push(["setOrgId",this._orgId]),uid?_etmc.push(["setUserInfo",{email:this._userId}]):_etmc.push(["setUserInfo",{email:""}]))};GolfNow.Web.Analytics.ExactTarget.prototype.TrackPageView=function(){typeof _etmc!="undefined"&&_etmc.push(["trackPageView"])};GolfNow.Web.Analytics.ExactTarget.prototype._getSortDesignation=function(n,t){var r,i;return!n||!t?"":(r="",t=t==0?"Ascending":"Descending",i=n.split("."),i.length>1?i[0]=="Date"?r="Date":i[0]=="Facilities"&&(i[1]=="Distance"?r="Distance":i[1]=="Rating"?r="Rating":i[1]=="Name"&&(r="Name")):r=i[0],r+" "+t)};GolfNow.Web.Analytics.ExactTarget.prototype.SetCustomPageView=function(){this._customPageViewSent=!0};GolfNow.Web.Analytics.ExactTarget.prototype.IsTrackPageViewSent=function(){return this._customPageViewSent};GolfNow.Web.Analytics.ExactTarget.prototype._getHolesParse=function(n){return n=="1"?"9":"18"};GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Analytics=GolfNow.Web.Analytics||{};GolfNow.Web.Analytics.Google=function(){var t="GolfNow.Web.Analytics.Google",i="/search-refine",r=function(){n(i)},n=function(n){try{ga("set","page",n);ga("send","pageview");GolfNow.Web.Utils.ConsoleLog(t+": Tracking Virtual PageView ("+n+")")}catch(i){}},u=function(n,t,i){if(typeof dataLayer!="undefined")try{dataLayer.push({event:n,virtualPageURL:t,virtualPageTitle:i})}catch(r){}};return{TrackPageView:n,TrackPageView2:u,TrackRefinePageView:r}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Analytics=GolfNow.Web.Analytics||{};GolfNow.Web.Analytics.Google=GolfNow.Web.Analytics.Google||{};GolfNow.Web.Analytics.Google.Ecommerce=function(){var t=function(t,i,r,u,f,e,o,s,h){if(typeof dataLayer!="undefined"){typeof h=="undefined"&&(h="");var c=GolfNow.Web.Utils.GetSearchTypeName(f);h===""&&u!==""&&(h=u.toLowerCase()==="true"?"Hot Deal":"Course");c===""&&(c=n());dataLayer.push({event:"productImpression",eventLabel:i,ecommerce:{impressions:[{name:t,id:i,price:r,category:h,list:c,Dimension36:e,Dimension37:o,Dimension38:s}]}})}},i=function(t,i,r,u,f,e,o,s,h,c){var l,a;if(typeof dataLayer!="undefined"){typeof c=="undefined"&&(c="");(h===""||h===null||h===undefined)&&(h=null);l=GolfNow.Web.Utils.GetSearchTypeName(f);c===""&&u!==""&&(c=u.toLowerCase()==="true"?"Hot Deal":"Course");l===""&&(l=n());try{a=h===null?!0:!1;dataLayer.push({event:"productClick",eventLabel:i,ecommerce:{click:{actionField:{list:l},products:[{name:t,id:i,price:r,category:c,Dimension36:e,Dimension37:o,Dimension38:s}]}},eventCallback:function(){a=!0;h!==null&&(document.location=h)}});window.setTimeout(function(){a||(window.location.href=h)},250)}catch(v){GolfNow.Web.Utils.ConsoleLog(v);h!==null&&(window.location.href=h)}}},r=function(n,t,i,r,u,f,e){typeof dataLayer!="undefined"&&dataLayer.push({event:"productDetailView",eventLabel:t,ecommerce:{detail:{products:[{name:n,id:t,price:i,category:r,Dimension36:u,Dimension37:f,Dimension38:e}]}}})},u=function(n,t,i,r,u,f,e){typeof dataLayer!="undefined"&&dataLayer.push({event:"addToCart",eventLabel:t,ecommerce:{add:{products:[{name:n,id:t,price:i,category:r,Dimension36:u,Dimension37:f,Dimension38:e}]}}})},f=function(n,t,i,r,u,f,e,o){if(typeof dataLayer=="undefined"){document.location=o;return}try{var s=!1;dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:1},products:[{name:n,id:t,price:i,category:r,Dimension36:u,Dimension37:f,Dimension38:e}]}},eventCallback:function(){s=!0;document.location=o}});window.setTimeout(function(){s||(window.location.href=o)},250)}catch(h){GolfNow.Web.Utils.ConsoleLog(h);window.location.href=o}},e=function(n,t,i,r,u,f,e,o,s){typeof dataLayer!="undefined"&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:2},products:[{name:n,id:t,price:i,category:r,variant:u,Dimension36:f,Dimension37:e,Dimension38:o,quantity:s}]}}})},o=function(n,t,i,r,u,f,e,o,s){typeof dataLayer!="undefined"&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:3},products:[{name:n,id:t,price:i,category:r,variant:u,Dimension36:f,Dimension37:e,Dimension38:o,quantity:s}]}}})},s=function(n,t){if(typeof dataLayer!="undefined"){if(!_.isArray(t)){GolfNow.Web.Utils.ConsoleError("Invalid argument: products \n expected an array.");return}dataLayer.push({event:"productCheckout",eventLabel:n,ecommerce:{checkout:{actionField:{step:3},products:t}}})}},h=function(n,t,i,r,u,f,e,o,s){typeof dataLayer!="undefined"&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:4},products:[{name:n,id:t,price:i,category:r,variant:u,Dimension36:f,Dimension37:e,Dimension38:o,quantity:s}]}}})},c=function(n,t){if(typeof dataLayer!="undefined"){if(!_.isArray(t)){GolfNow.Web.Utils.ConsoleError("Invalid argument: products \n expected an array.");return}dataLayer.push({event:"productCheckout",eventLabel:n,ecommerce:{checkout:{actionField:{step:4},products:t}}})}},l=function(n,t,i,r,u,f,e,o,s,h,c,l,a){typeof dataLayer!="undefined"&&dataLayer.push({event:"productPurchase",eventLabel:f,ecommerce:{purchase:{actionField:{id:n,revenue:t,tax:i,coupon:r},products:[{name:u,id:f,price:e,category:o,variant:s,Dimension36:h,Dimension37:c,Dimension38:l,quantity:a}]}}})},a=function(n,t){typeof dataLayer!="undefined"&&dataLayer.push({event:"productPurchase",eventLabel:n.productId,ecommerce:{purchase:{actionField:n,products:t}}})},v=function(n,t,i,r,u){$.ajax({url:n,type:"POST",datatype:"json",data:{FacilityId:t,TeetimeId:i,Players:r},success:function(n){u(n)}})},y=function(n,t,i){typeof dataLayer!="undefined"&&dataLayer.push({event:"removeFromCart",ecommerce:{remove:{products:[{name:n,id:t,price:i,category:"VIP",quantity:1}]}}})},n=function(){var n="Homepage",t;try{t=window.location.href;t.indexOf("destinations")>-1?n="Destination Page":t.indexOf("hot-deals")>-1?n="Hotdeals Page":t.indexOf("play-fast")>-1?n="Play Fast":t.indexOf("play-nine")>-1?n="Play Nine":t.indexOf("play-single")>-1?n="Play Single":t.indexOf("play-walk")>-1?n="Play Walk":t.indexOf("facility")>-1?n="Facility Search":t.indexOf("search")>-1?n="Location Search":t.indexOf("select-rate")>-1&&(n="Select Rate")}catch(i){GolfNow.Web.Utils.ConsoleLog(i)}return n},p=function(n,t,i,r,u){typeof dataLayer!="undefined"&&dataLayer.push({event:"productImpression",eventLabel:t,ecommerce:{impressions:[{name:n,id:t,price:i,category:r,list:u}]}})},w=function(n,t,i,r){if(typeof dataLayer!="undefined")dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:1},products:[{name:n,id:t,price:i,category:r,quantity:1}]}}})},b=function(n,t,i,r,u){typeof dataLayer!="undefined"&&dataLayer.push({event:"productClick",eventLabel:t,ecommerce:{click:{actionField:{list:u},products:[{name:n,id:t,price:i,category:r}]}}})},k=function(n,t,i,r,u,f){if(typeof dataLayer!="undefined"){(f===""||f===null||f===undefined)&&(f=null);try{var e=f===null?!0:!1;dataLayer.push({event:"addToCart",eventLabel:t,ecommerce:{add:{actionField:{list:u},products:[{name:n,id:t,price:i,category:r}]}},eventCallback:function(){e=!0;f!==null&&(document.location=f)}});window.setTimeout(function(){e||(window.location.href=f)},250)}catch(o){GolfNow.Web.Utils.ConsoleLog(o);f!==null&&(window.location.href=f)}}},d=function(n,t,i,r){if(typeof dataLayer!="undefined")dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:2},products:[{name:n,id:t,price:i,category:r,quantity:1}]}}})},g=function(n,t,i,r){if(typeof dataLayer!="undefined")dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:3},products:[{name:n,id:t,price:i,category:r,quantity:1}]}}})},nt=function(n,t,i,r){if(typeof dataLayer!="undefined")dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:4},products:[{name:n,id:t,price:i,category:r,quantity:1}]}}})},tt=function(n,t,i,r,u,f,e){typeof dataLayer!="undefined"&&dataLayer.push({event:"productPurchase",eventLabel:u,ecommerce:{purchase:{actionField:{id:n,revenue:t,tax:i},products:[{name:r,id:u,price:f,category:e,quantity:1}]}}})};return{AddToCart:u,CheckoutStep1:f,CheckoutStep2:e,CheckoutStep3:o,CheckoutStep3MultProducts:s,CheckoutStep4:h,CheckoutStep4MultiProducts:c,GetLoginPageInformation:v,ProductImpression:t,ProductClick:i,ProductDetailsView:r,Purchase:l,PurchaseMultiProducts:a,RemoveFromCart:y,VipProductImpression:p,VipCheckoutStep1:w,VipProductClick:b,VipAddToCart:k,VipCheckoutStep2:d,VipCheckoutStep3:g,VipCheckoutStep4:nt,VipPurchase:tt}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Client=GolfNow.Web.Client||{};var autoCompleteService=typeof google!="undefined"&&typeof google.maps!="undefined"&&typeof google.maps.places!="undefined"?new google.maps.places.AutocompleteService:{},xhrFacility,federatedSearchValidation=/^[\d\D]+$/,_trkcodeCacheName="GolfNow.Web.Client.TRK",_locationCacheName="GolfNow.Web.Client.CurrentPosition",_searchParameterCacheName="GolfNow.Web.SearchParameters",_searchAjaxTimeOut=3e4,_federatedSearcFacilityResults=[],_prevChangeLocationSearchKey="",$googleAttribution=$("<li />").append($("<span />").addClass("pull-right").append($("<img />").addClass("google-logo")));GolfNow.Web.Client.ForceFullPageHeight=function(){$("div.off-canvas-wrap").css("height","100%").children("div.inner-wrap").css("min-height","100%")};GolfNow.Web.Client.ForceDefaultPageHeight=function(){$("div.off-canvas-wrap").css("height","").children("div.inner-wrap").css("height","")};GolfNow.Web.Client.getCurrentPosition=function(n,t){GolfNow.Web.LocationServices.LocateMe(!0,n,t)};GolfNow.Web.Client.LoadTemplate=function(n,t,i,r){return $.templates[t]?$.Deferred().resolve():(n.indexOf("http")===-1&&cdnUrl!==""&&(n=cdnUrl.substring(0,cdnUrl.length-1)+n),$.ajax({url:n,dataType:"text",async:!0,cache:!0}).done(function(n){var u={};i&&(u.helpers=i);r&&(u.tags=r);_.isEmpty(u)?$.templates(t,n):(u.markup=n,$.templates(t,u))}))};GolfNow.Web.Client.SearchController=function(n){var i="GolfNow.Web.Client.PreloadCache",s="GolfNow.Web.Client.RestoreParameters",t=this,r=null,h=null,c=!1,v=["FacilityName","FacilitySlug","MarketName","Address","undefined"],u=function(n,i,u){u||(u=t.SearchParameters.Get());t.IsRequestPending()&&r.abort();abMode===1&&(GolfNow.Web.Utils.ConsoleLog("GetData pre-fetch"),GolfNow.Web.Utils.SetDefaultSearchView(abModeDefaultListView),GolfNow.Web.Utils.SetDefaultSearchSort(abModeDefaultListSort));u.CurrentClientDate=Date.today();u.TimeMax>=42&&(u.TimeMax=GolfNow.Web.Utils.GetTimePeriodOptions()[GolfNow.Web.Utils.GetTimePeriodOptions().length-1]-1);r=$.ajax({url:"/api/tee-times/tee-time-results",dataType:"json",data:JSON.stringify(u),contentType:"application/json; charset=utf-8",type:"POST",timeout:_searchAjaxTimeOut,beforeSend:function(n,t){t.data=JSON.stringify(_.omit(_.omit(JSON.parse(t.data),v),function(n){return typeof n=="undefined"||n===null}))},success:function(t){n(t)},error:i})},l=[{view:"Course",sort:GolfNow.Web.Utils.GetDefaultSearchSort(),dir:"0"},{view:"List",sort:GolfNow.Web.Utils.GetDefaultSearchSort(),dir:"0"},{view:"Map",sort:GolfNow.Web.Utils.GetDefaultSearchSort(),dir:"0"}],y=function(){var h=["HotDealsOnly","PriceMin","PriceMax","Players","TimePeriod","TimeMax","TimeMin","Holes","Radius","RateType","Q","QC"],e={},t=f(),r,o,n,s,i,u;if(t&&!$.isEmptyObject(t)){r=Object.getOwnPropertyNames(t);for(o in r)n=r[o],s=_.map(h,function(n){return n.toLowerCase()}),_.isString(n)&&_.indexOf(s,n.toLowerCase(),!1)>-1&&(i=t[n],i&&i!=="false"&&(u={},u[n]=i,$.extend(e,u)))}return e},f=function(){return GolfNow.Web.Cache.GetValue(_searchParameterCacheName)},p=function(n){var t=_.once(function(t){n({Latitude:t.Latitude,Longitude:t.Longitude})});GolfNow.Web.Client.getCurrentPosition(t,t)},w=function(n,t){n.PageNumber=t;GolfNow.Web.Cache.SetSessionStorageValue(i,n)},a=function(){return GolfNow.Web.Cache.GetValue(i)},b=function(n){var t=a();return t&&t.PageNumber==n?!0:!1},e=function(n,r){var f,e,o,s;t.ResultsData=n;f=t.SearchParameters.Get();t.RenderResults(n,f,r);t.RenderPredicates(f);t.AfterSearch(f,r);e=JSON.parse(JSON.stringify(f));e.PageNumber++;o=e.PageNumber;s=t.TotalPages();o<s?u(function(n){w(n,e.PageNumber)},null,e):GolfNow.Web.Cache.SetSessionStorageValue(i,null)},o=function(n){n.statusText!="abort"&&(t.RenderError(),t.AfterSearch())};this.ResultsData={};this.ViewSortMappings=l;this.LoadTemplates=function(){for(var n,r,u=[],i=0;i<t.JsTemplates.length;i++)n=t.JsTemplates[i],r=n.isPath?n.tmplPath:"/Tmpls/_"+n.tmplPath+".tmpl.html",u.push(GolfNow.Web.Client.LoadTemplate(r,n.accessorName,n.helpers,n.tags));return u};this.TotalRecords=function(){return this.ResultsData.total};this.TotalPages=function(){var n=t.ResultsData.ttResults.predicate.pageSize;return n>t.TotalRecords()?1:Math.ceil(t.TotalRecords()/n)};this.ResetAdvancedSearchParams=function(){t.SearchParameters.ResetAdvancedSearchParams()};this.DoSearch=function(){var n=t.SearchParameters.Get();t.BeforeSearch(n);t.RenderPredicates(n);t.SearchParameters.QueryNeedsLocation()?p(function(n){n?t.SearchParameters.Set({Latitude:n.Latitude,Longitude:n.Longitude},!0):t.SearchParameters.Set({Latitude:null,Longitude:null},!0);u(e,o)}):u(e,o)};this.NextResult=function(n){var r=t.SearchParameters.NextPage(),s=t.TotalPages(),h=GolfNow.Web.Cache.GetValue(i),c=h&&!$.isEmptyObject(h),f;(r<s||c)&&(f=function(i){var r=!1;t.IsRequestPending()?(r||(r=!0,n()),setTimeout(function(){f(i)},550)):(r||(r=!0,n()),setTimeout(i,550))},f(function(){var n=function(n){e(n,!0)};b(r)?n(a()):u(n,o)}));r>=s&&c&&GolfNow.Web.Cache.SetSessionStorageValue(i,null)};this.SelectActiveDate=function(n,i){var u=t.SearchParameters.Get(),r;if(typeof i=="undefined"&&(i=!1),r=GolfNow.Web.Utils.GetSearchTypeName(u.SearchType),i===!1){if(r==="Facility"){t.SearchParameters.Set({Date:n},!0);GolfNow.Web.UrlParams.HandleFacilityUrlHash(t);return}if(r==="GoPlay"){t.SearchParameters.Set({Date:n},!0);GolfNow.Web.UrlParams.HandleGoPlayUrlHash(t);return}}t.SearchParameters.Set({Date:n},i);t.SaveSearchParameters({Date:n},i)};this.NextDate=function(n){(n===undefined||n===null)&&(n=1);var r=t.SearchParameters.Get(),i=new Date(r.Date),u=GolfNow.Web.Utils.GetSearchTypeName(r.SearchType),f=u==="Facility",e=u==="GoPlay";new Date(i.setDate(i.getDate()+n));t.SavePickerSelectedDate(i);this.SelectActiveDate(i,!f&&!e);GolfNow.Web.Page.Pub("search_date_changed",i);f||e||t.RedirectToCustomSearchPage(r);$(".button-prev-date").show()};this.PreviousDate=function(){var i=t.SearchParameters.Get(),r=Date.today(),n=Date.parse(i.Date).addDays(-1);if(n.compareTo(r)===1||n.equals(r)){var u=GolfNow.Web.Utils.GetSearchTypeName(i.SearchType),f=u==="Facility",e=u==="GoPlay";this.SelectActiveDate(n,!f&&!e);f||e||t.RedirectToCustomSearchPage(i)}r.equals(n)&&$(".button-prev-date").hide()};this.SetDate=function(n,t){typeof t=="undefined"&&(t=!1);n instanceof Date?(this.SelectActiveDate(n,t),Date.today().compareTo(Date.parse(this.SearchParameters.Get().Date))===0?$(".button-prev-date").hide():$(".button-prev-date").show()):GolfNow.Web.Utils.ConsoleWarn("Set date requires a date object")};this.SavePickerSelectedDate=function(n){h=n};this.GetPickerSelectedDate=function(){return h};this.SetDisplayDates=function(n){Foundation.utils.is_small_only()?$("#currentDateText").html(n.toDateDisplayString()):$("#currentDateText").html(n.toDateDisplayString());$("#currentDateRefineText").html(n.toDateDisplayString())};this.redirectOnSearch=!1;this.Initialize=function(n,i){if(i=typeof i=="undefined"?!0:i,$.isEmptyObject(n)){var r=f();t.SearchParameters.Set(r,!0)}else{n.ResetLocation&&t.ResetFederatedSearchParameters();n.RedirectOnSearch&&(t.redirectOnSearch=!0);n.DisableLocationChange&&(c=n.DisableLocationChange);switch(n.SearchParamsAction){case 0:$.extend(n,f());break;case 2:$.extend(n,y())}t.SearchParameters.Set(n,!0)}$.when.apply(this,this.LoadTemplates()).done(function(){i&&!window.location.hash&&t.DoSearch()});$(window).on("unload",function(){void 0});GolfNow.Web.Page.Pub("searchController_Initialized",t)};this.ShouldRedirectOnSearch=function(){return t.redirectOnSearch?t.redirectOnSearch:!1};this.RedirectToCustomSearchPage=function(n,i){var c=["Latitude","Longitude","FacilityId","MarketId","Date","Radius","HotDealsOnly","PriceMin","PriceMax","Players","TimePeriod","Holes","View","SortBy","TimeMin","TimeMax","RateType","Q","QC"],e,o,s,r,h,u;$.isEmptyObject(n)||(t.SearchParameters.Set(n,!0),t.SaveSearchParameters(n));$.isEmptyObject(i)||(t.SearchParameters.Set(i,!0),t.SaveFederatedSearchParameters(i));e="/tee-times/search";o=GolfNow.Web.Utils.GetSearchTypeName(n.SearchType);o=="Facility"&&(e=window.location.pathname);s={};r=f();typeof r.SortBy!="undefined"&&(r.SortBy=r.SortBy&&r.SortBy.indexOf("|")>0?r.SortBy.replace("|","."):r.SortBy+"."+(r.SortDirection||"0"));$.each(r,function(n,t){if($.inArray(n,c)!=-1&&t&&t!=="false"){var i={};i[n.toLowerCase()]=t;$.extend(s,i)}});h=e+"#"+$.param(s);(window.location.pathname.startsWith(e)||window.location.pathname==="/")&&(u=h.replace("#","?"),u.indexOf("?")>-1&&(u.indexOf("qc")===-1&&(u+="&qc="+o),GolfNow.Web.Analytics.Google.TrackPageView(u)));window.location.href=h;GolfNow.Web.Client.SearchController.CloseFederatedSearch()};this.SaveSearchParameters=function(n){var t=$.extend(GolfNow.Web.Cache.GetValue(_searchParameterCacheName),n);t.Date&&(t.Date=GolfNow.Web.Utils.GetDateString(t.Date));GolfNow.Web.Cache.SetSessionStorageValue(_searchParameterCacheName,t,18e5)};this.SaveFederatedSearchParameters=function(n){var i={Address:null,Latitude:null,Longitude:null,FacilityId:null,FacilityName:null,MarketId:null,MarketName:null,SearchType:"GeoLocation"};$.extend(i,n);t.SearchParameters.Set(i,!0);t.SaveSearchParameters(i)};this.SaveCurrentFederatedSearchParameters=function(){var i=["Latitude","Longitude","Address","FacilityId","FacilityName","MarketId","MarketName","SearchType"],n={},r=this.SearchParameters.Get();$.each(r,function(t,r){if($.inArray(t,i)!=-1&&r&&r!=="false"){var u={};u[t]=r;$.extend(n,u)}});t.SaveFederatedSearchParameters(n)};this.ResetFederatedSearchParameters=function(){t.SaveFederatedSearchParameters({})};this.RenderResults=function(){GolfNow.Web.Utils.ConsoleWarn("RenderResults not implemented")};this.RenderError=function(){GolfNow.Web.Utils.ConsoleWarn("Error fetching results")};this.RenderPredicates=function(){GolfNow.Web.Utils.ConsoleWarn("RenderResults not implemented")};this.BeforeSearch=function(){};this.AfterSearch=function(){};this.JsTemplates=[];this.RenderResults=n.RenderResults;this.RenderPredicates=n.RenderPredicates;this.BeforeSearch=n.BeforeSearch;this.AfterSearch=n.AfterSearch;this.RenderError=n.RenderError;this.JsTemplates=n.JsTemplates;this.UseGooglePlaces=n.UseGooglePlaces;this.GetRestoreFedSearchKey=function(){function u(){var r=_.defaults(n,GolfNow.Web.Utils.GetRefineDefaults()),u=Object.getOwnPropertyNames(r),f,t,e;for(f in u)t=u[f],i.hasOwnProperty(t)&&i[t]&&(e=i[t],r[t]=e);return r}var i=t.SearchParameters.Get(),n={},r,f,e;return i?(r=GolfNow.Web.Utils.GetSearchTypeName(i.SearchType),(r=="GeoLocation"||r=="GoPlay")&&i.Latitude&&i.Longitude&&(i.Address?(n.Location=i.Address,n=u()):(f="",$.when(this.RecentSearches.Find(i.Latitude,i.Longitude),GolfNow.Web.LocationServices.Address()).done(function(i,e){f=i?i:e;n.Location=f;n=u();r=="GoPlay"&&t.SetRefinedResultsDisplay(n,$("#fedresults"),$(".list-refined-items"))}),f!==""&&(n.Location=f,n=u()))),r!="GoPlay"||c||(e=GolfNow.Web.LocationServices.Address(),$.when(e).then(function(t){n.Location=t;n=u()})),r!="GeoLocation"&&r!="GoPlay"||i.Latitude&&i.Longitude||(n=u()),r=="Facility"&&i.FacilityName&&(n.Location=i.FacilityName,n=u()),r=="Market"&&i.MarketName&&(n.Location=i.MarketName,n=u()),r=="Destination"&&i.MarketName&&(n.Location=i.MarketName,n=u(),n.Radius=viewOverrideParams.Radius),n):n};this.SetRefinedResultsDisplay=function(n,t,i){var u=GolfNow.Web.Utils.GetSearchTypeName(n.SearchType),r=n.Location===undefined?"Near You":GolfNow.Web.Utils.UrlDecodeString(n.Location);t.text(r);$("#fedresults-refine").text(r);GolfNow.Web.Page.Pub("set-filter-display-values",{refinedObj:n,refinedItems:Object.getOwnPropertyNames(n),searchType:u,location:r});i.empty()};this.IsRequestPending=function(){return r&&r.readyState!=4};this.SetRestoreParameters=function(n){GolfNow.Web.Cache.SetSessionStorageValue(s,n)};this.GetRestoreParameters=function(){return GolfNow.Web.Cache.GetValue(s)};this.ChangeView=function(n,i){var i=t.SearchParameters.Get(),o=i.View,s=i.HotDealsOnly=="true"?!0:!1,r,u,e,f;if(o!=n){r="";u="";$.grep(l,function(t){t.view===n&&(r=t.sort,u=t.dir)});rollUpSortBy=i.SortBy=r;i.SortDirection=u;i.SortBy&&i.SortBy==="Date"&&(n==="Course"||n==="Map")&&(rollUpSortBy+=Number(i.SortDirection)===0?".MinDate":".MaxDate");i.SortBy&&i.SortBy==="GreensFees"&&(n==="Course"||n==="Map")&&(rollUpSortBy+=Number(i.SortDirection)===0?".MinPrice":".MaxPrice");n==="Course"&&rollUpSortBy==="GreensFees.MaxPrice"&&(rollUpSortBy=GolfNow.Web.Utils.GetDefaultSearchSort(),i.SortBy=rollUpSortBy,i.SortDirection="0");i.SortByRollup=rollUpSortBy;i.View=n;e=GolfNow.Web.Utils.GetSearchTypeName(viewOverrideParams.SearchType);switch(e){case 0:case"GeoLocation":t.SaveCurrentFederatedSearchParameters();t.RedirectToCustomSearchPage(i);break;case 1:case"Facility":t.SearchParameters.Set(i,!0);f=$("#viewModal");f.length&&f.foundation("reveal","close");GolfNow.Web.UrlParams.HandleFacilityUrlHash(t);break;case 3:case"Destination":t.SaveCurrentFederatedSearchParameters();t.RedirectToCustomSearchPage(i);break;case"GoPlay":t.SaveCurrentFederatedSearchParameters();GolfNow.Web.UrlParams.HandleGoPlayUrlHash(t);break;default:t.SaveCurrentFederatedSearchParameters();t.RedirectToCustomSearchPage(i)}}};this.ChangeSort=function(n){var i=t.SearchParameters.Get(),u=i.View,f=n.split("|"),e="",o="0",s,r;f.length==2?(e=f[0],o=f[1]):e=f[0];rollUpSortBy=i.SortBy=e;i.SortDirection=o;i.SortBy&&i.SortBy==="Date"&&(u==="Course"||u==="Map")&&(rollUpSortBy+=Number(i.SortDirection)===0?".MinDate":".MaxDate");i.SortBy&&i.SortBy==="GreensFees"&&(u==="Course"||u==="Map")&&(rollUpSortBy+=Number(i.SortDirection)===0?".MinPrice":".MaxPrice");u==="Course"&&rollUpSortBy==="GreensFees.MaxPrice"&&(rollUpSortBy=GolfNow.Web.Utils.GetDefaultSearchSort(),i.SortBy=rollUpSortBy,i.SortDirection="0");i.SortByRollup=rollUpSortBy;s=GolfNow.Web.Utils.GetSearchTypeName(viewOverrideParams.SearchType);switch(s){case 0:case"GeoLocation":t.RedirectToCustomSearchPage(i);break;case 1:case"Facility":t.SearchParameters.Set(i,!0);r=$("#sortModal");r.length&&r.foundation("reveal","close");GolfNow.Web.UrlParams.HandleFacilityUrlHash(t);break;case 3:case"Destination":t.SaveCurrentFederatedSearchParameters();t.RedirectToCustomSearchPage(i);break;case 4:case"GoPlay":t.SearchParameters.Set(i,!0);r=$("#sortModal");r.length&&r.foundation("reveal","close");GolfNow.Web.UrlParams.HandleGoPlayUrlHash(t);break;default:t.SaveCurrentFederatedSearchParameters();t.RedirectToCustomSearchPage(i)}};this.GetRecentSearches=function(){return this.RecentSearches.Get()};this.AddRecentSearch=function(n,t,i,r,u,f){this.RecentSearches.Add(n,t,i,r,u,f)};this.FindRecentSearchesById=function(n,t){return this.RecentSearches.FindById(n,t)};this.RecentSearches=new GolfNow.Web.RecentSearches;this.SearchParameters=new GolfNow.Web.SearchParameters;$(this.SearchParameters).on("ParametersUpdated",function(){t.DoSearch()})};GolfNow.Web.Client.SearchController.OpenFederatedSearch=function(){try{$("#searchModal").foundation("reveal","open")}catch(n){GolfNow.Web.Utils.ConsoleWarn("OpenFederatedSearch:"+n)}};GolfNow.Web.Client.SearchController.InitializeFederatedSearch=_.once(function(){var n,t;GolfNow.Web.Utils.ConsoleLog("fedresults?:"+$("#fedresults").length);n=searchController?searchController.GetRestoreFedSearchKey():null;n&&n.Location&&n.Location!==""&&(t=$("#fedresults"),t.length>0&&searchController.SetRefinedResultsDisplay(n,t,$(".list-refined-items")));$("#fedsearch").length>0&&$("#fedsearch").val().length>0?(GolfNow.Web.Client.SearchController.StepTwo(),$("#fedsearch").trigger("keyup")):GolfNow.Web.Client.SearchController.StepOne();GolfNow.Web.Client.SearchController.PopulatePreviousSearch(searchController)});GolfNow.Web.Client.SearchController.PopulatePreviousSearch=function(n){var t=n.GetRecentSearches();t.length>0?($ulPreviousSearches=$(".federatedWrap .federatedStepOne .federatedSearchResults ul"),$ulPreviousSearches.length==0&&($ulPreviousSearches=$("#federatedResultsPrevious ul"),$("#federatedResultsPreviousTab a").html('<i class="ion-ios-loop-strong"><\/i> Previous <span>Searches<\/span> ('+Number(t.length)+")")),$ulPreviousSearches.length&&($ulPreviousSearches.empty(),tabidx=2,$.each(t,function(n,t){var i,f,r,u;if(tabidx+=n,i="ion-ios-location",!$.isEmptyObject(t)){f=t.label;r=null;switch(t.searchType){case"GEOLOCATION":r=Foundation.utils.is_medium_up()?GolfNow.Web.GeoPlaces.Location_Click:GolfNow.Web.GeoPlaces.RefineLocation_Click;i="ion-ios-location color-blue-primary";break;case"FACILITY":r=Foundation.utils.is_medium_up()?GolfNow.Web.GeoPlaces.Course_Click:GolfNow.Web.GeoPlaces.RefineCourse_Click;i="ion-ios-flag color-green-primary"}u=$("<a>");u.on("click",{$textbox:$("#fed-search-big"),$resultsList:$("#autocomplete-wrapper"),id:t.id,name:t.label,lat:t.lat,lng:t.long,viewport:t.geometryViewPort},r);$ulPreviousSearches.append($("<li><\/li>").append(u.html(f).prepend('<i class="'+i+'"><\/i>')))}}))):$(".federatedWrap .federatedStepOne .federatedSearchResults, #federatedResultsPreviousTab, #federatedResultsPrevious").hide()};GolfNow.Web.Client.SearchController.ShowRefineSearch=function(){GolfNow.Web.Page.Pub("show-refine-search-clicked",null);$("#searchModal").hasClass("open")||GolfNow.Web.Client.SearchController.OpenFederatedSearch();GolfNow.Web.Client.SearchController.StepThree();$(".federatedStepOne").parents(".autocomplete-results").hide()};GolfNow.Web.Client.SearchController.ShowSearchFilters=function(n){GolfNow.Web.Page.Pub("show-search-filters-clicked",{mediumOverride:n});Foundation.utils.is_medium_only()&&!n?$(".off-canvas-wrap").foundation("offcanvas","toggle","move-right"):(Foundation.utils.is_small_only()||n)&&($("#searchModal").hasClass("open")||GolfNow.Web.Client.SearchController.OpenFederatedSearch(),n||GolfNow.Web.Client.SearchController.StepThree(),$(".federatedStepOne").parents(".autocomplete-results").hide())};GolfNow.Web.Client.SearchController.StepOne=function(){$(".federatedStepTwo, .federatedStepThree").hide();$(".federatedStepOne").show()};GolfNow.Web.Client.SearchController.StepTwo=function(){$(".federatedStepOne, .federatedStepThree").hide();$(".federatedStepTwo").show()};GolfNow.Web.Client.SearchController.StepThree=function(){$(".federatedStepThree").is(":visible")||GolfNow.Web.Analytics.Google.TrackRefinePageView();$(".federatedStepOne, .federatedStepTwo").hide();$(".federatedStepThree").show();_.defer(function(){$(document).foundation("reflow")})};GolfNow.Web.Client.SearchController.CloseFederatedSearch=function(){try{$("#searchModal").foundation("reveal","close");$(".off-canvas-wrap").foundation("offcanvas","hide","offcanvas-overlap-right")}catch(n){GolfNow.Web.Utils.ConsoleWarn("CloseFederatedSearch:"+n)}};GolfNow.Web.Client.SearchController.UpdateFederatedResultsTabTotal=function(n,t){typeof t=="undefined"&&(t=0);var i="("+t+")";$("#"+n+" span").html(i)};GolfNow.Web.Client.SearchController.UpdateFacilityTabTotal=function(n){GolfNow.Web.Client.SearchController.UpdateFederatedResultsTabTotal("federatedResultsCoursesTab",n)};GolfNow.Web.Client.SearchController.UpdateLocationsTabTotal=function(n){GolfNow.Web.Client.SearchController.UpdateFederatedResultsTabTotal("federatedResultsLocationsTab",n)};GolfNow.Web.Client.SearchController.UseGooglePlaces=function(){return GolfNow.Web.Client.SearchController.UseGooglePlaces};GolfNow.Web.Client.SearchController.LocationSearchCallback=function(n,t,i,r){var u=$("#federatedResultsLocationsTab"),e=$("#federatedResultsLocations .federatedSearchResults ul"),s=Math.floor(previewTop/2),f,o;n=n.slice(0,s);f=n.length;o=r&&r.type!=="course";e.empty();n!=null&&f>0?($.each(n,function(n,t){var r,u;if(i==0||n<i){r=$("<a>");r.on("click",{id:t.mongoId,name:t.displayName,eid:t.id,lat:t.geo.lat,lng:t.geo.lon},GolfNow.Web.GeoPlaces.RefineLocation_Click);u=$("<li>").append(r.text(t.displayName));e.append(u)}}),u.is(":visible")||u.show(),o&&$('.federatedStepTwo .tabs a[href="#federatedResultsLocations"]').click()):(u.is(":visible")&&u.hide(),$('.federatedStepTwo .tabs a[href="#federatedResultsCourses"]').click());GolfNow.Web.Client.SearchController.UpdateLocationsTabTotal(f)};GolfNow.Web.Client.SearchController.CourseSearchCallback=function(n,t,i,r){var u=$("#federatedResultsCoursesTab"),e=$("#federatedResultsCourses .federatedSearchResults ul"),o=r&&r.type==="course",s=Math.floor(previewTop/2),f;n=n.slice(0,s);f=n.length;i||(e.empty(),_federatedSearcFacilityResults=[]);n!==null&&f>0?($.each(n,function(n,t){var i,r;_federatedSearcFacilityResults.push(t);i=$("<a>");i.on("click",{id:t.contextInformation.courseId,name:t.displayName,eid:t.id},GolfNow.Web.GeoPlaces.RefineCourse_Click);r=$("<li>").append(i.text(t.displayName));r.appendTo(e)}),u.is(":visible")||u.show(),o&&$('.federatedStepTwo .tabs a[href="#federatedResultsCourses"]').click()):(u.is(":visible")&&u.hide(),$('.federatedStepTwo .tabs a[href="#federatedResultsLocations"]').click());GolfNow.Web.Client.SearchController.UpdateFacilityTabTotal(f)};GolfNow.Web.Client.SearchController.validateFedSearch=function(n){var t=/\-/g,i=n;return n.length>0&&!federatedSearchValidation.test(n)?!1:n.length>0&&n.match(t)!=null&&n.match(t).length>1?!1:!0};GolfNow.Web.Client.SearchController.GetSearchParameterValue=function(n){if(typeof n!="undefined"){var t=GolfNow.Web.Cache.GetValue(_searchParameterCacheName);if(t!=null)return t[n]}};GolfNow.Web.Client.ChangeLocationSetup=function(n){var i=$("#location-search"),t=$("<ul />").addClass("f-dropdown").addClass("medium").addClass("autocomplete-results").css("left",i.css("left")).css("display","none");return t.append($("<li />").addClass("throbber").html('<img src="https://r3c8b5x6.ssl.hwcdn.net/Content/images/wait_sm.gif?v=201709220946" height="32" width="32">')),t.append($("<li />").addClass("message").html(n)),i.after(t),{$textbox:i,$resultsList:t}};GolfNow.Web.Client.ChangeLocation_Click=function(){var t,i;$("#save-location-change").removeClass("disabled").removeProp("disabled");t=$(this);t.parents(".autocomplete-results").hide();var n=t.parents().siblings("input#location-search"),r=$(this).attr("data-id"),u=$(this).attr("data-name");n.val(u);i={placeId:r};placeDetailService.getDetails(i,function(t,i){i==google.maps.places.PlacesServiceStatus.OK?(n.data("selectedPlaceId",r),n.data("selectedPlaceName",u),n.data("selectedPlaceGeo_lat",t.geometry.location.lat()),n.data("selectedPlaceGeo_long",t.geometry.location.lng())):alert("Unable to determine your geo location. Please try other search.")})};GolfNow.Web.Client.ChangeLocation_Click2=function(){var n;$("#save-location-change").removeClass("disabled").removeProp("disabled");n=$(this);n.parents(".autocomplete-results").hide();var t=n.parents().siblings("input#location-search"),r=n.attr("data-id"),i=n.attr("data-name"),u=n.data("lat"),f=n.data("long"),e=n.data("eid");t.val(i);t.data("selectedPlaceId",r);t.data("selectedPlaceName",i);t.data("selectedPlaceGeo_lat",u);t.data("selectedPlaceGeo_long",f);t.data("selectedPlaceGeoEid",e)};GolfNow.Web.Client.ChangeLocation_SaveClick=function(){var r=$(this),n=r.parents().siblings().find("input#location-search"),u=n.data("selectedPlaceId"),f=n.data("selectedPlaceName"),t={lat:n.data("selectedPlaceGeo_lat"),long:n.data("selectedPlaceGeo_long")},i=n.data("selectedPlaceGeoEid")||"";n.val()===""||u===""||f===""||$.isEmptyObject(t)?$("#save-location-change-error").text("Please select an item from the search results.").parents(".row").show():(i!==""&&GolfNow.Web.Request.Post("log-search-selection","/api/autocomplete/geoselection/"+i,null),GolfNow.Web.LocationServices.SetUsersLocation(t.lat,t.long,function(n){GolfNow.Web.Page.Pub("user-location-changed",n);$("#change-location-modal").foundation("reveal","close");$(".federatedNearMe a.nearMeLink span").text(n.Status.message)}))};GolfNow.Web.Client.ChangeLocation_CancelClick=function(){$("#change-location-modal").foundation("reveal","close")};GolfNow.Web.Client.ChangeLocationSearch=function(n,t){function r(n){var r,i,u,f;$.each(n,function(n,e){if(r=$("<li />").addClass("location"),i=$("<a />"),u=$("<i />").addClass("ion-ios-location"),f=$("<span />").html(e.label),i.append(u).append(f),i.attr("data-id",e.id),i.attr("data-name",e.label),i.attr("data-lat",e.lat),i.attr("data-long",e.long),usegoogleplaces)i.on("click",GolfNow.Web.Client.ChangeLocation_Click);else i.on("click",GolfNow.Web.Client.ChangeLocation_Click2);r.append(i);t.append(r)});usegoogleplaces&&t.append($googleAttribution);t.find(".throbber").hide();t.find(".facility, .location").show();t.find(".facility, .location").length==0&&t.find(".message").show()}function u(n){var t=/\-/g,i=n;return n.length>0&&!federatedSearchValidation.test(n)?!1:n.length>0&&n.match(t)!=null&&n.match(t).length>1?!1:!0}var i;if($("#save-location-change-error").text("").parents(".row").hide(),i=n.val(),i!=_prevChangeLocationSearchKey)if(_prevChangeLocationSearchKey=i,i&&i.length>=3){if(u(i))n.tooltipster("hide");else{n.tooltipster("show");return}t.find(".facility, .location").remove();t.show();t.find(".message").hide();t.find(".throbber").show();usegoogleplaces?GolfNow.Web.LocationServices.GetGoogleGeocodeResults(i).done(r):GolfNow.Web.LocationServices.GetGeoCitySearch(i).done(r)}else t.hide()};GolfNow.Web.Client.GetGooglePlacesWrapper=function(n,t,i){var r=$("#federatedResultsLocations .federatedSearchResults ul"),u=$("#federatedResultsLocations .federatedSearchResults p"),f;r.hide();u.show();f=[];$.when(GolfNow.Web.Utils.GetGooglePlacesAutoCompleteResults_Geo(n),GolfNow.Web.Utils.GetGooglePlacesAutoCompleteResults_Regions(n)).then(function(f,e){var o=_.uniq(_.union(f,e),function(n){return n.value});t(o,n,i);u.hide();r.show()})};GolfNow.Web.Client.GetCoursesSearchWrapper=function(n,t,i,r){r=typeof r=="undefined"?0:parseInt(r);var e=$("#federatedResultsCourses .federatedSearchResults ul"),u=$("#federatedResultsCourses .federatedSearchResults p"),f;r==0?f=window.setTimeout(function(){e.hide();u.show()},500):u.show();xhrFacility&&xhrFacility.readystate!=4&&xhrFacility.abort();xhrFacility=$.ajax({url:"/api/autocomplete/facility/search",method:"POST",dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify({searchkey:n,take:10,skip:r}),success:function(i){t(i,n,r==0?!1:!0)},error:function(){},complete:function(){r==0?(f&&window.clearTimeout(f),u.hide(),e.show()):u.hide()}})};GolfNow.Web.Client.FormUtilities=GolfNow.Web.Client.FormUtilities||{};GolfNow.Web.Client.FormUtilities.CleanValue=GolfNow.Web.Client.FormUtilities.CleanValue||function(n){return n&&n!="on"&&n!=""?n:null};GolfNow.Web.Client.FormUtilities.GetSelectedItem=GolfNow.Web.Client.FormUtilities.GetSelectedItem||function(n){return n.filter("input:checked:first")};GolfNow.Web.Client.FormUtilities.GetSelectedValue=GolfNow.Web.Client.FormUtilities.GetSelectedValue||function(n){var t=n.filter("input:checked:first").prop("value");return GolfNow.Web.Client.FormUtilities.CleanValue(t)};GolfNow.Web.Client.FormUtilities.SetSelectedValue=GolfNow.Web.Client.FormUtilities.SetSelectedValue||function(n,t,i){i=typeof i=="undefined"?null:i;n.filter("input").prop("checked",null).closest("li,div,label").removeClass("active");n.filter("input[value='"+t+"']").prop("checked",!0).closest("li,div,label").addClass("active");!GolfNow.Web.Client.FormUtilities.GetSelectedValue(n)&&n.length>1&&(i!=null&&n.filter("input[value='"+i+"']").prop("checked",!0).closest("li,div,label").addClass("active"),!GolfNow.Web.Client.FormUtilities.GetSelectedValue(n)&&n.length>1&&n.filter("input:first").prop("checked",!0).closest("li,div.label").addClass("active"))};GolfNow.Web.Client.FormUtilities.SetZipCodeValidations=GolfNow.Web.Client.FormUtilities.SetZipCodeValidations||function(n,t){t.toLowerCase()=="us"?n.prop("type","tel"):n.prop("type","text")};GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.MapController=function(){function d(){var n=this.ctx.root;return n&&n.hotDealsOnly?Boolean(n.hotDealsOnly)===!0:!1}function g(){return GolfNow.Web.Page.Pub("content_rendered",null),!0}var n=null,u=[],r=[],f=[],t=null,l="#map-info-window .facility-tile",e={},i={},h=[{tmplPath:"MapResults",accessorName:"mapResultsTemplate",isPath:!1,helpers:{colhotdeal:Foundation.utils.debounce(d,150,!0),contents_rendered:Foundation.utils.debounce(g,150,!0),units:GolfNow.Web.Utils.AppendRadiusUnits}},{tmplPath:"CubeRollupHeader",accessorName:"cubeRollupHeaderTemplate",isPath:!1},{tmplPath:"CubeRollup",accessorName:"cubeRollupTemplate",isPath:!1},{tmplPath:"StarRatings",accessorName:"starRatingsTemplate",isPath:!1}],o=null,s=!1,a=function(t,u,e,o){var h=new google.maps.StyledMapType([{featureType:"water",elementType:"all",stylers:[{hue:"#7fc8ed"},{saturation:55},{lightness:-6},{visibility:"on"}]},{featureType:"water",elementType:"labels",stylers:[{hue:"#7fc8ed"},{saturation:55},{lightness:-6},{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{hue:"#83cead"},{saturation:1},{lightness:-15},{visibility:"on"}]},{featureType:"landscape",elementType:"geometry",stylers:[{hue:"#f3f4f4"},{saturation:-84},{lightness:59},{visibility:"on"}]},{featureType:"landscape",elementType:"labels",stylers:[{hue:"#ffffff"},{saturation:-100},{lightness:100},{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{hue:"#ffffff"},{saturation:-100},{lightness:100},{visibility:"on"}]},{featureType:"road",elementType:"labels",stylers:[{hue:"#bbbbbb"},{saturation:-100},{lightness:26},{visibility:"on"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{hue:"#ffcc00"},{saturation:100},{lightness:-35},{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{hue:"#ffcc00"},{saturation:100},{lightness:-22},{visibility:"on"}]},{featureType:"poi.school",elementType:"all",stylers:[{hue:"#d7e4e4"},{saturation:-60},{lightness:23},{visibility:"on"}]}],{name:"GolfNow"});i={mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,"custom_style"]}};$.extend(i,u);s=o.hotDealsOnly;n?(n.setCenter({lat:i.center.lat,lng:i.center.lng}),y(),f.show(),c(e,i)):$.when.apply(this,k()).done(function(){var u=$.extend({},{insLocation:0},o);$.link.mapResultsTemplate("#map-info-col-headers",u);n=new google.maps.Map(document.getElementById(t),i);r=$("#map-info-window");f=$("#map-info-window .facility-address");f.find(".column > p").text("Select a pin to see the Tee Time information.");google.maps.event.addListener(n,"click",function(){r.hide()});c(e,i)}).fail(function(){GolfNow.Web.Utils.ConsoleWarn("Unable to load templates");GolfNow.Web.Page.Pub("no_results_rendered",null)})},v=function(i){if($.isEmptyObject(i))return!1;var h=s&&i.hasHotDeal||i.isHotDeal?"/Content/images/pin_orange.png":"/Content/images/pin_blue.png",o=new google.maps.Marker({position:new google.maps.LatLng(i.latitude,i.longitude),map:n,title:i.name,icon:h});return o.gnFacility=i,google.maps.event.addListener(o,"click",function(){var i,u;r.show();i='<span id="map-pin-title"> '+o.gnFacility.name+" <\/span>";t&&t.close();t=new google.maps.InfoWindow({content:i});google.maps.event.addListener(t,"domready",function(){$("#map-pin-title").dotdotdot({height:25}).on("click",function(){window.location.href=$(".facility-tile a:first").attr("href")})});t.open(n,o);$.isEmptyObject(o.gnFacility.address)||f.hide();r.find(".facility-tile").show();n.setCenter(o.position);u=[{facilities:[o.gnFacility],hotDealsOnly:s,insLocation:1}];$.link.mapResultsTemplate(l,u)}),u.push(o),e.extend(o.position),!0},y=function(){r.length>0&&r.find(".facility-tile").hide();t&&t.close();for(var n=0;n<u.length;n++)u[n].setMap(null);u=[]},p=function(){return e.isEmpty()?!1:(n.fitBounds(e),!0)},w=function(){o&&clearTimeout(o);o=setTimeout(b,250)},b=function(){},k=function(){for(var n,r,i=[],t=0;t<h.length;t++)n=h[t],r=n.isPath?n.tmplPath:"/Tmpls/_"+n.tmplPath+".tmpl.html",i.push(GolfNow.Web.Client.LoadTemplate(r,n.accessorName,n.helpers));return i},nt=function(){var n=new $.Deferred,t=$("#jsGooglePlaces");if(t.length&&t.attr("src").indexOf("&client=")<0){var t=$("#jsGooglePlaces"),r=t[0],i=t.attr("src");jsGoogleMapsUrl!==i?(i=jsGoogleMapsUrl,$.getScript(i).done(function(){n.resolve()})):n.resolve()}else n.resolve();return n.promise()},c=function(n,t){e=new google.maps.LatLngBounds;$.each(n,function(n,t){v(t)});p(t);GolfNow.Web.Page.Sub("window_resize",w);GolfNow.Web.Page.Pub("content_rendered",null)};return{DrawMap:a}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Navigation=GolfNow.Web.Navigation||{};GolfNow.Web.Navigation.StateViewName="GolfNow_NavigationState";GolfNow.Web.Navigation=function(){$(window).on("pagehide",function(){e()});var u=!1,f=!1,t=[],n=[],i="navigation_BackStack",r="navigation_ForwardStack",s=function(n){return n===document.location.pathname?!1:!0},e=function(){t.length&&!u&&GolfNow.Web.Cache.SetSessionStorageValue(i,t);n.length&&u&&GolfNow.Web.Cache.SetSessionStorageValue(r,n);u=!1;f=!1},a=function(){var n=GolfNow.Web.Cache.GetValue(i)||null,t;return n!==null&&(t=n.shift(),t)?(GolfNow.Web.Cache.SetSessionStorageValue(i,n,null),t.url):""},h=function(){var n=GolfNow.Web.Cache.GetValue(r)||null,t;return n!==null&&(t=n.shift(),t)?(GolfNow.Web.Cache.SetSessionStorageValue(r,n,null),t.url):""},c=function(t){t&&t.url!=="/"&&(n=GolfNow.Web.Cache.GetValue(r)||[],n.length===0?n.unshift(t):n[0].name!==t.name&&n[0].url!==t.url&&n.unshift(t))},o=function(){window.history.go(-1)},l=function(n,t){if(BackEnabled()){n=n||!1;t=t||0;var r=0,i="";do i=h(),r++;while(r<t&&s(i)===!1);if(i==="")return null;if(f=!0,n)return e(),htmlDecode(i);document.location.href=htmlDecode(i)}};return BackEnabled=function(){if(document.referrer){var n=document.referrer.match(/:\/\/(.[^/]+)/)[1],t=document.location.href.match(/:\/\/(.[^/]+)/)[1];return n.toLowerCase()==t.toLowerCase()}return!1},DisableBack=function(){window.history.forward()},SkipPage=function(){o(!1,1)},CancelBackNavigation=function(){window.onload=DisableBack();window.onpageshow=function(n){n.persisted&&DisableBack()};window.onunload=function(){void 0}},SkipBackNavigation=function(){window.onload=SkipPage();window.onpageshow=function(n){n.persisted&&SkipPage()};window.onunload=function(){void 0}},Add=function(n,r){t=GolfNow.Web.Cache.GetValue(i)||[];var u={name:n,url:r};t.length===0?t.unshift(u):t[0].url!==r&&t.unshift(u);c(u)},htmlDecode=function(n){return $("<div/>").html(n).text()},{Add:Add,Back:o,Forward:l,BackEnabled:BackEnabled,DisableBack:DisableBack,SkipPage:SkipPage,CancelBackNavigation:CancelBackNavigation,SkipBackNavigation:SkipBackNavigation}}();$(".deepNav nav a, a.back-link").click(function(n){n.preventDefault();GolfNow.Web.Navigation.Back()});GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.SearchParameters=function(){Array.prototype.find||(Array.prototype.find=function(n){var t;if(this==null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof n!="function")throw new TypeError("predicate must be a function");var i=Object(this),u=i.length>>>0,f=arguments[1],r;for(t=0;t<u;t++)if(r=i[t],n.call(f,r,t,i))return r;return""});var n={};n.Radius=GolfNow.Web.Utils.GetDefaultSearchRadius();n.Latitude=null;n.Longitude=null;n.Address=null;n.PageSize=30;n.PageNumber=0;n.SearchType=0;n.SortBy=GolfNow.Web.Utils.GetDefaultSearchSort();n.SortDirection=0;n.Date=null;n.HotDealsOnly=null;n.PriceMin=null;n.PriceMax=null;n.Players=null;n.TimePeriod=null;n.Holes=null;n.RateType=GolfNow.Web.Utils.GetDefaultRateType();n.TimeMin=null;n.TimeMax=null;n.FacilityId=null;n.FacilityName=null;n.FacilitySlug=null;n.MarketId=null;n.MarketName=null;n.SortByRollup=GolfNow.Web.Utils.GetDefaultSearchSort();n.View=GolfNow.Web.Utils.GetDefaultSearchView();n.ExcludeFeaturedFacilities=!1;n.RateTagCodes=null;n.Q=null;n.QC=null;this.ResetAdvancedSearchParams=function(){var t=GolfNow.Web.Utils.GetRefineDefaults();t.SearchType=GolfNow.Web.Utils.GetSearchTypeName(n.SearchType);t.View=n.View;t.SortBy=n.SortBy;t.SortByDirection=n.SortDirection;t.SortByRollup=n.SortByRollup;this.Set(t,!0)};this.NextPage=function(){return++n.PageNumber};this.Set=function(t,i){var o=Object.getOwnPropertyNames(n),r,u,f,e;for(r in t)u=o.find(function(n){if(n.toLowerCase()===r.toLowerCase())return n}),u!==undefined&&u!==""&&(f=t[r],r===undefined&&(f=null),r.toLowerCase()=="date"?(e=new Date(f),GolfNow.Web.Cache.SetActiveDate(GolfNow.Web.Utils.GetDateString(e)),n[u]=GolfNow.Web.Utils.GetDateString(e)):n[u]=f,n.PageNumber=0);i||$(this).trigger("ParametersUpdated")};this.Get=function(){return n};this.GetLc=function(){return _.invert(_.mapObject(_.invert(n),function(n){return n.toLowerCase()}))};this.ResetAdvancedSearchParams();this.QueryNeedsLocation=function(){return(n.SearchType==0||n.SearchType=="GeoLocation"||n.SearchType==4||n.SearchType=="GoPlay")&&(!n.Latitude||!n.Longitude)}};GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Tracking=GolfNow.Web.Tracking||{};GolfNow.Web.Tracking.Customer=GolfNow.Web.Tracking.Customer||{};GolfNow.Web.Tracking.Customer=function(){};GolfNow.Web.Tracking.Customer.ReservationCacheName="GolfNow.Web.Tracking.Customer.Reservations";GolfNow.Web.Tracking.Customer.FacilityCacheName="GolfNow.Web.Tracking.Customer.Facilities";GolfNow.Web.Tracking.Customer.GetReservations=function(){var n=new GolfNow.Web.Tracking.Locations(GolfNow.Web.Tracking.Customer.ReservationCacheName);return n.Get()};GolfNow.Web.Tracking.Customer.AddReservation=function(n,t,i,r,u,f){var e=new GolfNow.Web.Tracking.Locations(GolfNow.Web.Tracking.Customer.ReservationCacheName);e.Add(n,t,i,r,u,f)};GolfNow.Web.Tracking.Customer.GetFacilities=function(){var n=new GolfNow.Web.Tracking.Locations(GolfNow.Web.Tracking.Customer.FacilityCacheName);return n.Get()};GolfNow.Web.Tracking.Customer.AddFacility=function(n,t,i,r,u,f){var e=new GolfNow.Web.Tracking.Locations(GolfNow.Web.Tracking.Customer.FacilityCacheName);e.Add(n,t,i,r,u,f)};GolfNow.Web.Tracking.Locations=function(n){this._cacheName=n;this._locations=this.GetFromCache();this._maxLocations=10};GolfNow.Web.Tracking.Locations.prototype.GetFromCache=function(){var n=GolfNow.Web.Cache.GetValue(this._cacheName);return n===null?[]:n};GolfNow.Web.Tracking.Locations.prototype.Get=function(){return this._locations};GolfNow.Web.Tracking.Locations.prototype.Add=function(n,t,i,r,u,f){var e,o;for(i=i===undefined?null:i,r=r===undefined?null:r,u=u===undefined?{avgerageRating:null,reviewCount:null}:u,f=f===undefined?null:f,e=0;e<this._locations.length;e++)Number(this._locations[e].id)===Number(n)&&this._locations.splice(e,1);while(this._locations.length>=this._maxLocations)this._locations.pop();o={id:n,label:t,address:i,imgPath:r,rating:u,seoFriendlyName:f};this._locations.unshift(o);GolfNow.Web.Utils.ConsoleLog("Number of Locations: "+this._locations.length);GolfNow.Web.Cache.SetLocalStorageValue(this._cacheName,this._locations,31536e6)};GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Ads=GolfNow.Web.Ads||{};GolfNow.Web.Ads.Dfp=function(n){function h(i){var r=n.Deferred(),u=i.replace(/\./g,"-_-");return n.getJSON("/api/ads/dimensions/"+u,function(n){var i,u,f;n!==null&&n.configurations!==null&&(i=[],n.hasSingleDiscreetDimension?(u=n.configurations[0],f=_.map(u.dimensions,function(n){return"["+n.width+","+n.height+"]"}),t(n.name,JSON.parse("["+f.join()+"]"),n.name),i.push(n.name)):_.forEach(n.configurations,function(r){var u=n.name+"_"+r.displaymode.toLowerCase(),f=_.map(r.dimensions,function(n){return"["+n.width+","+n.height+"]"});t(n.name,JSON.parse("["+f.join()+"]"),u);i.push(u)}),r.resolve(i))}),r.promise()}var i,r=[],u=[],f=!1,t=function(n,t,i){r.push({name:n,dimensions:t,id:i})},c=function(n){GolfNow.Web.Page.Pub("publish_dfp_ad",n)},e=function(n){i=n;a();f=!0},l=function(){return f},o=function(){googletag.cmd.push(function(){n.each(r,function(n,t){googletag.defineSlot("/"+i+"/"+t.name,t.dimensions,t.id).addService(googletag.pubads())});n.each(u,function(n,t){googletag.pubads().setTargeting(t.name,t.value)});googletag.pubads().collapseEmptyDivs();googletag.enableServices()})},s=function(n,t){u.push({name:n,value:t})},a=function(){GolfNow.Web.Page.Sub("publish_dfp_ad",v)},v=function(n){googletag.cmd.push(function(){googletag.pubads().clear([n]);googletag.display(n)})},y=function(t,i,r,u){var l=this,c=[],f;t&&!_.isEmpty(r)&&(GolfNow.Web.Page.Sub("request_page_adnames",function(n){var t=n.adContainerName;n.adUnitNames=_.filter(c,function(n){if(n.toLowerCase().indexOf(t)>=0)return n});GolfNow.Web.Page.Pub("response_page_adnames",n)}),e(i),f=[],_.forEach(r,function(n){var t=n.AdUnitName.replace(/\./g,"-_-");f.push(h(t))}),n.when.apply(n,f).done(function(){var n=[];_.forEach(arguments,function(t){n.push(t)});c=_.flatten(n,!0);s("ct_url",u);o()}))};return{DefineSlot:t,DisplayAd:c,Init:e,IsInitialized:l,Publish:o,SetTargeting:s,PageSetup:y}}(jQuery);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Ads=GolfNow.Web.Ads||{};GolfNow.Web.Ads.Partners=function(){function i(t){n.customer={};n.facility={};n.reservation={};n.publish=function(){GolfNow.Web.Utils.ConsoleWarn("Publish method not implemented.")};n.resizeHandler=function(){GolfNow.Web.Utils.ConsoleWarn("ResizeHandler event not implemented.")};n.customer=t.customer;n.facility=t.facility;n.reservation=t.reservation;e()}function r(i,r){n.publish=i;n.publish(n.customer,n.facility,n.reservation);t(r)}function u(t){n.resizeHandler=t}function t(n){GolfNow.Web.Page.Pub("publish_adPartner_ad",n)}function f(n){GolfNow.Web.Page.Pub("refresh_adPartner_ad",n)}var n=this,e=function(){GolfNow.Web.Page.Sub("window_resize",function(){var t=Foundation.utils.is_small_only()?"small":"large";n.resizeHandler(t)});GolfNow.Web.Page.Sub("publish_adPartner_ad",o);GolfNow.Web.Page.Sub("refresh_adPartner_ad",s)},o=function(n){googletag.cmd.push(function(){googletag.display(n)})},s=function(n){googletag.cmd.push(function(){googletag.pubads().clear();googletag.display(n)})};return{Init:i,SetPublishHandler:r,SetResizeHandler:u,DisplayAd:t,RefreshAd:f}}(jQuery,_);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Ads=GolfNow.Web.Ads||{};GolfNow.Web.Ads.GolfBalls=function(n){var t={gb_confirmationpage_bottom_all_5_small:{width:290,height:50},gb_confirmationpage_bottom_all_5_medium:{width:468,height:60},gb_confirmationpage_bottom_all_5_large:{width:728,height:90},gb_confirmationpage_right_large_3:{width:300,height:300}},i="",r="",u="",f="",e="",o=function(n,t){u=typeof n=="undefined"?"GolfNow":n;f=typeof t=="undefined"?"Customer":t},s=function(n){e=typeof n=="undefined"?"GolfNow":n},h=function(n,t){i=n;r=t},c=function(n){var i,r,u;for(i in t)if(t.hasOwnProperty(i)&&(r=t[i],u=r.width+"x"+r.height,u==n))return i;return""},l=function(o){if(o instanceof Array){var s=o.map(function(n){var i=t[n],r,u;return i?(r=i.width,u=i.height,r+"x"+u):""}).join(","),h='<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">           <soap:Body>                <GetMultipleCheckoutBanner xmlns="'+r+'">                    <CustomerParameters>                        <NameValuePair>                            <Name>FirstName<\/Name>                            <Value>'+u+"<\/Value>                        <\/NameValuePair>                        <NameValuePair>                            <Name>LastName<\/Name>                            <Value>"+f+"<\/Value>                        <\/NameValuePair>                        <NameValuePair>                            <Name>TransactionSize<\/Name>                            <Value>"+e+"<\/Value>                        <\/NameValuePair>                        <NameValuePair>                            <Name>AdSize<\/Name>                            <Value>"+s+"<\/Value>                        <\/NameValuePair>                    <\/CustomerParameters>                <\/GetMultipleCheckoutBanner>            <\/soap:Body>        <\/soap:Envelope>";n.ajax({type:"POST",url:i,data:h,contentType:"text/xml; charset=ansi",dataType:"xml",success:function(t){n(t).find("BannerHTML").each(function(t,i){var u=n(i).find("Size").text(),f=c(u),r=n.parseHTML(n(i).find("HTML").text());n(r).find("a").attr("target","_blank");n("#"+f).html(r)})},error:function(n){console.log(n)}})}};return{ShowAds:l,SetName:o,SetTransactionBucket:s,SetServiceDetails:h}}(jQuery);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Ads=GolfNow.Web.Ads||{};GolfNow.Web.Ads.ClubHub=function(n,t){function i(n){GolfNow.Web.Ads.Partners.SetPublishHandler(u,n);GolfNow.Web.Ads.Partners.SetResizeHandler(e)}function r(n){GolfNow.Web.Ads.Partners.SetPublishHandler(f,n)}function u(n,i,r){googletag.cmd.push(function(){googletag.defineSlot("/145042136/desktop",[[375,160],[300,300],[360,210],[728,90]],"div-gpt-ad-1497656061163-0").addService(googletag.pubads());googletag.defineSlot("/145042136/mobile-new",[[300,600],[150,80],[400,110],[290,50]],"div-gpt-ad-1497656061163-1").addService(googletag.pubads());googletag.pubads().enableSingleRequest();googletag.pubads().collapseEmptyDivs();var u=GolfNow.Web.Date.DaysBetween(new Date,r.playDateTime),f=r.greensFee<=50?"0-50":r.greensFee<=100?"51-100":"100+";googletag.pubads().setTargeting("round_fee",f).setTargeting("course_name",t.escape(i.Name)).setTargeting("course_state",i.Address.StateProvinceCode).setTargeting("lead_time",u<3?u.toString():"3plus").setTargeting("course_city",t.escape(i.Address.City)).setTargeting("course_country",i.Address.Country).setTargeting("customer_city",t.escape(n.Address.City||"")).setTargeting("customer_state",n.Address.StateProvinceCode||"").setTargeting("customer_country",n.Address.Country||"").setTargeting("customer_gender",n.Gender||"").setTargeting("click_id",r.reservationId);googletag.enableServices()})}function f(n,i,r){googletag.cmd.push(function(){googletag.defineSlot("/145042136/clubhub",["fluid"],"div-gpt-ad-1-0").addService(googletag.pubads());googletag.pubads().enableSingleRequest();var u=GolfNow.Web.Date.DaysBetween(new Date,r.playDateTime),f=r.greensFee<=50?"0-50":r.greensFee<=100?"51-100":"100+";googletag.pubads().setTargeting("round_fee",f).setTargeting("local_golfer",((n.Address.StateProvinceCode||"")===i.Address.StateProvinceCode).toString()).setTargeting("course_name",t.escape(i.Name)).setTargeting("course_state",i.Address.StateProvinceCode).setTargeting("lead_time",u<3?u.toString():"3plus").setTargeting("course_city",t.escape(i.Address.City)).setTargeting("course_country",i.Address.Country).setTargeting("customer_city",t.escape(n.Address.City||"")).setTargeting("customer_state",n.Address.StateProvinceCode||"").setTargeting("customer_country",n.Address.Country||"").setTargeting("customer_gender",n.Gender||"").setTargeting("click_id",r.reservationId);googletag.enableServices()})}function e(n){var t="div-gpt-ad-1497656061163-";switch(n){case"small":t+="1";break;case"medium":t+="1";break;default:t+="0"}GolfNow.Web.Ads.Partners.RefreshAd(t)}return{Init:i,InitTest:r}}(jQuery,_);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Page=function(n,t,i,r){function b(n){GolfNow.Web.Utils.ConsoleLog("Loading "+n.widgetName+"...")}function k(n){GolfNow.Web.Utils.ConsoleLog("Done loading "+n.widgetName)}function d(n){GolfNow.Web.Utils.ConsoleLog("Error loading "+n)}function g(){t.subscribe("widget_loading",b);t.subscribe("widget_loadComplete",k);t.subscribe("widget_loadError",d)}function nt(){t.publish("page_init")}function tt(){return Foundation.utils.is_small_only()?"small":Foundation.utils.is_medium_only()?"medium":Foundation.utils.is_large_up()?"large":void 0}function it(){rt();n(window).resize(function(){var i=n("section");n.each(i,function(t){n(t).is(":visible")});t.publish("window_resize")})}function rt(){var n=window.matchMedia(Foundation.media_queries["small-only"]),t=window.matchMedia(Foundation.media_queries["medium-only"]),i=window.matchMedia(Foundation.media_queries["large-only"]),r=window.matchMedia(Foundation.media_queries.xlarge);try{r.addListener(function(n){n.matches&&h()});i.addListener(function(n){n.matches&&h()});t.addListener(function(n){n.matches&&p()});n.addListener(function(n){n.matches&&y()});i.matches&&h();t.matches&&p();n.matches&&y()}catch(u){c()}}function y(){GolfNow.Web.Utils.ConsoleLog("Handling Small Screen");t.publish("mq_small_screen");i.contains(e,"small")?s():o()}function p(){GolfNow.Web.Utils.ConsoleLog("Handling Medium Screen");t.publish("mq_medium_screen");i.contains(e,"medium")?s():o()}function h(){GolfNow.Web.Utils.ConsoleLog("Handling Large Screen");t.publish("mq_large_screen");i.contains(e,"large")?s():o()}function o(){document.location.href.lastIndexOf("unsupported")<0&&(document.location.href="/device/unsupported")}function c(){document.location.href.lastIndexOf("unsupported")<0&&(document.location.href="/browser/unsupported")}function s(){}function ut(u){i.each(u,function(u){var e=u.Name.toLowerCase(),o=n("#"+e);i.each(u.Widgets,function(n){var i=n.Name.toLowerCase(),h=a+"/widgets/"+i,u="async_"+i+"_init",e="async_"+i+"_fail",s="async_"+i+"_always";f.push(u);f.push(e);f.push(s);r.PostWidget(i,h,n).done(function(n){GolfNow.Web.Utils.ConsoleLog("XHR GetContent Done");o.append(n);t.publish(u)}).fail(function(){GolfNow.Web.Utils.ConsoleError("XHR GetContent Request - Fail");t.publish(e)}).always(function(n){var i=n.state?"error":"success";GolfNow.Web.Utils.ConsoleLog("XHR GetContent Request - Always: Status = "+i);t.publish(s)})})})}function ft(r,o,s,h,v,y){var p;try{if(HTMLElement)n(".off-canvas-wrap").show();else{c();return}}catch(d){c();return}a=y||cdnUrl.substring(0,cdnUrl.length-1)||location.protocol+"//"+location.host;v=v||{};h=h||{};s=s||{};var b=!n.isEmptyObject(s),tt=!n.isEmptyObject(h),rt=!n.isEmptyObject(v);l={Size:s,Views:h,Refinements:v};$searchElem.length&&$searchElem.data("configData",l);o!==null&&o!==undefined&&n.isArray(o)&&o.length>0&&(e=o);(r===null||r===undefined)&&GolfNow.Web.Utils.ConsoleWarn("pageName variable is not set");u=r;GolfNow.Web.Utils.ConsoleLog("Page Load: "+u);var k=u+"_config",ft="/api/config/getpageconfig/"+u,w="xhr_get_always_"+k;f.push(w);t.subscribe(w,function(n){GolfNow.Web.Utils.ConsoleLog("Topic Get Requset - Always: Status = "+n.requestStatus)});b&&(p=i.where(s.Sections,{PreLoad:!1}),p.length>0&&ut(p));g();it();nt()}function et(){return $searchElem.length?$searchElem.data("configData"):null}var w={Sub:function(n,i){t.subscribe(n,i)},Pub:function(n,i){t.publish(n,i)},PublishedTopics:function(){return f},PageName:function(){return u},PageLoad:ft,RedirectToUnsupported:o,RedirectToHome:s,GetPageConfig:et,GetCurrentClientProfile:tt},u="",l={},f=["window_resize","page_init","mq_small_screen","mq_medium_screen","mq_large_screen","mq_xlarge_screen"],e=["small"],a,v=n("#teetime-search");return $searchElem=v.length?v:n("#pre-fedsearch"),w}(jQuery,amplify,_,GolfNow.Web.Request);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.UrlParams=GolfNow.Web.UrlParams||{};GolfNow.Web.Page.Sub("searchController_Initialized",function(n){return searchController=n,GolfNow.Web.UrlParams.HandleUpdatedHashParameters(n),GolfNow.Web.Client.SearchController.InitializeFederatedSearch(),GolfNow.Web.Search.handlePreviousDateLink(),!0});GolfNow.Web.UrlParams.HandleHashChange=function(){GolfNow.Web.UrlParams.HandleUpdatedHashParameters()};GolfNow.Web.UrlParams.HandleUpdatedHashParameters=function(n){function p(n,t){var i=$.Deferred(),r;return t!=="GeoLocation"?i.resolve(n):(r=new GolfNow.Web.RecentSearches,$.when(r.Find(n.latitude,n.longitude),GolfNow.Web.LocationServices.Address()).done(function(t,r){t?(n.address=t,i.resolve(n)):(n.address=r,i.resolve(n))})),i.promise()}var r,t,u,o,c,s,h,f,e,v,l,y,i,a;n=searchController||n;r=n?n.SearchParameters.Get():null;location.hash.length>0&&(location.pathname.startsWith("/search",location.pathname.length-7)||location.pathname.startsWith("/go-play")||location.pathname.startsWith("/tee-times/hot-deals"))?(i=GolfNow.Web.Utils.GetSearchTypeName(r.SearchType),t=GolfNow.Web.UrlParams.GetHashParams(),i=="Facility"&&(t.sortbyrollup=r.SortByRollup,t.sortby=r.SortBy,t.view=r.View),t=GolfNow.Web.UrlParams.NormalizeViewAndSort(t),t=GolfNow.Web.UrlParams.HandleSpecialHashParams(t),n&&(u=GolfNow.Web.Utils.GetRefineDefaultsLower(),o=["searchtype"],i=="Facility"?(u.view="List",u.sortby="Date",c=redirectToFacilityLink.toLowerCase().replace("[facilityid]",r.FacilitySlug),c+=location.search,t=_.defaults(t,_.omit(u,o)),s=$.param(_.omit(t,function(n,t){var i=_.keys(u);return!_.contains(i,t)||t==="radius"||_.isNull(n)||_.isEmpty(n)})),n.SearchParameters.Set(t),history.replaceState(t,null,c+"#"+s),(s.indexOf("q=")>-1||s.indexOf("qc=")>-1)&&GolfNow.Web.Analytics.Google.TrackPageView(c+"?"+s),GolfNow.Web.UrlParams.PopulateSearchHeadline(n,i,t)):i=="GoPlay"?(e=function(){var r=window.location.href,f;r.indexOf("#")!=-1&&(r=r.substr(0,r.indexOf("#")));t.radius>GolfNow.Web.Utils.GetMaximumSearchRadius()&&(t.radius=GolfNow.Web.Utils.GetMaximumSearchRadius().toString());o.push("ratetype");t=_.defaults(t,_.omit(u,o));f=$.param(_.omit(t,function(n,t){var i=_.keys(u);return!_.contains(i,t)||_.isNull(n)||_.isEmpty(n)}));n.SearchParameters.Set(t);GolfNow.Web.UrlParams.PopulateSearchHeadline(n,i,t);(f.indexOf("q=")>-1||f.indexOf("qc=")>-1)&&GolfNow.Web.Analytics.Google.TrackPageView(r+"?"+f);window.location.href=r+"#"+f},GolfNow.Web.Client.getCurrentPosition(e,e)):(h=!1,f=_.defaults(t,_.omit(u,o)),(typeof t.latitude=="undefined"||t.latitude===null||typeof t.longitude=="undefined"||t.longitude===null)&&i!=="Destination"?(e=function(n){f.latitude=n.Latitude;f.longitude=n.Longitude;h=!0},GolfNow.Web.Client.getCurrentPosition(e,e)):i==="Destination"&&(f.latitude=n.SearchParameters.Get().Latitude,f.longitude=n.SearchParameters.Get().Longitude,h=!0),t.radius>GolfNow.Web.Utils.GetMaximumSearchRadius()&&(f.radius=GolfNow.Web.Utils.GetMaximumSearchRadius().toString(),h=!0),v=p(f,i),v.done(function(r){var e,u,f;GolfNow.Web.Page.Sub("beforeSearch",function(t){GolfNow.Web.UrlParams.PopulateSearchHeadline(n,i,t)});n.SearchParameters.Set(r);e=n.SearchParameters.Get();n.SaveSearchParameters(e);h&&(u=window.location.href,u.indexOf("#")!=-1&&(u=u.substr(0,u.indexOf("#"))),f=$.param(_.omit(r,function(n,i){var r=_.keys(t);return!_.contains(r,i)||_.isNull(n)||_.isEmpty(n)||i==="sortbyrollup"})),(f.indexOf("q=")>-1||f.indexOf("qc=")>-1)&&GolfNow.Web.Analytics.Google.TrackPageView(u+"?"+f),window.location.href=u+"#"+f)}))),l=$("#main-header a.login"),l.length&&(y=l.prop("href"),l.prop("href",y+location.hash))):(i=GolfNow.Web.Utils.GetSearchTypeName(r.SearchType),i=="Facility"?this.HandleFacilityUrlHash(n):i=="GoPlay"?this.HandleGoPlayUrlHash(n):i!="GeoLocation"&&i!="Destination"&&(a=_.extendOwn(r,_.omit(GolfNow.Web.Utils.GetRefineDefaults(),"SearchType")),n.SearchParameters.Set(a,!0),n.SaveSearchParameters(a)))};GolfNow.Web.UrlParams.PopulateSearchHeadline=function(n,t,i){var r=n?n.GetRestoreFedSearchKey():null;$.isEmptyObject(r)||(t==="Destination"&&i&&(r.Radius=i.radius),n.SetRefinedResultsDisplay(r,$("#fedresults"),$(".list-refined-items")))};$(window).bind("hashchange",GolfNow.Web.UrlParams.HandleHashChange);GolfNow.Web.UrlParams.GetHashParams=function(){for(var t={},n,r=/\+/g,u=/([^&;=]+)=?([^&;]*)/g,i=function(n){return decodeURIComponent(n.replace(r," "))},f=window.location.hash.substring(1);n=u.exec(f);)t[i(n[1]).toLowerCase()]=i(n[2]);return t};GolfNow.Web.UrlParams.NormalizeViewAndSort=function(n){var e=GolfNow.Web.Page.GetPageConfig(),u,f,o,t,i,s,h,r,l,c;if(_.isObject(e)&&_.isArray(e.Views)?(u=_.map(e.Views,function(n){return n.Name}),f=_.map(e.Views,function(n){return{view:n.Name,sorts:n.Sorts}})):(GolfNow.Web.Utils.ConsoleWarn("Unable to get page config views in Url Params."),u=["Course","List","Map"],f=[{view:"Course",sorts:[{Name:"Facilities.Weight"},{Name:"Facilities.Distance"},{Name:"Date"},{Name:"Facilities.Rating"},{Name:"GreensFees"},{Name:"Facilities.Name"},]},{view:"List",sorts:[{Name:"Facilities.Weight"},{Name:"Facilities.Distance"},{Name:"Date"},{Name:"Facilities.Rating"},{Name:"GreensFees"},{Name:"Facilities.Name"},]},{view:"Map",sorts:[{Name:"Facilities.Weight"},{Name:"Facilities.Distance"}]}]),n.view?u.indexOf(n.view)==-1&&(n.view=u[0]):n.view=u[0],typeof n.sortby=="undefined"){for(s=0;s<f.length;s++)if(h=f[s],n.view===h.view){t=h.sorts[0].Name;i=0;break}typeof t=="undefined"&&(t=f[0].sorts[0].Name,i=0)}else o=n.sortby.lastIndexOf("."),o==n.sortby.length-2?(t=n.sortby.substr(0,o),i=n.sortby.substr(o+1)):(t=n.sortby,i=n.sortdirection||0);return n.sortdirection=i&&i==1?1:0,t==="Facilities.Rating"&&(n.sortdirection=1),n.sortbyrollup=t,(n.view==="Course"||n.view==="Map")&&t==="Date"&&n.sortbyrollup.indexOf(".")===-1&&(n.sortbyrollup+=Number(n.sortdirection)===0?".MinDate":".MaxDate"),(n.view==="Course"||n.view==="Map")&&t==="GreensFees"&&n.sortbyrollup.indexOf(".")===-1&&(n.sortbyrollup+=Number(n.sortdirection)===0?".MinPrice":".MaxPrice"),r=GolfNow.Web.Search.getAllowedPageSorts(n.view),r&&r.Sorts.length?(l=_.findWhere(r.Sorts,{Name:t}),l?n.sortby=t:(c=_.findWhere(r.Sorts,{Default:!0}),n.sortby=c?c.Name:r.Sorts[0].Name)):n.sortby=t,GolfNow.Web.Search.handleSortState(n.view),n};GolfNow.Web.UrlParams.HandleSpecialHashParams=function(n){return _.each(n,function(n,t,i){switch(t.toLowerCase()){case"daysout":GolfNow.Web.Cache.SetActiveDate("");var u=(Number(n)||0)>=0?Number(n):0,r=GolfNow.Web.Utils.GetDateString(Date.parse("t + "+u+" d"));GolfNow.Web.Cache.SetActiveDate(r);i.date=r;GolfNow.Web.Utils.ConsoleLog("Overriding Date to:"+r)}}),n};GolfNow.Web.UrlParams.HandleFacilityUrlHash=function(n,t,i){var u,o,s,r,h;t=t||!1;var c=history.state,f=n.SearchParameters.Get(),e=t?i:redirectToFacilityLink.toLowerCase().replace("[facilityid]",f.FacilitySlug||f.FacilityId);if(e+=location.search,u=GolfNow.Web.Utils.GetRefineDefaults(),u.View="List",u.SortBy="Date",o=["SearchType","TimeMin","TimeMax","PriceMin","PriceMax","Holes","Players","RateType","Q","QC"],f.View!=="List"?(f.View="List",f.SortBy="Date"):o.push("View","SortBy"),c===null){if(viewOverrideParams.HotDealsOnly!==undefined?u.HotDealsOnly=viewOverrideParams.HotDealsOnly:o.push("HotDealsOnly"),s=_.extendOwn(f,_.omit(u,o)),r=this.BuildHashParamsFromSearchParams(s,u,["Radius"]),(r.indexOf("q=")>-1||r.indexOf("qc=")>-1)&&GolfNow.Web.Analytics.Google.TrackPageView(e+"?"+r),t){window.location=e+"#"+r;return}history.replaceState({id:f.FacilityId},"Init",e+"#"+r)}else{if(o.push("HotDealsOnly"),s=_.extendOwn(_.omit(u,o),_.omit(f,["SearchType"])),r=this.BuildHashParamsFromSearchParams(s,u,["Radius"]),n.SearchParameters.Set(s),(r.indexOf("q=")>-1||r.indexOf("qc=")>-1)&&GolfNow.Web.Analytics.Google.TrackPageView(e+"?"+r),t){window.location=e+"#"+r;return}history.pushState(s,null,e+"#"+r)}h=n.GetRestoreFedSearchKey();$.isEmptyObject(h)||n.SetRefinedResultsDisplay(h,$("#fedresults"),$(".list-refined-items"))};GolfNow.Web.UrlParams.HandleGoPlayUrlHash=function(n,t){var e,r,u,f,o,s,i;typeof n=="undefined"&&(n=searchController);typeof t=="undefined"&&(t=!1);s=n.SearchParameters.Get();i=window.location.href;i.indexOf("#")!=-1&&(i=i.substr(0,i.indexOf("#")));e=GolfNow.Web.Utils.GetRefineDefaults();r=["SearchType"];r.push("HotDealsOnly","TimeMin","TimeMax","TimePeriod","Holes","List","View","SortBy");u=_.extendOwn(_.omit(e,r),_.omit(s,["SearchType"]));f=this.BuildHashParamsFromSearchParams(u,e,r.concat(["Radius","Players","SortByRollup"]));(f.indexOf("q=")>-1||f.indexOf("qc=")>-1)&&GolfNow.Web.Analytics.Google.TrackPageView(i+"?"+f);n.SaveSearchParameters(u);n.SearchParameters.Set(u);o=n.GetRestoreFedSearchKey();$.isEmptyObject(o)||n.SetRefinedResultsDisplay(o,$("#fedresults"),$(".list-refined-items"))};GolfNow.Web.UrlParams.BuildHashParamsFromSearchParams=function(n,t,i){for(var u=_.omit(n,function(n,r){var u=_.keys(t);return!_.contains(u,r)||_.contains(i,r)||_.isNull(n)}),r,f=Object.keys(u),e=f.length,o={};e--;)r=f[e],o[r.toLowerCase()]=u[r];return $.param(o)};GolfNow.Web.UrlParams.isFacilitySearchType=function(n){var t=!1;switch(n){case"Facility":case"1":case 1:t=!0}return t};GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Cancellation=function(n){var f="",v="",e="",y="",w="",p="#EligibleModal",o="#IneligibleModal",u="#SuccessModal",s="#FailureModal",h="#WorryFreeModal",c="#WorryFreeFailureModal",l="#WorryFreeIneligibleModal",ut="#WorryFreeReason",a="#WorryFreePlayers",ft="#EligibleReason",g="#EligiblePlayers",b="",t=!1,nt=0,et=function(n){n=typeof n=="undefined"?"/api/account/reservation/cancel":n;b=n;st();lt()},ot=function(n,t,i,r,u,f){k();n?ct(i,r,u,f):!n&&t?ht(i,r,u,f):n||t?d():d()},k=function(){f="";v="";e="";y="";w="";t=!1;n(a).empty();var i=n("<option />").val("").html("Please choose number of players.");n(a).append(i);[1,2,3,4].forEach(function(t){i=n("<option />").val(t).html(t);n(a).append(i)})},i=function(t){if(t.namespace==="fndtn.reveal"){var i=n(this);nt=n(document).scrollTop();window.scrollTo(0,0);GolfNow.Web.Client.ForceFullPageHeight();i.css({top:0})}},r=function(t){t.namespace==="fndtn.reveal"&&(GolfNow.Web.Client.ForceDefaultPageHeight(),n(document).scrollTop(nt),document.location.reload(!0))},st=function(){n(p).on("click","a.button",function(){var i,r,u;n("#frmEligible").valid()&&(n(this).prop("disabled",!0).addClass("disabled"),i=n(ft).val(),r=n(g).val(),t||(u=n(this),t=!0,n.ajax({url:b,method:"post",datatype:"json",contentType:"application/json; charset=UTF-8",data:JSON.stringify({ReservationID:e,FacilityID:f,PlayersToCancel:r,CancellationReasonId:i}),success:function(n){n.success?(y=n.facilityUrl,tt()):it()},always:function(){t=!1;u.prop("disabled",!1).removeClass("disabled")}})))});n(h).on("click","a.button",function(){var i=n("#frmWorryFree"),r,u,o;i.length&&i.valid()?(n(this).prop("disabled",!0).addClass("disabled"),r=n(ut).val(),u=n(a).val(),t||(o=n(this),t=!0,n.ajax({url:b,method:"post",datatype:"json",contentType:"application/json; charset=UTF-8",data:JSON.stringify({ReservationID:e,FacilityID:f,PlayersToCancel:u,CancellationReasonId:r}),success:function(n){n.success?(y=n.facilityUrl,tt()):rt()},always:function(){t=!1;o.prop("disabled",!1).removeClass("disabled")}}))):n(this).hasClass("cancel")&&n(h).foundation("reveal","close")});n(u).on("click","a.button",function(){window.location.href=y});n(o).on("click","a.button",function(){d(!0)});n(s).on("click","a.button",function(){it(!0)});n(c).on("click","a.button",function(){rt(!0)});n(l).on("click","a.button",function(){at(!0)});n(u).on("close.fndtn.reveal",function(n){n.namespace==="fndtn.reveal"&&location.reload(!0)});n(p).on("opened.fndtn.reveal",i);n(p).on("close.fndtn.reveal",r);n(o).on("opened.fndtn.reveal",i);n(o).on("close.fndtn.reveal",r);n(u).on("opened.fndtn.reveal",i);n(u).on("close.fndtn.reveal",r);n(s).on("opened.fndtn.reveal",i);n(s).on("close.fndtn.reveal",r);n(h).on("opened.fndtn.reveal",i);n(h).on("close.fndtn.reveal",r);n(c).on("opened.fndtn.reveal",i);n(c).on("close.fndtn.reveal",r);n(l).on("opened.fndtn.reveal",i);n(l).on("close.fndtn.reveal",r)},ht=function(t,i,r,u){e=t;f=i;v=r;w=u;n(g+" option").each(function(){n(this).val()>u&&n(this).remove()});n(p).foundation("reveal","open")},ct=function(t,i,r,u){e=t;f=i;v=r;w=u;n(a+" option").each(function(){n(this).val()>u&&n(this).remove()});n(h).foundation("reveal","open")},lt=function(){validator=n("#frmWorryFree").validate({errorElement:"small",rules:{WorryFreePlayers:{required:!0},WorryFreeReason:{required:!0}},onfocusout:function(t){var i=n(t);i.valid()?i.parent("label").removeClass("error").addClass("valid"):i.parent("label").removeClass("valid").addClass("error")}});validateForm()},at=function(t){t=typeof t=="undefined"?!1:Boolean(t);t?n(l).foundation("reveal","close"):n(l).foundation("reveal","open")},d=function(t){t=typeof t=="undefined"?!1:Boolean(t);t?n(o).foundation("reveal","close"):n(o).foundation("reveal","open")},tt=function(){n(u).find(".facility-name").html(v);n(u).foundation("reveal","open")},it=function(t){t=typeof t=="undefined"?!1:Boolean(t);t?n(s).foundation("reveal","close"):n(s).foundation("reveal","open");k()},rt=function(t){t=typeof t=="undefined"?!1:Boolean(t);t?n(c).foundation("reveal","close"):n(c).foundation("reveal","open");k()};return{Init:et,CancelModal:ot}}(jQuery);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.FederatedSearch=function(){function f(){var f;$("#fedsearch").on({blur:function(){$(this).tooltipster("hide")},focus:function(){$("h2.federatedSearchHeading").text("Current Search");var n=$(this).val();GolfNow.Web.Client.SearchController.validateFedSearch(n)?$(this).tooltipster("hide"):$(this).tooltipster("show")},keyup:function(n){var t=$(this).val();if(GolfNow.Web.Client.SearchController.validateFedSearch(t)?$(this).tooltipster("hide"):$(this).tooltipster("show"),t.length==0?($(".federatedStepOne").show(),$(".federatedStepTwo").hide()):($(".federatedStepOne").hide(),$(".federatedStepTwo").show()),t.length>=minimumchar){if(!GolfNow.Web.Client.SearchController.validateFedSearch(t))return!1;n.which==27?GolfNow.Web.Client.SearchController.CloseFederatedSearch():t.length>=minimumchar&&previousSearchKey!=t&&(skipResults=0,previousSearchKey=t,GolfNow.Web.GeoPlaces.TypeAheadWrapper(t,GolfNow.Web.Client.SearchController.CourseSearchCallback,GolfNow.Web.Client.SearchController.LocationSearchCallback,previewTop,skipResults,function(){$("#federatedResultsCourses").find("li").length==0&&$("#federatedResultsLocations").find("li").length==0&&$("#federatedResultsCourses").find(".message").show()}))}else GolfNow.Web.Client.SearchController.StepOne()}}).tooltipster({content:$('<p class="help-block"><strong class="required-text">Search Requirements<\/strong><br />Multiple Hyphens, Symbols, and Special Characters are not Allowed<br />'),trigger:"custom",position:"bottom-right"});$("#searchModal").on("focus","#fedsearch:text",function(){$(this).val().length>0&&$(this)[0].setSelectionRange(0,$(this).val().length)});$(".universal-search .search-bar input").focus(function(){$(".universal-search .search-refine").hide()});$(".container *:not(.container.universal-search *)").click(function(){$(".universal-search .search-refine").show()});$("#coursecontainer").hide();$("#placecontainer").hide();$(".federatedClose").click(function(){GolfNow.Web.Client.SearchController.CloseFederatedSearch(!1)});$(document).on("opened.fndtn.reveal","#searchModal",function(n){if(n.namespace==="fndtn.reveal"){var t=$(this);f=Date.parse(searchController.SearchParameters.Get().Date)}}).on("click","#applyBtn",function(){$("#advancedSearch").valid()&&($(".sorting-controls, .results-location").fadeIn(),r(searchController))}).on("click","#resetBtn",function(){$("#advancedSearch").validate().resetForm();searchController.ResetAdvancedSearchParams();t(searchController)}).on("click","#closeBtn",function(){searchController.SetDate(f,!0);searchController.SetDisplayDates(f);GolfNow.Web.Client.SearchController.CloseFederatedSearch()}).on("change.fndtn.slider",function(n){n.namespace==="fndtn.slider"&&$("input[name='sldrRadius']").val($(n.target).attr("data-slider"))});$("#federatedSearchFacilityMoreResults").click(function(n){return n.preventDefault(),skipResults+=5,GolfNow.Web.Client.GetCoursesSearchWrapper($("#fedsearch").val(),GolfNow.Web.Client.SearchController.FacilitySearchCallback,previewTop,skipResults),!1});$(window).on("pageshow",function(n){if(n.originalEvent.persisted)var t=setInterval(function(){searchController.IsRequestPending()||(initializeFederatedSearch(),window.clearInterval(t))},100)});GolfNow.Web.Page.Sub("show-refine-search-clicked",function(){n=!0});GolfNow.Web.Page.Sub("show-search-filters-clicked",function(t){u=t.mediumOverride||!1;(Foundation.utils.is_small_only()||u)&&(n=!0)});GolfNow.Web.Page.Sub("edit-search-clicked",function(){n=!1});GolfNow.Web.Page.Sub("homepage-edit-search-clicked",function(){i=!0;n=!1});GolfNow.Web.Page.Sub("filter-option-changed",function(n){r(n)})}function t(n){var i=n.SearchParameters.Get(),r=Number(i.TimeMin||GolfNow.Web.Utils.GetMinTimePeriodValue()),u=Number(i.TimeMax||GolfNow.Web.Utils.GetMaxTimePeriodValue()),f=Number(i.PriceMin||GolfNow.Web.Utils.GetPriceFloor()),e=Number(i.PriceMax||GolfNow.Web.Utils.GetPriceCeiling()),o=Number(i.Radius||GolfNow.Web.Utils.GetDefaultSearchRadius("mi")),s=Number(i.Holes)||0,h=Number(i.Players)||0,c=i.HotDealsOnly||!1,l=i.Date,a=i.RateType||GolfNow.Web.Utils.GetDefaultRateType(),t=document.querySelector("gn-search-filters");t&&(t.setAttribute("timemin",r),t.setAttribute("timemax",u),t.setAttribute("pricemin",f),t.setAttribute("pricemax",e),t.setAttribute("radius",o),t.setAttribute("hotdealsonly",c),t.setAttribute("holes",s),t.setAttribute("players",h),t.setAttribute("date",l),t.setAttribute("ratetype",a));Foundation.utils.is_small_only()&&$("h2.federatedSearchHeading").text("Filter Search")}function r(n){var t=document.querySelector("gn-search-filters"),i,r,f,e,o,s;if(price=[t.getAttribute("pricemin"),t.getAttribute("pricemax")],time=[t.getAttribute("timemin"),t.getAttribute("timemax")],distance=t.getAttribute("radius"),players=t.getAttribute("players"),holes=t.getAttribute("holes"),hotdealsonly=t.getAttribute("hotdealsonly"),ratetype=t.getAttribute("ratetype"),time[0]<=GolfNow.Web.Utils.GetMinTimePeriodValue()&&(time[0]=GolfNow.Web.Utils.GetMinTimePeriodValue()),time[1]>=GolfNow.Web.Utils.GetMaxTimePeriodValue()&&(time[1]=GolfNow.Web.Utils.GetMaxTimePeriodValue()),price[1]>=130&&(price[1]=GolfNow.Web.Utils.GetPriceCeiling()),i={HotDealsOnly:hotdealsonly,Radius:distance,Players:players,Holes:holes,PriceMin:price[0],PriceMax:price[1],TimeMin:time[0],TimeMax:time[1],RateType:ratetype},n.redirectOnSearch=!0,r=n.SearchParameters.Get(),i.View=r.View,i.SortBy=r.SortBy,f=n.GetPickerSelectedDate(),f&&n.SetDate(f,!0),e=GolfNow.Web.Utils.GetSearchTypeName(r.SearchType),e==searchType_Facility){var h=r.FacilityId,c=r.FacilityName,u=redirectToFacilityLink.toLowerCase().replace("[facilityid]",h);u=u.substring(0,u.lastIndexOf("/"));f||(i.Date=r.Date);n.SearchParameters.Set(i,!0);o=!window.location.pathname.startsWith(u);GolfNow.Web.UrlParams.HandleFacilityUrlHash(n,o,u+"/search");GolfNow.Web.Client.SearchController.CloseFederatedSearch()}else n.SaveCurrentFederatedSearchParameters(),n.ShouldRedirectOnSearch()?n.RedirectToCustomSearchPage(i):(n.SearchParameters.Set(i),n.SaveSearchParameters(i),s=n.GetRestoreFedSearchKey(),n.SetRefinedResultsDisplay(s,$("#fedresults"),$(".list-refined-items")),GolfNow.Web.Client.SearchController.CloseFederatedSearch())}function e(r,u){if(r!=null){var f={placeId:r};placeDetailService.getDetails(f,function(f,e){if(e==google.maps.places.PlacesServiceStatus.OK){var o=f.geometry.location,s={Latitude:o.lat(),Longitude:o.lng(),SearchType:searchType_GeoLocation};f.geometry.viewport&&(s.Radius=GolfNow.Web.LocationServices.CalculateRadius(f.geometry.viewport),viewOverrideParams.OverrideRadius=!0);searchController.SearchParameters.Set(s,!0);searchController.SaveFederatedSearchParameters({Latitude:o.lat(),Longitude:o.lng(),Address:f.formatted_address,SearchType:searchType_GeoLocation});searchController.AddRecentSearch(r,u,"GEOLOCATION",o.lat(),o.lng());$("#fedsearch").val(u);t(searchController);n||i||!Foundation.utils.is_small_only()?Foundation.utils.is_small_only()?GolfNow.Web.Client.SearchController.StepThree():searchController.RedirectToCustomSearchPage(s):$("#applyBtn").click()}else alert("Imposible to determine selected location geo location. Please try other search")})}else alert("Unable to retrieve google place Id.")}function o(r){GolfNow.Web.Utils.ConsoleLog("GeoPlace Handler");var f=r.id,u=r.name,e=r.lat,o=r.lng;f!=null?GolfNow.Web.LocationServices.GetGeographicDetails2(e,o,function(r){var e=r.Geometry.location,o={Latitude:e.lat(),Longitude:e.lng(),SearchType:searchType_GeoLocation},s=!1;r.Geometry.viewport&&(o.Radius=GolfNow.Web.LocationServices.CalculateRadius(r.Geometry.viewport),s=!0);searchController.SearchParameters.Set(o,!0);searchController.SaveFederatedSearchParameters({Latitude:e.lat(),Longitude:e.lng(),Address:u,SearchType:searchType_GeoLocation});searchController.AddRecentSearch(f,u,"GEOLOCATION",e.lat(),e.lng(),s?r.Geometry.viewport:null);$("#fedsearch").val(u);t(searchController);n||i||!Foundation.utils.is_small_only()?Foundation.utils.is_small_only()?GolfNow.Web.Client.SearchController.StepThree():searchController.RedirectToCustomSearchPage(o):$("#applyBtn").click()}):alert("Unable to retrieve google place Id.")}function s(r,u){searchController.SearchParameters.Set({FacilityId:r,SearchType:searchType_Facility,FacilityName:u},!0);searchController.AddRecentSearch(r,u,"FACILITY");$("#fedsearch").val(u);t(searchController);n||i||!Foundation.utils.is_small_only()?Foundation.utils.is_small_only()?GolfNow.Web.Client.SearchController.StepThree():(redirectToFacilityLink=redirectToFacilityLink.toLowerCase().replace("[facilityid]",r),window.location=redirectToFacilityLink):$("#applyBtn").click()}function h(){GolfNow.Web.LocationServices.HasGPS&&GolfNow.Web.LocationServices.LocateMe(!0,function(r){$("input#fedsearch").val(r.Address);$(".universal-search.front-ver-b.front-ver-b-on #geo_msg").text(r.State.message);$(".federatedNearMe > a.nearMeLink > span").text(r.State.message);searchController.SearchParameters.Set({SearchType:searchType_GeoLocation,Latitude:r.Latitude,Longitude:r.Longitude,Address:r.Address},!0);searchController.SaveFederatedSearchParameters({SearchType:searchType_GeoLocation,Latitude:r.Latitude,Longitude:r.Longitude,Address:r.Address});t(searchController);n||i||!Foundation.utils.is_small_only()?GolfNow.Web.Client.SearchController.ShowRefineSearch():$("#applyBtn").click()},function(r){GolfNow.Web.LocationServices.Address_City().done(function(){$("input#fedsearch").val(r.Address);$(".universal-search.front-ver-b.front-ver-b-on #geo_msg").text(r.State.message);$(".federatedNearMe > a.nearMeLink > span").text(r.State.message);searchController.SearchParameters.Set({SearchType:searchType_GeoLocation,Latitude:r.Latitude,Longitude:r.Longitude,Address:r.Address},!0);searchController.SaveFederatedSearchParameters({SearchType:searchType_GeoLocation,Latitude:r.Latitude,Longitude:r.Longitude,Address:r.Address});t(searchController);n||i||!Foundation.utils.is_small_only()?GolfNow.Web.Client.SearchController.ShowRefineSearch():$("#applyBtn").click()})},!0)}function c(){var t=l(),n=$(".search-options-wrap");$.each(t,function(t,i){switch(i.Mode){case 0:n.find("."+i.Name.toLowerCase()).hide();break;case 1:n.find("."+i.Name.toLowerCase()).show()}})}function l(){var t=[],n=GolfNow.Web.Page.GetPageConfig();return _.isObject(n)&&_.isObject(n.Refinements)?t=n.Refinements:GolfNow.Web.Utils.ConsoleWarn("Unable to get defined page refinements in FederatedSearch"),t}var n=!1,i=!1,u=!1;return{initPage:f,ShowAdvancedSearch:t,facilityHandler:s,placeLatLongHandler:e,geoPlaceHandler:o,nearmeHandler:h,handlePageRefinements:c}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.GeoPlaces=function(n){function u(n,t){var i=null,r=_.filter(n,function(n){return n.displayName.toLowerCase().startsWith(t.toLowerCase())}),u;return r.length&&(i=_.max(r,function(n){return n.contextInformation.score}),r.length===1?i=r[0]:(u=_.sortBy(r,function(n){return-n.contextInformation.score}),u[1].type!==i.type&&(i=_.find(n,function(n){return n.contextInformation.score===i.contextInformation.score&&n.displayName.toLowerCase().startsWith(t.toLowerCase())})))),i||n[0]}function r(){var t=n("#fed-search-big-date");t.pickadate("picker").open(!1);_.delay(function(){t.focus()},150)}var t=null,i="/api/autocomplete/geoselection/";return{TypeAheadWrapper:function(t,i,r,f,e,o){var c=this,s=n("#federatedResultsLocations .federatedSearchResults ul, #federatedResultsCourses .federatedSearchResults ul"),h=n("#federatedResultsLocations .federatedSearchResults p, #federatedResultsCourses .federatedSearchResults p");s.hide();h.show();GolfNow.Web.LocationServices.GeoCoordinates().done(function(l){var a=l.Lat,v=l.Long;c.GetTypeAheadResults(t,f,a,v,e).done(function(o){var c=null,w=o.count,s=o.hits,h=_.groupBy(s,function(n){return n.type}),l=h.course||[],v=h.city||[],y=h.postal||[],p=h.place||[],a=_.uniq(_.union(v,p,y),function(t){return n.trim(t.displayName)});s&&s.length&&(c=u(s,t));l=_.sortBy(l,function(n){return-n.contextInformation.score});a=_.sortBy(a,function(n){return-n.contextInformation.score});i(l,t,e==0?!1:!0,c);r(a,t,f,c)}).fail(function(){}).always(function(){h.hide();s.show();typeof o!="undefined"&&o&&o()})})},GetTypeAheadResults:function(i,r,u,f,e){var o=n.Deferred(),s;return t&&t.readystate!=4&&t.abort(),s={searchkey:i,take:r,skip:e},u!==undefined&&u!==0&&f!==undefined&&f!==0&&(s.lat=u,s.lng=f),t=n.ajax({url:"/api/autocomplete/geolookup",method:"POST",dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify(s),success:function(n){o.resolve(n)},error:function(n,t){t=="abort"?o.reject():o.resolve({})},always:function(){t=null}}),o.promise()},RefineCourse_Click:function(t){var r=t.data.id,u=t.data.name,f=n("#fedsearch").val();t.data.eid&&t.data.eid!==""&&GolfNow.Web.Request.Post("log-search-selection",i+t.data.eid,{searchTerm:f});GolfNow.Web.FederatedSearch.facilityHandler(r,u)},RefineLocation_Click:function(t){var u=t.data.id,f=t.data.name,r=n("#fedsearch").val();t.data.eid&&t.data.eid!==""&&GolfNow.Web.Request.Post("log-search-selection",i+t.data.eid,{searchTerm:r});GolfNow.Web.FederatedSearch.geoPlaceHandler(t.data)},Course_Click:function(t){var u,e;if(t.type=="click"||t.type=="keypress"||t.keyCode==13){u="date";e=n(this);e.parents(".autocomplete-results").hide();var i=t.data.$textbox,f=t.data.$resultsList,o={searchType:"course",searchTerm:i.val()||""};i.length?(i.data().searchData=_.extend(t.data,o),i.val(t.data.name),document.activeElement.id===i.attr("id")||document.activeElement.nodeName.toLowerCase()==="body"?i.trigger("blur",!0):u=""):u="";f&&f.length&&f.parent("#autocomplete-wrapper").hide();u==="date"&&r()}},Location_Click:function(t){var u,e;if(t.type=="click"||t.type=="keypress"||t.keyCode==13){u="date";e=n(this);e.parents(".autocomplete-results").hide();var i=t.data.$textbox,f=t.data.$resultsList,o={searchType:"location",searchTerm:i.val()||""};i.length?(i.data().searchData=_.extend(t.data,o),i.val(t.data.name),document.activeElement.id===i.attr("id")||document.activeElement.nodeName.toLowerCase()==="body"?i.trigger("blur",!0):u=""):u="";f&&f.length&&f.parent("#autocomplete-wrapper").hide();u==="date"&&r()}},SearchBtn_Event:function(t){var c=n(this),r=t.id,h=t.name,o=t.eid||"",l=t.$resultsList,u=t.searchTerm,s=t.players,f,e;c.parents(".autocomplete-results").hide();t.searchType==="course"&&r?searchController&&(o!==""&&GolfNow.Web.Request.Post("log-search-selection",i+o,{searchTerm:u}),searchController.SearchParameters.Set({FacilityId:r,SearchType:searchType_Facility,FacilityName:h,Players:s,Q:u,QC:"Facility"},!0),searchController.AddRecentSearch(r,h,"FACILITY"),redirectToFacilityLink=redirectToFacilityLink.toLowerCase().replace("[facilityid]",r),GolfNow.Web.UrlParams.HandleFacilityUrlHash(searchController,!0,redirectToFacilityLink)):t.searchType==="location"&&t.lat&&(t.lng||t.lon)?(f=t.lat,e=t.lng||t.lon,GolfNow.Web.LocationServices.GetGeographicDetails2(f,e,function(n){var c,h,t;_.isEmpty(n)||(c=n.Geometry.location,searchController&&(o!==""&&GolfNow.Web.Request.Post("log-search-selection",i+o,{searchTerm:u}),h=!1,t={Latitude:f,Longitude:e,SearchType:searchType_GeoLocation,Players:s,Q:u,QC:"GeoLocation"},n.Geometry.viewport&&(t.Radius=GolfNow.Web.LocationServices.CalculateRadius(n.Geometry.viewport),h=!0),searchController.SearchParameters.Set(t,!0),searchController.SaveFederatedSearchParameters({Latitude:f,Longitude:e,Address:n.Formatted_Address,SearchType:searchType_GeoLocation,Players:s,Q:u,QC:"GeoLocation"}),searchController.AddRecentSearch(r,n.Formatted_Address,"GEOLOCATION",f,e,h?n.Geometry.viewport:null),searchController.RedirectToCustomSearchPage(t)))})):(alert("Please retry your search entry."),n("#fed-search-big").trigger("focus"))}}}(jQuery);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Gifting=function(n){function t(n,t){var u=n.indexOf("/widget/"),o;if(u>-1){var r={event:"itsonme"},i="Reservation Details",s=n.substring(u+8),f=s.split("-"),h=f[1],e=_.reduce(_.rest(f,1),function(n,t){return n+"-"+t});e+="-"+t;o=_.without(document.location.pathname.split("/"),"");switch(o[0]){case"courses":i="Course Details";break;case"tee-times":i="Confirmation";break;case"account":i="Reservation Details";break;default:i="Reservation Details"}r.parameters={SearchType:i};r.searchEventLabel=e;dataLayer.push(r)}}return{AddClickHandler:function(i,r,u,f){n(i).on("click","#lnk-gift-this-course",function(){if(t(r,f),Foundation.utils.is_small_only())window.open(r,"_blank");else{var i=n("<iframe />",{id:"itsonmeiframe",src:r,width:"100%",height:"500px",frameborder:"0",marginwidth:"0",marginheight:"0",scrolling:"auto"});showHtmlMessage("<span>"+u+"<\/span>",i[0],null)}})}}}(jQuery);GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.Search=function(){function d(){searchController.SearchParameters.Get().View==="Map"||f.is(":visible")||h.show().scrollTo()}function g(){var i,n,r,t;if($("#inputCurrentDate").detach().appendTo(".off-canvas-wrap"),i=$("#inputCurrentDate").pickadate({min:!0,max:GolfNow.Web.Utils.GetMaximumCalendarDays(),clear:"Close"}),i.length>0){n=i.pickadate("picker");$(document).on("click","#dayPicker",function(t){GolfNow.Web.Page.Pub("close-result-action-menus");n.refine=!1;n.get("open")?n.close():n.open();t.stopPropagation()});$(document).on("click","#refineDayPicker",function(t){n.refine=!0;n.get("open")?n.close():n.open();t.stopPropagation()});n.on("set",function(n){if(n.select){var i=new Date(n.select),e=$(this)[0],f=GolfNow.Web.Utils.GetSearchTypeName(searchController.SearchParameters.Get().SearchType),r=f==="Facility",u=f==="GoPlay";$("#currentDateRefineText").html(i.toDateDisplayString());$("#search-header-date").html(t.toDateDisplayString());GolfNow.Web.Page.Pub("search_date_changed",i);searchController.SavePickerSelectedDate(i);(!e.refine||r||u)&&!wt.IsHomePageSearch()&&(searchController.SetDate(i,!r&&!u),r||u||searchController.RedirectToCustomSearchPage(searchController.SearchParameters.Get()))}});r=GolfNow.Web.Cache.GetActiveDate();t=Date.parse(r);n&&n.set("select",[t.getFullYear(),t.getMonth(),t.getDate()],{muted:!0});$("#search-header-date").html(t.toDateDisplayString());$("#currentDateText").html(t.toDateDisplayString());$("#currentDateRefineText").html(t.toDateDisplayString())}}function nt(){a.on({scroll:it})}function tt(n,t){n.event="search";var i=function(){var n=window.location.href,i=n.indexOf("#"),t=n.lastIndexOf("/");return i!==-1&&t!==-1&&i>t&&(n=n.substr(t+1,i-1-t)),n};if(t&&t.SearchType!==null){if(!isNaN(t.SearchType))switch(GolfNow.Web.Utils.GetSearchTypeName(t.SearchType)){case searchType_GeoLocation:t.SearchType=searchType_GeoLocation;break;case searchType_Facility:t.SearchType=searchType_Facility;break;case searchType_Market:t.SearchType=searchType_Market;break;case searchType_Destination:t.SearchType=searchType_Destination;break;case searchType_GoPlay:t.SearchType=searchType_GoPlay}switch(t.SearchType){case searchType_GeoLocation:n.searchEventLabel=t.Address;break;case searchType_Facility:n.searchEventLabel=t.FacilityName;break;case searchType_Market:n.searchEventLabel=t.MarketName;break;case searchType_Destination:n.searchEventLabel=t.MarketName;break;case searchType_GoPlay:n.searchEventLabel=i()}}n.parameters=t;dataLayer.push(n);exactTarget.TrackSearch(t)}function it(){var i=this,n=$("#main-header div.contain-to-grid").hasClass("sticky"),t=n?6:5;window.readyForAutoScroll&&a.scrollTop()>=bt.height()-a.height()*t&&(window.readyForAutoScroll=!1,window.setTimeout(function(){searchController.NextResult(d)},150))}function v(){var n=this.ctx.root[this.getIndex()],i,t;if(n)return i=n.sortDirection,t=function(){var i=n.view,t=i==="Course"?n.sortByRollup:n.sortBy;return t.toLowerCase().indexOf(".max")>-1||t.toLowerCase().indexOf(".min")>-1?t.split(".")[0]:t},t()}function y(){var n=this.ctx.root[this.getIndex()];if(n)return n.view}function rt(){var n=this.ctx.root[this.getIndex()];if(n)return Boolean(n.hotDealsOnly)===!0}function ut(n){var t=null,i=this.ctx.root;return i&&i.length>1?t=this.ctx.root[this.getIndex()]:i&&i.length===1&&(t=this.ctx.root[0]),t&&n?t.isVipMember&&n.vipEligible:void 0}function ft(){return GolfNow.Web.Page.Pub("content_rendered",null),!0}function et(){return GolfNow.Web.Page.Pub("featured_rendered",null),h.hide(),!0}function ot(){return GolfNow.Web.Page.Pub("no_results_rendered",null),!0}function st(){var n=Number(searchController.SearchParameters.Get().Players)||"";return _.isNumber(n)&&n>0?n:""}function r(n,t){(t===undefined||t===null||t==="")&&(t="");var i=p.parent("section"),e=$("#map-wrapper"),r=b,o=w,h=$("#pResultsOptions"),u=$("#sortingcontrols");n==1?(i.show(),u.show(),s.hide(),f.hide(),GolfNow.Web.Client.SearchController.PopulatePreviousSearch(searchController)):n==2?(t!==""?(h.hide(),r.html(t)):r.html(kt),s.show(),i.hide(),e.hide(),r.show(),o.hide(),u.hide(),f.hide(),ot()):n==3?(s.show(),i.hide(),e.hide(),r.hide(),u.show(),o.show(),f.hide()):n==4&&(i.hide(),e.hide(),u.hide(),s.hide(),f.show())}function ht(){Date.today().compareTo(Date.parse(searchController.SearchParameters.Get().Date))===0&&$(".button-prev-date").hide()}function ct(n){if(!l){var t=o(n);t&&t.Sorts&&t.Sorts.length>0?Foundation.utils.is_small_only()?GolfNow.Web.Utils.GetServerDisplayMode()=="small"?($("#sort-listing-button").removeClass("disabled").attr("data-reveal-id","sortModal").parents("a").attr("data-reveal-id","sortModal"),$(".sort-dropdown-menu").attr("data-reveal-id","sortModal")):$("#sort-listing-button").parent().removeClass("disabled"):GolfNow.Web.Utils.GetServerDisplayMode()!="small"?$("#sort-listing-button").parent().removeClass("disabled"):$("#sort-listing-button").removeClass("disabled").attr("data-reveal-id","sortModal").parents("a").attr("data-reveal-id","sortModal"):Foundation.utils.is_small_only()?($("#sort-listing-button").removeAttr("data-reveal-id","").attr("data-toggle","").attr("data-target","").addClass("disabled").parents("a").removeAttr("data-reveal-id",""),$(".sort-dropdown-menu").removeAttr("data-reveal-id","")):$("#sort-listing-button").parent().addClass("disabled");l=!0}}function o(n){var i=null,r=n||at(),t=GolfNow.Web.Page.GetPageConfig();return _.isObject(t)&&_.isArray(t.Views)?i=_.find(t.Views,function(n){if(n.Name===r)return n}):GolfNow.Web.Utils.ConsoleWarn("Unable to get page config in Search"),i}function lt(n){var t=o();if(t&&t.Sorts){var i=n.split("|"),r=i[0],u=Number(i[1]),f={Name:r,Direction:u};return!_.isEmpty(_.findWhere(t.Sorts,f))}return!1}function at(){var i=searchController.SearchParameters.Get(),n=i.View||i.SearchType,t;if(typeof n=="number"){switch(n){case 0:t="Course";break;default:t="List"}n=t}return n}function vt(n,t){var r=$("meta[name='currency-code']").attr("content"),i;n.ttResults.facilities&&n.ttResults.facilities.length?i=n.ttResults.facilities[0].currencyCode:n.ttResults.teeTimes&&n.ttResults.teeTimes[0].teeTimeRates&&(i=n.ttResults.teeTimes[0].teeTimeRates[0].singlePlayerPrice.greensFees.currencyCode);r!==i&&($("meta[name='currency-code']").attr("content",i),GolfNow.Web.UrlParams.PopulateSearchHeadline(searchController,t))}function u(n){var i=$("#teetimeslist, #search-results"),t=$("gn-search-filters > aside"),r=$("gn-search-results").find("#ttresults, #loading, #map-wrapper, #nextPageThrobber, .no-results.mulligan"),f=$("#facility-listing"),u=$("gn-search-result-actions > .search-results-heading > div");i.hasClass("row")&&i.removeClass("row");t.removeClass();r.removeClass("large-9");n>1?(i.addClass("row"),t.addClass("columns large-3"),r.addClass("columns large-9"),t.show(),u.show()):n===1&&(t.addClass("left-off-canvas-menu"),_.delay(function(){$(document).foundation("offcanvas","reflow");t.show();u.show()},500))}function yt(n){var t=GolfNow.Web.Page.GetPageConfig();_.isObject(t)&&_.isObject(t.Views)?_.each(n,function(n){var i=$(n),u=i.data("view-criteria"),f={Name:u},r;_.findWhere(t.Views,f)?(r=i.parent(),r.hasClass("depricated")===!1&&r.show()):i.parent().hide()}):GolfNow.Web.Utils.ConsoleWarn("Unable to remove unsupported view options in Search.")}function pt(n,t){var i=o();_.isEmpty(i)?(GolfNow.Web.Utils.ConsoleWarn("Unable to remove unsupported sort options in Search."),Foundation.utils.is_small_only()?$("#sort-listing-button").attr("data-toggle","").attr("data-target","").addClass("disabled"):$("#sort-listing-button").parent().addClass("disabled")):(Foundation.utils.is_small_only()?t.toLowerCase()=="small"?$("#sort-listing-button").attr("data-reveal-id","sortModal").removeClass("disabled").parents("a").attr("data-reveal-id","sortModal"):$("#sort-listing-button").parent().removeClass("disabled"):t.toLowerCase()!="small"?$("#sort-listing-button").parent().removeClass("disabled"):$("#sort-listing-button").attr("data-reveal-id","sortModal").removeClass("disabled").parents("a").attr("data-reveal-id","sortModal"),_.each(n,function(n){var t=$(n),u=t.data("sort-criteria").split("|"),f=u[0],e=Number(u[1]),o={Name:f,Direction:e},r;_.findWhere(i.Sorts,o)?(r=t.parent(),r.hasClass("depricated")===!1&&r.show()):t.parent().hide()}))}var wt=GolfNow.Web.Utils,h=$("#nextPageThrobber"),f=$("#loading"),p=$("#ttresults"),s=$("section.mulligan"),w=$("#pResultsError"),b=$("#pResultsNone"),e=[],t=[],c=0,k=0,n={ttResults:null},i={featured:[]},l=!1,a=$(window),bt=$(document),kt=b.html(),gt=w.html(),dt=_.once(function(){return Foundation.utils.is_large_up()?u(3):Foundation.utils.is_medium_only()?u(1):Foundation.utils.is_small_only()&&u(0),GolfNow.Web.Page.Sub("mq_small_screen",function(){u(0)}),GolfNow.Web.Page.Sub("mq_medium_screen",function(){u(1)}),GolfNow.Web.Page.Sub("mq_large_screen",function(){u(2)}),GolfNow.Web.Page.Sub("mq_xlarge_screen",function(){u(3)}),new GolfNow.Web.Client.SearchController({UseGooglePlaces:usegoogleplaces,RenderPredicates:function(n){var o=new Date,l,u,a,f,r,v,t,s,y,p,e,h,w,i,c,b;o=new Date(o.getFullYear(),o.getMonth(),o.getDate());l=$("#inputCurrentDate").pickadate("picker");u=new Date(n.Date);l&&l.set("select",[u.getFullYear(),u.getMonth(),u.getDate()],{muted:!0});$("#currentDateText").html(u.toDateDisplayString());$("#currentDateRefineText").html(u.toDateDisplayString());a=n.SortBy+"|"+n.SortDirection;f=$("#sortModal");f.length&&(f.find("a.selected").removeClass("selected").css("color",""),r=f.find('a.sort-criteria-option[data-sort-criteria="'+a+'"]'),r.length>0?(t=r.clone().children(),r.addClass("selected"),Foundation.utils.is_small_only()&&r.css("color","#003b5d"),t.find("span").remove(),t.find("i").remove(),$("#sort-listing-button").empty().append(t).append(' <i class="icon icon ion-arrow-down-b"><\/i>')):(v=f.find("a.sort-criteria-option"),t=v.clone().first(),v.addClass("selected"),Foundation.utils.is_small_only()&&r.css("color","#003b5d"),t.find("span").remove(),t.find("i").remove(),$("#sort-listing-button").empty().append(t).append(' <i class="icon icon ion-arrow-down-b"><\/i>')));s=$("#sort-options");s.length&&(s.find("a.selected").removeClass("selected"),y=s.find('a[data-sort-criteria="'+a+'"]'),y.length&&(y.addClass("selected"),Foundation.utils.is_small_only()&&r.css("color","#003b5d")));p=n.View;e=$("#viewModal");e.length&&(e.find("a.selected").removeClass("selected").css("color",""),h=e.find('a.view-criteria-option[data-view-criteria="'+p+'"]'),h.length>0?(i=h.clone().children(),h.addClass("selected"),i.find("span").remove(),i.find("i").remove(),$("#view-options-button").empty().append(i).append(' <i class="icon icon ion-arrow-down-b"><\/i>')):(w=e.find("a.view-criteria-option"),i=w.clone().first().children(),w.addClass("selected"),i.find("span").remove(),i.find("i").remove(),$("#view-options-button").empty().append(i).append(' <i class="icon icon ion-arrow-down-b"><\/i>')));c=$("#view-options");c.length&&(c.find("a.selected").removeClass("selected"),b=c.find('a[data-view-criteria="'+p+'"]'),b.length&&b.addClass("selected"));GolfNow.Web.Page.Pub("renderPredicates",n)},RenderResults:function(u,o,s){var p,a,y,v;if(l=!1,p=o,GolfNow.Web.Page.Sub("content_rendered",function(){r(1);window.readyForAutoScroll=u.total>=o.PageSize*(o.PageNumber+1)?!0:!1;h.hide()}),u.limitReached?GolfNow.Web.Utils.ConsoleLog("(400+ Results)"):GolfNow.Web.Utils.ConsoleLog("("+u.total+" Results)"),u.total>0)if(vt(u,o.SearchType),u.ttResults.predicate.view=="Map"){$("#map-wrapper").show();$("#ttresults").hide();a=10;switch(u.ttResults.predicate.radius){case 25:a=9;break;case 50:a=8}s?$.observable(t).insert(u.ttResults.facilities):(n=u,t=n.ttResults.facilities);y={center:{lat:u.ttResults.predicate.latitude,lng:u.ttResults.predicate.longitude},zoom:a};GolfNow.Web.MapController.DrawMap("map-canvas",y,t,u.ttResults.predicate);r(1)}else if($("#map-wrapper").hide(),$("#ttresults").show(),s)f.hide(),n.ttResults.startIndex=u.ttResults.startIndex,u.ttResults.featuredFacilities=n.ttResults.featuredFacilities,GolfNow.Web.Domains.BookingCenterPhone().done(function(n){i.phoneNumber=n}),u.ttResults.teeTimes?$.observable(e).insert(u.ttResults.teeTimes):$.observable(t).insert(u.ttResults.facilities),GolfNow.Web.Page.Pub("search_results_data_loaded",{totalRecords:u.total,pageSize:u.ttResults.predicate.pageSize,startIndex:u.ttResults.startIndex,serverData:n,coursesByFeatured:i,teetimes:e||t,isTeeTimes:!$.isEmptyObject(u.ttResults.teeTimes)});else{c=0;k=0;n=u;i={featured:[]};GolfNow.Web.Domains.BookingCenterPhone().done(function(n){i.phoneNumber=n});$.extend(!0,i,u.ttResults.predicate);e=n.ttResults.teeTimes;t=n.ttResults.facilities;GolfNow.Web.Page.Pub("search_results_data_loaded",{totalRecords:u.total,pageSize:u.ttResults.predicate.pageSize,startIndex:u.ttResults.startIndex,serverData:n,coursesByFeatured:i,featuredFacilities:n.ttResults.featuredFacilities,teetimes:e||t,isTeeTimes:!$.isEmptyObject(e),featuredFacilityInsertLocation:c,featuredFacilityInsertLocation2:k});try{$.isPlainObject($.templates.teeTimeResultsTemplate)&&$.isPlainObject($.templates.featuredFacilityTemplate)&&$.isPlainObject($.templates.cubeHeaderTemplate)&&$.isPlainObject($.templates.cubeTemplate)&&$.isPlainObject($.templates.cubeRollupHeaderTemplate)&&$.isPlainObject($.templates.cubeRollupTemplate)&&$.isPlainObject($.templates.starRatingsTemplate)&&$.isPlainObject($.templates.mulliganMessageTemplate)?$.templates.teeTimeResultsTemplate.link("#ttresults",[i]):$.when.apply(this,searchController.LoadTemplates()).done(function(){$.templates.teeTimeResultsTemplate.link("#ttresults",[i])}).fail(function(){r(3)})}catch(w){r(3);GolfNow.Web.Utils.ConsoleLog(w)}}else v="",u.ttException&&(u.ttException.predicateSearchType=o.SearchType,v=$.render.mulliganMessageTemplate(u.ttException)),r(2,v)},BeforeSearch:function(i){$(".search-action").addClass("searching").attr("disabled","disabled");i.PageNumber===0&&(e=[],t=[],n={ttResults:null},c=0,p.empty());i.View==="Map"&&(i.PageSize=1e3);GolfNow.Web.Page.Pub("beforeSearch",i);GolfNow.Web.Utils.GetDefaultUnitOfMeasure()!=="mi"&&(i.Radius=Math.round(i.Radius*.621));r(4)},AfterSearch:function(n,t){$(".search-action").removeClass("searching").removeAttr("disabled");n.Radius=GolfNow.Web.Utils.HandleUnitsConversion(null,n.Radius);GolfNow.Web.Page.Pub("afterSearch",n);n&&!t&&tt({},n)},RenderError:function(){r(3);GolfNow.Web.Utils.ConsoleWarn("Error Encountered")},JsTemplates:[{tmplPath:"TeeTimeResults",accessorName:"teeTimeResultsTemplate",isPath:!1,helpers:{colsort:Foundation.utils.debounce(v,150,!0),colview:Foundation.utils.debounce(y,150,!0),colhotdeal:Foundation.utils.debounce(rt,150,!0),contents_rendered:Foundation.utils.debounce(ft,150,!0),featured_rendered:Foundation.utils.debounce(et,150,!0),displayVIPBadge:Foundation.utils.debounce(ut,150,!0),playersFilterOption:Foundation.utils.debounce(st,150,!0),units:GolfNow.Web.Utils.AppendRadiusUnits}},{tmplPath:"FeaturedFacility",accessorName:"featuredFacilityTemplate",isPath:!1},{tmplPath:"CubeHeader",accessorName:"cubeHeaderTemplate",isPath:!1},{tmplPath:"Cube",accessorName:"cubeTemplate",isPath:!1},{tmplPath:"CubeRollupHeader",accessorName:"cubeRollupHeaderTemplate",isPath:!1},{tmplPath:"CubeRollup",accessorName:"cubeRollupTemplate",isPath:!1},{tmplPath:"StarRatings",accessorName:"starRatingsTemplate",isPath:!1},{tmplPath:"SearchResultMulliganMessage",accessorName:"mulliganMessageTemplate",isPath:!1,tags:{filterslink:function(n){return Foundation.utils.is_large_up()||GolfNow.Web.Utils.GetSearchTypeName(n)===searchType_GoPlay?this.tagCtx.render():'<a class="search-action search-refine-btn pointerLink">'+this.tagCtx.render()+"<\/a>"},nextavailablelink:function(n){return'<a href="javascript:searchController.NextDate('+n+');">'+this.tagCtx.render()+"<\/a>"}}}]})});return v.depends=["#index","~root"],y.depends=["#index","~root"],{initializeSearch:dt,bindEventHandlers:nt,bindDatePicker:g,handlePreviousDateLink:ht,handleSortState:ct,getAllowedPageSorts:o,isSortAllowed:lt,removeUnSupportedSortOptions:pt,removeUnSupportedViewOptions:yt}}();GolfNow=GolfNow||{};GolfNow.Web=GolfNow.Web||{};GolfNow.Web.GoPlay=function(){var i="",h=GolfNow.Web.LocationServices,t=null,n=null,r=0,u=!1,f={noResultsMessage:"No results found.  Please try another search."},e=function(r){r=typeof r=="undefined"?{}:r;$.extend(r,f);i=r.noResultsMessage;var u=GolfNow.Web.Client.ChangeLocationSetup(i);n=u.$textbox;t=u.$resultsList;o();s()},o=function(){GolfNow.Web.Page.Sub("search_results_data_loaded",function(){var n=document.querySelector("gn-featured-courses");n&&n.setAttribute("show-featured",!1)});GolfNow.Web.Page.Sub("user-location-changed",function(){searchController.SearchParameters.Set({Latitude:null,Longitude:null},!0);GolfNow.Web.UrlParams.HandleGoPlayUrlHash(searchController)});$(document).on("opened.fndtn.reveal","#change-location-modal",function(n){if(n.namespace==="fndtn.reveal"){var t=$(this);u=!0;r=$(document).scrollTop();window.scrollTo(0,0);GolfNow.Web.Client.ForceFullPageHeight();t.css({top:0})}});$(document).on("close.fndtn.reveal","#change-location-modal",function(n){n.namespace==="fndtn.reveal"&&(u=!1)});$(document).on("closed.fndtn.reveal","#change-location-modal",function(i){i.namespace==="fndtn.reveal"&&($("#save-location-change-error").text("").parents(".row").hide(),n.val(""),n.tooltipster("hide"),t.hide(),GolfNow.Web.Client.ForceDefaultPageHeight(),$(document).scrollTop(r))});n.on("keyup",_.partial(GolfNow.Web.Client.ChangeLocationSearch,n,t));n.on("focus",_.partial(GolfNow.Web.Client.ChangeLocationSearch,n,t));n.tooltipster({content:$('<p class="help-block"><strong class="required-text">Search Requirements<\/strong><br />Multiple Hyphens, Symbols, and Special Characters are not Allowed<br />'),trigger:"custom",position:"bottom-right"});$("body").on("click","#save-location-change",GolfNow.Web.Client.ChangeLocation_SaveClick);$("body").on("click","#cancel-location-change",GolfNow.Web.Client.ChangeLocation_CancelClick)},s=function(){if($activeMessage=$("#active-period-message"),$inactiveMessage=$("#inactive-period-message"),$inactiveMessage.length&&$activeMessage.length){var i=new Date,t=null,n=null,r=$activeMessage[0].getAttribute("data-startdate"),u=$activeMessage[0].getAttribute("data-enddate");r!==null&&(t=new Date(r));u!==null&&(n=new Date(u));t!==null&&i.getTime()>=t.getTime()&&(n!==null&&i.getTime()<=n.getTime()||n===null)?($activeMessage.show(),$inactiveMessage.hide()):($activeMessage.hide(),$inactiveMessage.show())}};return{InitPage:e}}(),function(n){"use strict";n.views.converters("escapeApostrophes",function(n){return n=typeof n=="undefined"?"":n,n.replace("&#39;","'").replace("'","\\'")})}(this.jQuery),function(n){"use strict";n.views.helpers({facilityImagePathDisplay:function(t){return t.imagePathURL?n.views.helpers.imagePathDisplay(t.imagePathURL):t.imgPath?n.views.helpers.imagePathDisplay(t.imgPath):t.thumbnailImagePath?n.views.helpers.imagePathDisplay(t.thumbnailImagePath):"/Content/images/general.jpg"}})}(this.jQuery),function(n){"use strict";n.views.helpers({facilitySearchSlug:function(n){var t;return n.seoFriendlyName?t=n.seoFriendlyName:n.id&&(t=n.id),"/tee-times/facility/"+t+"/search"}})}(this.jQuery),function(n){"use strict";n.views.helpers({filterTotalDisplay:function(n,t,i){return(t=t.toString().toLowerCase(),i=i.toString().toLowerCase(),typeof n=="undefined")?0:typeof n[t]=="undefined"?0:typeof n[t][i]=="undefined"?0:n[t][i]}})}(this.jQuery),function(n){"use strict";n.views.helpers({holesDisplay:function(n){return n.isNine?"<strong>Holes:<\/strong> 9":n.isEightteen?"<strong>Holes:<\/strong> 18":"<strong>Holes:<\/strong> "+n.holeCount}})}(this.jQuery),function(n){"use strict";n.views.helpers({iconSummaryDisplay:function(n){var t="";return n.isCartIncluded&&(t+=" <strong>Cart:<\/strong> Included"),n.isAdvisory&&(t+=' <strong>Advisory:<\/strong> <i class="ion-alert-circled"><\/i>'),t}})}(this.jQuery),function(n){"use strict";n.views.helpers({imagePathDisplay:function(n){return n!==""&&n.indexOf("http")===-1?document.location.protocol+"//"+n:n!==""?n:void 0}})}(this.jQuery),function(n){"use strict";n.views.helpers({playerRuleDisplay:function(n){switch(n){case 1:return"<strong>Golfers:<\/strong> 1";case 9:return"<strong>Golfers:<\/strong> 1, 4";case 15:return"<strong>Golfers:<\/strong> 1 - 4";case 8:return"<strong>Golfers:<\/strong> 4";case 5:return"<strong>Golfers:<\/strong> 1, 3";case 13:return"<strong>Golfers:<\/strong> 1, 3 - 4";case 3:return"<strong>Golfers:<\/strong> 1 - 2";case 11:return"<strong>Golfers:<\/strong> 1 - 2, 4";case 7:return"<strong>Golfers:<\/strong> 1 - 3";case 4:return"<strong>Golfers:<\/strong> 3";case 12:return"<strong>Golfers:<\/strong> 3 - 4";case 2:return"<strong>Golfers:<\/strong> 2";case 10:return"<strong>Golfers:<\/strong> 2, 4";case 6:return"<strong>Golfers:<\/strong> 2 - 3";case 14:return"<strong>Golfers:<\/strong> 2 - 4";default:return"<strong>Golfers:<\/strong> Unknown"}}})}(this.jQuery),function(n,t,i){"use strict";String.prototype.padLeft=function(n,t){var i=this;for(!this instanceof String&&(i=this.toString());i.length<t;)i=n+i;return i};i.prototype.toShortDateString=function(){return(this.getMonth()+1).toString().padLeft("0",2)+"/"+this.getDate().toString().padLeft("0",2)+"/"+this.getFullYear()};n.views.helpers({shortDate:function(n){if(n instanceof i)n=i.parse(n.toShortDateString());else{var r=n,u=n.indexOf(".");u>-1&&(r=n.substr(0,u));n=i.parse(r)}return t.isDate(n)?n.toShortDateString():(new i).toShortDateString()},formatDate:function(n,r){if((r===undefined||r===null||r==="")&&(r="dddd, MMM dd"),n instanceof i)n=i.parse(n);else{var u=n,f=n.indexOf(".");f>-1&&(u=n.substr(0,f));n=i.parse(u)}return t.isDate(n)?n.toString(r):(new i).toString(r)}})}(this.jQuery,_,Date),function(n){"use strict";n.views.helpers({subratingDisplay:function(n){return typeof n=="undefined"?"n/a":n.ValueLabel}})}(this.jQuery),function(n){"use strict";function t(n,t,i,r){var u=t+"_"+i,f=n.substr(0,r);return f!==""&&f.length<n.length?'<div><p id="Less'+u+'">'+f+'...<a class="more" href="javascript:toggleReviewText(\''+u+"');\">Read More<\/a><\/p><\/div>"+('<div><p id="More'+u+'" style="display:none;">'+n+' <a class="more" href="javascript:toggleReviewText(\''+u+"');\">Read Less<\/a><\/p><\/div>"):"<div><p>"+f+"<\/p><\/div>"}n.views.tags({abbreviateText:{render:t}})}(this.jQuery);$.views.tags({debug:function(n){var t=this.tagCtx.props,i=t.message||"Debug:";console.log(i,n)}}),function(n){"use strict";function t(t,i){var u=n.Deferred(),h=t,e=i.tagCtx.props.startIndex,o=i.tagCtx.props.currentIndex,l=i.tagCtx.props.date,s=i.tagCtx.props.frequency,a=i.tagCtx.props.totalRecords,f,c,r,v,y;if((e+o)%s==0)if(f=(e+o)/s,c=a/s,f<h.length&&f<c){if(r=h[f],r&&!r.minPrice)return v=i,y="",n.ajax({type:"POST",async:!0,url:"/api/tee-times/featured-facility-result",data:JSON.stringify({facilityId:r.facilityId,predicateDate:l}),dataType:"json",contentType:"application/json; charset=utf-8"}).pipe(function(n){return r.minPrice=n.ffResult.minPrice,r.teeTimeCount=n.ffResult.teeTimeCount,{facility:r,pos:o,startIndex:e}});u.reject()}else u.reject();else u.reject();return u.promise()}function i(i){var r=this;n.when(t(i,r)).done(function(t){if(t!==undefined){var i=r.tagCtx.content.render(t.facility),u=t.startIndex+t.pos;n("#results").children(".single-course-list").eq(u).before(i)}else return undefined})}n.views.tags({featuredFacility:{render:i,template:""}})}(this.jQuery),function(n){"use strict";n.views.tags({range:{baseTag:n.views.tags["for"],render:function(t){var u=this.tagCtx.props.start||0,i=this.tagCtx.props.end,r;if(u||i)if(this.tagCtx.args.length)n.isArray(t)&&(t=t.slice(u,i));else for(t=[],i=i||0,r=u;r<=i;r++)t.push(r);return this.baseTag.render.apply(this,t?[t]:arguments)},onArrayChange:function(){this.refresh()}}})}(this.jQuery),function(n){"use strict";function t(){return this.tagCtx.content.render({ClientResponse:this.tagCtx.props.ClientResponse,Product:this.tagCtx.props.Product})}n.views.tags({reviewClientResponse:{render:t}})}(this.jQuery),function(n){"use strict";function t(){return this.tagCtx.content.render({Comment:this.tagCtx.props.Comment})}n.views.tags({reviewComment:{render:t}})}(this.jQuery),function(n){"use strict";function t(){return this.tagCtx.content.render({averageRating:this.tagCtx.props.averageRating,reviewCount:this.tagCtx.props.reviewCount,distance:this.tagCtx.props.distance,isAdvisory:this.tagCtx.props.isAdvisory,includeContainer:this.tagCtx.props.includeContainer||"true",facilityId:this.tagCtx.props.facilityId,productReviewId:this.tagCtx.props.productReviewId,starsOnly:this.tagCtx.props.starsOnly||"false",starsAndReviewsOnly:this.tagCtx.props.starsAndReviewsOnly||"false",readReviewPageUrl:this.tagCtx.props.readReviewPageUrl||"#"})}n.views.tags({starRating:{render:t}})}(this.jQuery),function(n){"use strict";function t(){var s=array,r=this.tagCtx.props.startIndex,u=this.tagCtx.props.currentIndex,h=this.tagCtx.props.date,f=this.tagCtx.props.frequency,e,t,o,i;return(r+u)%f==0&&(e=(r+u)/f,t=s[e],t)?(o=this,i="",n.ajax({type:"POST",async:!1,url:"/api/tee-times/featured-facility-result",data:JSON.stringify({facilityId:t.facilityId,predicateDate:h}),dataType:"json",contentType:"application/json; charset=utf-8"}).done(function(n){t.minPrice=n.ffResult.minPrice;t.teeTimeCount=n.ffResult.teeTimeCount;i=o.tagCtx.content.render(t)}),i):""}n.views.tags({teeTimeRate:{render:t}})}(this.jQuery);typeof WeakMap=="undefined"&&function(){var t=Object.defineProperty,i=Date.now()%1e9,n=function(){this.name="__st"+(Math.random()*1e9>>>0)+(i+++"__")};n.prototype={set:function(n,i){var r=n[this.name];return r&&r[0]===n?r[1]=i:t(n,this.name,{value:[n,i],writable:!0}),this},get:function(n){var t;return(t=n[this.name])&&t[0]===n?t[1]:undefined},"delete":function(n){var t=n[this.name],i;return t?(i=t[0]===n,t[0]=t[1]=undefined,i):!1},has:function(n){var t=n[this.name];return t?t[0]===n:!1}};window.WeakMap=n}(),function(n){function b(n){f.push(n);u||(u=!0,o(a))}function k(n){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n}function a(){var n,t;u=!1;n=f;f=[];n.sort(function(n,t){return n.uid_-t.uid_});t=!1;n.forEach(function(n){var i=n.takeRecords();d(n);i.length&&(n.callback_(i,n),t=!0)});t&&a()}function d(n){n.nodes_.forEach(function(t){var r=i.get(t);r&&r.forEach(function(t){t.observer===n&&t.removeTransientObservers()})})}function h(n,t){for(var u,f,e,o,s,r=n;r;r=r.parentNode)if(u=i.get(r),u)for(f=0;f<u.length;f++)(e=u[f],o=e.options,r===n||o.subtree)&&(s=t(o),s&&e.enqueue(s))}function c(n){this.callback_=n;this.nodes_=[];this.records_=[];this.uid_=++v}function y(n,t){this.type=n;this.target=t;this.addedNodes=[];this.removedNodes=[];this.previousSibling=null;this.nextSibling=null;this.attributeName=null;this.attributeNamespace=null;this.oldValue=null}function g(n){var t=new y(n.type,n.target);return t.addedNodes=n.addedNodes.slice(),t.removedNodes=n.removedNodes.slice(),t.previousSibling=n.previousSibling,t.nextSibling=n.nextSibling,t.attributeName=n.attributeName,t.attributeNamespace=n.attributeNamespace,t.oldValue=n.oldValue,t}function l(n,t){return e=new y(n,t)}function p(n){return t?t:(t=g(e),t.oldValue=n,t)}function nt(){e=t=undefined}function tt(n){return n===t||n===e}function it(n,i){return n===i?n:t&&tt(n)?t:null}function w(n,t,i){this.observer=n;this.target=t;this.options=i;this.transientObservedNodes=[]}var i=new WeakMap,o=window.msSetImmediate,r,s,u,f,v,e,t;o||(r=[],s=String(Math.random()),window.addEventListener("message",function(n){if(n.data===s){var t=r;r=[];t.forEach(function(n){n()})}}),o=function(n){r.push(n);window.postMessage(s,"*")});u=!1;f=[];v=0;c.prototype={observe:function(n,t){var r,u,f;if(n=k(n),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;for(r=i.get(n),r||i.set(n,r=[]),f=0;f<r.length;f++)if(r[f].observer===this){u=r[f];u.removeListeners();u.options=t;break}u||(u=new w(this,n,t),r.push(u),this.nodes_.push(n));u.addListeners()},disconnect:function(){this.nodes_.forEach(function(n){for(var u,r=i.get(n),t=0;t<r.length;t++)if(u=r[t],u.observer===this){u.removeListeners();r.splice(t,1);break}},this);this.records_=[]},takeRecords:function(){var n=this.records_;return this.records_=[],n}};w.prototype={enqueue:function(n){var t=this.observer.records_,i=t.length,u,r;if(t.length>0){if(u=t[i-1],r=it(u,n),r){t[i-1]=r;return}}else b(this.observer);t[i]=n},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(n){var t=this.options;t.attributes&&n.addEventListener("DOMAttrModified",this,!0);t.characterData&&n.addEventListener("DOMCharacterDataModified",this,!0);t.childList&&n.addEventListener("DOMNodeInserted",this,!0);(t.childList||t.subtree)&&n.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(n){var t=this.options;t.attributes&&n.removeEventListener("DOMAttrModified",this,!0);t.characterData&&n.removeEventListener("DOMCharacterDataModified",this,!0);t.childList&&n.removeEventListener("DOMNodeInserted",this,!0);(t.childList||t.subtree)&&n.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(n){if(n!==this.target){this.addListeners_(n);this.transientObservedNodes.push(n);var t=i.get(n);t||i.set(n,t=[]);t.push(this)}},removeTransientObservers:function(){var n=this.transientObservedNodes;this.transientObservedNodes=[];n.forEach(function(n){var r,t;for(this.removeListeners_(n),r=i.get(n),t=0;t<r.length;t++)if(r[t]===this){r.splice(t,1);break}},this)},handleEvent:function(n){var u,i,r,f,e;n.stopImmediatePropagation();switch(n.type){case"DOMAttrModified":var o=n.attrName,s=n.relatedNode.namespaceURI,i=n.target,t=new l("attributes",i);t.attributeName=o;t.attributeNamespace=s;u=n.attrChange===MutationEvent.ADDITION?null:n.prevValue;h(i,function(n){if(n.attributes)return n.attributeFilter&&n.attributeFilter.length&&n.attributeFilter.indexOf(o)===-1&&n.attributeFilter.indexOf(s)===-1?void 0:n.attributeOldValue?p(u):t});break;case"DOMCharacterDataModified":var i=n.target,t=l("characterData",i),u=n.prevValue;h(i,function(n){if(n.characterData)return n.characterDataOldValue?p(u):t});break;case"DOMNodeRemoved":this.addTransientObserver(n.target);case"DOMNodeInserted":i=n.relatedNode;r=n.target;n.type==="DOMNodeInserted"?(f=[r],e=[]):(f=[],e=[r]);var c=r.previousSibling,a=r.nextSibling,t=l("childList",i);t.addedNodes=f;t.removedNodes=e;t.previousSibling=c;t.nextSibling=a;h(i,function(n){if(n.childList)return t})}nt()}};n.JsMutationObserver=c;n.MutationObserver||(n.MutationObserver=c)}(this);"undefined"==typeof WeakMap&&!function(){var t=Object.defineProperty,i=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(i+++"__")};n.prototype={set:function(n,i){var r=n[this.name];return r&&r[0]===n?r[1]=i:t(n,this.name,{value:[n,i],writable:!0}),this},get:function(n){var t;if((t=n[this.name])&&t[0]===n)return t[1]},"delete":function(n){var t=n[this.name],i;return t?(i=t[0]===n,t[0]=t[1]=void 0,i):!1},has:function(n){var t=n[this.name];return t?t[0]===n:!1}};window.WeakMap=n}(),function(n){function w(n){l.push(n);c||(c=!0,s(a))}function b(n){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n}function a(){var n,t;c=!1;n=l;l=[];n.sort(function(n,t){return n.uid_-t.uid_});t=!1;n.forEach(function(n){var i=n.takeRecords();k(n);i.length&&(n.callback_(i,n),t=!0)});t&&a()}function k(n){n.nodes_.forEach(function(t){var r=i.get(t);r&&r.forEach(function(t){t.observer===n&&t.removeTransientObservers()})})}function f(n,t){for(var u,f,e,o,s,r=n;r;r=r.parentNode)if(u=i.get(r),u)for(f=0;f<u.length;f++)e=u[f],o=e.options,(r===n||o.subtree)&&(s=t(o),s&&e.enqueue(s))}function e(n){this.callback_=n;this.nodes_=[];this.records_=[];this.uid_=++it}function v(n,t){this.type=n;this.target=t;this.addedNodes=[];this.removedNodes=[];this.previousSibling=null;this.nextSibling=null;this.attributeName=null;this.attributeNamespace=null;this.oldValue=null}function d(n){var t=new v(n.type,n.target);return t.addedNodes=n.addedNodes.slice(),t.removedNodes=n.removedNodes.slice(),t.previousSibling=n.previousSibling,t.nextSibling=n.nextSibling,t.attributeName=n.attributeName,t.attributeNamespace=n.attributeNamespace,t.oldValue=n.oldValue,t}function o(n,t){return u=new v(n,t)}function y(n){return t?t:(t=d(u),t.oldValue=n,t)}function g(){u=t=void 0}function nt(n){return n===t||n===u}function tt(n,i){return n===i?n:t&&nt(n)?t:null}function p(n,t,i){this.observer=n;this.target=t;this.options=i;this.transientObservedNodes=[]}var i=new WeakMap,s=window.msSetImmediate,r,h,u,t;s||(r=[],h=String(Math.random()),window.addEventListener("message",function(n){if(n.data===h){var t=r;r=[];t.forEach(function(n){n()})}}),s=function(n){r.push(n);window.postMessage(h,"*")});var c=!1,l=[],it=0;e.prototype={observe:function(n,t){var r,u,f;if(n=b(n),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;for(r=i.get(n),r||i.set(n,r=[]),f=0;f<r.length;f++)if(r[f].observer===this){u=r[f];u.removeListeners();u.options=t;break}u||(u=new p(this,n,t),r.push(u),this.nodes_.push(n));u.addListeners()},disconnect:function(){this.nodes_.forEach(function(n){for(var u,r=i.get(n),t=0;t<r.length;t++)if(u=r[t],u.observer===this){u.removeListeners();r.splice(t,1);break}},this);this.records_=[]},takeRecords:function(){var n=this.records_;return this.records_=[],n}};p.prototype={enqueue:function(n){var t=this.observer.records_,i=t.length,u,r;if(t.length>0){if(u=t[i-1],r=tt(u,n),r)return void(t[i-1]=r)}else w(this.observer);t[i]=n},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(n){var t=this.options;t.attributes&&n.addEventListener("DOMAttrModified",this,!0);t.characterData&&n.addEventListener("DOMCharacterDataModified",this,!0);t.childList&&n.addEventListener("DOMNodeInserted",this,!0);(t.childList||t.subtree)&&n.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(n){var t=this.options;t.attributes&&n.removeEventListener("DOMAttrModified",this,!0);t.characterData&&n.removeEventListener("DOMCharacterDataModified",this,!0);t.childList&&n.removeEventListener("DOMNodeInserted",this,!0);(t.childList||t.subtree)&&n.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(n){if(n!==this.target){this.addListeners_(n);this.transientObservedNodes.push(n);var t=i.get(n);t||i.set(n,t=[]);t.push(this)}},removeTransientObservers:function(){var n=this.transientObservedNodes;this.transientObservedNodes=[];n.forEach(function(n){this.removeListeners_(n);for(var r=i.get(n),t=0;t<r.length;t++)if(r[t]===this){r.splice(t,1);break}},this)},handleEvent:function(n){var u,e,s,i,r;switch(n.stopImmediatePropagation(),n.type){case"DOMAttrModified":var h=n.attrName,c=n.relatedNode.namespaceURI,i=n.target,t=new o("attributes",i);t.attributeName=h;t.attributeNamespace=c;u=n.attrChange===MutationEvent.ADDITION?null:n.prevValue;f(i,function(n){if(n.attributes&&(!n.attributeFilter||!n.attributeFilter.length||-1!==n.attributeFilter.indexOf(h)||-1!==n.attributeFilter.indexOf(c)))return n.attributeOldValue?y(u):t});break;case"DOMCharacterDataModified":var i=n.target,t=o("characterData",i),u=n.prevValue;f(i,function(n){if(n.characterData)return n.characterDataOldValue?y(u):t});break;case"DOMNodeRemoved":this.addTransientObserver(n.target);case"DOMNodeInserted":i=n.relatedNode;r=n.target;"DOMNodeInserted"===n.type?(e=[r],s=[]):(e=[],s=[r]);var l=r.previousSibling,a=r.nextSibling,t=o("childList",i);t.addedNodes=e;t.removedNodes=s;t.previousSibling=l;t.nextSibling=a;f(i,function(n){if(n.childList)return t})}g()}};n.JsMutationObserver=e;n.MutationObserver||(n.MutationObserver=e)}(this);window.CustomElements=window.CustomElements||{flags:{}},function(n){var i=n.flags,t=[],r=function(n){t.push(n)},u=function(){t.forEach(function(t){t(n)})};n.addModule=r;n.initializeModules=u;n.hasNative=Boolean(document.registerElement);n.useNative=!i.register&&n.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements);CustomElements.addModule(function(n){function i(n,t){r(n,function(n){return t(n)?!0:void u(n,t)});u(n,t)}function r(n,t,i){var u=n.firstElementChild;if(!u)for(u=n.firstChild;u&&u.nodeType!==Node.ELEMENT_NODE;)u=u.nextSibling;for(;u;)t(u,i)!==!0&&r(u,t,i),u=u.nextElementSibling;return null}function u(n,t){for(var r=n.shadowRoot;r;)i(r,t),r=r.olderShadowRoot}function e(n,i){t=[];f(n,i);t=null}function f(n,i){if(n=wrap(n),!(t.indexOf(n)>=0)){t.push(n);for(var r,e=n.querySelectorAll("link[rel="+o+"]"),u=0,s=e.length;s>u&&(r=e[u]);u++)r["import"]&&f(r["import"],i);i(n)}}var t,o=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";n.forDocumentTree=e;n.forSubtree=i});CustomElements.addModule(function(n){function i(n){return h(n)||c(n)}function h(t){return n.upgrade(t)?!0:void r(t)}function c(n){f(n,function(n){if(h(n))return!0})}function d(n){r(n);u(n)&&f(n,function(n){r(n)})}function l(n){if(s.push(n),!o){o=!0;var t=window.Platform&&window.Platform.endOfMicrotask||setTimeout;t(a)}}function a(){o=!1;for(var t,i=s,n=0,r=i.length;r>n&&(t=i[n]);n++)t();s=[]}function r(n){e?l(function(){v(n)}):v(n)}function v(n){n.__upgraded__&&(n.attachedCallback||n.detachedCallback)&&!n.__attached&&u(n)&&(n.__attached=!0,n.attachedCallback&&n.attachedCallback())}function g(n){y(n);f(n,function(n){y(n)})}function y(n){e?l(function(){p(n)}):p(n)}function p(n){n.__upgraded__&&(n.attachedCallback||n.detachedCallback)&&n.__attached&&!u(n)&&(n.__attached=!1,n.detachedCallback&&n.detachedCallback())}function u(n){for(var t=n,i=wrap(document);t;){if(t==i)return!0;t=t.parentNode||t.host}}function nt(n){if(n.shadowRoot&&!n.shadowRoot.__watched){t.dom&&console.log("watching shadow-root for: ",n.localName);for(var i=n.shadowRoot;i;)b(i),i=i.olderShadowRoot}}function w(n){var u,r,f;if(t.dom){if(u=n[0],u&&"childList"===u.type&&u.addedNodes&&u.addedNodes){for(r=u.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;f=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";f=f.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,f||"")}n.forEach(function(n){"childList"===n.type&&(k(n.addedNodes,function(n){n.localName&&i(n)}),k(n.removedNodes,function(n){n.localName&&g(n)}))});t.dom&&console.groupEnd()}function tt(n){for(n=wrap(n),n||(n=wrap(document));n.parentNode;)n=n.parentNode;var t=n.__observer;t&&(w(t.takeRecords()),a())}function b(n){if(!n.__observer){var t=new MutationObserver(w);t.observe(n,{childList:!0,subtree:!0});n.__observer=t}}function it(n){n=wrap(n);t.dom&&console.group("upgradeDocument: ",n.baseURI.split("/").pop());i(n);b(n);t.dom&&console.groupEnd()}function rt(n){ut(n,it)}var t=n.flags,f=n.forSubtree,ut=n.forDocumentTree,e=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;n.hasPolyfillMutations=e;var o=!1,s=[],k=Array.prototype.forEach.call.bind(Array.prototype.forEach),ft=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var n=ft.call(this);return CustomElements.watchShadow(this),n};n.watchShadow=nt;n.upgradeDocumentTree=rt;n.upgradeSubtree=c;n.upgradeAll=i;n.attachedNode=d;n.takeRecords=tt});CustomElements.addModule(function(n){function u(i){if(!i.__upgraded__&&i.nodeType===Node.ELEMENT_NODE){var u=i.getAttribute("is"),r=n.getRegisteredDefinition(u||i.localName);if(r&&(u&&r.tag==i.localName||!u&&!r["extends"]))return t(i,r)}}function t(t,u){return r.upgrade&&console.group("upgrade:",t.localName),u.is&&t.setAttribute("is",u.is),i(t,u),t.__upgraded__=!0,e(t),n.attachedNode(t),n.upgradeSubtree(t),r.upgrade&&console.groupEnd(),t}function i(n,t){Object.__proto__?n.__proto__=t.prototype:(f(n,t.prototype,t["native"]),n.__proto__=t.prototype)}function f(n,t,i){for(var u,o,e,f={},r=t;r!==i&&r!==HTMLElement.prototype;){for(o=Object.getOwnPropertyNames(r),e=0;u=o[e];e++)f[u]||(Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(r,u)),f[u]=1);r=Object.getPrototypeOf(r)}}function e(n){n.createdCallback&&n.createdCallback()}var r=n.flags;n.upgrade=u;n.upgradeWithDefinition=t;n.implementPrototype=i});CustomElements.addModule(function(n){function h(i,r){var u=r||{};if(!i)throw new Error("document.registerElement: first argument `name` must not be empty");if(i.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(i)+"'.");if(l(i))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(i)+"'. The type name is invalid.");if(t(i))throw new Error("DuplicateDefinitionError: a type with name '"+String(i)+"' is already registered");if(!u.prototype)throw new Error("Options missing required prototype property");return u.__name=i.toLowerCase(),u.lifecycle=u.lifecycle||{},u.ancestry=e(u["extends"]),a(u),v(u),c(u.prototype),p(u.__name,u),u.ctor=w(u),u.ctor.prototype=u.prototype,u.prototype.constructor=u.ctor,n.ready&&d(document),u.ctor}function c(n){var t,i;n.setAttribute._polyfilled||(t=n.setAttribute,n.setAttribute=function(n,i){f.call(this,n,i,t)},i=n.removeAttribute,n.removeAttribute=function(n){f.call(this,n,null,i)},n.setAttribute._polyfilled=!0)}function f(n,t,i){var r,u;n=n.toLowerCase();r=this.getAttribute(n);i.apply(this,arguments);u=this.getAttribute(n);this.attributeChangedCallback&&u!==r&&this.attributeChangedCallback(n,r,u)}function l(n){for(var t=0;t<r.length;t++)if(n===r[t])return!0}function e(n){var i=t(n);return i?e(i["extends"]).concat([i]):[]}function a(n){for(var t,i=n["extends"],r=0;t=n.ancestry[r];r++)i=t.is&&t.tag;n.tag=i||n.__name;i&&(n.is=n.__name)}function v(n){var i,f,r,u,t;if(!Object.__proto__){for(i=HTMLElement.prototype,n.is&&(f=document.createElement(n.tag),r=Object.getPrototypeOf(f),r===n.prototype&&(i=r)),t=n.prototype;t&&t!==i;)u=Object.getPrototypeOf(t),t.__proto__=u,t=u;n["native"]=i}}function y(n){return nt(s(n.tag),n)}function t(n){if(n)return u[n.toLowerCase()]}function p(n,t){u[n]=t}function w(n){return function(){return y(n)}}function b(n,t,r){return n===rt?i(t,r):ut(n,t)}function i(n,r){var f=t(r||n),u;return f&&(n==f.tag&&r==f.is||!r&&!f.is)?new f.ctor:r?(u=i(n),u.setAttribute("is",r),u):(u=s(n),n.indexOf("-")>=0&&tt(u,HTMLElement),u)}function k(n){var t=ft.call(this,n);return g(t),t}var o,d=n.upgradeDocumentTree,g=n.upgrade,nt=n.upgradeWithDefinition,tt=n.implementPrototype,it=n.useNative,r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],u={},rt="http://www.w3.org/1999/xhtml",s=document.createElement.bind(document),ut=document.createElementNS.bind(document),ft=Node.prototype.cloneNode;o=Object.__proto__||it?function(n,t){return n instanceof t}:function(n,t){for(var i=n;i;){if(i===t.prototype)return!0;i=i.__proto__}return!1};document.registerElement=h;document.createElement=i;document.createElementNS=b;Node.prototype.cloneNode=k;n.registry=u;n["instanceof"]=o;n.reservedTagList=r;n.getRegisteredDefinition=t;document.register=document.registerElement}),function(n){function i(){r(wrap(document));window.HTMLImports&&(HTMLImports.__importsParsingHook=function(n){r(wrap(n["import"]))});CustomElements.ready=!0;setTimeout(function(){CustomElements.readyTime=Date.now();window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime);document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var f=n.useNative,e=n.initializeModules,t,r,u;f?(t=function(){},n.watchShadow=t,n.upgradeAll=t,n.upgradeDocumentTree=t,n.takeRecords=t,n["instanceof"]=function(n,t){return n instanceof t}):e();r=n.upgradeDocumentTree;(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(n){return n}),"function"!=typeof CustomEvent&&(window.CustomEvent=function(n,t){t=t||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(n,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),i},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||n.flags.eager)?i():"interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready?(u=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded",window.addEventListener(u,i)):i()}(window.CustomElements)