').removeClass("hidden"); } else { $("#gb-social-media-icons-outer").remove(); } }, "RsMenu": function() { // FOR SCOPE var _this = this; $.csRsMenu({ "breakPoint" : 768, // SYSTEM BREAK POINTS - 768, 640, 480, 320 "slideDirection" : "left-to-right", // OPTIONS - left-to-right, right-to-left "menuButtonParent" : ".gb-mystart.right", "menuBtnText" : "Menu", "colors": { "pageOverlay": "#000000", // DEFAULT #000000 "menuBackground": "#FFFFFF", // DEFAULT #FFFFFF "menuText": "#333333", // DEFAULT #333333 "menuTextAccent": "#333333", // DEFAULT #333333 "dividerLines": "#E6E6E6", // DEFAULT #E6E6E6 "buttonBackground": "#E6E6E6", // DEFAULT #E6E6E6 "buttonText": "#333333" // DEFAULT #333333 }, "showDistrictHome": _this.ShowDistrictHome, "districtHomeText": "District Home", "showSchools" : _this.ShowSchoolList, "schoolMenuText": "Our Schools", "showTranslate" : _this.ShowTranslate, "translateMenuText": "Translate Language", "translateVersion": 2, // 1 = FRAMESET, 2 = BRANDED "translateId" : "", "showAccount": true, "accountMenuText": "Website Admin", "usePageListNavigation": true, "extraMenuOptions": {}, "siteID": "1", "allLoaded": function(){} }); }, "ViewFullSite": function() { // VIEW FULL SITE BUTTON ON MOBILE if(this.ShowFullSiteButton) { $("#gb-page").addClass("using-full-site-btn"); $("body").viewFullSite({ "breakPoint"	: 639, // SYSTEM BREAK POINTS - 1023, 767, 639, 479 "buttonContainer"	: "body", "useDefaultCSS"	: "yes", "fixedPosition"	: "bottom" // IF USING DEFAULT STYLES - TOP, BOTTOM }); } }, "AppAccordion": function() { $(".sp-column.one").csAppAccordion({ "accordionBreakpoints" : [640, 480, 320] }); }, "Search": function() { // FOR SCOPE var _this = this; $(document).on("click keydown", "#gb-search-toggle", function(e) { if(_this.AllyClick(e)) { e.preventDefault(); // SEARCH IS CLOSED if($(this).attr("aria-expanded") == "false") { $(this).attr("aria-expanded", "true"); $("#gb-search").attr({"aria-hidden": "false", "data-open": "true"}); setTimeout(function() { $("#gb-search-input").focus(); }, 500); } // SEARCH IS OPEN else { $(this).attr("aria-expanded", "false"); $("#gb-search").attr({"aria-hidden": "true", "data-open": "false"}); } } }); $("#gb-search-form").submit(function(e) { e.preventDefault(); if($.trim($("#gb-search-input").val()) != "" && $.trim($("#gb-search-input").val()) != "What are you searching for?") { window.location.href = "/site/Default.aspx?PageType=6&SiteID=1&SearchString=" + $("#gb-search-input").val(); } }); $(document).on("click keydown", "#gb-close-search", function(e) { // CLICK, ENTER KEY, SPACE KEY if(_this.AllyClick(e)) { e.preventDefault(); $("#gb-search-toggle").attr("aria-expanded", "false"); $("#gb-search").attr({"aria-hidden": "true", "data-open": "false"}); if(e.type == "keydown") { setTimeout(function() { $("#gb-search-toggle").focus(); }, 500); } } // SHIFT+TAB else if(e.type == "keydown" && e.keyCode == _this.KeyCodes.tab && e.shiftKey) { e.preventDefault(); $("#gb-search-button").focus(); } // ESC else if(e.type == "keydown" && e.keyCode == _this.KeyCodes.esc) { e.preventDefault(); $("#gb-search-toggle").attr("aria-expanded", "false"); $("#gb-search").attr({"aria-hidden": "true", "data-open": "false"}); setTimeout(function() { $("#gb-search-toggle").focus(); }, 500); } }); $(document).on("keydown", "#gb-search-input", function(e) { // ESC if(e.keyCode == _this.KeyCodes.esc) { e.preventDefault(); $("#gb-search-toggle").attr("aria-expanded", "false"); $("#gb-search").attr({"aria-hidden": "true", "data-open": "false"}); setTimeout(function() { $("#gb-search-toggle").focus(); }, 500); } }); $(document).on("keydown", "#gb-search-button", function(e) { if(e.keyCode == _this.KeyCodes.tab && !e.shiftKey) { e.preventDefault(); $("#gb-close-search").focus(); } // ESC else if(e.keyCode == _this.KeyCodes.esc) { e.preventDefault(); $("#gb-search-toggle").attr("aria-expanded", "false"); $("#gb-search").attr({"aria-hidden": "true", "data-open": "false"}); setTimeout(function() { $("#gb-search-toggle").focus(); }, 500); } }); $(document).on("keydown", function() { setTimeout(function() { if($("#gb-search[data-open='true']").length && !$("#gb-search[data-open='true']").find(":focus").length && !$("#gb-search-toggle").is(":focus")) { $("#gb-search-toggle").attr("aria-expanded", "false"); $("#gb-search").attr({"aria-hidden": "true", "data-open": "false"}); } },500 ); }); $("#gb-search-input").focus(function() { if($(this).val() == "What are you searching for?") { $(this).val(""); } }).blur(function() { if($(this).val() == "") { $(this).val("What are you searching for?"); } }); }, "AllyClick": function(event) { if(event.type == "click") { return true; } else if(event.type == "keydown") { if(event.keyCode == this.KeyCodes.space || event.keyCode == this.KeyCodes.enter) { return true; } } else { return false; } }, "GetBreakPoint": function() { return window.getComputedStyle(document.querySelector("body"), ":before").getPropertyValue("content").replace(/"|'/g, "");/*"*/ } };