var WSLApp=WSL.EnsureNamespace("WSL.App");WSLApp.ResponsiveElements=function(){var n,t,i,r,u,f,o=function(){n=$("#divMobileSearch");t=$("#navPanel");i=$("#districtInfoDisplayContainer");r=$("#mapButtonContainer");u=$("#mapLoadContainer");f=$("#mobileInstructions")},s=function(n){$("#navigationList").appendTo(n)},h=function(i){n&&(i?t.panel("open"):t.panel("close"))},c=function(i){t&&(i?n.show():n.hide())},l=function(n){i&&(n?i.show():i.hide())},a=function(n){r&&(n?e()||r.show():r.hide())},v=function(n){f&&(n?e()||f.show():f.hide())},y=function(n){u&&(n?(u.show(),Map&&WashingtonMap.resizeMapDiv(),Map.currentPosition?WashingtonMap.codeByPointAndZoomToIt(WashingtonMap.currentPosition.lat(),WashingtonMap.currentPosition.lng()):WashingtonMap.initialize()):e()||u.hide())},e=function(){var n=window.location.pathname.toLowerCase();return n.indexOf("/displaydistrict/")>=0};return{init:o,appendNavigation:s,displayMobileSearch:h,displayNavPanel:c,displayDistrictInfo:l,displayMapButton:a,displayMap:y,displayMobileInstructions:v,isDisplayDistrictMode:e}}();WSLApp.MediaQueryBreakPoints={xsmall:1,small:2,medium:3,large:4,xlarge:5};WSLApp.JSMediaQueries=function(){var c=250,l,t="small",i="",n="",r="",u="",f="",e,o,s,a=function(){n=$("#headerNavigationFooter");r=n.find("#headerElements");u=n.find("#navigationLinks");f=n.find("#footer");e=$("#headerElements");o=$("#navPanel");s=$("#footerContainer");r.appendTo(e).enhanceWithin();u.appendTo(o).enhanceWithin();f.appendTo(s).enhanceWithin();WSLApp.ResponsiveElements.init()},v=function(){l=setTimeout(h,c)},y=function(){var n=window.getComputedStyle(document.getElementById("mediaquery"),":after").getPropertyValue("content");return n==null&&(n=window.getComputedStyle(document.getElementById("mediaquery"),"").getPropertyValue("font-family")),n=n.replace(/"/g,""),n.replace(/'/g,"")},h=function(n){WSL.Logger.log("window.screen.width="+window.screen.width);WSL.Logger.log("lastMediaQuery="+t);WSL.Logger.log("lastPage="+i);WSL.Logger.log("currentPage="+n);var r=y();(r!=t||i!=n)&&(t=r,p(r));i=n},p=function(n){try{WSL.Logger.log("breakpoint="+n);WSL.Logger.log("WSLApp.MediaQueryBreakPoints[breakpoint]="+WSLApp.MediaQueryBreakPoints[n]);var t="#navPanel";WSLApp.ResponsiveElements.displayDistrictInfo(!0);WSLApp.ResponsiveElements.displayMapButton(!0);WSLApp.ResponsiveElements.displayMap(!1);WSLApp.ResponsiveElements.displayMobileInstructions(!0);WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.xsmall;WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.small;WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.medium;WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.large&&(WSLApp.ResponsiveElements.displayDistrictInfo(!1),WSLApp.ResponsiveElements.displayMapButton(!1),WSLApp.ResponsiveElements.displayMap(!0),WSLApp.ResponsiveElements.displayMobileInstructions(!1),WSLApp.ResponsiveElements.displayMobileSearch(!1),WSLApp.ResponsiveElements.displayNavPanel(!1),t="#desktopNavigation");WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.xlarge;WSLApp.ResponsiveElements.appendNavigation(t)}catch(i){WSL.Logger.log("Error in processMediaQuery="+i.message)}};return{init:a,onResize:v,apply:h}}();window.addEventListener?window.addEventListener("resize",WSLApp.JSMediaQueries.onResize):window.attachEvent&&window.attachEvent("onresize",WSLApp.JSMediaQueries.onResize);window.getComputedStyle||(window.getComputedStyle=function(n){return this.el=n,this.getPropertyValue=function(t){var i=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),i.test(t)&&(t=t.replace(i,function(){return arguments[2].toUpperCase()})),n.currentStyle[t]?n.currentStyle[t]:null},this});WSLApp.Search=function(){var i=function(){if(!WSL.Logger)throw"WSLApp.Search requires WSL.Logger";if(!SubmitWebsiteSearch)throw"WSLApp.Search requires WSL.Utilities SubmitWebsiteSearch";}(),n=function(n,t){$(n).click(function(){$(t).slideToggle("fast")})},t=function(n,t){$(n).bind("keyup",function(n){(n.which&&n.which==13||n.keyCode&&n.keyCode==13)&&$(t).click()});$(t).click(function(){SubmitWebsiteSearch($(n).val())})};return{initializeControls:t,initializeContainer:n}}();WSLApp.UI=function(){var n=function(){var t=$("#headerElements").outerHeight(),i=$("#footerContainer").height(),r=$.mobile.getScreenHeight(),n=r-(t+i)+35;WSL.Logger.log("content="+n);$(".ui-page-active").css("min-height",n+"px")};return{setContentHeight:n}}();$(document).on("mobileinit",function(){WSL.Logger.on();$.mobile.ajaxEnabled=!1;$.mobile.linkBindingEnabled=!1;$.mobile.hashListeningEnabled=!1;$.mobile.resetActivePageHeight=WSLApp.UI.setContentHeight});$(document).on("pagebeforeshow","[data-role=page]",function(){WSLApp.JSMediaQueries.init();WSLApp.JSMediaQueries.apply();WSLApp.Search.initializeControls("#bannerSearchInput","#bannerSubmitSearchBtn");WSLApp.Search.initializeControls("#mobileSearchInput","#mobileSubmitSearchBtn");WSLApp.Search.initializeContainer("#searchPanel","#divMobileSearch")})