var WSLApp=WSL.EnsureNamespace("WSL.App");WSLApp.ResponsiveElements=function(){var n,t,i=function(){n=$("#divMobileSearch");t=$("#navPanel")},r=function(n){$("#navigationList").appendTo(n)},u=function(i){n&&(i?t.panel("open"):t.panel("close"))},f=function(i){t&&(i?n.show():n.hide())},e=function(n,t){$(n).length>0&&($(n).table().data("table").destroy(),$(n).attr("data-tablesaw-mode",t),$(n).table())};return{init:i,appendNavigation:r,displayMobileSearch:u,displayNavPanel:f,updateTablesawMode:e}}();WSLApp.MediaQueryBreakPoints={xsmall:1,small:2,medium:3,large:4,xlarge:5};WSLApp.JSMediaQueries=function(){var a=250,r,t="small",i="",n="",u="",f="",e="",o,s,h,v=function(){n=$("#headerNavigationFooter");u=n.find("#headerElements");f=n.find("#navigationLinks");e=n.find("#footer");o=$("#headerElements");s=$("#navPanel");h=$("#footerContainer");u.appendTo(o).enhanceWithin();f.appendTo(s).enhanceWithin();e.appendTo(h).enhanceWithin();WSLApp.ResponsiveElements.init()},y=function(){clearTimeout(r);r=setTimeout(c,a)},p=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,"")},c=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=p();(r!=t||i!=n)&&(t=r,w(r));i=n},w=function(n){try{WSL.Logger.log("breakpoint="+n);WSL.Logger.log("WSLApp.MediaQueryBreakPoints[breakpoint]="+WSLApp.MediaQueryBreakPoints[n]);var t="#navPanel",i="stack";WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.xsmall&&l();WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.small&&l();WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.medium&&(i="columntoggle");WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.large&&(WSLApp.ResponsiveElements.displayMobileSearch(!1),WSLApp.ResponsiveElements.displayNavPanel(!1),t="#desktopNavigation");WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.xlarge;WSLApp.ResponsiveElements.appendNavigation(t);$("#membertable").length&&WSLApp.ResponsiveElements.updateTablesawMode("#membertable",i)}catch(r){WSL.Logger.log("Error in processMediaQuery="+r.message)}},l=function(){var n=$("td.rostercontent").children().not("span"),t;n.length>0&&n.remove();t=$("td.rostercontent").children();t.removeClass("tablesaw-cell-content")};return{init:v,onResize:y,apply:c}}();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")},t=function(n){var t=n+" tr:not(.ui-screen-hidden)";$(t).each(function(n){n%2?($(this).removeClass("tableEvenBackground"),$(this).addClass("tableOddBackground")):($(this).removeClass("tableOddBackground"),$(this).addClass("tableEvenBackground"))})};return{setContentHeight:n,addZebraStriping:t}}();WSLApp.UI.FilterOrdinals=function(n,t){var r=!1,f,i,u,e,o;return t&&typeof t=="string"&&(t.match(/\d\d/)?(f=$("<div><\/div>").append(this.innerHTML).find("a.districtInformation"),i=f.text(),i&&(i=i.trim(),r=!(i===t))):(u=this.innerText,u&&(e=t.toLowerCase(),o=u.toLowerCase(),r=o.indexOf(e)<0))),r};$(document).on("mobileinit",function(){if(WSL.Logger.on(),$.mobile.ajaxEnabled=!1,$.mobile.linkBindingEnabled=!1,$.mobile.hashListeningEnabled=!1,$.mobile.resetActivePageHeight=WSLApp.UI.setContentHeight,location.href){var n=location.href.toLowerCase();(n.indexOf("/members")>0||n.indexOf("/membersbydistrictandcounties")>0)&&($.mobile.filterable.prototype.options.filterCallback=WSLApp.UI.FilterOrdinals)}});$(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");$(document).ready(function(){if($("table.tablesaw").length>0){var n=$("table.tablesaw")[0].id;WSLApp.UI.addZebraStriping("#"+n)}$("table.tablesaw").on("filterablefilter",function(n){var t=n.currentTarget.id;WSLApp.UI.addZebraStriping("#"+t)});$("table.tablesaw :button").click(function(){var n=$(this).parents("table"),t=n[0].id;WSLApp.UI.addZebraStriping("#"+t)})})})