var WSLApp=WSL.EnsureNamespace("WSL.App");WSLApp.ResponsiveElements=function(){var n=function(){},t=function(n,t){$(n).length>0&&($(n).table().data("table").destroy(),$(n).attr("data-tablesaw-mode",t),$(n).table())};return{init:n,updateTablesawMode:t}}();WSLApp.MediaQueryBreakPoints={xsmall:1,small:2,medium:3,large:4,xlarge:5};WSLApp.JSMediaQueries=function(){var o=250,i,n="small",t="",r,u,s=function(){externalHeaderContent=$("#headerNavigation");externalFooterContent=$("#footerNavigation");r=$("#headerElements");u=$("#footerContainer");externalHeaderContent.appendTo(r).enhanceWithin();externalFooterContent.appendTo(u).enhanceWithin();WSLApp.ResponsiveElements.init()},h=function(){clearTimeout(i);i=setTimeout(f,o)},c=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,"")},f=function(i){WSL.Logger.log("window.screen.width="+window.screen.width);WSL.Logger.log("lastMediaQuery="+n);WSL.Logger.log("lastPage="+t);WSL.Logger.log("currentPage="+i);var r=c();(r!=n||t!=i)&&(n=r,l(r));t=i},l=function(n){try{WSL.Logger.log("breakpoint="+n);WSL.Logger.log("WSLApp.MediaQueryBreakPoints[breakpoint]="+WSLApp.MediaQueryBreakPoints[n]);var t="stack";WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.xsmall&&e();WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.small&&e();WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.medium&&(t="columntoggle");WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.large;WSLApp.MediaQueryBreakPoints[n]>=WSLApp.MediaQueryBreakPoints.xlarge;$("#membertable").length&&WSLApp.ResponsiveElements.updateTablesawMode("#membertable",t)}catch(i){WSL.Logger.log("Error in processMediaQuery="+i.message)}},e=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:s,onResize:h,apply:f}}();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)})})})