(function(n,t){function w(){var i=e.find("a"),t={};if(i){i.filter(function(n,t){var r=$(t),i=r.attr("href");return i?i.indexOf(h)==0:!1}).each(function(n,i){var u=$(i),r=u.attr("href");if(!t[r]){t[r]=$(r);$(r).attr("aria-labelledby",r.slice(1));t[r].on("focus",function(n){$(n.target).on("keyup",f)}).on("blur",function(n){$(n.target).off("keyup",f)})}}).on("click",function(t){t.preventDefault();var i=$(t.target),r=i.closest("a").attr("href"),u=r+h;nt(i);n.location.hash!==u?n.location.hash=u:$(n).trigger("hashchange");b(r)});p.find("a").on("focus",function(n){$(n.target).on("keyup",f)}).on("blur",function(n){$(n.target).off("keyup",f)})}}function b(n){var t=$(n);t.length&&($(document.activeElement).blur(),setTimeout(function(){t.focus()}))}function f(n){var t=n.keyCode?n.keyCode:n.which;t===$.ui.keyCode.TAB&&(c($(n.target)),$(n.target).off("keyup",f))}function c(n){ot.scrollToView({offset:n.offset(),padding:parseInt(n.css("padding-top")||0),position:n.position()})}function k(n){c($(n))}function s(){var e=$(n).scrollTop(),o;if(y.outerHeight!==t)if(o=y.outerHeight(),(e>o+a||$("#main-container .content-container").hasClass("fixed"))&&$(n).width()>it){if(i.addClass("active"),i.width(v.width()),u&&!r.hasClass("fixed")&&(r.css({"max-width":r.width()}),r.addClass("fixed")),!u){var c=$(n).height()+e,l=i.offsetParent().offset().top,s=i.outerHeight(),f=c-l-s-rt,h=et.height()-s-ut;f=Math.min(f,h);i.css("top",f);f<=h&&$(document).trigger(Events.CommonEventsNames.ToTopButtonTopPropertyChanged)}}else v.css("margin-top",0),i.removeClass("active"),u&&(r.removeClass("fixed"),r.css({"max-width":"none"}))}function d(){$(n).scroll(function(){s()});$(n).resize(function(){s()});s()}function g(){var n=$(":tabbable",$(".tab-content")).last(),t=$(":tabbable",$(".footer-container")).first();n.on("keydown",function(n){n.keyCode!=$.ui.keyCode.TAB||n.shiftKey||(i.attr("tabindex","0"),o(n,i))});i.on("keydown",function(r){r.keyCode==$.ui.keyCode.TAB&&r.shiftKey?o(r,n):r.keyCode==$.ui.keyCode.TAB?o(r,t):r.keyCode==$.ui.keyCode.ENTER&&i.click()});t.on("keydown",function(n){n.keyCode==$.ui.keyCode.TAB&&n.shiftKey&&o(n,i)})}function o(n,t){n.preventDefault?n.preventDefault():n.returnValue=!1;t.focus()}function nt(n){var t=n.closest("ul");t.hasClass("submenu")&&(t.find("li").removeClass("active"),n.closest("li").addClass("active"))}function l(){var t=n.location.hash.match("(#.*)"+h);return t?t[1]:null}function tt(){n.location.hash.indexOf("#your-california-privacy-rights")>-1&&document.getElementById("your-california-privacy-rights").scrollIntoView()}var a=40,it=767,rt=30,ut=20,ft=500,h="#",u,e=$(".online-app-guide-container, .agency-information-container"),r=e.find(".menu").first(),v=r.find(">ul").first(),i=e.find("#to-top-panel"),y=$(".head-container"),et=$("#content"),p=e.find(".info-body.info-section"),ot=gJobs&&gJobs.pageScrollService,st=gJobs&&gJobs.screenReadersService;$(document).ready(function(){var t,i;if(w(),d(),tt(),$("#online-employment-application-guide").removeAttr("aria-labelledby"),$(document).trigger(Events.CommonEventsNames.HelpAndSupportPageOpened),gJobs.areaInfoService.getCurrentArea()===gJobs.areaInfoService.areaNames.GJobs&&(gJobs.nonFlickeringPopover($("#print-button"),"header-nav-popover visible-desktop"),gJobs.nonFlickeringPopover($("#to-top-panel"),"header-nav-popover visible-desktop")),u=gJobs.areaInfoService.getCurrentArea()==gJobs.areaInfoService.areaNames.Career,"scrollRestoration"in history&&(history.scrollRestoration="manual"),u){a=0;$(n).on("resize",function(){if(r.hasClass("fixed")){var n=e.width()-p.outerWidth();r.css({"max-width":n})}else r.css({"max-width":"none"})})}$(n).on("hashchange",function(){var n=l();n?k(n):$("html, body").animate({scrollTop:0},ft)});t=l();t&&(i=$("#screen-reader-message").text(),$(n).trigger("hashchange"),st.setNotificationWithFocusSaving({text:i,$element:$(t)}));u||g()})})(window)