!function(e){function t(e){return e.length?n(i(),r(e)):!0}function n(e,t){return e.left<=t.left&&t.right<=e.right&&e.top<=t.top&&t.bottom<=e.bottom}function i(){var t=e(window),n={left:t.scrollLeft(),top:t.scrollTop()};return n.right=n.left+t.width(),n.bottom=n.top+t.height(),n}function r(e){var t=e.offset();return t.right=t.left+e.outerWidth(),t.bottom=t.top+e.outerHeight(),t}e(".js-hover-ot-menu").each(function(){var t=e("#"+e(this).attr("data-target"));e(this).hover(function(e){t.addClass("ot-menu-opened")},function(){t.removeClass("ot-menu-opened")})}),e(".js-hover-menu").each(function(){var n=e("#"+e(this).attr("data-target"));e(this).hover(function(){OT.Common.Menus.showMenu(n),n.addClass("menu-top"),t(n.find(e(this).attr("data-containment-test-selector")))||n.toggleClass("menu-top")},function(){OT.Common.Menus.closeAllMenus()})})}(jQuery),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";function i(e){return null!=e&&""!==e}function r(e){return Array.isArray(e)?e.map(r).filter(i).join(" "):e}n.merge=function o(e,t){if(1===arguments.length){for(var n=e[0],r=1;r<e.length;r++)n=o(n,e[r]);return n}var a=e["class"],s=t["class"];(a||s)&&(a=a||[],s=s||[],Array.isArray(a)||(a=[a]),Array.isArray(s)||(s=[s]),e["class"]=a.concat(s).filter(i));for(var c in t)"class"!=c&&(e[c]=t[c]);return e},n.joinClasses=r,n.cls=function(e,t){for(var i=[],o=0;o<e.length;o++)t&&t[o]?i.push(n.escape(r([e[o]]))):i.push(r(e[o]));var a=r(i);return a.length?' class="'+a+'"':""},n.attr=function(e,t,i,r){return"boolean"==typeof t||null==t?t?" "+(r?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?" "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'":i?" "+e+'="'+n.escape(t)+'"':" "+e+'="'+t+'"'},n.attrs=function(e,t){var i=[],o=Object.keys(e);if(o.length)for(var a=0;a<o.length;++a){var s=o[a],c=e[s];"class"==s?(c=r(c))&&i.push(" "+s+'="'+c+'"'):i.push(n.attr(s,c,!1,t))}return i.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function a(t,n,i,r){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||r))throw t.message+=" on line "+i,t;try{r=r||e("fs").readFileSync(n,"utf8")}catch(o){a(t,null,i)}var s=3,c=r.split("\n"),u=Math.max(i-s,0),l=Math.min(c.length,i+s),s=c.slice(u,l).map(function(e,t){var n=t+u+1;return(n==i?"  > ":"    ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+i+"\n"+s+"\n\n"+t.message,t}},{fs:2}],2:[function(e,t,n){},{}]},{},[1])(1)}),function(){this.JST||(this.JST={}),this.JST["views/recently-viewed"]=function(e){var t,n=[],i=e||{};return function(e,i){e.length>0&&(n.push('<div class="row"><div class="column"><p class="recently-viewed">Recent locations: &nbsp'),function(){var i=e;if("number"==typeof i.length)for(var r=0,o=i.length;o>r;r++){var a=i[r];n.push("<a"+jade.attr("href","/start/"+a.link,!0,!1)+' class="recent-location">'+jade.escape(null==(t=a.name)?"":t)+"</a>"),r<e.length-1&&n.push("<span>"+jade.escape(null==(t=", ")?"":t)+"</span>")}else{var o=0;for(var r in i){o++;var a=i[r];n.push("<a"+jade.attr("href","/start/"+a.link,!0,!1)+' class="recent-location">'+jade.escape(null==(t=a.name)?"":t)+"</a>"),r<e.length-1&&n.push("<span>"+jade.escape(null==(t=", ")?"":t)+"</span>")}}}.call(this),n.push("</p></div></div>"))}.call(this,"locations"in i?i.locations:"undefined"!=typeof locations?locations:void 0,"undefined"in i?i.undefined:void 0),n.join("")}}.call(this),function(e,t,n,i){n.createNS("OT.RecentlyViewed"),n.RecentlyViewed={getRecentLocations:function(){var e=[],t=JSON.parse(localStorage.getItem("otVisitedMetros"));return t&&Object.keys(t).forEach(function(n){e.push({loctype:"metro",metroId:n,count:t[n].num_visits,time:t[n].time,name:t[n].name,link:"?m="+n,true_visited:t[n].true_visited});var i=t[n].otVisitedMacros;Object.keys(i).forEach(function(r){e.push({loctype:"macro",metroId:n,macroId:r,count:i[r].num_visits,time:i[r].time,name:i[r].name,link:"?m="+n+"&mn="+r,true_visited:i[r].true_visited});var o=t[n].otVisitedMacros[r].otVisitedNeighborhoods;Object.keys(o).forEach(function(t){e.push({loctype:"neigh",metroId:n,macroId:r,neighId:t,count:o[t].num_visits,time:o[t].time,name:o[t].name,link:"?m="+n+"&mn="+r+"&n="+t,true_visited:o[t].true_visited})})})}),e.sort(function(e,t){return t.time-e.time}),e},showRecentlyViewed:function(){var t=_.filter(n.RecentlyViewed.getRecentLocations(),function(e){return e.true_visited}),r=i({locations:t.slice(0,5)});e(".recently-viewed-locations").children().length?e(".recently-viewed-locations").children().replaceWith(r):e(".recently-viewed-locations").append(r)}}}(jQuery,window,OT,JST["views/recently-viewed"]),function(e,t){t.createNS("OT.Ticker"),t.SlidesTicker={bind:function(t,n){var i="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",r=n||2e3,o=t.length,a=function(e){e.addClass("transparent").one(i,c)},s=function(e){e.removeClass("hide").one(i,u),setTimeout(function(){e.removeClass("transparent")})},c=function(n){var i=e(n.currentTarget).addClass("hide"),r=i.next();s(r.length?r:e(t[0]))},u=function(t){l(e(t.currentTarget))},l=function(n){setTimeout(a,r,n||e(t[0]))};o>1&&l()},initialize:function(){t.SlidesTicker.bind(e(".hero-imgs div"),5e3),t.SlidesTicker.bind(e(".hero-names span"),5e3)}},t.SlidesTicker.initialize()}(jQuery,OT);