var resizePanels;$(function(){function ni(t){if(viewMode===4){var i=$("#fragview").outerWidth()-130;t=r(t,i/8);t&&($("#searchWithinProvTab").addClass("active").show().find("a").text(t),n.SectionTitle1(r(t,a)),n.SectionTitle2(r(t,o)))}}function ti(n){printViewFilter.PrintType=n.attr("data-PrintType");printViewFilter.ProvIds=n.attr("data-ProvIds")+".";printViewFilter.ProvIds==="all-."&&(printViewFilter.ProvIds+=",toc-.");var t=sw.getLoadingCover("loadingCover",sw.isXs()?"body":"#Main");t.show();sw.ajax({type:"POST",url:printViewUrl,data:printViewFilter,cache:!1,success:function(n){isFileDownloadProcessed(n)}})}function k(){var n,i,t;if(!w&&!l){if(n=$("div.dms:first"),n.length===0){resizePanels();$("#loadingIndicator").hide();return}$("#loadingIndicator").show();i=n.attr("data-field");t=n.attr("data-term");i==="seriesId"&&(lazyLoadFilter.SeriesId=t,fragments&&(lazyLoadFilter.FragSysId=fragments[t].Item1,lazyLoadFilter._=fragments[t].Item2),bt.insertBefore(n),l=1,sw.ajax({type:"GET",url:lazyLoadContentUrl,data:lazyLoadFilter,cache:!0,success:function(t,i,r){var u=r.getResponseHeader("XmlTag");switch(u){case"derivations":$(".derTbl").append(t);n.remove();break;case"toBeTabled":$(".toBeTabled").append(t);n.remove();break;default:n.replaceWith(t)}wt===0&&d(window.location.hash);$("#ToggleAnnotate").length>0&&($("#ToggleAnnotate").prop("checked")?$(".amendNote").show():$(".amendNote").hide());l=0;bt.remove();resizePanels();sw.isTouchDevice||disableScrollTracking!=="0"||k()}}))}}function si(){ot={};$("#toc a").each(function(n,t){var i=$(t).attr("href");i.indexOf("#")===0&&(ot[i]=1)})}function hi(n){if(!n)return 0;for(var t in ot)if(t===n)return 1;return 0}function d(n){var t,r,i;return hi(n)&&(n=n.replace(".",""),t=$(it(n)),t.length===0&&(t=$('a[name="'+it(n.substr(1))+'"]')),t.length>0)?(r=t.offset(),r&&(i=r.top,sw.isXs()||sw.isSm()?i-=160:n.indexOf("pr")>-1&&(i-=20),$(window).scrollTop(i),$(window).trigger("scroll")),wt=1,isScrolled=1,!0):!1}function ci(){$('[data-spy="scroll"]').each(function(){$(this).scrollspy("refresh")})}function r(n,t){var i=n;return i.length<=t?i:(i=i.substr(0,t-4),i+"...")}function fi(n,t){var i=t.offset().top,u=i+t.height(),r=n.offset().top,f=r+30;return f<=u&&r>=i}function at(){if(sw.isMobile()){$("#nav").height($("#topLeftPanel").outerHeight()+$("#mobileToolbar").outerHeight());return}if(rt=$("#sidebar").width()-20,disableScrollTracking==="1")t=u-ut-s-40,v=t-$("#topLeftPanel").outerHeight()-$("#tocTitle").outerHeight()-$("#tocButton").outerHeight();else{if($("#nav").hasClass("affix-top"))t=u-$("#breadcrumb").outerHeight()-s-45;else{var n=$("#fs").outerHeight();t=n>u?u-20:n-50}v=t-$("#topLeftPanel").outerHeight()-$("#tocTitle").outerHeight()-$("#tocButton").outerHeight()}$("#toc").width(rt-2).animate({height:v},{queue:!0,duration:0});$("#nav").width(rt).animate({height:t},{queue:!0,duration:0});$("#DesktopToolbar").width($("#fragview").outerWidth())}function ei(){o=Math.floor($("#topLeftPanel").outerWidth()/8.2);a=o}function g(){var t=window.innerHeight?window.innerHeight:$(window).outerHeight(),i,r;(n.Show.MobileTimeline()||n.Show.Toc())&&$("#nav").css({height:t+"px"}).addClass("mobile-expanded");i=$("#sidebar").width();$("#nav").width(i);n.Show.Toc()&&$("#toc").height(t-89).width(i);n.Show.MobileTimeline()&&(r=221,$("#mobileDocTimeline").height(t-r),$("#mobileProvTimeline").height(t-r))}function y(){n.Show.Sidebar(!0);n.Show.TopLeftPanel(!0);n.Show.Toc(!1);n.Show.MobileTimeline(!1);n.Show.MobileToolbar(!0);var t=177;$("#nav").hasClass("affix-top")&&(t+=10);$("#nav").width($("#sidebar").width()).height(t);$("body").attr("data-offset","200")}function vt(){n.Show.MobileToolbar(!1);n.Show.MobileTimeline(!1);n.Show.Toc(!0);n.Show.TopLeftPanel(!0);$("#topSection").show();$("html,body").removeClass("mobile-modal-open");$("body").attr("data-offset","100")}function oi(){if(sw.isXs())$("#printModal .modal-dialog").css({margin:"0",width:$(window).width()+"px",height:$(window).height()+"px"}),$("#printModal .print-filter").css("height",$(window).height()-179+"px");else{$("#printModal .print-filter").css({height:$(window).height()-260+"px"});var n=$(window).width();n>=1200?n=1024:n-=200;$("#printModal .modal-dialog").css({margin:"",width:n+"px"})}}function yt(n){n?f.expandProvTimelineOnce||(setTimeout(function(){$("#mobileProvTimeline").scrollTop((provTimelineLen-provTimelineIdx)*60-20)},100),f.expandProvTimelineOnce=1):f.expandDocTimelineOnce||(setTimeout(function(){$("#mobileDocTimeline").scrollTop((timelineItems.length-docTimelineIdx)*60-50)},100),f.expandDocTimelineOnce=1)}function nt(n){n?f.expandProvTimelineOnce||(setTimeout(function(){$("#provTimeline").scrollLeft(provTimelineIdx*140)},100),f.expandProvTimelineOnce=1):f.expandDocTimelineOnce||(setTimeout(function(){$("#docTimeline").scrollLeft(docTimelineIdx*140)},100),f.expandDocTimelineOnce=1)}function tt(n){$(n+" a.timeline-popover").each(function(){var t=$(this),i="hover";sw.isTouchDevice&&(i="manual",t.click(function(){var t=$(this);return t.data("showPopover")===1?!0:($(n+" a.timeline-popover").each(function(){$(this).data("showPopover",0).popover("hide")}),t.data("showPopover",1).popover("show"),!1)}));t.popover({trigger:i,title:t.attr("title"),content:t.attr("data-date")})})}function pt(n,t){var r=currViewUrl,o=r.indexOf("#"),i,f,u;o>-1&&(r=r.substr(0,o));i=$.getQueryParameters();i[n]=t;f="";i.ViewType&&i.ViewType!==null&&(f=i.ViewType);f.toLowerCase()==="within"&&(delete i.ViewType,i.Phrase&&delete i.Phrase);var s=r.indexOf("?"),e=s>-1?r.substr(0,s):r,h=0;for(u in i)typeof i[u]!="undefined"&&(e+=h===0?"?":"&",e+=u+"="+i[u],h+=1);return e}function it(n){return n}function li(){if(sw.isMobile()){$("#nav").height($("#topLeftPanel").outerHeight()+$("#mobileToolbar").outerHeight());return}var n=$(window).scrollTop();t=n>s+ut?u-kt:u-s-ut-kt;v=t-$("#topLeftPanel").outerHeight()-$("#tocTitle").outerHeight()-$("#tocButton").outerHeight();$("#nav").css({height:t+"px",position:"fixed",bottom:"20px"});$("#toc").css({height:v+"px"})}var n,ii,ri,ui,b,lt,l;sw.isMobile=function(){return sw.isXs()||sw.isSm()};validStartDate=parseServerDate(validStartDate);var p=0,wt=0,l=0,bt=$('<div class="ajax-loading">&nbsp;<\/div>'),w=0,a,o,v,rt,s=$("#siteHeader").height()+$("#topSection").height()+$("#mastHeadRow").height(),ut=$("#breadcrumb").outerHeight(),ai=s+143,e=$(window),u=e.height(),ft=e.width(),t=u-s-10,t=500,kt=30,et=0,dt=$.getQueryParameters(),f={},h,ot={},c="",st=sw.isMobile(),gt=54,vi=$(".footer").outerHeight(),yi=$(document).height();ei();initAddToCollection();sw.popover("#compareVersions","#compareVersionsPopover","bottom","");sw.popover(".pager-bottom .page-size","#pageSizePopover","bottom","search-within",0);sw.popover(".pager-bottom .page-index","#pageIndexPopover","bottom","search-within",0);$(document).on("click","a",function(){var n=$(this),t;return n.hasClass("non-ajax")?!0:n.parents("#searchWithinList").length===0&&n.parents(".popover.search-within").length===0?!0:(t=n.hasClass("prov")?"prov":"list",History.pushState({state:n.attr("href"),getPartialView:t,provTitle:n.text()},document.title,n.attr("href")),!1)});$("#searchWithinListTab, searchWithinListTab a").click(function(){return $("#searchWithinListTab").addClass("active"),$("#searchWithinProvTab").removeClass("active"),$("#searchWithinList").show(),$("#legisContent").hide(),!1});$("#searchWithinProvTab, searchWithinProvTab a").click(function(){return $("#searchWithinListTab").removeClass("active"),$("#searchWithinProvTab").addClass("active"),$("#searchWithinList").hide(),$("#legisContent").show(),!1});History.Adapter.bind(window,"statechange",function(){var t=History.getState(),r,i;t.data.getPartialView&&(r=sw.getLoadingCover("loadingCover","#main"),r.show(),i=t.url,i+=i.indexOf("?")>-1?"&":"?",i+="getPartialView="+t.data.getPartialView,$("#legisContent").hide(),$(".pager-bottom .page-size, .pager-bottom .page-index").popover("hide"),sw.ajax({method:"POST",url:i,success:function(i){t.data.getPartialView==="list"?($("#searchWithinTabs").show(),$("#searchWithinListTab").show().addClass("active"),$("#searchWithinProvTab").removeClass("active"),$("#legis").length>0&&$("#legisContent").html(""),$("#tocNav").html(i.Toc),$("#searchWithinList").html(i.SearchResult).show(),sw.popover(".pager-bottom .page-size","#pageSizePopover","bottom","search-within",0),sw.popover(".pager-bottom .page-index","#pageIndexPopover","bottom","search-within",0)):($("#searchWithinTabs").show().show(),$("#searchWithinListTab").removeClass("active"),ni(t.data.provTitle),$("#searchWithinList").hide(),$("#legisContent").html(i.Content).show(),$("#provTimeline").html(i.DesktopTimeline),$("#mobileProvTimeline").html(i.MobileTimeline),$("#wholeDoc").show(),exitSearchUrl=i.ExitSearchUrl,isProvisionView=1,n.ShowDesktopProvTimeline(),window.scrollTo(0,0),disableScrollTracking==="0"&&$("#nav").affix("checkPosition"),lazyLoadFilter=i.LazyLoadFilter,k());r.hide()}}))});$("#searchPhrase").focus();n={Show:{Sidebar:ko.observable(showSideBar),TopLeftPanel:ko.observable(!0),MobileToolbar:ko.observable(!0),Legis:ko.observable(!0),Toc:ko.observable($(".device-md").is(":visible")||$(".device-lg").is(":visible")),Timeline:ko.observable($(".device-md").is(":visible")||$(".device-lg").is(":visible")),ActDetails:ko.observable(!0),DesktopTimeline:ko.observable(!1),MobileTimeline:ko.observable(!1),DesktopDocTimeline:ko.observable(isProvisionView===0),DesktopProvTimeline:ko.observable(isProvisionView===1),MobileDocTimeline:ko.observable(isProvisionView===0),MobileProvTimeline:ko.observable(isProvisionView===1),SearchWithin:ko.observable(viewMode===4)},LegisTitle:ko.observable(legisTitle),LegisTitle1:ko.observable(""),SectionTitle:ko.observable(""),SectionTitle1:ko.observable(""),SectionTitle2:ko.observable(r(provTitle,o)),HideSearchWithin:function(){return(n.Show.SearchWithin(0),!$("#searchWithinListTab").is(":visible"))?($("#searchWithinTabs").hide(),!1):(window.location=window.location.href.substr(0,window.location.href.indexOf("&ViewType=Within")),!1)},ShowSearchWithin:function(){return n.Show.SearchWithin(1),n.Show.DesktopTimeline(0),$("#searchPhrase,#searchPhraseMobile").focus(),!1},SearchWithinPhrase:ko.observable(searchWithinPhrase),SubmitSearchWithin:function(t){var u=$(t),i=n.SearchWithinPhrase(),r;return i=i.replaceAll("<","lt;"),i=i.replaceAll(">","gt;"),r=u.attr("action"),r+="&Phrase="+encodeURIComponent(i),viewMode=4,History.pushState({state:r,getPartialView:"list"},document.title,r),document.body.scrollTop=document.documentElement.scrollTop=0,$("#searchPhraseMobile").blur(),!1},ShowDesktopDocTimeline:function(){return n.Show.DesktopDocTimeline(!0),n.Show.DesktopProvTimeline(!1),nt(0),!1},ShowDesktopProvTimeline:function(){return isProvisionView?(n.Show.DesktopDocTimeline(!1),n.Show.DesktopProvTimeline(!0),nt(1),!1):(sw.bsAlert("Provision Timeline","The Provision timeline is only available when a single provision is being viewed.<br /><br />To view a single provision, select the checkbox next to the provision in the Table of Contents panel and click on 'Get Provisions'."),!1)},ShowMobileDocTimeline:function(){return n.Show.MobileDocTimeline(!0),n.Show.MobileProvTimeline(!1),yt(0),!1},ShowMobileProvTimeline:function(){return isProvisionView?(n.Show.MobileDocTimeline(!1),n.Show.MobileProvTimeline(!0),yt(1),!1):(sw.bsAlert("Provision Timeline","The Provision timeline is only available when a single provision is being viewed.<br /><br />To view a single provision, select the checkbox next to the provision in the Table of Contents panel and click on 'Get Provisions'."),!1)},ToggleDesktopTimeline:function(){var i,t;n.Show.DesktopTimeline(!n.Show.DesktopTimeline());i=n.Show.DesktopTimeline()?"On":"Off";n.Show.SearchWithin(0);t=pt("Timeline",i)+window.location.hash;History.pushState({state:t},document.title,t);nt(isProvisionView)},ShowMobileToc:function(){n.Show.Sidebar(!0);n.Show.Toc(!0);n.Show.TopLeftPanel(!1);n.Show.MobileToolbar(!1);$("#topSection").hide();h=$(window).scrollTop();var t=$("#tocNav .nav li.active");c=t.length>1?$(t.get(1)).find("a").attr("href"):t.find("a").attr("href");$("html,body").addClass("mobile-modal-open");setTimeout(function(){if(c&&($("#tocNav .nav li.active").removeClass("active"),t=$('#tocNav .nav li a[href="'+it(c)+'"').parents("li").addClass("active"),c="",!fi(t,i))){var n=t.offset().top,r=i.offset().top;i.scrollTop(i.scrollTop()+(n-r)-50)}},100);g()},HideMobileToc:function(){y();$("html,body").removeClass("mobile-modal-open");$(window).scrollTop(h);$("#topSection").show();$("#nav").removeClass("mobile-expanded").width($("#sidebar").width())},ShowMobileTimeline:function(){n.Show.Sidebar(!0);n.Show.Toc(!1);n.Show.MobileTimeline(!0);n.Show.TopLeftPanel(!1);n.Show.MobileToolbar(!1);yt(isProvisionView);$("#topSection").hide();h=$(window).scrollTop();$("html,body").addClass("mobile-modal-open");g()},HideMobileTimeline:function(){y();$("html,body").removeClass("mobile-modal-open");$(window).scrollTop(h);$("#topSection").show();$("#nav").removeClass("mobile-expanded").width($("#sidebar").width())},ToggleActDetails:function(){return n.Show.ActDetails(!n.Show.ActDetails()),!1},ToggleSidebar:function(){var t=$("#toc ul.nav li.active"),r,i;return t.length===0&&(t=$("#toc li.active")),r=t.find("a").first(),i=r.attr("href"),$(".body-content").hasClass("toc-hidden")?$(".body-content").removeClass("toc-hidden"):$(".body-content").addClass("toc-hidden"),n.Show.Toc(!0),n.Show.Sidebar(!n.Show.Sidebar()),resizePanels(),$("#DesktopToolbar").css("width",$("#fragview").outerWidth()+"px"),setTimeout(function(){var t=$(i);if(t.length>0){var r=$(i).offset(),n=$("#DesktopToolbar").outerHeight(),u=r.top-n-30;$(window).scrollTop(u);$("body").data()["bs.scrollspy"].options.offset=n+50;ci()}},100),!1},GoToTop:function(){return window.location.hash=window.location.hash==="#top"?"top2":"top",!1},OnClearProvisions:function(){return $(".toc input").prop("checked",!1),!1},OnGetProvisions:function(){var t=[],i=$(".toc input:checked"),r,n,u;if(i.each(function(n,i){t.push($(i).val())}),r=i.length,r===0){alert("Please select at least 1 provision");return}return n=t.join(","),n.length<1700?(u=pt("ProvIds",n)+(t.length===1?"#"+n:""),window.location=u):(currViewFilter.ProvIds=n,sw.postForm(currViewUrl,currViewFilter,"")),!1},OnPrintClick:function(n,t){h=$(window).scrollTop();$("#printModal").on("shown.bs.modal",function(){oi()});return p?$("#printModal").modal("show"):$("#printModal .modal-body").load(t.currentTarget.href+"&partial=1",function(){$("#printModal").modal("show");p=1;initPrintForm()}),!1}};$(document).on("click",".legis-download",function(){var n=$(this);return p?ti(n):$("#printModal .modal-body").load($("#printLink").attr("href")+"&partial=1",function(){p=1;initPrintForm();ti(n)}),!1});ni(provTitle);$("#printModal").on("hidden.bs.modal",function(){$(window).scrollTop(h)});disableScrollTracking==="0"&&(ii=sw.isXs()||sw.isSm()?$("#topLeftPanel").outerHeight()+$("#mobileToolbar").outerHeight()+50:$("#DesktopToolbar").outerHeight()+50,$("body").css("position","relative").scrollspy({target:"#tocNav",offset:ii}));sw.isMobile()?(y(),dt.Timeline==="On"&&n.ShowMobileTimeline()):(vt(),dt.Timeline==="On"&&(n.Show.DesktopTimeline(!0),nt(isProvisionView)));ri=!1;ui=function(){$("div[data-toggle=popover]").each(function(){$(this).popover("hide")})};$(document).on("touchstart",function(){ui();ri=!1});if(disableScrollTracking==="1")e.on("scroll",function(){li()});e.on("orientationchange",function(){et=1;st=sw.isMobile();setTimeout(function(){sw.isMobile()?(y(),g()):(vt(),resizePanels())},200)});e.on("resize",function(){if(u=e.height(),ft=e.width(),st=sw.isMobile(),ei(),et){et=0;return}setTimeout(function(){sw.isMobile()?(sw.isTouchDevice&&(n.Show.MobileTimeline()||n.Show.Toc())?g():y(),disableScrollTracking==="0"&&($("#nav").data("bs.affix").options.offset={top:gt})):(vt(),resizePanels(),disableScrollTracking==="0"&&($("#nav").data("bs.affix").options.offset={top:$("#sidebar").position().top,bottom:function(){return this.bottom=$(".footer").outerHeight(!0)+15}}));oi()},200)});if(resizePanels=function(){if(at(),disableScrollTracking==="0"){var n=$("#colLegis").width();ft<n?$(".table-responsive").parent().css({width:ft-62+"px",display:"block"}):($(".table-responsive").parent().css({"max-width":n-20+"px"}),$(".table-responsive").each(function(){var t=$(this),n={},i;n=t.width()<t.find(".table").width()?{"max-height":$(window).height()-100,"overflow-y":"auto"}:{"max-height":"none","overflow-y":"initial"};n["max-width"]=$(window).width()-20;i=t.parent().prev();i.length>0&&i.hasClass("p1No")&&(n["max-width"]=n["max-width"]-44);t.css(n)}))}},setTimeout(function(){disableScrollTracking==="1"&&$(".footer").hide();resizePanels()},100),disableScrollTracking==="0"){$("#nav").affix({offset:{top:st?gt:$("#sidebar").position().top,bottom:function(){return this.bottom=$(".footer").outerHeight(!0)+15}}}).on("affixed-top.bs.affix",function(){$("#colLegis").css({"margin-top":"0px"});setTimeout(at,100)}).on("affixed.bs.affix",function(){if($("#nav").hasClass("affix")){if(sw.isMobile()){$("#colLegis").css({"margin-top":$("#nav").outerHeight()+"px"});return}setTimeout(at,100)}});$("#DesktopToolbar").affix({offset:{top:201}}).on("affixed.bs.affix",function(){$("#DesktopToolbar").hasClass("affix")&&$("#fragview").css({"margin-top":$("#DesktopToolbar").outerHeight()+"px"});$("#DesktopToolbar").width($("#fragview").outerWidth())}).on("affixed-top.bs.affix",function(){$("#fragview").css({"margin-top":"20px"});n.LegisTitle1("");n.SectionTitle1("")})}var ht=0,ct="",i=$(".doc-legend");$("#tocNav").on("activate.bs.scrollspy",function(t){var f=$(t.target),u="",e,s,h;if(ht===1)u=ct,setTimeout(function(){ht=0;ct=""},200);else{if(e=f.find("ul.nav"),e.length>0)return;fi(f,i)||(s=f.offset().top,h=i.offset().top,i.scrollTop(i.scrollTop()+(s-h)-50));u=$.trim(t.target.innerText)}u?(n.LegisTitle1(r(legisTitle,a)),n.SectionTitle(u),n.SectionTitle1(r(u,a)),n.SectionTitle2(r(u,o))):(n.SectionTitle(provTitle),n.SectionTitle1(r(provTitle,a)),n.SectionTitle2(r(provTitle,o)))});$('[data-toggle="tooltip"]').tooltip();$("a[data-toggle=popover]").popover();tt("#docTimeline");tt("#provTimeline");tt("#mobileDocTimeline");tt("#mobileProvTimeline");lt=function(){for(var n=0;n<timelineItems.length;n++){var t=timelineItems[n],r=parseServerDate(t.Item1),i=new Date(2999,11,31);n+1<timelineItems.length&&(i=parseServerDate(timelineItems[n+1].Item1));r<=b&&b<i&&(w=1,window.location=t.Item2+"&Timeline=On")}w||alert("Could not find any version in force as at "+(sw.isMobile()?$("#versionDateHidden").val():$("#versionDatePicker").val())+".")};$("#versionForm").submit(function(){return lt(),!1});$(".datepicker-trigger").datepicker({autoclose:!0,format:"dd M yyyy",disableTouchKeyboard:!1}).each(function(n,t){validStartDate.getFullYear()!==1753&&($(t).datepicker("setDate",validStartDate),b=validStartDate)}).on("changeDate",function(n){b=n.date;sw.isMobile()&&lt()});sw.popover("#versionsButton","#versionsPopover","bottom");$("#versionsButton2").popover({placement:"bottom",trigger:"click",animation:!1,template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><div class="popover-content"><\/div><\/div>',html:!0,content:$("#versionsPopover").html()});$(".doc-legend").find("a").click(function(){var f,t,r,u,e,i;return $(".row-offcanvas").toggleClass("active"),sw.isMobile()&&n.HideMobileToc(),ht=1,ct=$.trim($(this).text()),f=this,t=f.href.substring(f.href.indexOf("#")+1),c="#"+t,r=!1,u=document.getElementById(t),u==null?(u=document.getElementsByName(t),u.length>0&&(r=!0)):r=!0,r?(window.location.hash=t,!1):(e=$(this).attr("data-part"),i=e?e:t,i.indexOf("-.")===-1&&(i=i),w=1,window.location.href=pt("ProvIds",i)+"#"+t,!1)});$("#nav, #TocBar, #ButtonRow, .front .actHd, .front .chapNo").trigger("affixed.bs.affix");ko.applyBindings(n,$("#Container").get(0));$("#docTimeline,#provTimeline").each(function(){var n=$(this).find("ul");n.width(n.find("li").length*140)});$("#ToggleAnnotate").change(function(){$(this).prop("checked")?$(".amendNote").show():$(".amendNote").hide()});$("#ToggleShowDiff").change(function(){window.location=currUrl.replaceAll("&ShowDiff=on","").replaceAll("&ShowDiff=off","")+(currUrl.indexOf("?")>-1?"&":"?")+"ShowDiff="+($(this).prop("checked")?"on":"off")});$("#mobileToggleAnnotate").click(function(){$("#ToggleAnnotate").prop("checked")?($(".amendNote").hide(),$("#ToggleAnnotate").prop("checked",!1),$(this).text("Show Amendment Annotation")):($(".amendNote").show(),$("#ToggleAnnotate").prop("checked",!0),$(this).text("Hide Amendment Annotation"))});$(window).on("hashchange",function(){d(window.location.hash)});setTimeout(function(){var n,t,r,u,f;(si(),window.location.hash?(t=d(window.location.hash),n=window.location.hash):fragmentPath.length>0&&(t=d(fragmentPath.split(",")[0]),n=fragmentPath.split(",")[0]),n&&t)&&(n=n.replace("#",""),n=n.replace(".",""),r=$('a[href="'+it("#"+n)+'"'),r.length>0&&(u=r.offset().top,f=i.offset().top,i.scrollTop(i.scrollTop()+(u-f)-50)))},100);$(document).on("click","#legis img",function(){window.open($(this).attr("src"),"Legislation Image","width=800,height=600,location=0,menubar=0")});l=0;sw.isTouchDevice||disableScrollTracking!=="0"?($("#loadingIndicator").hide(),$(window).scroll(function(){$(window).scrollTop()+$(window).height()>$(document).height()-100&&k()})):k()})