function $buo_f(){var n=document.createElement("script");n.src="//browser-update.org/update.js";document.body.appendChild(n)}function base64toBlob(n,t){var i,r,e;t=t||"";var u=1024,o=atob(n),s=o.length,h=Math.ceil(s/u),c=new Array(h);for(i=0;i<h;++i){var f=i*u,l=Math.min(f+u,s),a=new Array(l-f);for(r=f,e=0;r<l;++e,++r)a[e]=o[r].charCodeAt(0);c[i]=new Uint8Array(a)}return new Blob(c,{type:t})}function form_interaction(){function n(n){if(validEmail(n)){var t={EmailAddress:n,Subject:"na",Comment:"shhhh"},i=JSON.stringify(t);$.ajax({url:"/Contact/Subscribe",cache:!1,type:"POST",contentType:"application/json; charset=utf-8",data:i,dataType:"json",success:function(){$("form.newsletter p").hide();$("form.newsletter section.input_holder").replaceWith('<p class="OS_SB success">'+$("form.newsletter section.input_holder").data("success")+"<\/p>");$("form.newsletter a.btn").remove()},error:function(){show_error($("form.newsletter section.input_holder"))}})}}$("section.textarea_holder").click(function(){$(this).find("textarea").focus()});$("section.input_holder").click(function(){$(this).find("input").focus()});$("#newsletter_contact_form input").focusin(function(){$(this).parent().css({backgroundColor:"#ffffff",backgroundPosition:"0 -40px"})}).focusout(function(){$(this).parent().css({backgroundColor:"#f7f7f7",backgroundPosition:"0 0"})});$("#newsletter_contact_form textarea").focusin(function(){$(this).parent().css({backgroundColor:"#ffffff",backgroundPosition:"0 -100px"})}).focusout(function(){$(this).parent().css({backgroundColor:"#f7f7f7",backgroundPosition:"0 0"})});$("#email_contact_form input").focusin(function(){$(this).parent().css({backgroundColor:"#ffffff",backgroundPosition:"0 -40px"})}).focusout(function(){$(this).parent().css({backgroundColor:"#f7f7f7",backgroundPosition:"0 0"})});$("#email_contact_form textarea").focusin(function(){$(this).parent().css({backgroundColor:"#ffffff",backgroundPosition:"0 -100px"})}).focusout(function(){$(this).parent().css({backgroundColor:"#f7f7f7",backgroundPosition:"0 0"})});$("#form_submit").click(function(){var r=!1,u=!1,f=!1,i=$("#input_subject input").val(),n,t,e,o;i==$("#input_subject input").attr("placeholder")&&(i="");n=$("#input_email input").val();n==$("#input_email input").attr("placeholder")&&(n="");t=$("#input_msg textarea").val();t==$("#input_msgvtextarea").attr("placeholder")&&(t="");i.length<=1||i==""?(show_error($("#input_subject")),u=!0):hide_error($("#input_subject"));n.indexOf("@")!=-1&&n.indexOf(".")!=-1&&n.length>6&&n.length-n.lastIndexOf(".")>2?hide_error($("#input_email")):(show_error($("#input_email")),f=!0);t.length<=5||t==""?(show_error($("#input_msg")),r=!0):hide_error($("#input_msg"));$(".all_form_error").css({opacity:"0",display:"none"});r?($(".form_message_error").css({display:"block"}),$(".form_message_error").stop().animate({opacity:"1"},300,"easeOutQuad")):f?($(".form_email_error").css({display:"block"}),$(".form_email_error").stop().animate({opacity:"1"},300,"easeOutQuad")):u?($(".form_subject_error").css({display:"block"}),$(".form_subject_error").stop().animate({opacity:"1"},300,"easeOutQuad")):(e={Id:"0",EmailAddress:n,Subject:i,Comment:t},o=JSON.stringify(e),$.ajax({url:"/Contact",cache:!1,type:"POST",contentType:"application/json; charset=utf-8",data:o,dataType:"json",success:function(){$(".form_success").css({display:"block"});$(".form_success").stop().animate({opacity:"1"});$(".form_success").delay(2e3).animate({opacity:"0"},300,"easeOutQuad",function(){$(this).css({display:"none"})});clear_form()}}).fail(function(){$(".form_network_error").css({display:"block"});$(".form_network_error").stop().animate({opacity:"1"},300,"easeOutQuad")}))});$("form.newsletter input").bind("focus",function(){hide_error($(this).parent())});$("form.newsletter input").bind("keydown",function(t){hide_error($(this).parent());t.keyCode==13&&n($(this).val())});$("form.newsletter a.btn.pull-right").bind("click",function(){n($(this).parents("form.newsletter").find("input").val())})}function clear_form(){$("#input_subject input").val("");$("#input_email input").val("");$("#input_msg textarea").val("")}function show_error(n){n.stop().animate({borderBottomColor:"#ed3c3c",borderTopColor:"#ed3c3c",borderRightColor:"#ed3c3c",borderLeftColor:"#ed3c3c"},300,"easeOutQuad");n.hasClass("textarea_holder")?n.css({backgroundPosition:"0 -200px"}):n.css({backgroundPosition:"0 -80px"})}function hide_error(n){n.stop().animate({borderBottomColor:"#dedede",borderTopColor:"#dedede",borderRightColor:"#dedede",borderLeftColor:"#dedede"},300,"easeOutQuad");n.css({backgroundPosition:"0 0"})}function numbersonly(n,t,i){var r,u;if(t===KeyboardEvent)r=t.which;else return!0;return u=String.fromCharCode(r),r==null||r==0||r==8||r==9||r==13||r==27?!0:"0123456789-+.()".indexOf(u)>-1?!0:i&&u=="."?(n.form.elements[i].focus(),!1):!1}function validEmail(n){return n.search(/^[_a-z0-9-]+([\.\+][_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$/i)>-1}function getCurrentLocationContext(n){$.ajax({url:"/Geo/"+n.coords.latitude+"/"+n.coords.longitude,cache:!1,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){(typeof $.cookie("LastCountyVisited")=="undefined"||typeof $.cookie("DefaultSetOnce")!="undefined")&&($.cookie("LastCountyVisited",decodeURIComponent(n.NearestCounty.trim()),{expires:7,path:"/"}),$.cookie("LastDistrictVisited",decodeURIComponent(n.NearestDistrict.trim()),{expires:7,path:"/"}),$.cookie("LastSchoolVisited",decodeURIComponent(n.NearestSchool.trim()),{expires:7,path:"/"}),typeof $.cookie("DefaultSetOnce")!="undefined"&&$.cookie("DefaultSetOnce",null,{path:"/"}))},error:function(){}})}function gelocationIsDenied(){}function initBreadcrumbs(){var i=$("#breadcrumbs"),n,t;if(i.length>0){if(clearElements(),n=extractEntitiesFromURL(),addElement("<li><a href='/'><i class='icon-home' title='Ed-Data Home'><\/i><\/a><\/li>"),n.isActive=="state"){addElement("<li title='California State Profile' class='current'>California<\/li>");return}n.county!==null&&(t=null,t=n.isActive=="county"?"<li title='Current County Profile' class='current'>"+EdDataDecodeURI(n.county)+"<\/li>":"<li title='County Profile'><a href='/county/"+SEOEncode(n.county)+"/'>"+EdDataDecodeURI(n.county)+"<\/a><\/li>",addElement(t));n.district!==null&&(t=null,t=n.isActive=="district"?"<li title='Current District Profile' class='current'>"+EdDataDecodeURI(SEODecode(n.district))+"<\/li>":"<li title='District Profile'><a href='/district/"+SEOEncode(n.county)+"/"+SEOEncode(n.district)+"'>"+EdDataDecodeURI(SEODecode(n.district))+"<\/a><\/li>",addElement(t));n.isActive=="school"&&addElement("<li title='Current School Profile' class='current'>"+EdDataDecodeURI(SEODecode(n.school))+"<\/li>");n.isActive==="article"&&addElement("<li title='Current Article' class='current'>"+EdDataDecodeURI(n.articleName)+"<\/li>");n.isActive==="comparisons"&&addElement("<li title='Current Comparison' class='current'>Comparisons<\/li>")}}function extractEntitiesFromURL(){var o=window.location,n=o.toString().replace(/#.*$/g,"").replace(/\?.*$/g,"").split(/\//gi),t,r,u,f,e,i;return n.length>2&&(t=n[3]),t=n[3],t.match(/school/i)?(r=n[4],u=decodeURIComponent(n[5]),f=decodeURIComponent(n[6]),i="school"):t.match(/district/i)?(r=n[4],u=decodeURIComponent(n[5]),i="district"):t.match(/county/i)?(r=n[4],i="county"):t.match(/state/i)?i="state":t.match(/article/i)?(e=n[4],i="article"):t.match(/comparisons/i)&&(i="comparisons"),{operation:decodeURIComponent(t),county:SEODecode(r),district:SEODecode(u),school:SEODecode(f),articleName:decodeURIComponent(e),isActive:i}}function EdDataDecodeURI(n){return decodeURIComponent(n).replace(/-/g," ")}function clearElements(){$("#breadcrumbs").empty()}function addElement(n){$("#breadcrumbs").append(n)}function SEOEncode(n){return n==null?null:(n=n.replace(/ - /g,"^^^^"),n=n.replace(/-/g,"--"),n=n.replace(/ /g,"-"),n=n.replace(/\^\^\^\^/g,"----"),n=n.replace(/\//g,"_"),n=n.replace(/&/g,"_And_"),n=n.replace(/#/g,"_No_"),n=n.replace(/\+/g,"_Plus_"),n=n.replace(/'/g,"_Qt_"),n=n.replace(/"/g,"_Dq_"),n=n.replace(/:/g,"_Col_"),n.replace(/!/g,"_Ex_"))}function SEODecode(n){return n==null?null:(n=n.replace(/_(A|a)nd_/g,"&"),n=n.replace(/_(N|n)o_/g,"#"),n=n.replace(/_(P|p)lus_/g,"+"),n=n.replace(/_(Q|q)t_/g,"'"),n=n.replace(/_(D|d)q_/g,'"'),n=n.replace(/_(C|c)ol_/g,":"),n=n.replace(/_(E|e)x_/g,"!"),n=n.replace(/----/g,"^^^^"),n=n.replace(/--/g,"@@@"),n=n.replace(/-/g," "),n=n.replace(/@@@/g,"-"),n=n.replace(/_/g,"/"),n.replace(/\^\^\^\^/g," - "))}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}var $buoop={vs:{i:9,f:15,o:12.1,s:5.1},c:2},$_com,wasAlreadyAdded,$body,selectConfig,selector,countyChangeDfd,districtChangeDfd,__extends,eddata;try{document.addEventListener("DOMContentLoaded",$buo_f,!1)}catch(e){window.addEventListener("onload",$buo_f)}$(document).ready(function(){var n="test_cookie";$.cookie(n,!0);$.cookie(n)?$.removeCookie(n,{path:"/"}):$("#no-cookie-message").removeClass("hidden");$("#nav li").hasClass("active")||$("#nav>li:first").addClass("active");$.cookie("IncludeClosedMerged")==="true"?$("#include-closed-districts-schools").prop("checked",!0):$("#include-closed-districts-schools").prop("checked",!1);eddata.glossary.Factory.initialize($_glo.SectionType.WORD);eddata.userHistoryManager.get(function(n){$(".footermap").append('<a class="tag" title="Tag" href="/'+n.RouteUrl+'">'+n.TagDisplayName+"<\/a>")});typeof eddata_tourType!="undefined"&&eddata.tourFactory.initialize();$(".profile-pref-link").click(function(n){var t,i;$(n.target).attr("data-profile-tab")?t=parseInt($(n.target).attr("data-profile-tab")):(i=parseInt($(n.target).attr("data-profile-section")),t=$_com.getTabForSectionType(i),$_com.setPreferredSectionForTab(i,t,!0));$_com.setPreferredTab(t,!0)});$("[data-toggle='tooltip']").tooltip();$('[data-toggle="tooltipl"]').tooltip({placement:"left"});$('[data-toggle="tooltipb"]').tooltip({placement:"bottom"});$('[data-toggle="popover"]').popover({trigger:"hover",placement:"top"})}),function(n){var t,i;(function(n){n[n.PROFILE_DEMOGRAPHIC=0]="PROFILE_DEMOGRAPHIC";n[n.PROFILE_PERFORMANCE=1]="PROFILE_PERFORMANCE";n[n.PROFILE_CAREER_READINESS=2]="PROFILE_CAREER_READINESS";n[n.PROFILE_DISCIPLINE=3]="PROFILE_DISCIPLINE";n[n.PROFILE_ABSENTEEISM=4]="PROFILE_ABSENTEEISM";n[n.ELECTION=5]="ELECTION";n[n.ELECTION_CARDS=6]="ELECTION_CARDS";n[n.FINANCE_GENERAL_FUND_REV=7]="FINANCE_GENERAL_FUND_REV";n[n.FINANCE_GENERAL_FUND_EXP=8]="FINANCE_GENERAL_FUND_EXP";n[n.FINANCE_ALL_REV_AND_EXP=9]="FINANCE_ALL_REV_AND_EXP";n[n.FINANCE_OTH_FIN_CONT=10]="FINANCE_OTH_FIN_CONT";n[n.STAFF_DEMOGRAPHIC=11]="STAFF_DEMOGRAPHIC";n[n.STAFF_TEACHERS_SALARIES=12]="STAFF_TEACHERS_SALARIES"})(t=n.SectionType||(n.SectionType={}));i=function(){function n(){}return n.getTabForSectionType=function(n){switch(n){case t.PROFILE_DEMOGRAPHIC:case t.PROFILE_PERFORMANCE:case t.PROFILE_CAREER_READINESS:case t.PROFILE_DISCIPLINE:case t.PROFILE_ABSENTEEISM:return 0;case t.ELECTION:case t.ELECTION_CARDS:return 1;case t.FINANCE_GENERAL_FUND_REV:case t.FINANCE_GENERAL_FUND_EXP:case t.FINANCE_ALL_REV_AND_EXP:case t.FINANCE_OTH_FIN_CONT:return 2;case t.STAFF_DEMOGRAPHIC:case t.STAFF_TEACHERS_SALARIES:return 3}},n.setPreferredSectionForTab=function(n,t,i,r){var u=$_com.getPagePreferences();u.sectionsPerTab[t]=n;u.isAltSectionView=r;u.scrollToSection=i||!1;$_com.setPagePreferences(u)},n.setPreferredTab=function(n,t){var i=this.getPagePreferences();i.tabNbr=n;i.scrollToSection=t||!1;$_com.setPagePreferences(i)},n.getPagePreferences=function(){var i=$.cookie("pagePreferences"),n,t;return i&&(n=JSON.parse(i),n.sectionsPerTab.length==4)?n:(t={sectionsPerTab:[0,5,7,11],tabNbr:0},$_com.setPagePreferences(t),t)},n.setPagePreferences=function(n){$.cookie("pagePreferences",JSON.stringify(n),{expires:1,path:"/"})},n.parseStartEndFyrFromRangeAsString=function(n){var t=n.split(","),i=parseInt(t[0]),r=parseInt(t[t.length-1]);return{start:i,end:r}},n}();n.Common=i}(eddata||(eddata={}));$_com=eddata.Common;$(".navbar .dropdown").hover(function(){$(this).addClass("extra-nav-class").find(".dropdown-menu").first().stop(!0,!0).delay(50).slideDown()},function(){var n=$(this);n.find(".dropdown-menu").first().stop(!0,!0).delay(100).slideUp("fast",function(){n.removeClass("extra-nav-class")})});wasAlreadyAdded=!1;$("#search").tokenInput("/search/Keywords",{theme:"facebook",queryParam:"query",minChars:3,searchDelay:150,noResultsText:"",searchingText:"",onAdd:function(n){$("#token-input-search").prop("disabled",!0);$(".token-input-delete-token-facebook").hide();wasAlreadyAdded=!0;window.location.href="/search/Faceted?query="+SEOEncode(n.name)},onReady:function(){$("#token-input-search").attr("aria-labelledby","SearchAllEdData");$("#token-input-search").keydown(function(n){if(n.which==13&&!wasAlreadyAdded){var t=$("#search-box .token-input-input-token-facebook>tester").text();t!=""&&$("#search").tokenInput("add",{name:t})}})}});$("#searchclear").click(function(){$("#token-input-search").val("")});$("#token-input-search").keyup(function(){$(this).val()!==""?$("#searchclear").removeClass("hidden"):$("#searchclear").addClass("hidden")});$("#searchbtn").click(function(){var n=$("#search-box .token-input-input-token-facebook>tester").text();n!=""&&$("#search").tokenInput("add",{name:n})});$(document).ready(function(){$("#nav").tinyNav({active:"selected",header:" ",label:"",indent:""})});$(document).ready(function(){});$(document).ready(function(){});$(document).ready(function(n){n("#submit").click(function(){var r=n("input[name=name]"),t=n("input[name=email]"),u=n("textarea[name=comment]"),i=!1,f;return(r.val()==""?(r.addClass("error"),i=!0):r.removeClass("error"),t.val()==""?(t.addClass("error"),i=!0):t.removeClass("error"),/^([a-z0-9_\-\.])+\@([a-z0-9_\-\.])+\.([a-z]{2,4})$/i.test(t.val())?t.removeClass("error"):(t.addClass("error"),i=!0),u.val()==""?(u.addClass("error"),i=!0):u.removeClass("error"),i==!0)?!1:(f="name="+r.val()+"&email="+t.val()+"&comment="+encodeURIComponent(u.val()),n(".text").attr("disabled","true"),n(".loading").show(),n.ajax({url:"contact.php",type:"GET",data:f,cache:!1,success:function(t){t==1?(n(".done").fadeIn("slow"),n(".form").find("input[type=text], textarea").val("")):alert("Sorry, unexpected error. Please try again later.")}}),!1)})});$(document).ready(function(n){n("#back-top").hide();n(function(){n(window).scroll(function(){n(this).scrollTop()>600?n("#back-top").fadeIn():n("#back-top").fadeOut()});n("#back-top a").click(function(){return n("body,html").animate({scrollTop:0},800),!1})})});$body=$("body");$(window).on("load",function(){$body.toggleClass("on off");$("#trigger").click(function(){$body.toggleClass("on off");setTimeout(function(){$body.toggleClass("on off")},2e3)})});$(document).on("ready",function(){Waves.init();Waves.attach(".drag-ripple","waves-block",!0);Waves.attach(".flat-buttons",["waves-button"]);Waves.attach(".float-buttons",["waves-button","waves-float"]);Waves.attach(".float-button-light",["waves-button","waves-float","waves-light"])});$(function(){$("input, textarea").placeholder()});$(document).ready(function(n){n(".animated").appear();n(document.body).on("appear",".fade",function(){n(this).each(function(){n(this).addClass("anim-fade")})});n(document.body).on("appear",".slidea",function(){n(this).each(function(){n(this).addClass("anim-slide")})});n(document.body).on("appear",".hatch",function(){n(this).each(function(){n(this).addClass("anim-hatch")})});n(document.body).on("appear",".entrance",function(){n(this).each(function(){n(this).addClass("anim-entrance")})});n(document.body).on("appear",".fadeInUpNow",function(){n(this).each(function(){n(this).addClass("fadeInUp")})});n(document.body).on("appear",".fadeInDownNow",function(){n(this).each(function(){n(this).addClass("fadeInDown")})});n(document.body).on("appear",".fadeInLeftNow",function(){n(this).each(function(){n(this).addClass("fadeInLeft")})});n(document.body).on("appear",".fadeInRightNow",function(){n(this).each(function(){n(this).addClass("fadeInRight")})});n(document.body).on("appear",".fadeInUpBigNow",function(){n(this).each(function(){n(this).addClass("fadeInUpBig")})});n(document.body).on("appear",".fadeInDownBigNow",function(){n(this).each(function(){n(this).addClass("fadeInDownBig")})});n(document.body).on("appear",".fadeInLeftBigNow",function(){n(this).each(function(){n(this).addClass("fadeInLeftBig")})});n(document.body).on("appear",".fadeInRightBigNow",function(){n(this).each(function(){n(this).addClass("fadeInRightBig")})});n(document.body).on("appear",".fadeInNow",function(){n(this).each(function(){n(this).addClass("fadeIn")})});n(document.body).on("appear",".flashNow",function(){n(this).each(function(){n(this).addClass("flash")})});n(document.body).on("appear",".shakeNow",function(){n(this).each(function(){n(this).addClass("shake")})});n(document.body).on("appear",".bounceNow",function(){n(this).each(function(){n(this).addClass("bounce")})});n(document.body).on("appear",".tadaNow",function(){n(this).each(function(){n(this).addClass("tada")})});n(document.body).on("appear",".swingNow",function(){n(this).each(function(){n(this).addClass("swing")})})});$(window).on("load",function(){form_interaction()});$(document).ready(function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(getCurrentLocationContext,gelocationIsDenied)});$("#Subscribe a").click(function(n){n.preventDefault();$(this).tab("show");$("html").getNiceScroll().resize();$("html, body").animate({scrollTop:$(document).height()},"slow")});$(document).ready(function(){initBreadcrumbs()});selectConfig={".chosen-select":{},".chosen-select-deselect":{allow_single_deselect:!0},".chosen-select-no-single":{disable_search_threshold:10},".chosen-select-no-results":{no_results_text:"Sorry, nothing found!"},".chosen-select-width":{width:"95%"}};for(selector in selectConfig)$(selector).chosen(selectConfig[selector]);countyChangeDfd=$.Deferred();districtChangeDfd=$.Deferred();$(window).on("load",function(){var n,i,t;$("#districtddl").prop("disabled",!0).trigger("chosen:updated");$("#schoolddl").prop("disabled",!0).trigger("chosen:updated");$("#include-closed-districts-schools").prop("disabled",!0);n=extractEntitiesFromURL();n.county!=="undefined"&&n.county!==null&&($("#countyddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.county.toLocaleLowerCase().trim()}).prop("selected",!0).trigger("chosen:updated"),$("#countyddl").change());$.when(countyChangeDfd).done(function(){if(n.district!=="undefined"&&n.district!==null){var t=$("#districtddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.district.toLocaleLowerCase().trim()}).prop("disabled",!1).prop("selected",!0).trigger("chosen:updated");$("#districtddl").change();t.length==0&&($("#include-closed-districts-schools").click(),setTimeout(function(){$("#districtddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.district.toLocaleLowerCase().trim()}).prop("disabled",!1).prop("selected",!0).trigger("chosen:updated");$("#districtddl").change()},1e3))}});$.when(districtChangeDfd).done(function(){n.school!=="undefined"&&n.school!==null&&$("#schoolddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.school.toLocaleLowerCase().trim()}).prop("disabled",!1).prop("selected",!0).trigger("chosen:updated")});n.district!=="undefined"&&n.district!==null&&($("#districtddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.district.toLocaleLowerCase().trim()}).prop("selected",!0).trigger("chosen:updated"),$("#schoolddl").change());n.school!=="undefined"&&n.school!==null&&(i=$("#schoolddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.school.toLocaleLowerCase().trim()}).prop("selected",!0).trigger("chosen:updated"),$("#schoolddl").change(),i.length!=0||$("#include-closed-districts-schools").is(":checked")||($("#include-closed-districts-schools").click(),setTimeout(function(){$("#schoolddl option").filter(function(){return $(this).text().toLocaleLowerCase()==n.school.toLocaleLowerCase().trim()}).prop("selected",!0).trigger("chosen:updated");$("#schoolddl").change()},1e3)));t=!1;$("#countyddl_chosen, #districtddl_chosen, #schoolddl_chosen").keydown(function(n){n.which!=13||t||$("#cds-go-btn").click()});$("#countyddl, #districtddl, #schoolddl").on("chosen:showing_dropdown",function(){t=!0});$("#countyddl, #districtddl, #schoolddl").on("chosen:hiding_dropdown",function(){t=!1})});$("#cds-go-btn").click(function(){location.href=$("#countydistrictschoolsearch").attr("action")});$("#countyddl").change(function(){if($("#countyddl").prop("selectedIndex")!=0){$("#districtddl").prop("disabled",!0).trigger("chosen:updated");$("#cdsdistrict .loader").addClass("spinning");var n=$("#countydistrictschoolsearch").attr("data-districtlistaction");$.getJSON(n+"/"+$("#countyddl").val()+"/"+$("#include-closed-districts-schools").is(":checked"),function(n){var t="<option>Select a District<\/option>";$.each(n,function(n,i){t+="<option value='"+i.Value+"'>"+i.Text.trim()+"<\/option>"});$("#districtddl").html(t);$("#districtddl").prop("disabled",!1).trigger("chosen:updated");$("#cdsdistrict .loader").removeClass("spinning");$("#schoolddl").html("<option>Select a School<\/option>");$("#schoolddl").prop("disabled",!0).trigger("chosen:updated");$("#include-closed-districts-schools").prop("disabled",!1);$("#cds-go-btn").prop("disabled",!1);countyChangeDfd.resolve()});$("#countydistrictschoolsearch").attr("action","/county/"+SEOEncode($("#countyddl option:selected").text().trim()))}else $("#countydistrictschoolsearch").attr("action","#"),$("#districtddl").prop("selectedIndex",0),$("#districtddl").prop("disabled",!0).trigger("chosen:updated"),$("#schoolddl").prop("selectedIndex",0),$("#schoolddl").prop("disabled",!0).trigger("chosen:updated"),$("#include-closed-districts-schools").prop("checked",!1),$("#cds-go-btn").prop("disabled",!0)});$("#districtddl").change(function(){if($("#districtddl").prop("selectedIndex")!=0){$("#schoolddl").prop("disabled",!0).trigger("chosen:updated");$("#cdsschool .loader").addClass("spinning");var n=$("#countydistrictschoolsearch").attr("data-schoollistaction");$.getJSON(n+"/"+$("#countyddl").val()+"/"+$("#districtddl").val()+"/"+$("#include-closed-districts-schools").is(":checked"),function(n){var t="<option>Select a School<\/option>";$.each(n,function(n,i){t+="<option value='"+i.Value+"'>"+i.Text+"<\/option>"});$("#schoolddl").html(t);$("#schoolddl").prop("disabled",!1).trigger("chosen:updated");$("#cdsschool .loader").removeClass("spinning");districtChangeDfd.resolve()});$("#countydistrictschoolsearch").attr("action","/district/"+SEOEncode($("#countyddl option:selected").text().trim())+"/"+SEOEncode($("#districtddl option:selected").text().trim()))}else $("#countydistrictschoolsearch").attr("action","/county/"+SEOEncode($("#countyddl option:selected").text().trim())),$("#schoolddl").prop("selectedIndex",0),$("#schoolddl").prop("disabled",!0).trigger("chosen:updated")});$("#schoolddl").change(function(){$("#schoolddl").prop("selectedIndex")!=0?$("#countydistrictschoolsearch").attr("action","/school/"+SEOEncode($("#countyddl option:selected").text().trim())+"/"+SEOEncode($("#districtddl option:selected").text().trim())+"/"+SEOEncode($("#schoolddl option:selected").text().trim())):$("#countydistrictschoolsearch").attr("action","/district/"+SEOEncode($("#countyddl option:selected").text().trim())+"/"+SEOEncode($("#districtddl option:selected").text().trim()))});$("#include-closed-districts-schools").change(function(){$.cookie("IncludeClosedMerged",$("#include-closed-districts-schools").is(":checked"),{path:"/"});$("#schoolddl").prop("disabled",!0).trigger("chosen:updated");$("#districtddl").prop("disabled",!0).trigger("chosen:updated");$("#countyddl").change()}),function(n){var t=function(){function n(){}return n.add=function(n,t){$.ajax({url:"/UserHistory/Add",cache:!1,type:"POST",data:JSON.stringify(n),contentType:"application/json; charset=utf-8",dataType:"text",success:function(n){typeof t!="function"||JSON.parse(n.toLowerCase())||t("'/UserHistory/Add': Server did not return 'true'")},error:function(n,i){t("'/UserHistory/Add' call failed: "+i)}})},n.get=function(t,i){$.ajax({url:"/UserHistory/Recent",cache:!1,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",success:function(i){var r=[0,0,0,0,0,0];i.forEach(function(i){var u=!1;switch(i.TagType){case"Article":r[0]++;r[0]<=n.nbrOfArticles&&(u=!0);break;case"County":r[1]++;r[1]<=n.nbrOfCounties&&(u=!0);break;case"School":r[2]++;r[2]<=n.nbrOfSchools&&(u=!0);break;case"District":r[3]++;r[3]<=n.nbrOfDistricts&&(u=!0);break;case"DistrictComparison":r[4]++;r[4]<=n.nbrOfDistrictComparisons&&(u=!0);break;case"SchoolComparison":r[5]++;r[5]<=n.nbrOfSchoolComparisons&&(u=!0)}typeof t=="function"&&u&&t(i)})},error:function(n,t){typeof i=="function"&&i("'/UserHistory/Recent' call failed: "+t)}})},n.nbrOfArticles=3,n.nbrOfSchools=2,n.nbrOfDistricts=2,n.nbrOfCounties=2,n.nbrOfDistrictComparisons=1,n.nbrOfSchoolComparisons=1,n}();n.userHistoryManager=t}(eddata||(eddata={})),function(n){var t;(function(t){var i,r,u;(function(n){n[n.WORD=0]="WORD";n[n.FINANCE=1]="FINANCE"})(i=t.SectionType||(t.SectionType={}));r=function(){function n(){}return n.initialize=function(n){switch(n){case i.WORD:this.gWord||(this.gWord=new t.Word);break;case i.FINANCE:this.gFinance||(this.gFinance=new t.Finance)}},n.navigateToTerm=function(n,t){var r;switch(n){case i.WORD:r=this.gWord;break;case i.FINANCE:r=this.gFinance}this.initialize(n);r.setTerm(t);r.isOpened()||r.openClose();r.loadTerms(n==i.WORD?r.getTerm().substring(0,1):t)},n.rebindPageLinks=function(n){var t=this;$("[data-term]").each(function(r,u){var e=$(u).attr("data-gloss-type"),f;f=e?parseInt(e):i.WORD;n&&f!=n||($(u).unbind("click"),$(u).click(function(n){n.preventDefault();t.navigateToTerm(f,$(n.target).attr("data-term"))}))})},n.rebindElementLinks=function(n,t){var r=this;n.find("[data-term]").each(function(n,u){var e=$(u).attr("data-gloss-type"),f;f=e?parseInt(e):i.WORD;t&&f!=t||($(u).unbind("click"),$(u).click(function(n){n.preventDefault();r.navigateToTerm(f,$(n.target).closest("a").attr("data-term"))}))})},n.getJQueryElementForSection=function(n){switch(n){case 0:return $("#word-glossary");case 1:return $("#fin-glossary")}},n}();t.Factory=r;u=function(){function t(t){var i=this;this.glossaryContainerId="#"+$_glo_f.getJQueryElementForSection(t)[0].id;this.type=t;$(this.glossaryContainerId).find(".btn-toolbar button").each(function(n,t){$(t).on("click",function(n,t){i.setTerm($(n.target).html());t||i.loadTerms()})});$("body").click(function(t){$(t.target).parents(i.glossaryContainerId+" .glossary-panel-toggle").length||$(t.target).parents(i.glossaryContainerId+" .glossary-panel-button").length||!i.isOpened()||$(t.target).closest("a").hasClass("glossaryterm")||n.tourFactory.isOpen(n.tourType.Glossary)||i.openClose()});$(this.glossaryContainerId).find(".glossary-panel-button").click(function(n){var t=!1;i.isOpened()||(t=!0);i.openClose();t&&!$("#word-glossary .glossary-body span div").length&&i.loadTerms();n.stopPropagation()});$(this.glossaryContainerId).find(".btn-glossaryClose").click(function(){i.openClose()});$(this.glossaryContainerId).find(".btn-glossaryExit").click(function(){i.openClose()});$(this.glossaryContainerId).find(".btn-glossary-pagination").show();r.rebindPageLinks(this.type)}return t.prototype.loadTerms=function(){},t.prototype.setTerm=function(){},t.prototype.getTerm=function(){return""},t.prototype.getTermDefinition=function(){},t.prototype.isOpened=function(){return $(this.glossaryContainerId).find(".glossary-panel-toggle").is(":visible")},t.prototype.onTermsLoaded=function(n,t,i){var u=this,f=$("<span>");$.parseJSON(n).forEach(function(n){var t=$("<h4>",{html:i(n)});t.click(function(t){var i=$(t.target).parent("div");i.hasClass("active")?(i.removeClass("active"),u.setUpScrolling()):u.getTermDefinition(n,function(n){$(u.glossaryContainerId).find(".glossary-body div").removeClass("active");i.addClass("active");i.find("p").replaceWith($("<p>",{html:n}));r.rebindElementLinks(i,u.type);u.setUpScrolling()})});$(f).append($("<div>").append(t).append($("<p>")))});$(this.glossaryContainerId).find(".glossary-body span").replaceWith($(f));$.parseJSON(n).length===0&&$(this.glossaryContainerId).find(".glossary-body span").replaceWith($("<span>").append($("<div>").append($("<h4>",{html:"Sorry, no entry for this range"}))));$(".btn-toolbar button").removeClass("activated");$(".btn-toolbar button").each(function(n,i){$(i).html().toLowerCase()===t(u.getTerm()).toLowerCase()&&$(i).addClass("activated")});this.setUpScrolling()},t.prototype.openClose=function(){this.isOpened()?($(this.glossaryContainerId).find(".glossary-panel-button").attr("data-original-title",$(this.glossaryContainerId).find(".glossary-panel-button").attr("data-original-title").replace("close","open")),this.previousTourType&&(eddata_tourType=this.previousTourType)):($(this.glossaryContainerId).find(".glossary-panel-button").attr("data-original-title",$(this.glossaryContainerId).find(".glossary-panel-button").attr("data-original-title").replace("open","close")),typeof eddata_tourType!="undefined"&&(this.previousTourType=eddata_tourType),eddata_tourType="Glossary");$(this.glossaryContainerId).find(".glossary-panel-toggle").slideToggle();$(this.glossaryContainerId).find(".glossary-panel-button").tooltip("hide")},t.prototype.setUpScrolling=function(){if($(this.glossaryContainerId).find(".outer-box").css("max-height",$(window).height()-250),$(this.glossaryContainerId).find(".glossary-body").parent().hasClass("scroll-buttons-wrapper"))return $(this.glossaryContainerId).find(".glossary-body").scrollButtons({reload:!0}),!1;$(this.glossaryContainerId).find(".glossary-body").scrollButtons({up:".btn-scr-up",down:".btn-scr-dn",maxDuration:1e4})},t}();t.Section=u})(t=n.glossary||(n.glossary={}))}(eddata||(eddata={}));var $_glo=eddata.glossary,$_glo_f=eddata.glossary.Factory,__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),eddata;(function(n){var t;(function(n){var t=function(n){function t(){var t=n.call(this,$_glo.SectionType.WORD)||this;return t.setTerm("a"),t}return __extends(t,n),t.prototype.loadTerms=function(n){var t=this;$.ajax({url:"/glossary/Word/"+(n?n:this.getTerm()),cache:!0,type:"GET",contentType:"application/html; charset=utf-8",dataType:"html",success:function(n){t.onTermsLoaded(n,function(n){return n},function(n){return n});$(t.glossaryContainerId).find(".btn-toolbar button").each(function(n,t){$(t).unbind("click")});$(t.glossaryContainerId).find(".btn-toolbar button").each(function(n,i){$(i).click(function(n){t.setTerm($(n.target).html());t.loadTerms($(n.target).html())})});t.term.length>1&&$(t.glossaryContainerId).find(".glossary-body div h4").each(function(n,i){if($(i).html().toLowerCase().trim()===t.term.toLowerCase().trim())return $("#word-glossary").find(".scroll-buttons-wrapper").animate({scrollTop:0},0),$("#word-glossary").find(".scroll-buttons-wrapper").animate({scrollTop:$(i).position().top}),$(i).click(),!1})}})},t.prototype.getTerm=function(){return this.term},t.prototype.setTerm=function(n){this.term=n},t.prototype.getTermDefinition=function(n,t){$.ajax({url:"/glossary/Word/"+SEOEncode(n),cache:!0,type:"GET",contentType:"application/html; charset=utf-8",dataType:"html",success:function(n){t&&typeof t=="function"&&t($.parseJSON(n).Definition)}})},t}(n.Section);n.Word=t})(t=n.glossary||(n.glossary={}))})(eddata||(eddata={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i,r;(function(n){n[n.OBJECT=1]="OBJECT";n[n.FUNCTION=2]="FUNCTION";n[n.SOURCE=3]="SOURCE";n[n.GOAL=4]="GOAL"})(i=t.FinanceType||(t.FinanceType={}));r=function(t){function r(){var n=t.call(this,$_glo.SectionType.FINANCE)||this;n.requestTerm={CodeType:i.OBJECT,CodeStart:"1000",CodeEnd:"1999"};$(n.glossaryContainerId).show();$(n.glossaryContainerId).find("a[data-finance-type]").on("click",function(t,i){$(n.glossaryContainerId).find(".nav-tabs li").removeClass("active");$(t.target).parent().addClass("active");n.requestTerm.CodeType=parseInt($(t.target).attr("data-finance-type"));i||n.loadTerms()});return n}return __extends(r,t),r.prototype.loadTerms=function(t){var i=this;t&&(this.requestTerm={CodeType:parseInt(t.split("|")[0]),CodeStart:t.split("|")[1].substr(0,1)=="0"?"0001":t.split("|")[1].substr(0,1)+"000",CodeEnd:t.split("|")[1].substr(0,1)+"999",Code:t.split("|")[1]},$(this.glossaryContainerId).find(".glossary-panel-header a[data-finance-type='"+this.requestTerm.CodeType+"']").trigger("click",[!0]),$(this.glossaryContainerId).find(".btn-toolbar button:contains('"+this.requestTerm.CodeStart+"-"+this.requestTerm.CodeEnd+"')").trigger("click",[!0]));$.ajax({url:"/glossary/Finance/"+this.requestTerm.CodeType+"?codeStart="+this.requestTerm.CodeStart+"&codeEnd="+this.requestTerm.CodeEnd+"&year="+n.finance.Data.currentYear,cache:!0,type:"GET",contentType:"application/html; charset=utf-8",dataType:"html",success:function(n){i.onTermsLoaded(n,function(n){return n.CodeStart+"-"+n.CodeEnd},function(n){return("0000"+n.Id).slice(-4)+"  "+n.Title});t&&$(i.glossaryContainerId).find(".glossary-body div h4").each(function(n,t){if($(t).text().split(" ")[0].toLowerCase().trim()===i.requestTerm.Code.toString())return $("#fin-glossary").find(".scroll-buttons-wrapper").animate({scrollTop:0},0),$("#fin-glossary").find(".scroll-buttons-wrapper").animate({scrollTop:$(t).position().top}),$(t).click(),!1})}})},r.prototype.getTerm=function(){return this.requestTerm},r.prototype.setTerm=function(n){typeof n=="string"?(this.requestTerm.CodeStart=n.split("-")[0],this.requestTerm.CodeEnd=n.split("-")[1]):this.requestTerm=n},r.prototype.getTermDefinition=function(n,t){t&&typeof t=="function"&&t(n.Description)},r}(t.Section);t.Finance=r})(t=n.glossary||(n.glossary={}))}(eddata||(eddata={})),function(n){var t=function(){function t(){}return t.notifyAndLog=function(t){n.errorManager.callToLog(t)},t.callToLog=function(n){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/error/LogJavascriptError",data:JSON.stringify(n),success:function(){},dataType:"JSON"})},t}();n.errorManager=t}(eddata||(eddata={}));window.onerror=function(n,t,i,r){t.indexOf("maps.gstatic")==-1&&eddata.errorManager.callToLog({colnumber:r,eventOrMessage:n,location:i.toString(),source:t})},function(n,t){var r,i;return i=t.document,r=function(){function r(i){var r;try{r=t.localStorage}catch(u){r=!1}this._options=n.extend({name:"tour",steps:[],container:"body",keyboard:!0,storage:r,debug:!1,backdrop:!1,redirect:!0,orphan:!1,duration:!1,basePath:"",template:"<div class='popover'> <div class='arrow'><\/div> <h3 class='popover-title'><\/h3> <div class='popover-content'><\/div> <div class='popover-navigation'> <div class='btn-group'> <button class='btn btn-sm btn-default' data-role='prev'>&laquo; Prev<\/button> <button class='btn btn-sm btn-default' data-role='next'>Next &raquo;<\/button> <button class='btn btn-sm btn-default' data-role='pause-resume' data-pause-text='Pause' data-resume-text='Start'>Pause<\/button> <\/div> <button class='btn btn-sm btn-default' data-role='end'>End tour<\/button> <\/div> <\/div>",afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){}},i);this._force=!1;this._inited=!1;this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1};this}return r.prototype.addSteps=function(n){for(var i,t=0,r=n.length;t<r;t++)i=n[t],this.addStep(i);return this},r.prototype.addStep=function(n){return this._options.steps.push(n),this},r.prototype.getStep=function(t){if(this._options.steps[t]!=null)return n.extend({id:"step-"+t,path:"",placement:"right",title:"",content:"<p><\/p>",next:t===this._options.steps.length-1?-1:t+1,prev:t-1,animation:!0,container:this._options.container,backdrop:this._options.backdrop,redirect:this._options.redirect,orphan:this._options.orphan,duration:this._options.duration,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume},this._options.steps[t])},r.prototype.init=function(n){return(this._force=n,this.ended())?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(n){return function(){return n.showStep(n._current)}}(this)),this._current!==null&&this.showStep(this._current),this._inited=!0,this)},r.prototype.start=function(n){var t;return n==null&&(n=!1),this._inited||this.init(n),this._current===null&&(t=this._makePromise(this._options.onStart!=null?this._options.onStart(this):void 0),this._callOnPromiseDone(t,this.showStep,0)),this},r.prototype.next=function(){var n;return n=this.hideStep(this._current),this._callOnPromiseDone(n,this._showNextStep)},r.prototype.prev=function(){var n;return n=this.hideStep(this._current),this._callOnPromiseDone(n,this._showPrevStep)},r.prototype.goTo=function(n){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this.showStep,n)},r.prototype.end=function(){var r,u;return r=function(r){return function(){if(n(i).off("click.tour-"+r._options.name),n(i).off("keyup.tour-"+r._options.name),n(t).off("resize.tour-"+r._options.name),r._setState("end","yes"),r._inited=!1,r._force=!1,r._clearTimer(),r._options.onEnd!=null)return r._options.onEnd(r)}}(this),u=this.hideStep(this._current),this._callOnPromiseDone(u,r)},r.prototype.ended=function(){return!this._force&&!!this._getState("end")},r.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this.start()},r.prototype.pause=function(){var n;if(n=this.getStep(this._current),!(n&&n.duration))return this;if(this._paused=!0,this._duration-=(new Date).getTime()-this._start,t.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),n.onPause!=null)return n.onPause(this,this._duration)},r.prototype.resume=function(){var n;if(n=this.getStep(this._current),!(n&&n.duration))return this;if(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||n.duration,this._timer=t.setTimeout(function(n){return function(){return n._isLast()?n.next():n.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),n.onResume!=null&&this._duration!==n.duration)return n.onResume(this,this._duration)},r.prototype.hideStep=function(t){var u,r,i;if(i=this.getStep(t),i)return this._clearTimer(),r=this._makePromise(i.onHide!=null?i.onHide(this,t):void 0),u=function(r){return function(){var u;if(u=n(i.element),u.data("bs.popover")||u.data("popover")||(u=n("body")),u.popover("destroy").removeClass("tour-"+r._options.name+"-element tour-"+r._options.name+"-"+t+"-element"),i.reflex&&u.css("cursor","").off("click.tour-"+r._options.name),i.backdrop&&r._hideBackdrop(),i.onHidden!=null)return i.onHidden(r)}}(this),this._callOnPromiseDone(r,u),r},r.prototype.showStep=function(n){var r,u,f,t;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(t=this.getStep(n),!t)?void 0:(f=n<this._current,r=this._makePromise(t.onShow!=null?t.onShow(this,n):void 0),u=function(r){return function(){var e,u;if(r.setCurrentStep(n),u=function(){switch({}.toString.call(t.path)){case"[object Function]":return t.path();case"[object String]":return this._options.basePath+t.path;default:return t.path}}.call(r),e=[i.location.pathname,i.location.hash].join(""),r._isRedirect(u,e)){r._redirect(t,u);return}if(r._isOrphan(t)){if(!t.orphan){r._debug("Skip the orphan step "+(r._current+1)+". Orphan option is false and the element doesn't exist or is hidden.");f?r._showPrevStep():r._showNextStep();return}r._debug("Show the orphan step "+(r._current+1)+". Orphans option is true.")}return t.backdrop&&r._showBackdrop(r._isOrphan(t)?void 0:t.element),r._scrollIntoView(t.element,function(){if(r.getCurrentStep()===n){if(t.element!=null&&t.backdrop&&r._showOverlayElement(t.element),r._showPopover(t,n),t.onShown!=null)t.onShown(r);return r._debug("Step "+(r._current+1)+" of "+r._options.steps.length)}}),t.duration?r.resume():void 0}}(this),this._callOnPromiseDone(r,u),r)},r.prototype.getCurrentStep=function(){return this._current},r.prototype.setCurrentStep=function(n){return n!=null?(this._current=n,this._setState("current_step",n)):(this._current=this._getState("current_step"),this._current=this._current===null?null:parseInt(this._current,10)),this},r.prototype._setState=function(n,t){var r,i;if(this._options.storage){i=""+this._options.name+"_"+n;try{this._options.storage.setItem(i,t)}catch(u){r=u;r.code===DOMException.QUOTA_EXCEEDED_ERR&&this.debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(i,t)}return this._state==null&&(this._state={}),this._state[n]=t},r.prototype._removeState=function(n){var t;return this._options.storage?(t=""+this._options.name+"_"+n,this._options.storage.removeItem(t),this._options.afterRemoveState(t)):this._state!=null?delete this._state[n]:void 0},r.prototype._getState=function(n){var i,t;return this._options.storage?(i=""+this._options.name+"_"+n,t=this._options.storage.getItem(i)):this._state!=null&&(t=this._state[n]),(t===void 0||t==="null")&&(t=null),this._options.afterGetState(n,t),t},r.prototype._showNextStep=function(){var t,i,n;return n=this.getStep(this._current),i=function(t){return function(){return t.showStep(n.next)}}(this),t=this._makePromise(n.onNext!=null?n.onNext(this):void 0),this._callOnPromiseDone(t,i)},r.prototype._showPrevStep=function(){var t,i,n;return n=this.getStep(this._current),i=function(t){return function(){return t.showStep(n.prev)}}(this),t=this._makePromise(n.onPrev!=null?n.onPrev(this):void 0),this._callOnPromiseDone(t,i)},r.prototype._debug=function(n){if(this._options.debug)return t.console.log("Bootstrap Tour '"+this._options.name+"' | "+n)},r.prototype._isRedirect=function(n,t){return n!=null&&n!==""&&({}.toString.call(n)==="[object RegExp]"&&!n.test(t)||{}.toString.call(n)==="[object String]"&&n.replace(/\?.*$/,"").replace(/\/?$/,"")!==t.replace(/\/?$/,""))},r.prototype._redirect=function(t,r){return n.isFunction(t.redirect)?t.redirect.call(this,r):t.redirect===!0?(this._debug("Redirect to "+r),i.location.href=r):void 0},r.prototype._isOrphan=function(t){return t.element==null||!n(t.element).length||n(t.element).is(":hidden")&&n(t.element)[0].namespaceURI!=="http://www.w3.org/2000/svg"},r.prototype._isLast=function(){return this._current<this._options.steps.length-1},r.prototype._showPopover=function(t,i){var r,f,u,e,o,s;if(n(".tour-"+this._options.name).remove(),s=n.extend({},this._options),u=n.isFunction(t.template)?n(t.template(i,t)):n(t.template),f=u.find(".popover-navigation"),o=this._isOrphan(t),o&&(t.element="body",t.placement="top",u=u.addClass("orphan")),r=n(t.element),u.addClass("tour-"+this._options.name+" tour-"+this._options.name+"-"+i),r.addClass("tour-"+this._options.name+"-element tour-"+this._options.name+"-"+i+"-element"),t.options&&n.extend(s,t.options),t.reflex&&!o)r.css("cursor","pointer").on("click.tour-"+this._options.name,function(n){return function(){return n._isLast()?n.next():n.end()}}(this));return t.prev<0&&f.find("[data-role='prev']").addClass("disabled"),t.next<0&&f.find("[data-role='next']").addClass("disabled"),t.duration||f.find("[data-role='pause-resume']").remove(),t.template=u.clone().wrap("<div>").parent().html(),r.popover({placement:t.placement,trigger:"manual",title:t.title,content:t.content,html:!0,animation:t.animation,container:t.container,template:t.template,selector:t.element}).popover("show"),e=r.data("bs.popover")?r.data("bs.popover").tip():r.data("popover").tip(),e.attr("id",t.id),this._reposition(e,t),o?this._center(e):void 0},r.prototype._reposition=function(t,r){var f,h,e,c,o,s,u;if(c=t[0].offsetWidth,h=t[0].offsetHeight,u=t.offset(),o=u.left,s=u.top,f=n(i).outerHeight()-u.top-t.outerHeight(),f<0&&(u.top=u.top+f),e=n("html").outerWidth()-u.left-t.outerWidth(),e<0&&(u.left=u.left+e),u.top<0&&(u.top=0),u.left<0&&(u.left=0),t.offset(u),r.placement==="bottom"||r.placement==="top"){if(o!==u.left)return this._replaceArrow(t,(u.left-o)*2,c,"left")}else if(s!==u.top)return this._replaceArrow(t,(u.top-s)*2,h,"top")},r.prototype._center=function(i){return i.css("top",n(t).outerHeight()/2-i.outerHeight()/2)},r.prototype._replaceArrow=function(n,t,i,r){return n.find(".arrow").css(r,t?50*(1-t/i)+"%":"")},r.prototype._scrollIntoView=function(i,r){var u,f,h,e,o,s;return(u=n(i),!u.length)?r():(f=n(t),e=u.offset().top,s=f.height(),o=Math.max(0,e-s/2),this._debug("Scroll into view. ScrollTop: "+o+". Element offset: "+e+". Window height: "+s+"."),h=0,n("body,html").stop(!0,!0).animate({scrollTop:Math.ceil(o)},function(n){return function(){if(++h==2)return r(),n._debug("Scroll into view. Animation end element offset: "+u.offset().top+". Window height: "+f.height()+".")}}(this)))},r.prototype._onResize=function(i,r){return n(t).on("resize.tour-"+this._options.name,function(){return clearTimeout(r),r=setTimeout(i,100)})},r.prototype._initMouseNavigation=function(){var t=this;return n(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']:not(.disabled)").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']:not(.disabled)").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']:not(.disabled)",function(n){return function(t){return t.preventDefault(),n.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']:not(.disabled)",function(n){return function(t){return t.preventDefault(),n.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(n){return function(t){return t.preventDefault(),n.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(i){var r;return i.preventDefault(),r=n(this),r.text(t._paused?r.data("pause-text"):r.data("resume-text")),t._paused?t.resume():t.pause()})},r.prototype._initKeyboardNavigation=function(){if(this._options.keyboard)return n(i).on("keyup.tour-"+this._options.name,function(n){return function(t){if(t.which)switch(t.which){case 39:return t.preventDefault(),n._isLast()?n.next():n.end();case 37:if(t.preventDefault(),n._current>0)return n.prev();break;case 27:return t.preventDefault(),n.end()}}}(this))},r.prototype._makePromise=function(t){return t&&n.isFunction(t.then)?t:null},r.prototype._callOnPromiseDone=function(n,t,i){return n?n.then(function(n){return function(){return t.call(n,i)}}(this)):t.call(this,i)},r.prototype._showBackdrop=function(){if(!this.backdrop.backgroundShown)return this.backdrop=n("<div/>",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,n("body").append(this.backdrop)},r.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},r.prototype._hideBackground=function(){if(this.backdrop)return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},r.prototype._showOverlayElement=function(t){var u,i,r;if(i=n(t),i&&i.length!==0&&!this.backdrop.overlayElementShown)return this.backdrop.overlayElementShown=!0,u=n("<div/>"),r=i.offset(),r.top=r.top,r.left=r.left,u.width(i.innerWidth()).height(i.innerHeight()).addClass("tour-step-background").offset(r),i.addClass("tour-step-backdrop"),n("body").append(u),this.backdrop.$element=i,this.backdrop.$background=u},r.prototype._hideOverlayElement=function(){if(this.backdrop.overlayElementShown)return this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1},r.prototype._clearTimer=function(){return t.clearTimeout(this._timer),this._timer=null,this._duration=null},r}(),t.Tour=r}(jQuery,window),function(n){var t,r,i;(function(n){n[n.HomePage=0]="HomePage";n[n.SearchPage=1]="SearchPage";n[n.ProfilePage=2]="ProfilePage";n[n.Glossary=3]="Glossary"})(t=n.tourType||(n.tourType={}));r=function(){function n(){}return n.initialize=function(){$("#takeatour").show();$(".tour-btn").click(function(i){var r=$(i.target).attr("data-tour-type");if(r){if(r!=eddata_tourType&&r!="Glossary"){$.removeCookie("startTour",{path:"/"});$.cookie("startTour",r,{expires:1,path:"/"});switch(r){case"Home":window.location.href="/";break;case"Search":window.location.href="/search/Faceted?query=california";break;case"Profile":window.location.href="/State/CA"}return!1}}else r=eddata_tourType;switch(r){case"Home":n.open(t.HomePage);break;case"Search":n.open(t.SearchPage);break;case"Glossary":n.open(t.Glossary);break;case"Profile":n.open(t.ProfilePage)}})},n.open=function(n){var r=this;switch(n){case t.HomePage:this.homePageTour?this.homePageTour.open():this.homePageTour=new i(t.HomePage,function(){r.homePageTour.open()});break;case t.SearchPage:this.searchPageTour?this.searchPageTour.open():this.searchPageTour=new i(t.SearchPage,function(){r.searchPageTour.open()});break;case t.ProfilePage:this.profilePageTour?this.profilePageTour.open():this.profilePageTour=new i(t.ProfilePage,function(){r.profilePageTour.open()});break;case t.Glossary:this.glossaryTour?this.glossaryTour.open():this.glossaryTour=new i(t.Glossary,function(){r.glossaryTour.open()})}},n.isOpen=function(n){switch(n){case t.HomePage:return this.homePageTour==undefined?!1:this.homePageTour.isOpen();case t.SearchPage:return this.searchPageTour==undefined?!1:this.searchPageTour.isOpen();case t.ProfilePage:return this.profilePageTour==undefined?!1:this.profilePageTour.isOpen();case t.Glossary:return this.glossaryTour==undefined?!1:this.glossaryTour.isOpen()}},n}();n.tourFactory=r;i=function(){function n(n,i){this.onCreated=i;switch(n){case t.HomePage:this.getHomePageTour();break;case t.SearchPage:this.getSearchPageTour();break;case t.ProfilePage:this.getProfilePageTour();break;case t.Glossary:this.getGlossaryPageTour()}}return n.prototype.start=function(){this.tourObj.init()},n.prototype.open=function(){this.tourObj.restart()},n.prototype.isOpen=function(){return!this.tourObj.ended()},n.prototype.getCustomTextByKey=function(n,t){var i="not found";return $.each(n,function(n,r){var u=r;u.QualifiedTokenName==t&&(i=u.KeyText)}),i},n.prototype.getHomePageTour=function(){var n=this,t=null;$.ajax({url:"/home/tour/strings/home",cache:!0,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",timeout:15e3,success:function(i){t=i;var r={steps:[{element:"#tour-go",placement:"bottom",title:"Tour.Home.HomepageTour.Title",content:"Tour.Home.HomepageTour.Content"},{element:"#eddatalogo",placement:"bottom",backdrop:!1,title:"Tour.Home.EdDataLogo.Title",content:"Tour.Home.EdDataLogo.Content"},{element:"#nav",placement:"left",title:"Tour.Home.PrimaryNavigation.Title",content:"Tour.Home.PrimaryNavigation.Content"},{element:"#redcdssearchbar",placement:"bottom",backdrop:!0,title:"Tour.Home.SearchBar.Title",content:"Tour.Home.SearchBar.Content"},{element:"#cdscounty",placement:"bottom",backdrop:!1,title:"Tour.Home.CountySearch.Title",content:"Tour.Home.CountySearch.Content"},{element:"#cdsdistrict",placement:"bottom",backdrop:!1,title:"Tour.Home.DistrictSearch.Title",content:"Tour.Home.DistrictSearch.Content"},{element:"#cdsschool",placement:"bottom",backdrop:!1,title:"Tour.Home.SchoolSearch.Title",content:"Tour.Home.SchoolSearch.Content"},{element:"#cds-go-btn",placement:"left",title:"Tour.Home.InitiateSearch.Title",content:"Tour.Home.InitiateSearch.Content"},{element:"#articlewidget",placement:"top",backdrop:!1,title:"Tour.Home.Articles.Title",content:"Tour.Home.Articles.Content"},{element:"#articlecontrols",placement:"bottom",backdrop:!0,title:"Tour.Home.ArticleNavigation.Title",content:"Tour.Home.ArticleNavigation.Content"},{element:"#abouteddata",placement:"top",title:"Tour.Home.AboutEd-Data.Title",content:"Tour.Home.AboutEd-Data.Content"},{element:"#recentlyviewed",placement:"top",title:"Tour.Home.RecentlyViewed.Title",content:"Tour.Home.RecentlyViewed.Content"},{element:"#subcontact",placement:"top",title:"Tour.Home.Subscribe.Title",content:"Tour.Home.Subscribe.Content"},{element:".glossary-panel-button",placement:"left",backdrop:!0,title:"Tour.Home.Glossary.Title",content:"Tour.home.Glossary.Content"},{element:".token-input-list-facebook",placement:"bottom",backdrop:!0,title:"Tour.Home.SiteSearch.Title",content:"Tour.Home.SiteSearch.Content"},{title:"Tour.Home.TourEnd.Title",content:"Tour.Home.TourEnd.Content",orphan:!0}]};$.each(r.steps,function(i,r){n.step=r;n.step.title=n.getCustomTextByKey(t,n.step.title);n.step.content=n.getCustomTextByKey(t,n.step.content)});n.tourObj=new Tour(r);n.tourObj.start();n.onCreated&&typeof n.onCreated=="function"&&n.onCreated()}})},n.prototype.getSearchPageTour=function(){var n=this,t=null;$.ajax({url:"/home/tour/strings/search",cache:!0,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",timeout:15e3,success:function(i){t=i;var r={steps:[{element:"#tour-go",placement:"bottom",title:"Tour.Search.SearchResultsTour.Title",content:"Tour.Search.SearchResultsTour.Content"},{element:"#search-box-tokens",placement:"top",backdrop:!1,title:"Tour.Search.SearchResults.Title",content:"Tour.Search.SearchResults.Content"},{element:"#ResultsPerPage",placement:"left",backdrop:!1,title:"Tour.Search.ResultsReturned.Title",content:"Tour.Search.ResultsReturned.Content"},{element:"#CountyCB",placement:"left",backdrop:!1,title:"Tour.Search.FilterResults.Title",content:"Tour.Search.FilterResults.Content"},{element:"#resultsList",placement:"top",backdrop:!1,title:"Tour.Search.ResultsCDS.Title",content:"Tour.Search.ResultsCDS.Content"},{element:".article-result-container",placement:"left",backdrop:!1,title:"Tour.Search.ResultsArticles.Title",content:"Tour.Search.ResultsArticles.Content"},{element:".glossary-result-container",placement:"left",backdrop:!1,title:"Tour.Search.ResultsGlossary.Title",content:"Tour.Search.ResultsGlossary.Content"},{element:"#pageTopTextResult",placement:"top",backdrop:!1,title:"Tour.Search.Paging.Title",content:"Tour.Search.Paging.Content"},{title:"Tour.Search.TourEnd.Title",content:"Tour.Search.TourEnd.Content",orphan:!0}]};$.each(r.steps,function(i,r){n.step=r;n.step.title=n.getCustomTextByKey(t,n.step.title);n.step.content=n.getCustomTextByKey(t,n.step.content)});n.tourObj=new Tour(r);n.tourObj.start();n.onCreated&&typeof n.onCreated=="function"&&n.onCreated()}})},n.prototype.getProfilePageTour=function(){var n=this,t=null;$.ajax({url:"/home/tour/strings/profile",cache:!0,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",timeout:15e3,success:function(i){t=i;var r={steps:[{element:"#tour-go",placement:"bottom",title:"Tour.Profile.ProfileTour.Title",content:"Tour.Profile.ProfileTour.Content"},{element:"#redcdssearchbar",placement:"bottom",backdrop:!0,title:"Tour.Profile.ProfileCDS.Title",content:"Tour.Profile.ProfileCDS.Content"},{element:"#breadcrumbs .icon-home",placement:"left",title:"Tour.Profile.Navigation.Title",content:"Tour.Profile.Navigation.Content"},{element:"#inforelated",placement:"top",title:"Tour.Profile.InformationSection.Title",content:"Tour.Profile.InformationSection.Content"},{element:"#inforelated",placement:"bottom",title:"Tour.Profile.Links.Title",content:"Tour.Profile.Links.Content"},{element:"#keyatt",placement:"left",title:"Tour.Profile.Attributes.Title",content:"Tour.Profile.Attributes.Content"},{element:"#googlemap",placement:"left",backdrop:!1,title:"Tour.Profile.Location.Title",content:"Tour.Profile.Location.Content"},{element:"#profile-data-tab",placement:"top",title:"Tour.Profile.Demographics.Title",content:"Tour.Profile.Demographics.Content"},{element:"#profile-chart-type-0",placement:"top",backdrop:!0,title:"Tour.Profile.Charts.Title",content:"Tour.Profile.Charts.Content"},{element:"#chartContent-0",placement:"right",backdrop:!0,title:"Tour.Profile.Tips.Title",content:"Tour.Profile.Tips.Content"},{element:"#datatable-0",placement:"top",backdrop:!0,title:"Tour.Profile.DataTable.Title",content:"Tour.Profile.DataTable.Content"},{element:"#charttabs-0",placement:"top",backdrop:!0,title:"Tour.Profile.ChartNotes.Title",content:"Tour.Profile.ChartNotes.Content"},{element:"#wheel-0",placement:"right",backdrop:!0,title:"Tour.Profile.Sharing.Title",content:"Tour.Profile.Sharing.Content"},{element:"#chartHeader-0",placement:"top",backdrop:!0,title:"Tour.Profile.Drag.Title",content:"Tour.Profile.Drag.Content"},{title:"Tour.Profile.TourEnd.Title",content:"Tour.Profile.TourEnd.Content",orphan:!0}]};$.each(r.steps,function(i,r){n.step=r;n.step.title=n.getCustomTextByKey(t,n.step.title);n.step.content=n.getCustomTextByKey(t,n.step.content)});n.tourObj=new Tour(r);n.tourObj.start();n.onCreated&&typeof n.onCreated=="function"&&n.onCreated()}})},n.prototype.getGlossaryPageTour=function(){var n=this,t=null;$.ajax({url:"/home/tour/strings/glossary",cache:!0,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",timeout:15e3,success:function(i){t=i;var r={steps:[{element:"#glossarytour-go",placement:"bottom",title:"Tour.Glossary.GlossaryTour.Title",content:"Tour.Glossary.GlossaryTour.Content"},{title:"Tour.Glossary.IconAndLinks.Title",content:"Tour.Glossary.IconAndLinks.Content",orphan:!0},{element:".glossary-panel-button",placement:"left",backdrop:!0,title:"Tour.Glossary.Tab.Title",content:"Tour.Glossary.Tab.Content"},{title:"Tour.Glossary.AlphaNavigation.Title",content:"Tour.Glossary.AlphaNavigation.Content",orphan:!0},{title:"Tour.Glossary.Scrolling.Title",content:"Tour.Glossary.Scrolling.Content",orphan:!0},{title:"Tour.Glossary.Closing.Title",content:"Tour.Glossary.Closing.Content",orphan:!0},{title:"Tour.Glossary.TourEnd.Title",content:"Tour.Glossary.TourEnd.Content",orphan:!0}]};$.each(r.steps,function(i,r){n.step=r;n.step.title=n.getCustomTextByKey(t,n.step.title);n.step.content=n.getCustomTextByKey(t,n.step.content)});n.tourObj=new Tour(r);n.tourObj.start();n.onCreated&&typeof n.onCreated=="function"&&n.onCreated()}})},n}()}(eddata||(eddata={})),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?module.exports=n(require("jquery")):n(jQuery)}(function(n){"use strict";function tt(){var n=t.currentScript||function(){var n=t.getElementsByTagName("script");return n.length?n[n.length-1]:!1}(),i=n?n.src.split("?")[0]:"";return i.split("/").length>0?i.split("/").slice(0,-1).join("/")+"/":""}function ft(n,t,i){for(var r=0,u=t.length;r<u;r++)i(n,t[r])}var a=!1,p=!1,g=0,nt=2e3,s=0,i=n,t=document,r=window,f=i(r),h=[],e=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||!1,v=r.cancelAnimationFrame||r.webkitCancelAnimationFrame||r.mozCancelAnimationFrame||!1,w,c,l,d;e?r.cancelAnimationFrame||(v=function(){}):(w=0,e=function(n){var t=(new Date).getTime(),i=Math.max(0,16-(t-w)),u=r.setTimeout(function(){n(t+i)},i);return w=t+i,u},v=function(n){r.clearTimeout(n)});var o=r.MutationObserver||r.WebKitMutationObserver||!1,u=Date.now||function(){return(new Date).getTime()},k={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:tt(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},b=!1,it=function(){function s(){var u=["grab","-webkit-grab","-moz-grab"],t,f,r;for((n.ischrome&&!n.ischrome38||n.isie)&&(u=[]),t=0,f=u.length;t<f;t++)if(r=u[t],i.cursor=r,i.cursor==r)return r;return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}if(b)return b;var u=t.createElement("DIV"),i=u.style,e=navigator.userAgent,f=navigator.platform,n={};return n.haspointerlock="pointerLockElement"in t||"webkitPointerLockElement"in t||"mozPointerLockElement"in t,n.isopera="opera"in r,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini=Object.prototype.toString.call(r.operamini)==="[object OperaMini]",n.isie="all"in t&&"attachEvent"in u&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in i),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in t)||t.documentMode===7),n.isie8=n.isie&&"documentMode"in t&&t.documentMode===8,n.isie9=n.isie&&"performance"in r&&t.documentMode===9,n.isie10=n.isie&&"performance"in r&&t.documentMode===10,n.isie11="msRequestFullscreen"in u&&t.documentMode>=11,n.ismsedge="msCredentials"in r,n.ismozilla="MozAppearance"in i,n.iswebkit=!n.ismsedge&&"WebkitAppearance"in i,n.ischrome=n.iswebkit&&"chrome"in r,n.ischrome38=n.ischrome&&"touchAction"in i,n.ischrome22=!n.ischrome38&&n.ischrome&&n.haspointerlock,n.ischrome26=!n.ischrome38&&n.ischrome&&"transition"in i,n.cantouch="ontouchstart"in t.documentElement||"ontouchstart"in r,n.hasw3ctouch=(r.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),n.hasmstouch=!n.hasw3ctouch&&(r.MSPointerEvent||!1),n.ismac=/^mac$/i.test(f),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(f),n.isios4=n.isios&&!("seal"in Object),n.isios7=n.isios&&"webkitHidden"in t,n.isios8=n.isios&&"hidden"in t,n.isios10=n.isios&&r.Proxy,n.isandroid=/android/i.test(e),n.haseventlistener="addEventListener"in u,n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,n.trstyle="transform",n.hastransform="transform"in i||function(){for(var r=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,u=r.length;t<u;t++)if(i[r[t]]!==undefined){n.trstyle=r[t];break}n.hastransform=!!n.trstyle}(),n.hastransform&&(i[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(i[n.trstyle])),n.transitionstyle="transition",n.prefixstyle="",n.transitionend="transitionend",n.hastransition="transition"in i||function(){var t,f;n.transitionend=!1;var r=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],u=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],e=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"];for(t=0,f=r.length;t<f;t++)if(r[t]in i){n.transitionstyle=r[t];n.prefixstyle=u[t];n.transitionend=e[t];break}n.ischrome26&&(n.prefixstyle=u[1]);n.hastransition=n.transitionstyle}(),n.cursorgrabvalue=s(),n.hasmousecapture="setCapture"in u,n.hasMutationObserver=o!==!1,u=null,b=n,n},rt=function(n,c){function pt(){var n=l.doc.css(w.trstyle);return n&&n.substr(0,6)=="matrix"?n.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function ti(){var n=l.win,t;if("zIndex"in n)return n.zIndex();while(n.length>0){if(n[0].nodeType==9)return!1;if(t=n.css("zIndex"),!isNaN(t)&&t!==0)return parseInt(t);n=n.parent()}return!1}function ft(n,t,i){var u=n.css(t),r=parseFloat(u),f;return isNaN(r)?(r=wt[u]||0,f=r==3?i?l.win.outerHeight()-l.win.innerHeight():l.win.outerWidth()-l.win.innerWidth():1,l.isie8&&r&&(r+=1),f?r:0):r}function bt(n,t,i,u){l._bind(n,t,function(u){u=u||r.event;var f={original:u,target:u.target||u.srcElement,type:"wheel",deltaMode:u.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return u.preventDefault?u.preventDefault():u.returnValue=!1,!1},stopImmediatePropagation:function(){u.stopImmediatePropagation?u.stopImmediatePropagation():u.cancelBubble=!0}};return t=="mousewheel"?(u.wheelDeltaX&&(f.deltaX=-1/40*u.wheelDeltaX),u.wheelDeltaY&&(f.deltaY=-1/40*u.wheelDeltaY),f.deltaY||f.deltaX||(f.deltaY=-1/40*u.wheelDelta)):f.deltaY=u.detail,i.call(n,f)},u)}function yt(n,t,i,r){var s,e,h,f,o;if(l.scrollrunning||(l.newscrolly=l.getScrollTop(),l.newscrollx=l.getScrollLeft(),vt=u()),s=u()-vt,vt=u(),s>350?et=1:et+=(2-et)/10,n=n*et|0,t=t*et|0,n){if(r)if(n<0){if(l.getScrollLeft()>=l.page.maxw)return!0}else if(l.getScrollLeft()<=0)return!0;e=n>0?1:-1;gt!==e&&(l.scrollmom&&l.scrollmom.stop(),l.newscrollx=l.getScrollLeft(),gt=e);l.lastdeltax-=n}if(t){if(h=function(){var n=l.getScrollTop();if(t<0){if(n>=l.page.maxh)return!0}else if(n<=0)return!0}(),h){if(y.nativeparentscrolling&&i&&!l.ispage&&!l.zoomactive)return!0;f=l.view.h>>1;l.newscrolly<-f?(l.newscrolly=-f,t=-1):l.newscrolly>l.page.maxh+f?(l.newscrolly=l.page.maxh+f,t=1):t=0}o=t>0?1:-1;dt!==o&&(l.scrollmom&&l.scrollmom.stop(),l.newscrolly=l.getScrollTop(),dt=o);l.lastdeltay-=t}(t||n)&&l.synched("relativexy",function(){var t=l.lastdeltay+l.newscrolly,n;l.lastdeltay=0;n=l.lastdeltax+l.newscrollx;l.lastdeltax=0;l.rail.drag||l.doScrollPos(n,t)})}function ni(n,t,i){var r,u,f,e;if(!i&&ht)return!0;if(n.deltaMode===0?(r=-(n.deltaX*(y.mousescrollstep/54))|0,u=-(n.deltaY*(y.mousescrollstep/54))|0):n.deltaMode===1&&(r=-(n.deltaX*y.mousescrollstep*50/80)|0,u=-(n.deltaY*y.mousescrollstep*50/80)|0),t&&y.oneaxismousemode&&r===0&&u&&(r=u,u=0,i&&(f=r<0?l.getScrollLeft()>=l.page.maxw:l.getScrollLeft()<=0,f&&(u=r,r=0))),l.isrtlmode&&(r=-r),e=yt(r,u,i,!0),e)i&&(ht=!0);else return ht=!1,n.stopImmediatePropagation(),n.preventDefault()}var l=this,tt,y,ot,rt,b,w,st,lt,wt,d,at,kt,ht,ct;if(this.version="3.7.6",this.name="nicescroll",this.me=c,tt=i("body"),y=this.opt={doc:tt,win:!1},i.extend(y,k),y.snapbackspeed=80,n||!1)for(ot in y)n[ot]!==undefined&&(y[ot]=n[ot]);if(y.disablemutationobserver&&(o=!1),this.doc=y.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(y.win?y.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=y.win!==!1,this.win=y.win||(this.ispage?f:this.doc),this.docscroll=this.ispage&&!this.haswrapper?f:this.win,this.body=tt,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe=this.doc[0].nodeName=="IFRAME"&&this.win[0].nodeName=="IFRAME",this.istextarea=this.win[0].nodeName=="TEXTAREA",this.forcescreen=!1,this.canshowonmouseevent=y.autohidemode!="scroll",this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,y.rtlmode=="auto"?(rt=this.win[0]==r?this.body:this.win,b=rt.css("writing-mode")||rt.css("-webkit-writing-mode")||rt.css("-ms-writing-mode")||rt.css("-moz-writing-mode"),b=="horizontal-tb"||b=="lr-tb"||b===""?(this.isrtlmode=rt.css("direction")=="rtl",this.isvertical=!1):(this.isrtlmode=b=="vertical-rl"||b=="tb"||b=="tb-rl"||b=="rl-tb",this.isvertical=b=="vertical-rl"||b=="tb"||b=="tb-rl")):(this.isrtlmode=y.rtlmode===!0,this.isvertical=!1),this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,y.scrollbarid!==!1)this.id=y.scrollbarid;else do this.id="ascrail"+nt++;while(t.getElementById(this.id));if(this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=y.overflowx,this.overflowy=y.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=it(),w=i.extend({},this.detected),this.canhwscroll=w.hastransform&&y.hwacceleration,this.ishwscroll=this.canhwscroll&&l.haswrapper,this.hasreversehr=this.isrtlmode?this.isvertical?!(w.iswebkit||w.isie||w.isie11):!(w.iswebkit||w.isie&&!w.isie10&&!w.isie11):!1,this.istouchcapable=!1,!w.cantouch&&(w.hasw3ctouch||w.hasmstouch)?this.istouchcapable=!0:w.cantouch&&!w.isios&&!w.isandroid&&(w.iswebkit||w.ismozilla)&&(this.istouchcapable=!0),y.enablemouselockapi||(w.hasmousecapture=!1,w.haspointerlock=!1),this.debounced=function(n,t,i){if(l){var r=l.delaylist[n]||!1;r||(l.delaylist[n]={h:e(function(){l.delaylist[n].fn.call(l);l.delaylist[n]=!1},i)},t.call(l));l.delaylist[n].fn=t}},this.synched=function(n,t){l.synclist[n]?l.synclist[n]=t:(l.synclist[n]=t,e(function(){l&&(l.synclist[n]&&l.synclist[n].call(l),l.synclist[n]=null)}))},this.unsynched=function(n){l.synclist[n]&&(l.synclist[n]=!1)},this.css=function(n,t){for(var i in t)l.saved.css.push([n,i,n.css(i)]),n.css(i,t[i])},this.scrollTop=function(n){return n===undefined?l.getScrollTop():l.setScrollTop(n)},this.scrollLeft=function(n){return n===undefined?l.getScrollLeft():l.setScrollLeft(n)},st=function(n,t,i,r,f,e,o){this.st=n;this.ed=t;this.spd=i;this.p1=r||0;this.p2=f||1;this.p3=e||0;this.p4=o||1;this.ts=u();this.df=t-n},st.prototype={B2:function(n){return 3*(1-n)*(1-n)*n},B3:function(n){return 3*(1-n)*n*n},B4:function(n){return n*n*n},getPos:function(){return(u()-this.ts)/this.spd},getNow:function(){var n=(u()-this.ts)/this.spd,t=this.B2(n)+this.B3(n)+this.B4(n);return n>=1?this.ed:this.st+this.df*t|0},update:function(n,t){return this.st=this.getNow(),this.ed=n,this.spd=t,this.ts=u(),this.df=this.ed-this.st,this}},this.ishwscroll?(this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},w.hastranslate3d&&w.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(n){if(!n){var t=pt();if(t)return t.length==16?-t[13]:-t[5];if(l.timerscroll&&l.timerscroll.bz)return l.timerscroll.bz.getNow()}return l.doc.translate.y},this.getScrollLeft=function(n){if(!n){var t=pt();if(t)return t.length==16?-t[12]:-t[4];if(l.timerscroll&&l.timerscroll.bh)return l.timerscroll.bh.getNow()}return l.doc.translate.x},this.notifyScrollEvent=function(n){var i=t.createEvent("UIEvents");i.initUIEvent("scroll",!1,!1,r,1);i.niceevent=!0;n.dispatchEvent(i)},lt=this.isrtlmode?1:-1,w.hastranslate3d&&y.enabletranslate3d?(this.setScrollTop=function(n,t){l.doc.translate.y=n;l.doc.translate.ty=n*-1+"px";l.doc.css(w.trstyle,"translate3d("+l.doc.translate.tx+","+l.doc.translate.ty+",0)");t||l.notifyScrollEvent(l.win[0])},this.setScrollLeft=function(n,t){l.doc.translate.x=n;l.doc.translate.tx=n*lt+"px";l.doc.css(w.trstyle,"translate3d("+l.doc.translate.tx+","+l.doc.translate.ty+",0)");t||l.notifyScrollEvent(l.win[0])}):(this.setScrollTop=function(n,t){l.doc.translate.y=n;l.doc.translate.ty=n*-1+"px";l.doc.css(w.trstyle,"translate("+l.doc.translate.tx+","+l.doc.translate.ty+")");t||l.notifyScrollEvent(l.win[0])},this.setScrollLeft=function(n,t){l.doc.translate.x=n;l.doc.translate.tx=n*lt+"px";l.doc.css(w.trstyle,"translate("+l.doc.translate.tx+","+l.doc.translate.ty+")");t||l.notifyScrollEvent(l.win[0])})):(this.getScrollTop=function(){return l.docscroll.scrollTop()},this.setScrollTop=function(n){l.docscroll.scrollTop(n)},this.getScrollLeft=function(){return l.hasreversehr?l.detected.ismozilla?l.page.maxw-Math.abs(l.docscroll.scrollLeft()):l.page.maxw-l.docscroll.scrollLeft():l.docscroll.scrollLeft()},this.setScrollLeft=function(n){return setTimeout(function(){if(l)return l.hasreversehr&&(n=l.detected.ismozilla?-(l.page.maxw-n):l.page.maxw-n),l.docscroll.scrollLeft(n)},1)}),this.getTarget=function(n){return n?n.target?n.target:n.srcElement?n.srcElement:!1:!1},this.hasParent=function(n,t){if(!n)return!1;for(var i=n.target||n.srcElement||n||!1;i&&i.id!=t;)i=i.parentNode||!1;return i!==!1},wt={thin:1,medium:3,thick:5},this.getDocumentScrollOffset=function(){return{top:r.pageYOffset||t.documentElement.scrollTop,left:r.pageXOffset||t.documentElement.scrollLeft}},this.getOffset=function(){var n,i,t,r;return l.isfixed?(n=l.win.offset(),i=l.getDocumentScrollOffset(),n.top-=i.top,n.left-=i.left,n):(t=l.win.offset(),!l.viewport)?t:(r=l.viewport.offset(),{top:t.top-r.top,left:t.left-r.left})},this.updateScrollBar=function(n){var t,i,r,u,f;l.ishwscroll?(l.rail.css({height:l.win.innerHeight()-(y.railpadding.top+y.railpadding.bottom)}),l.railh&&l.railh.css({width:l.win.innerWidth()-(y.railpadding.left+y.railpadding.right)})):(r=l.getOffset(),t={top:r.top,left:r.left-(y.railpadding.left+y.railpadding.right)},t.top+=ft(l.win,"border-top-width",!0),t.left+=l.rail.align?l.win.outerWidth()-ft(l.win,"border-right-width")-l.rail.width:ft(l.win,"border-left-width"),i=y.railoffset,i&&(i.top&&(t.top+=i.top),i.left&&(t.left+=i.left)),l.railslocked||l.rail.css({top:t.top,left:t.left,height:(n?n.h:l.win.innerHeight())-(y.railpadding.top+y.railpadding.bottom)}),l.zoom&&l.zoom.css({top:t.top+1,left:l.rail.align==1?t.left-20:t.left+l.rail.width+4}),l.railh&&!l.railslocked&&(t={top:r.top,left:r.left},i=y.railhoffset,i&&(i.top&&(t.top+=i.top),i.left&&(t.left+=i.left)),u=l.railh.align?t.top+ft(l.win,"border-top-width",!0)+l.win.innerHeight()-l.railh.height:t.top+ft(l.win,"border-top-width",!0),f=t.left+ft(l.win,"border-left-width"),l.railh.css({top:u-(y.railpadding.top+y.railpadding.bottom),left:f,width:l.railh.width})))},this.doRailClick=function(n,i,r){var u,e,f,o;l.railslocked||(l.cancelEvent(n),"pageY"in n||(n.pageX=n.clientX+t.documentElement.scrollLeft,n.pageY=n.clientY+t.documentElement.scrollTop),i?(u=r?l.doScrollLeft:l.doScrollTop,f=r?(n.pageX-l.railh.offset().left-l.cursorwidth/2)*l.scrollratio.x:(n.pageY-l.rail.offset().top-l.cursorheight/2)*l.scrollratio.y,l.unsynched("relativexy"),u(f|0)):(u=r?l.doScrollLeftBy:l.doScrollBy,f=r?l.scroll.x:l.scroll.y,o=r?n.pageX-l.railh.offset().left:n.pageY-l.rail.offset().top,e=r?l.view.w:l.view.h,u(f>=o?e:-e)))},l.newscrolly=l.newscrollx=0,l.hasanimationframe="requestAnimationFrame"in r,l.hascancelanimationframe="cancelAnimationFrame"in r,l.hasborderbox=!1,this.init=function(){var v,d,e,n,it,rt,ft,st,c,u,b,nt,at,ht,k,et,ct,lt,h,ot;if((l.saved.css=[],w.isoperamini)||w.isandroid&&!("hidden"in t))return!0;if(y.emulatetouch=y.emulatetouch||y.touchbehavior,l.hasborderbox=r.getComputedStyle&&r.getComputedStyle(t.body)["box-sizing"]==="border-box",v={"overflow-y":"hidden"},(w.isie11||w.isie10)&&(v["-ms-overflow-style"]="none"),l.ishwscroll&&(this.doc.css(w.transitionstyle,w.prefixstyle+"transform 0ms ease-out"),w.transitionend&&l.bind(l.doc,w.transitionend,l.onScrollTransitionEnd,!1)),l.zindex="auto",l.zindex=l.ispage||y.zindex!="auto"?y.zindex:ti()||"auto",!l.ispage&&l.zindex!="auto"&&l.zindex>s&&(s=l.zindex),l.isie&&l.zindex===0&&y.zindex=="auto"&&(l.zindex="auto"),!l.ispage||!w.isieold){d=l.docscroll;l.ispage&&(d=l.haswrapper?l.win:l.doc);l.css(d,v);l.ispage&&(w.isie11||w.isie)&&l.css(i("html"),v);!w.isios||l.ispage||l.haswrapper||l.css(tt,{"-webkit-overflow-scrolling":"touch"});e=i(t.createElement("div"));e.css({position:"relative",top:0,float:"right",width:y.cursorwidth,height:0,"background-color":y.cursorcolor,border:y.cursorborder,"background-clip":"padding-box","-webkit-border-radius":y.cursorborderradius,"-moz-border-radius":y.cursorborderradius,"border-radius":y.cursorborderradius});e.addClass("nicescroll-cursors");l.cursor=e;n=i(t.createElement("div"));n.attr("id",l.id);n.addClass("nicescroll-rails nicescroll-rails-vr");ft=["left","right","top","bottom"];for(st in ft)rt=ft[st],it=y.railpadding[rt]||0,it&&n.css("padding-"+rt,it+"px");n.append(e);n.width=Math.max(parseFloat(y.cursorwidth),e.outerWidth());n.css({width:n.width+"px",zIndex:l.zindex,background:y.background,cursor:"default"});n.visibility=!0;n.scrollable=!0;n.align=y.railalign=="left"?0:1;l.rail=n;l.rail.drag=!1;c=!1;!y.boxzoom||l.ispage||w.isieold||(c=t.createElement("div"),l.bind(c,"click",l.doZoom),l.bind(c,"mouseenter",function(){l.zoom.css("opacity",y.cursoropacitymax)}),l.bind(c,"mouseleave",function(){l.zoom.css("opacity",y.cursoropacitymin)}),l.zoom=i(c),l.zoom.css({cursor:"pointer",zIndex:l.zindex,backgroundImage:"url("+y.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),y.dblclickzoom&&l.bind(l.win,"dblclick",l.doZoom),w.cantouch&&y.gesturezoom&&(l.ongesturezoom=function(n){return n.scale>1.5&&l.doZoomIn(n),n.scale<.8&&l.doZoomOut(n),l.cancelEvent(n)},l.bind(l.win,"gestureend",l.ongesturezoom)));l.railh=!1;y.horizrailenabled&&(l.css(d,{overflowX:"hidden"}),e=i(t.createElement("div")),e.css({position:"absolute",top:0,height:y.cursorwidth,width:0,backgroundColor:y.cursorcolor,border:y.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":y.cursorborderradius,"-moz-border-radius":y.cursorborderradius,"border-radius":y.cursorborderradius}),w.isieold&&e.css("overflow","hidden"),e.addClass("nicescroll-cursors"),l.cursorh=e,u=i(t.createElement("div")),u.attr("id",l.id+"-hr"),u.addClass("nicescroll-rails nicescroll-rails-hr"),u.height=Math.max(parseFloat(y.cursorwidth),e.outerHeight()),u.css({height:u.height+"px",zIndex:l.zindex,background:y.background}),u.append(e),u.visibility=!0,u.scrollable=!0,u.align=y.railvalign=="top"?0:1,l.railh=u,l.railh.drag=!1);l.ispage?(n.css({position:"fixed",top:0,height:"100%"}),n.css(n.align?{right:0}:{left:0}),l.body.append(n),l.railh&&(u.css({position:"fixed",left:0,width:"100%"}),u.css(u.align?{bottom:0}:{top:0}),l.body.append(u))):(l.ishwscroll?(l.win.css("position")=="static"&&l.css(l.win,{position:"relative"}),b=l.win[0].nodeName=="HTML"?l.body:l.win,i(b).scrollTop(0).scrollLeft(0),l.zoom&&(l.zoom.css({position:"absolute",top:1,right:0,"margin-right":n.width+4}),b.append(l.zoom)),n.css({position:"absolute",top:0}),n.css(n.align?{right:0}:{left:0}),b.append(n),u&&(u.css({position:"absolute",left:0,bottom:0}),u.css(u.align?{bottom:0}:{top:0}),b.append(u))):(l.isfixed=l.win.css("position")=="fixed",nt=l.isfixed?"fixed":"absolute",l.isfixed||(l.viewport=l.getViewport(l.win[0])),l.viewport&&(l.body=l.viewport,/fixed|absolute/.test(l.viewport.css("position"))||l.css(l.viewport,{position:"relative"})),n.css({position:nt}),l.zoom&&l.zoom.css({position:nt}),l.updateScrollBar(),l.body.append(n),l.zoom&&l.body.append(l.zoom),l.railh&&(u.css({position:nt}),l.body.append(u))),w.isios&&l.css(l.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),y.disableoutline&&(w.isie&&l.win.attr("hideFocus","true"),w.iswebkit&&l.win.css("outline","none")));y.autohidemode===!1?(l.autohidedom=!1,l.rail.css({opacity:y.cursoropacitymax}),l.railh&&l.railh.css({opacity:y.cursoropacitymax})):y.autohidemode===!0||y.autohidemode==="leave"?(l.autohidedom=i().add(l.rail),w.isie8&&(l.autohidedom=l.autohidedom.add(l.cursor)),l.railh&&(l.autohidedom=l.autohidedom.add(l.railh)),l.railh&&w.isie8&&(l.autohidedom=l.autohidedom.add(l.cursorh))):y.autohidemode=="scroll"?(l.autohidedom=i().add(l.rail),l.railh&&(l.autohidedom=l.autohidedom.add(l.railh))):y.autohidemode=="cursor"?(l.autohidedom=i().add(l.cursor),l.railh&&(l.autohidedom=l.autohidedom.add(l.cursorh))):y.autohidemode=="hidden"&&(l.autohidedom=!1,l.hide(),l.railslocked=!1);(w.cantouch||l.istouchcapable||y.emulatetouch||w.hasmstouch)&&(l.scrollmom=new ut(l),at=null,l.ontouchstart=function(n){var t,e,o,r,u,c;if(l.locked||n.pointerType&&(n.pointerType==="mouse"||n.pointerType===n.MSPOINTER_TYPE_MOUSE))return!1;if(l.hasmoving=!1,l.scrollmom.timer&&(l.triggerScrollEnd(),l.scrollmom.stop()),!l.railslocked){if(t=l.getTarget(n),t&&(e=/INPUT/i.test(t.nodeName)&&/range/i.test(t.type),e))return l.stopPropagation(n);if(o=n.type==="mousedown",!("clientX"in n)&&"changedTouches"in n&&(n.clientX=n.changedTouches[0].clientX,n.clientY=n.changedTouches[0].clientY),l.forcescreen&&(r=n,n={original:n.original?n.original:n},n.clientX=r.screenX,n.clientY=r.screenY),l.rail.drag={x:n.clientX,y:n.clientY,sx:l.scroll.x,sy:l.scroll.y,st:l.getScrollTop(),sl:l.getScrollLeft(),pt:2,dl:!1,tg:t},l.ispage||!y.directionlockdeadzone)l.rail.drag.dl="f";else{var s={w:f.width(),h:f.height()},h=l.getContentSize(),a=h.h-s.h,v=h.w-s.w;l.rail.drag.ck=l.rail.scrollable&&!l.railh.scrollable?a>0?"v":!1:!l.rail.scrollable&&l.railh.scrollable?v>0?"h":!1:!1}if(y.emulatetouch&&l.isiframe&&w.isie&&(u=l.win.position(),l.rail.drag.x+=u.left,l.rail.drag.y+=u.top),l.hasmoving=!1,l.lastmouseup=!1,l.scrollmom.reset(n.clientX,n.clientY),t&&o){if(c=/INPUT|SELECT|BUTTON|TEXTAREA/i.test(t.nodeName),!c)return(w.hasmousecapture&&t.setCapture(),y.emulatetouch)?(!t.onclick||t._onclick||!1||(t._onclick=t.onclick,t.onclick=function(n){if(l.hasmoving)return!1;t._onclick.call(this,n)}),l.cancelEvent(n)):l.stopPropagation(n);/SUBMIT|CANCEL|BUTTON/i.test(i(t).attr("type"))&&(l.preventclick={tg:t,click:!1})}}},l.ontouchend=function(n){if(!l.rail.drag)return!0;if(l.rail.drag.pt==2){if(n.pointerType&&(n.pointerType==="mouse"||n.pointerType===n.MSPOINTER_TYPE_MOUSE))return!1;l.rail.drag=!1;var i=n.type==="mouseup";if(l.hasmoving&&(l.scrollmom.doMomentum(),l.lastmouseup=!0,l.hideCursor(),w.hasmousecapture&&t.releaseCapture(),i))return l.cancelEvent(n)}else if(l.rail.drag.pt==1)return l.onmouseup(n)},ht=y.emulatetouch&&l.isiframe&&!w.hasmousecapture,k=y.directionlockdeadzone*.3|0,l.ontouchmove=function(n,i){var c,a,v,r;if(!l.rail.drag||n.targetTouches&&y.preventmultitouchscrolling&&n.targetTouches.length>1||n.pointerType&&(n.pointerType==="mouse"||n.pointerType===n.MSPOINTER_TYPE_MOUSE))return!0;if(l.rail.drag.pt==2){"changedTouches"in n&&(n.clientX=n.changedTouches[0].clientX,n.clientY=n.changedTouches[0].clientY);a=c=0;ht&&!i&&(v=l.win.position(),a=-v.left,c=-v.top);var s=n.clientY+c,b=s-l.rail.drag.y,h=n.clientX+a,p=h-l.rail.drag.x,u=l.rail.drag.st-b;if(l.ishwscroll&&y.bouncescroll)u<0?u=Math.round(u/2):u>l.page.maxh&&(u=l.page.maxh+Math.round((u-l.page.maxh)/2));else if(u<0?(u=0,s=0):u>l.page.maxh&&(u=l.page.maxh,s=0),s===0&&!l.hasmoving)return l.ispage||(l.rail.drag=!1),!0;if(r=l.getScrollLeft(),l.railh&&l.railh.scrollable&&(r=l.isrtlmode?p-l.rail.drag.sl:l.rail.drag.sl-p,l.ishwscroll&&y.bouncescroll?r<0?r=Math.round(r/2):r>l.page.maxw&&(r=l.page.maxw+Math.round((r-l.page.maxw)/2)):(r<0&&(r=0,h=0),r>l.page.maxw&&(r=l.page.maxw,h=0))),!l.hasmoving){if(l.rail.drag.y===n.clientY&&l.rail.drag.x===n.clientX)return l.cancelEvent(n);var e=Math.abs(b),o=Math.abs(p),f=y.directionlockdeadzone;if(l.rail.drag.ck?l.rail.drag.ck=="v"?o>f&&e<=k?l.rail.drag=!1:e>f&&(l.rail.drag.dl="v"):l.rail.drag.ck=="h"&&(e>f&&o<=k?l.rail.drag=!1:o>f&&(l.rail.drag.dl="h")):e>f&&o>f?l.rail.drag.dl="f":e>f?l.rail.drag.dl=o>k?"f":"v":o>f&&(l.rail.drag.dl=e>k?"f":"h"),!l.rail.drag.dl)return l.cancelEvent(n);l.triggerScrollStart(n.clientX,n.clientY,0,0,0);l.hasmoving=!0}return l.preventclick&&!l.preventclick.click&&(l.preventclick.click=l.preventclick.tg.onclick||!1,l.preventclick.tg.onclick=l.onpreventclick),l.rail.drag.dl&&(l.rail.drag.dl=="v"?r=l.rail.drag.sl:l.rail.drag.dl=="h"&&(u=l.rail.drag.st)),l.synched("touchmove",function(){l.rail.drag&&l.rail.drag.pt==2&&(l.prepareTransition&&l.resetTransition(),l.rail.scrollable&&l.setScrollTop(u),l.scrollmom.update(h,s),l.railh&&l.railh.scrollable?(l.setScrollLeft(r),l.showCursor(u,r)):l.showCursor(u),w.isie10&&t.selection.clear())}),l.cancelEvent(n)}if(l.rail.drag.pt==1)return l.onmousemove(n)},l.ontouchstartCursor=function(n,t){if(!l.rail.drag||l.rail.drag.pt==3){if(l.locked)return l.cancelEvent(n);l.cancelScroll();l.rail.drag={x:n.touches[0].clientX,y:n.touches[0].clientY,sx:l.scroll.x,sy:l.scroll.y,pt:3,hr:!!t};var i=l.getTarget(n);return!l.ispage&&w.hasmousecapture&&i.setCapture(),l.isiframe&&!w.hasmousecapture&&(l.saved.csspointerevents=l.doc.css("pointer-events"),l.css(l.doc,{"pointer-events":"none"})),l.cancelEvent(n)}},l.ontouchendCursor=function(n){if(l.rail.drag)return(w.hasmousecapture&&t.releaseCapture(),l.isiframe&&!w.hasmousecapture&&l.doc.css("pointer-events",l.saved.csspointerevents),l.rail.drag.pt!=3)?void 0:(l.rail.drag=!1,l.cancelEvent(n))},l.ontouchmoveCursor=function(n){var t,i;if(l.rail.drag)return l.rail.drag.pt!=3?void 0:(l.cursorfreezed=!0,l.rail.drag.hr?(l.scroll.x=l.rail.drag.sx+(n.touches[0].clientX-l.rail.drag.x),l.scroll.x<0&&(l.scroll.x=0),t=l.scrollvaluemaxw,l.scroll.x>t&&(l.scroll.x=t)):(l.scroll.y=l.rail.drag.sy+(n.touches[0].clientY-l.rail.drag.y),l.scroll.y<0&&(l.scroll.y=0),i=l.scrollvaluemax,l.scroll.y>i&&(l.scroll.y=i)),l.synched("touchmove",function(){l.rail.drag&&l.rail.drag.pt==3&&(l.showCursor(),l.rail.drag.hr?l.doScrollLeft(Math.round(l.scroll.x*l.scrollratio.x),y.cursordragspeed):l.doScrollTop(Math.round(l.scroll.y*l.scrollratio.y),y.cursordragspeed))}),l.cancelEvent(n))});l.onmousedown=function(n,t){if(!l.rail.drag||l.rail.drag.pt==1){if(l.railslocked)return l.cancelEvent(n);l.cancelScroll();l.rail.drag={x:n.clientX,y:n.clientY,sx:l.scroll.x,sy:l.scroll.y,pt:1,hr:t||!1};var i=l.getTarget(n);return w.hasmousecapture&&i.setCapture(),l.isiframe&&!w.hasmousecapture&&(l.saved.csspointerevents=l.doc.css("pointer-events"),l.css(l.doc,{"pointer-events":"none"})),l.hasmoving=!1,l.cancelEvent(n)}};l.onmouseup=function(n){if(l.rail.drag)return l.rail.drag.pt!=1?!0:(w.hasmousecapture&&t.releaseCapture(),l.isiframe&&!w.hasmousecapture&&l.doc.css("pointer-events",l.saved.csspointerevents),l.rail.drag=!1,l.cursorfreezed=!1,l.hasmoving&&l.triggerScrollEnd(),l.cancelEvent(n))};l.onmousemove=function(n){var t,i;if(l.rail.drag)return l.rail.drag.pt!==1?void 0:w.ischrome&&n.which===0?l.onmouseup(n):(l.cursorfreezed=!0,l.hasmoving||l.triggerScrollStart(n.clientX,n.clientY,0,0,0),l.hasmoving=!0,l.rail.drag.hr?(l.scroll.x=l.rail.drag.sx+(n.clientX-l.rail.drag.x),l.scroll.x<0&&(l.scroll.x=0),t=l.scrollvaluemaxw,l.scroll.x>t&&(l.scroll.x=t)):(l.scroll.y=l.rail.drag.sy+(n.clientY-l.rail.drag.y),l.scroll.y<0&&(l.scroll.y=0),i=l.scrollvaluemax,l.scroll.y>i&&(l.scroll.y=i)),l.synched("mousemove",function(){l.cursorfreezed&&(l.showCursor(),l.rail.drag.hr?l.scrollLeft(Math.round(l.scroll.x*l.scrollratio.x)):l.scrollTop(Math.round(l.scroll.y*l.scrollratio.y)))}),l.cancelEvent(n));l.checkarea=0};w.cantouch||y.emulatetouch?(l.onpreventclick=function(n){if(l.preventclick)return l.preventclick.tg.onclick=l.preventclick.click,l.preventclick=!1,l.cancelEvent(n)},l.onclick=w.isios?!1:function(n){return l.lastmouseup?(l.lastmouseup=!1,l.cancelEvent(n)):!0},y.grabcursorenabled&&w.cursorgrabvalue&&(l.css(l.ispage?l.doc:l.win,{cursor:w.cursorgrabvalue}),l.css(l.rail,{cursor:w.cursorgrabvalue}))):(et=function(n){var i,t,r;l.selectiondrag&&(n&&(i=l.win.outerHeight(),t=n.pageY-l.selectiondrag.top,t>0&&t<i&&(t=0),t>=i&&(t-=i),l.selectiondrag.df=t),l.selectiondrag.df!==0)&&(r=-(l.selectiondrag.df/3)|0,l.doScrollBy(r),l.debounced("doselectionscroll",function(){et()},50))},l.hasTextSelected="getSelection"in t?function(){return t.getSelection().rangeCount>0}:"selection"in t?function(){return t.selection.type!="None"}:function(){return!1},l.onselectionstart=function(){l.ispage||(l.selectiondrag=l.win.offset())},l.onselectionend=function(){l.selectiondrag=!1},l.onselectiondrag=function(n){l.selectiondrag&&l.hasTextSelected()&&l.debounced("selectionscroll",function(){et(n)},250)});w.hasw3ctouch?(l.css(l.ispage?i("html"):l.win,{"touch-action":"none"}),l.css(l.rail,{"touch-action":"none"}),l.css(l.cursor,{"touch-action":"none"}),l.bind(l.win,"pointerdown",l.ontouchstart),l.bind(t,"pointerup",l.ontouchend),l.delegate(t,"pointermove",l.ontouchmove)):w.hasmstouch?(l.css(l.ispage?i("html"):l.win,{"-ms-touch-action":"none"}),l.css(l.rail,{"-ms-touch-action":"none"}),l.css(l.cursor,{"-ms-touch-action":"none"}),l.bind(l.win,"MSPointerDown",l.ontouchstart),l.bind(t,"MSPointerUp",l.ontouchend),l.delegate(t,"MSPointerMove",l.ontouchmove),l.bind(l.cursor,"MSGestureHold",function(n){n.preventDefault()}),l.bind(l.cursor,"contextmenu",function(n){n.preventDefault()})):w.cantouch&&(l.bind(l.win,"touchstart",l.ontouchstart,!1,!0),l.bind(t,"touchend",l.ontouchend,!1,!0),l.bind(t,"touchcancel",l.ontouchend,!1,!0),l.delegate(t,"touchmove",l.ontouchmove,!1,!0));y.emulatetouch&&(l.bind(l.win,"mousedown",l.ontouchstart,!1,!0),l.bind(t,"mouseup",l.ontouchend,!1,!0),l.bind(t,"mousemove",l.ontouchmove,!1,!0));!y.cursordragontouch&&(w.cantouch||y.emulatetouch)||(l.rail.css({cursor:"default"}),l.railh&&l.railh.css({cursor:"default"}),l.jqbind(l.rail,"mouseenter",function(){if(!l.ispage&&!l.win.is(":visible"))return!1;l.canshowonmouseevent&&l.showCursor();l.rail.active=!0}),l.jqbind(l.rail,"mouseleave",function(){l.rail.active=!1;l.rail.drag||l.hideCursor()}),y.sensitiverail&&(l.bind(l.rail,"click",function(n){l.doRailClick(n,!1,!1)}),l.bind(l.rail,"dblclick",function(n){l.doRailClick(n,!0,!1)}),l.bind(l.cursor,"click",function(n){l.cancelEvent(n)}),l.bind(l.cursor,"dblclick",function(n){l.cancelEvent(n)})),l.railh&&(l.jqbind(l.railh,"mouseenter",function(){if(!l.ispage&&!l.win.is(":visible"))return!1;l.canshowonmouseevent&&l.showCursor();l.rail.active=!0}),l.jqbind(l.railh,"mouseleave",function(){l.rail.active=!1;l.rail.drag||l.hideCursor()}),y.sensitiverail&&(l.bind(l.railh,"click",function(n){l.doRailClick(n,!1,!0)}),l.bind(l.railh,"dblclick",function(n){l.doRailClick(n,!0,!0)}),l.bind(l.cursorh,"click",function(n){l.cancelEvent(n)}),l.bind(l.cursorh,"dblclick",function(n){l.cancelEvent(n)}))));y.cursordragontouch&&(this.istouchcapable||w.cantouch)&&(l.bind(l.cursor,"touchstart",l.ontouchstartCursor),l.bind(l.cursor,"touchmove",l.ontouchmoveCursor),l.bind(l.cursor,"touchend",l.ontouchendCursor),l.cursorh&&l.bind(l.cursorh,"touchstart",function(n){l.ontouchstartCursor(n,!0)}),l.cursorh&&l.bind(l.cursorh,"touchmove",l.ontouchmoveCursor),l.cursorh&&l.bind(l.cursorh,"touchend",l.ontouchendCursor));y.emulatetouch||w.isandroid||w.isios?(l.bind(w.hasmousecapture?l.win:t,"mouseup",l.ontouchend),l.onclick&&l.bind(t,"click",l.onclick),y.cursordragontouch?(l.bind(l.cursor,"mousedown",l.onmousedown),l.bind(l.cursor,"mouseup",l.onmouseup),l.cursorh&&l.bind(l.cursorh,"mousedown",function(n){l.onmousedown(n,!0)}),l.cursorh&&l.bind(l.cursorh,"mouseup",l.onmouseup)):(l.bind(l.rail,"mousedown",function(n){n.preventDefault()}),l.railh&&l.bind(l.railh,"mousedown",function(n){n.preventDefault()}))):(l.bind(w.hasmousecapture?l.win:t,"mouseup",l.onmouseup),l.bind(t,"mousemove",l.onmousemove),l.onclick&&l.bind(t,"click",l.onclick),l.bind(l.cursor,"mousedown",l.onmousedown),l.bind(l.cursor,"mouseup",l.onmouseup),l.railh&&(l.bind(l.cursorh,"mousedown",function(n){l.onmousedown(n,!0)}),l.bind(l.cursorh,"mouseup",l.onmouseup)),!l.ispage&&y.enablescrollonselection&&(l.bind(l.win[0],"mousedown",l.onselectionstart),l.bind(t,"mouseup",l.onselectionend),l.bind(l.cursor,"mouseup",l.onselectionend),l.cursorh&&l.bind(l.cursorh,"mouseup",l.onselectionend),l.bind(t,"mousemove",l.onselectiondrag)),l.zoom&&(l.jqbind(l.zoom,"mouseenter",function(){l.canshowonmouseevent&&l.showCursor();l.rail.active=!0}),l.jqbind(l.zoom,"mouseleave",function(){l.rail.active=!1;l.rail.drag||l.hideCursor()})));y.enablemousewheel&&(l.isiframe||l.mousewheel(w.isie&&l.ispage?t:l.win,l.onmousewheel),l.mousewheel(l.rail,l.onmousewheel),l.railh&&l.mousewheel(l.railh,l.onmousewheelhr));l.ispage||w.cantouch||/HTML|^BODY/.test(l.win[0].nodeName)||(l.win.attr("tabindex")||l.win.attr({tabindex:++g}),l.bind(l.win,"focus",function(n){a=l.getTarget(n).id||l.getTarget(n)||!1;l.hasfocus=!0;l.canshowonmouseevent&&l.noticeCursor()}),l.bind(l.win,"blur",function(){a=!1;l.hasfocus=!1}),l.bind(l.win,"mouseenter",function(n){p=l.getTarget(n).id||l.getTarget(n)||!1;l.hasmousefocus=!0;l.canshowonmouseevent&&l.noticeCursor()}),l.bind(l.win,"mouseleave",function(){p=!1;l.hasmousefocus=!1;l.rail.drag||l.hideCursor()}));l.onkeypress=function(n){var u,o,e;if(l.railslocked&&l.page.maxh===0||(n=n||r.event,u=l.getTarget(n),u&&/INPUT|TEXTAREA|SELECT|OPTION/.test(u.nodeName)&&(o=u.getAttribute("type")||u.type||!1,!o||!/submit|button|cancel/i.tp))||i(u).attr("contenteditable"))return!0;if(l.hasfocus||l.hasmousefocus&&!a||l.ispage&&!a&&!p){if(e=n.keyCode,l.railslocked&&e!=27)return l.cancelEvent(n);var f=n.ctrlKey||!1,s=n.shiftKey||!1,t=!1;switch(e){case 38:case 63233:l.doScrollBy(72);t=!0;break;case 40:case 63235:l.doScrollBy(-72);t=!0;break;case 37:case 63232:l.railh&&(f?l.doScrollLeft(0):l.doScrollLeftBy(72),t=!0);break;case 39:case 63234:l.railh&&(f?l.doScrollLeft(l.page.maxw):l.doScrollLeftBy(-72),t=!0);break;case 33:case 63276:l.doScrollBy(l.view.h);t=!0;break;case 34:case 63277:l.doScrollBy(-l.view.h);t=!0;break;case 36:case 63273:l.railh&&f?l.doScrollPos(0,0):l.doScrollTo(0);t=!0;break;case 35:case 63275:l.railh&&f?l.doScrollPos(l.page.maxw,l.page.maxh):l.doScrollTo(l.page.maxh);t=!0;break;case 32:y.spacebarenabled&&(s?l.doScrollBy(l.view.h):l.doScrollBy(-l.view.h),t=!0);break;case 27:l.zoomactive&&(l.doZoom(),t=!0)}if(t)return l.cancelEvent(n)}};y.enablekeyboard&&l.bind(t,w.isopera&&!w.isopera12?"keypress":"keydown",l.onkeypress);l.bind(t,"keydown",function(n){var t=n.ctrlKey||!1;t&&(l.wheelprevented=!0)});l.bind(t,"keyup",function(n){var t=n.ctrlKey||!1;t||(l.wheelprevented=!1)});l.bind(r,"blur",function(){l.wheelprevented=!1});l.bind(r,"resize",l.onscreenresize);l.bind(r,"orientationchange",l.onscreenresize);l.bind(r,"load",l.lazyResize);!w.ischrome||l.ispage||l.haswrapper||(ct=l.win.attr("style"),lt=parseFloat(l.win.css("width"))+1,l.win.css("width",lt),l.synched("chromefix",function(){l.win.attr("style",ct)}));l.onAttributeChange=function(){l.lazyResize(l.isieold?250:30)};y.enableobserver&&(l.isie11||o===!1||(l.observerbody=new o(function(n){return n.forEach(function(n){if(n.type=="attributes")return tt.hasClass("modal-open")&&tt.hasClass("modal-dialog")&&!i.contains(i(".modal-dialog")[0],l.doc[0])?l.hide():l.show()}),l.me.clientWidth!=l.page.width||l.me.clientHeight!=l.page.height?l.lazyResize(30):void 0}),l.observerbody.observe(t.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),l.ispage||l.haswrapper||(h=l.win[0],o!==!1?(l.observer=new o(function(n){n.forEach(l.onAttributeChange)}),l.observer.observe(h,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),l.observerremover=new o(function(n){n.forEach(function(n){if(n.removedNodes.length>0)for(var t in n.removedNodes)if(!!l&&n.removedNodes[t]===h)return l.remove()})}),l.observerremover.observe(h.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(l.bind(h,w.isie&&!w.isie9?"propertychange":"DOMAttrModified",l.onAttributeChange),w.isie9&&h.attachEvent("onpropertychange",l.onAttributeChange),l.bind(h,"DOMNodeRemoved",function(n){n.target===h&&l.remove()}))));!l.ispage&&y.boxzoom&&l.bind(r,"resize",l.resizeZoom);l.istextarea&&(l.bind(l.win,"keydown",l.lazyResize),l.bind(l.win,"mouseup",l.lazyResize));l.lazyResize(30)}this.doc[0].nodeName=="IFRAME"&&(ot=function(){var n,u,t;l.iframexd=!1;try{n="contentDocument"in this?this.contentDocument:this.contentWindow._doc;u=n.domain}catch(f){l.iframexd=!0;n=!1}if(l.iframexd)return"console"in r&&console.log("NiceScroll error: policy restriced iframe"),!0;l.forcescreen=!0;l.isiframe&&(l.iframe={doc:i(n),html:l.doc.contents().find("html")[0],body:l.doc.contents().find("body")[0]},l.getContentSize=function(){return{w:Math.max(l.iframe.html.scrollWidth,l.iframe.body.scrollWidth),h:Math.max(l.iframe.html.scrollHeight,l.iframe.body.scrollHeight)}},l.docscroll=i(l.iframe.body));w.isios||!y.iframeautoresize||l.isiframe||(l.win.scrollTop(0),l.doc.height(""),t=Math.max(n.getElementsByTagName("html")[0].scrollHeight,n.body.scrollHeight),l.doc.height(t));l.lazyResize(30);l.css(i(l.iframe.body),v);w.isios&&l.haswrapper&&l.css(i(n.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?l.bind(this.contentWindow,"scroll",l.onscroll):l.bind(n,"scroll",l.onscroll);y.enablemousewheel&&l.mousewheel(n,l.onmousewheel);y.enablekeyboard&&l.bind(n,w.isopera?"keypress":"keydown",l.onkeypress);w.cantouch?(l.bind(n,"touchstart",l.ontouchstart),l.bind(n,"touchmove",l.ontouchmove)):y.emulatetouch&&(l.bind(n,"mousedown",l.ontouchstart),l.bind(n,"mousemove",function(n){return l.ontouchmove(n,!0)}),y.grabcursorenabled&&w.cursorgrabvalue&&l.css(i(n.body),{cursor:w.cursorgrabvalue}));l.bind(n,"mouseup",l.ontouchend);l.zoom&&(y.dblclickzoom&&l.bind(n,"dblclick",l.doZoom),l.ongesturezoom&&l.bind(n,"gestureend",l.ongesturezoom))},this.doc[0].readyState&&this.doc[0].readyState==="complete"&&setTimeout(function(){ot.call(l.doc[0],!1)},500),l.bind(this.doc,"load",ot))},this.showCursor=function(n,t){if(l.cursortimeout&&(clearTimeout(l.cursortimeout),l.cursortimeout=0),l.rail){if(l.autohidedom&&(l.autohidedom.stop().css({opacity:y.cursoropacitymax}),l.cursoractive=!0),l.rail.drag&&l.rail.drag.pt==1||(n!==undefined&&n!==!1&&(l.scroll.y=n/l.scrollratio.y|0),t!==undefined&&(l.scroll.x=t/l.scrollratio.x|0)),l.cursor.css({height:l.cursorheight,top:l.scroll.y}),l.cursorh){var i=l.hasreversehr?l.scrollvaluemaxw-l.scroll.x:l.scroll.x;l.cursorh.css({width:l.cursorwidth,left:!l.rail.align&&l.rail.visibility?i+l.rail.width:i});l.cursoractive=!0}l.zoom&&l.zoom.stop().css({opacity:y.cursoropacitymax})}},this.hideCursor=function(n){l.cursortimeout||l.rail&&l.autohidedom&&(l.hasmousefocus&&y.autohidemode==="leave"||(l.cursortimeout=setTimeout(function(){l.rail.active&&l.showonmouseevent||(l.autohidedom.stop().animate({opacity:y.cursoropacitymin}),l.zoom&&l.zoom.stop().animate({opacity:y.cursoropacitymin}),l.cursoractive=!1);l.cursortimeout=0},n||y.hidecursordelay)))},this.noticeCursor=function(n,t,i){l.showCursor(t,i);l.rail.active||l.hideCursor(n)},this.getContentSize=l.ispage?function(){return{w:Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),h:Math.max(t.body.scrollHeight,t.documentElement.scrollHeight)}}:l.haswrapper?function(){return{w:l.doc[0].offsetWidth,h:l.doc[0].offsetHeight}}:function(){return{w:l.docscroll[0].scrollWidth,h:l.docscroll[0].scrollHeight}},this.onResize=function(n,t){var i,r,u;if(!l||!l.win)return!1;var f=l.page.maxh,e=l.page.maxw,o=l.view.h,s=l.view.w;if(l.view={w:l.ispage?l.win.width():l.win[0].clientWidth,h:l.ispage?l.win.height():l.win[0].clientHeight},l.page=t?t:l.getContentSize(),l.page.maxh=Math.max(0,l.page.h-l.view.h),l.page.maxw=Math.max(0,l.page.w-l.view.w),l.page.maxh==f&&l.page.maxw==e&&l.view.w==s&&l.view.h==o){if(l.ispage||(i=l.win.offset(),l.lastposition&&(r=l.lastposition,r.top==i.top&&r.left==i.left)))return l;l.lastposition=i}return(l.page.maxh===0?(l.hideRail(),l.scrollvaluemax=0,l.scroll.y=0,l.scrollratio.y=0,l.cursorheight=0,l.setScrollTop(0),l.rail&&(l.rail.scrollable=!1)):(l.page.maxh-=y.railpadding.top+y.railpadding.bottom,l.rail.scrollable=!0),l.page.maxw===0?(l.hideRailHr(),l.scrollvaluemaxw=0,l.scroll.x=0,l.scrollratio.x=0,l.cursorwidth=0,l.setScrollLeft(0),l.railh&&(l.railh.scrollable=!1)):(l.page.maxw-=y.railpadding.left+y.railpadding.right,l.railh&&(l.railh.scrollable=y.horizrailenabled)),l.railslocked=l.locked||l.page.maxh===0&&l.page.maxw===0,l.railslocked)?(l.ispage||l.updateScrollBar(l.view),!1):(l.hidden||(l.rail.visibility||l.showRail(),l.railh&&!l.railh.visibility&&l.showRailHr()),l.istextarea&&l.win.css("resize")&&l.win.css("resize")!="none"&&(l.view.h-=20),l.cursorheight=Math.min(l.view.h,Math.round(l.view.h*(l.view.h/l.page.h))),l.cursorheight=y.cursorfixedheight?y.cursorfixedheight:Math.max(y.cursorminheight,l.cursorheight),l.cursorwidth=Math.min(l.view.w,Math.round(l.view.w*(l.view.w/l.page.w))),l.cursorwidth=y.cursorfixedheight?y.cursorfixedheight:Math.max(y.cursorminheight,l.cursorwidth),l.scrollvaluemax=l.view.h-l.cursorheight-(y.railpadding.top+y.railpadding.bottom),l.hasborderbox||(l.scrollvaluemax-=l.cursor[0].offsetHeight-l.cursor[0].clientHeight),l.railh&&(l.railh.width=l.page.maxh>0?l.view.w-l.rail.width:l.view.w,l.scrollvaluemaxw=l.railh.width-l.cursorwidth-(y.railpadding.left+y.railpadding.right)),l.ispage||l.updateScrollBar(l.view),l.scrollratio={x:l.page.maxw/l.scrollvaluemaxw,y:l.page.maxh/l.scrollvaluemax},u=l.getScrollTop(),u>l.page.maxh?l.doScrollTop(l.page.maxh):(l.scroll.y=l.getScrollTop()/l.scrollratio.y|0,l.scroll.x=l.getScrollLeft()/l.scrollratio.x|0,l.cursoractive&&l.noticeCursor()),l.scroll.y&&l.getScrollTop()===0&&l.doScrollTo(l.scroll.y*l.scrollratio.y|0),l)},this.resize=l.onResize,d=0,this.onscreenresize=function(){clearTimeout(d);var n=!l.ispage&&!l.haswrapper;n&&l.hideRails();d=setTimeout(function(){l&&(n&&l.showRails(),l.resize());d=0},120)},this.lazyResize=function(n){return clearTimeout(d),n=isNaN(n)?240:n,d=setTimeout(function(){l&&l.resize();d=0},n),l},this.jqbind=function(n,t,r){l.events.push({e:n,n:t,f:r,q:!0});i(n).on(t,r)},this.mousewheel=function(n,i,r){var u="jquery"in n?n[0]:n,f;"onwheel"in t.createElement("div")?l._bind(u,"wheel",i,r||!1):(f=t.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",bt(u,f,i,r||!1),f=="DOMMouseScroll"&&bt(u,"MozMousePixelScroll",i,r||!1))},at=!1,w.haseventlistener){try{kt=Object.defineProperty({},"passive",{get:function(){at=!0}});r.addEventListener("test",null,kt)}catch(ii){}this.stopPropagation=function(n){return n?(n=n.original?n.original:n,n.stopPropagation(),!1):!1};this.cancelEvent=function(n){return n.cancelable&&n.preventDefault(),n.stopImmediatePropagation(),n.preventManipulation&&n.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},r.constructor.prototype.addEventListener=t.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(n,t){this.attachEvent("on"+n,t)},r.constructor.prototype.removeEventListener=t.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(n,t){this.detachEvent("on"+n,t)},this.cancelEvent=function(n){return n=n||r.event,n&&(n.cancelBubble=!0,n.cancel=!0,n.returnValue=!1),!1},this.stopPropagation=function(n){return n=n||r.event,n&&(n.cancelBubble=!0),!1};this.delegate=function(n,t,i,r,u){var f=h[t]||!1;f||(f={a:[],l:[],f:function(n){for(var r=f.l,u=r.length-1,t=!1,i=u;i>=0;i--)if(t=r[i].call(n.target,n),t===!1)return!1;return t}},l.bind(n,t,f.f,r,u),h[t]=f);l.ispage?(f.a=[l.id].concat(f.a),f.l=[i].concat(f.l)):(f.a.push(l.id),f.l.push(i))};this.undelegate=function(n,t){var i=h[t]||!1,r,u;if(i&&i.l)for(r=0,u=i.l.length;r<u;r++)i.a[r]===l.id&&(i.a.splice(r),i.l.splice(r),i.a.length===0&&(l._unbind(n,t,i.l.f),h[t]=null))};this.bind=function(n,t,i,r,u){var f="jquery"in n?n[0]:n;l._bind(f,t,i,r||!1,u||!1)};this._bind=function(n,t,i,r,u){l.events.push({e:n,n:t,f:i,b:r,q:!1});at&&u?n.addEventListener(t,i,{passive:!1,capture:r}):n.addEventListener(t,i,r||!1)};this._unbind=function(n,t,i,r){h[t]?l.undelegate(n,t,i,r):n.removeEventListener(t,i,r)};this.unbindAll=function(){for(var n,t=0;t<l.events.length;t++)n=l.events[t],n.q?n.e.unbind(n.n,n.f):l._unbind(n.e,n.n,n.f,n.b)};this.showRails=function(){return l.showRail().showRailHr()};this.showRail=function(){return l.page.maxh!==0&&(l.ispage||l.win.css("display")!="none")&&(l.rail.visibility=!0,l.rail.css("display","block")),l};this.showRailHr=function(){return l.railh&&l.page.maxw!==0&&(l.ispage||l.win.css("display")!="none")&&(l.railh.visibility=!0,l.railh.css("display","block")),l};this.hideRails=function(){return l.hideRail().hideRailHr()};this.hideRail=function(){return l.rail.visibility=!1,l.rail.css("display","none"),l};this.hideRailHr=function(){return l.railh&&(l.railh.visibility=!1,l.railh.css("display","none")),l};this.show=function(){return l.hidden=!1,l.railslocked=!1,l.showRails()};this.hide=function(){return l.hidden=!0,l.railslocked=!0,l.hideRails()};this.toggle=function(){return l.hidden?l.show():l.hide()};this.remove=function(){var u,r,t,n,f;l.stop();l.cursortimeout&&clearTimeout(l.cursortimeout);for(u in l.delaylist)l.delaylist[u]&&v(l.delaylist[u].h);for(l.doZoomOut(),l.unbindAll(),w.isie9&&l.win[0].detachEvent("onpropertychange",l.onAttributeChange),l.observer!==!1&&l.observer.disconnect(),l.observerremover!==!1&&l.observerremover.disconnect(),l.observerbody!==!1&&l.observerbody.disconnect(),l.events=null,l.cursor&&l.cursor.remove(),l.cursorh&&l.cursorh.remove(),l.rail&&l.rail.remove(),l.railh&&l.railh.remove(),l.zoom&&l.zoom.remove(),r=0;r<l.saved.css.length;r++)t=l.saved.css[r],t[0].css(t[1],t[2]===undefined?"":t[2]);l.saved=!1;l.me.data("__nicescroll","");n=i.nicescroll;n.each(function(t){if(this&&this.id===l.id){delete n[t];for(var i=++t;i<n.length;i++,t++)n[t]=n[i];n.length--;n.length&&delete n[n.length]}});for(f in l)l[f]=null,delete l[f];l=null};this.scrollstart=function(n){return this.onscrollstart=n,l};this.scrollend=function(n){return this.onscrollend=n,l};this.scrollcancel=function(n){return this.onscrollcancel=n,l};this.zoomin=function(n){return this.onzoomin=n,l};this.zoomout=function(n){return this.onzoomout=n,l};this.isScrollable=function(n){var t=n.target?n.target:n,r,u;if(t.nodeName=="OPTION")return!0;while(t&&t.nodeType==1&&t!==this.me[0]&&!/^BODY|HTML/.test(t.nodeName)){if(r=i(t),u=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"",/scroll|auto/.test(u))return t.clientHeight!=t.scrollHeight;t=t.parentNode?t.parentNode:!1}return!1};this.getViewport=function(n){for(var t=n&&n.parentNode?n.parentNode:!1,r,u;t&&t.nodeType==1&&!/^BODY|HTML/.test(t.nodeName);){if((r=i(t),/fixed|absolute/.test(r.css("position")))||(u=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"",/scroll|auto/.test(u)&&t.clientHeight!=t.scrollHeight)||r.getNiceScroll().length>0)return r;t=t.parentNode?t.parentNode:!1}return!1};this.triggerScrollStart=function(n,t,i,r,u){if(l.onscrollstart){var f={type:"scrollstart",current:{x:n,y:t},request:{x:i,y:r},end:{x:l.newscrollx,y:l.newscrolly},speed:u};l.onscrollstart.call(l,f)}};this.triggerScrollEnd=function(){if(l.onscrollend){var n=l.getScrollLeft(),t=l.getScrollTop(),i={type:"scrollend",current:{x:n,y:t},end:{x:n,y:t}};l.onscrollend.call(l,i)}};var dt=0,gt=0,vt=0,et=1;ht=!1;this.onmousewheel=function(n){var t,i,r;return l.wheelprevented||l.locked?!1:l.railslocked?(l.debounced("checkunlock",l.resize,250),!1):l.rail.drag?l.cancelEvent(n):(y.oneaxismousemode==="auto"&&n.deltaX!==0&&(y.oneaxismousemode=!1),y.oneaxismousemode&&n.deltaX===0&&!l.rail.scrollable)?l.railh&&l.railh.scrollable?l.onmousewheelhr(n):!0:(t=u(),i=!1,y.preservenativescrolling&&l.checkarea+600<t&&(l.nativescrollingarea=l.isScrollable(n),i=!0),l.checkarea=t,l.nativescrollingarea)?!0:(r=ni(n,!1,i),r&&(l.checkarea=0),r)};this.onmousewheelhr=function(n){if(!l.wheelprevented){if(l.railslocked||!l.railh.scrollable)return!0;if(l.rail.drag)return l.cancelEvent(n);var t=u(),i=!1;return(y.preservenativescrolling&&l.checkarea+600<t&&(l.nativescrollingarea=l.isScrollable(n),i=!0),l.checkarea=t,l.nativescrollingarea)?!0:l.railslocked?l.cancelEvent(n):ni(n,!0,i)}};this.stop=function(){return l.cancelScroll(),l.scrollmon&&l.scrollmon.stop(),l.cursorfreezed=!1,l.scroll.y=Math.round(l.getScrollTop()*(1/l.scrollratio.y)),l.noticeCursor(),l};this.getTransitionSpeed=function(n){return 80+n/72*y.scrollspeed|0};y.smoothscroll?l.ishwscroll&&w.hastransition&&y.usetransition&&!!y.smoothscroll?(ct="",this.resetTransition=function(){ct="";l.doc.css(w.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(n,t){var r=t?n:l.getTransitionSpeed(n),i=r+"ms";return ct!==i&&(ct=i,l.doc.css(w.prefixstyle+"transition-duration",i)),r},this.doScrollLeft=function(n,t){var i=l.scrollrunning?l.newscrolly:l.getScrollTop();l.doScrollPos(n,i,t)},this.doScrollTop=function(n,t){var i=l.scrollrunning?l.newscrollx:l.getScrollLeft();l.doScrollPos(i,n,t)},this.cursorupdate={running:!1,start:function(){var n=this,t;n.running||(n.running=!0,t=function(){n.running&&e(t);l.showCursor(l.getScrollTop(),l.getScrollLeft());l.notifyScrollEvent(l.win[0])},e(t))},stop:function(){this.running=!1}},this.doScrollPos=function(n,t){var u=l.getScrollTop(),f=l.getScrollLeft(),s,r;if(((l.newscrolly-u)*(t-u)<0||(l.newscrollx-f)*(n-f)<0)&&l.cancelScroll(),y.bouncescroll?(t<0?t=t/2|0:t>l.page.maxh&&(t=l.page.maxh+(t-l.page.maxh)/2|0),n<0?n=n/2|0:n>l.page.maxw&&(n=l.page.maxw+(n-l.page.maxw)/2|0)):(t<0?t=0:t>l.page.maxh&&(t=l.page.maxh),n<0?n=0:n>l.page.maxw&&(n=l.page.maxw)),l.scrollrunning&&n==l.newscrollx&&t==l.newscrolly)return!1;l.newscrolly=t;l.newscrollx=n;var e=l.getScrollTop(),o=l.getScrollLeft(),i={};i.x=n-o;i.y=t-e;s=Math.sqrt(i.x*i.x+i.y*i.y)|0;r=l.prepareTransition(s);l.scrollrunning||(l.scrollrunning=!0,l.triggerScrollStart(o,e,n,t,r),l.cursorupdate.start());l.scrollendtrapped=!0;w.transitionend||(l.scrollendtrapped&&clearTimeout(l.scrollendtrapped),l.scrollendtrapped=setTimeout(l.onScrollTransitionEnd,r));l.setScrollTop(l.newscrolly);l.setScrollLeft(l.newscrollx)},this.cancelScroll=function(){if(!l.scrollendtrapped)return!0;var n=l.getScrollTop(),t=l.getScrollLeft();return l.scrollrunning=!1,w.transitionend||clearTimeout(w.transitionend),l.scrollendtrapped=!1,l.resetTransition(),l.setScrollTop(n),l.railh&&l.setScrollLeft(t),l.timerscroll&&l.timerscroll.tm&&clearInterval(l.timerscroll.tm),l.timerscroll=!1,l.cursorfreezed=!1,l.cursorupdate.stop(),l.showCursor(n,t),l},this.onScrollTransitionEnd=function(){if(l.scrollendtrapped){var n=l.getScrollTop(),t=l.getScrollLeft();if(n<0?n=0:n>l.page.maxh&&(n=l.page.maxh),t<0?t=0:t>l.page.maxw&&(t=l.page.maxw),n!=l.newscrolly||t!=l.newscrollx)return l.doScrollPos(t,n,y.snapbackspeed);l.scrollrunning&&l.triggerScrollEnd();l.scrollrunning=!1;l.scrollendtrapped=!1;l.resetTransition();l.timerscroll=!1;l.setScrollTop(n);l.railh&&l.setScrollLeft(t);l.cursorupdate.stop();l.noticeCursor(!1,n,t);l.cursorfreezed=!1}}):(this.doScrollLeft=function(n,t){var i=l.scrollrunning?l.newscrolly:l.getScrollTop();l.doScrollPos(n,i,t)},this.doScrollTop=function(n,t){var i=l.scrollrunning?l.newscrollx:l.getScrollLeft();l.doScrollPos(i,n,t)},this.doScrollPos=function(n,t){var i=l.getScrollTop(),r=l.getScrollLeft(),f,c,o,s,a,h;if(((l.newscrolly-i)*(t-i)<0||(l.newscrollx-r)*(n-r)<0)&&l.cancelScroll(),f=!1,l.bouncescroll&&l.rail.visibility||(t<0?(t=0,f=!0):t>l.page.maxh&&(t=l.page.maxh,f=!0)),l.bouncescroll&&l.railh.visibility||(n<0?(n=0,f=!0):n>l.page.maxw&&(n=l.page.maxw,f=!0)),l.scrollrunning&&l.newscrolly===t&&l.newscrollx===n)return!0;l.newscrolly=t;l.newscrollx=n;l.dst={};l.dst.x=n-r;l.dst.y=t-i;l.dst.px=r;l.dst.py=i;c=Math.sqrt(l.dst.x*l.dst.x+l.dst.y*l.dst.y)|0;o=l.getTransitionSpeed(c);l.bzscroll={};s=f?1:.58;l.bzscroll.x=new st(r,l.newscrollx,o,0,0,s,1);l.bzscroll.y=new st(i,l.newscrolly,o,0,0,s,1);a=u();h=function(){if(l.scrollrunning){var n=l.bzscroll.y.getPos();l.setScrollLeft(l.bzscroll.x.getNow());l.setScrollTop(l.bzscroll.y.getNow());n<=1?l.timer=e(h):(l.scrollrunning=!1,l.timer=0,l.triggerScrollEnd())}};l.scrollrunning||(l.triggerScrollStart(r,i,n,t,o),l.scrollrunning=!0,l.timer=e(h))},this.cancelScroll=function(){return l.timer&&v(l.timer),l.timer=0,l.bzscroll=!1,l.scrollrunning=!1,l}):(this.doScrollLeft=function(n,t){var i=l.getScrollTop();l.doScrollPos(n,i,t)},this.doScrollTop=function(n,t){var i=l.getScrollLeft();l.doScrollPos(i,n,t)},this.doScrollPos=function(n,t){var r=n>l.page.maxw?l.page.maxw:n,i;r<0&&(r=0);i=t>l.page.maxh?l.page.maxh:t;i<0&&(i=0);l.synched("scroll",function(){l.setScrollTop(i);l.setScrollLeft(r)})},this.cancelScroll=function(){});this.doScrollBy=function(n){yt(0,n)};this.doScrollLeftBy=function(n){yt(n,0)};this.doScrollTo=function(n,t){var i=t?Math.round(n*l.scrollratio.y):n;i<0?i=0:i>l.page.maxh&&(i=l.page.maxh);l.cursorfreezed=!1;l.doScrollTop(n)};this.checkContentSize=function(){var n=l.getContentSize();(n.h!=l.page.h||n.w!=l.page.w)&&l.resize(!1,n)};l.onscroll=function(){l.rail.drag||l.cursorfreezed||l.synched("scroll",function(){l.scroll.y=Math.round(l.getScrollTop()/l.scrollratio.y);l.railh&&(l.scroll.x=Math.round(l.getScrollLeft()/l.scrollratio.x));l.noticeCursor()})};l.bind(l.docscroll,"scroll",l.onscroll);this.doZoomIn=function(n){var i,r,e,t,u;if(!l.zoomactive){l.zoomactive=!0;l.zoomrestore={style:{}};i=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"];r=l.win[0].style;for(e in i)t=i[e],l.zoomrestore.style[t]=r[t]!==undefined?r[t]:"";return l.zoomrestore.style.width=l.win.css("width"),l.zoomrestore.style.height=l.win.css("height"),l.zoomrestore.padding={w:l.win.outerWidth()-l.win.width(),h:l.win.outerHeight()-l.win.height()},w.isios4&&(l.zoomrestore.scrollTop=f.scrollTop(),f.scrollTop(0)),l.win.css({position:w.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0}),u=l.win.css("backgroundColor"),(""===u||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(u))&&l.win.css("backgroundColor","#fff"),l.rail.css({zIndex:s+101}),l.zoom.css({zIndex:s+102}),l.zoom.css("backgroundPosition","0 -18px"),l.resizeZoom(),l.onzoomin&&l.onzoomin.call(l),l.cancelEvent(n)}};this.doZoomOut=function(n){if(l.zoomactive)return l.zoomactive=!1,l.win.css("margin",""),l.win.css(l.zoomrestore.style),w.isios4&&f.scrollTop(l.zoomrestore.scrollTop),l.rail.css({"z-index":l.zindex}),l.zoom.css({"z-index":l.zindex}),l.zoomrestore=!1,l.zoom.css("backgroundPosition","0 0"),l.onResize(),l.onzoomout&&l.onzoomout.call(l),l.cancelEvent(n)};this.doZoom=function(n){return l.zoomactive?l.doZoomOut(n):l.doZoomIn(n)};this.resizeZoom=function(){if(l.zoomactive){var n=l.getScrollTop();l.win.css({width:f.width()-l.zoomrestore.padding.w+"px",height:f.height()-l.zoomrestore.padding.h+"px"});l.onResize();l.setScrollTop(Math.min(l.page.maxh,n))}};this.init();i.nicescroll.push(this)},ut=function(n){var t=this;this.nc=n;this.lastx=0;this.lasty=0;this.speedx=0;this.speedy=0;this.lasttime=0;this.steptime=0;this.snapx=!1;this.snapy=!1;this.demulx=0;this.demuly=0;this.lastscrollx=-1;this.lastscrolly=-1;this.chkx=0;this.chky=0;this.timer=0;this.reset=function(n,i){t.stop();t.steptime=0;t.lasttime=u();t.speedx=0;t.speedy=0;t.lastx=n;t.lasty=i;t.lastscrollx=-1;t.lastscrolly=-1};this.update=function(n,i){var r=u();t.steptime=r-t.lasttime;t.lasttime=r;var f=i-t.lasty,e=n-t.lastx,h=t.nc.getScrollTop(),c=t.nc.getScrollLeft(),o=h+f,s=c+e;t.snapx=s<0||s>t.nc.page.maxw;t.snapy=o<0||o>t.nc.page.maxh;t.speedx=e;t.speedy=f;t.lastx=n;t.lasty=i};this.stop=function(){t.nc.unsynched("domomentum2d");t.timer&&clearTimeout(t.timer);t.timer=0;t.lastscrollx=-1;t.lastscrolly=-1};this.doSnapy=function(n,i){var r=!1;i<0?(i=0,r=!0):i>t.nc.page.maxh&&(i=t.nc.page.maxh,r=!0);n<0?(n=0,r=!0):n>t.nc.page.maxw&&(n=t.nc.page.maxw,r=!0);r?t.nc.doScrollPos(n,i,t.nc.opt.snapbackspeed):t.nc.triggerScrollEnd()};this.doMomentum=function(n){var o=u(),l=n?o+n:t.lasttime,a=t.nc.getScrollLeft(),v=t.nc.getScrollTop(),s=t.nc.page.maxh,h=t.nc.page.maxw,e,y,p,f,c;if(t.speedx=h>0?Math.min(60,t.speedx):0,t.speedy=s>0?Math.min(60,t.speedy):0,e=l&&o-l<=60,(v<0||v>s||a<0||a>h)&&(e=!1),y=t.speedy&&e?t.speedy:!1,p=t.speedx&&e?t.speedx:!1,y||p){f=Math.max(16,t.steptime);f>50&&(c=f/50,t.speedx*=c,t.speedy*=c,f=50);t.demulxy=0;t.lastscrollx=t.nc.getScrollLeft();t.chkx=t.lastscrollx;t.lastscrolly=t.nc.getScrollTop();t.chky=t.lastscrolly;var i=t.lastscrollx,r=t.lastscrolly,w=function(){var n=u()-o>600?.04:.02;t.speedx&&(i=Math.floor(t.lastscrollx-t.speedx*(1-t.demulxy)),t.lastscrollx=i,(i<0||i>h)&&(n=.1));t.speedy&&(r=Math.floor(t.lastscrolly-t.speedy*(1-t.demulxy)),t.lastscrolly=r,(r<0||r>s)&&(n=.1));t.demulxy=Math.min(1,t.demulxy+n);t.nc.synched("domomentum2d",function(){var n,u;t.speedx&&(n=t.nc.getScrollLeft(),t.chkx=i,t.nc.setScrollLeft(i));t.speedy&&(u=t.nc.getScrollTop(),t.chky=r,t.nc.setScrollTop(r));t.timer||(t.nc.hideCursor(),t.doSnapy(i,r))});t.demulxy<1?t.timer=setTimeout(w,f):(t.stop(),t.nc.hideCursor(),t.doSnapy(i,r))};w()}else t.doSnapy(t.nc.getScrollLeft(),t.nc.getScrollTop())}},y=n.fn.scrollTop;n.cssHooks.pageYOffset={get:function(n){var t=i.data(n,"__nicescroll")||!1;return t&&t.ishwscroll?t.getScrollTop():y.call(n)},set:function(n,t){var r=i.data(n,"__nicescroll")||!1;return r&&r.ishwscroll?r.setScrollTop(parseInt(t)):y.call(n,t),this}};n.fn.scrollTop=function(n){if(n===undefined){var t=this[0]?i.data(this[0],"__nicescroll")||!1:!1;return t&&t.ishwscroll?t.getScrollTop():y.call(this)}return this.each(function(){var t=i.data(this,"__nicescroll")||!1;t&&t.ishwscroll?t.setScrollTop(parseInt(n)):y.call(i(this),n)})};c=n.fn.scrollLeft;i.cssHooks.pageXOffset={get:function(n){var t=i.data(n,"__nicescroll")||!1;return t&&t.ishwscroll?t.getScrollLeft():c.call(n)},set:function(n,t){var r=i.data(n,"__nicescroll")||!1;return r&&r.ishwscroll?r.setScrollLeft(parseInt(t)):c.call(n,t),this}};n.fn.scrollLeft=function(n){if(n===undefined){var t=this[0]?i.data(this[0],"__nicescroll")||!1:!1;return t&&t.ishwscroll?t.getScrollLeft():c.call(this)}return this.each(function(){var t=i.data(this,"__nicescroll")||!1;t&&t.ishwscroll?t.setScrollLeft(parseInt(n)):c.call(i(this),n)})};l=function(n){var t=this,r,u;if(this.length=0,this.name="nicescrollarray",this.each=function(n){return i.each(t,n),t},this.push=function(n){t[t.length]=n;t.length++},this.eq=function(n){return t[n]},n)for(r=0;r<n.length;r++)u=i.data(n[r],"__nicescroll")||!1,u&&(this[this.length]=u,this.length++);return this};ft(l.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(n,t){n[t]=function(){var n=arguments;return this.each(function(){this[t].apply(this,n)})}});n.fn.getNiceScroll=function(n){return n===undefined?new l(this):this[n]&&i.data(this[n],"__nicescroll")||!1};d=n.expr.pseudos||n.expr[":"];d.nicescroll=function(n){return i.data(n,"__nicescroll")!==undefined};i.fn.niceScroll=function(n,t){t!==undefined||typeof n!="object"||"jquery"in n||(t=n,n=!1);var r=new l;return this.each(function(){var f=i(this),u=i.extend({},t),o,s,e;(n||!1)&&(o=i(n),u.doc=o.length>1?i(n,f):o,u.win=f);s=!("doc"in u);s||"win"in u||(u.win=f);e=f.data("__nicescroll")||!1;e||(u.doc=u.doc||f,e=new rt(u,f),f.data("__nicescroll",e));r.push(e)}),r.length===1?r[0]:r};r.NiceScroll={getjQuery:function(){return n}};i.nicescroll||(i.nicescroll=new l,i.nicescroll.options=k)}),function(n){"use strict";var i={up:undefined,down:undefined,velocity:300,maxDuration:2e3},r='<div style="position: absolute; top: 0px; background-color: #fff; border: 1px solid #000; padding:5px; display: none;">Up<\/div>',u='<div style="position: absolute; bottom: 0px; background-color: #fff; border: 1px solid #000; padding:5px; display: none;">Down<\/div>',t=function(n,t){this.$content=n;this.$container=n.parent();this.velocity=t.velocity;this.maxDuration=t.maxDuration;this.setButtons(t);this.wrapContent();this.setExtraHeight();this.$content.data("scroll-buttons-active",!0);this.$content.data("scrollable-area",this)};t.prototype={setExtraHeight:function(){var n=this.getContentHeight()-this.$container.height();this.extraHeight=n},getContentHeight:function(){return this.$wrapper.prop("scrollHeight")},getScrollUpDuration:function(){var n=this.$wrapper.prop("scrollTop");return this.getScrollDuration(n)},getScrollDownDuration:function(){var n=this.getContentHeight()-this.$wrapper.prop("scrollTop");return this.getScrollDuration(n)},getScrollDuration:function(n){var t=n/this.velocity*1e3;return Math.min(t,this.maxDuration)},activateScrolling:function(){var n=this;this.$down.hover(function(){n.scrollDown()},function(){n.$wrapper.stop()});this.$up.hover(function(){n.scrollUp()},function(){n.$wrapper.stop()})},activateScrollingForTouchscreens:function(){var n=this;this.$down.bind("touchstart",function(){n.scrollDown()});this.$down.bind("touched",function(){n.$wrapper.stop()});this.$up.bind("touchstart",function(){n.scrollUp()});this.$up.bind("touched",function(){n.$wrapper.stop()})},setButtons:function(t){t.up===undefined?(this.$up=n(r),this.$container.append(this.$up)):this.$up=this.$container.find(t.up);t.down===undefined?(this.$down=n(u),this.$container.append(this.$down)):this.$down=this.$container.find(t.down)},displayButtons:function(){this.extraHeight>0?(this.$down.fadeIn(),this.$up.fadeIn()):(this.$down.fadeOut(),this.$up.fadeOut())},scrollDown:function(){this.scrollTo(this.extraHeight,this.getScrollDownDuration())},scrollUp:function(){this.scrollTo(0,this.getScrollUpDuration())},scrollTo:function(n,t){this.$wrapper.animate({scrollTop:n},t)},wrapContent:function(){this.$content.wrap('<div class="scroll-buttons-wrapper" />');this.$wrapper=this.$content.parent();this.$container.css({overflow:"hidden",position:"relative"});this.$wrapper.css({height:this.$container.height(),width:this.$container.width()+20,overflow:"auto",position:"absolute",top:0,left:0})},reload:function(){this.setExtraHeight();this.displayButtons()}};n.fn.scrollButtons=function(r){if(r.reload===!0)n(this).data("scroll-buttons-active")===!0&&n(this).data("scrollable-area").reload();else{var f=n.extend({},i,r),u=new t(n(this),f);u.activateScrolling();u.displayButtons()}return this}}(jQuery);!function(n,t){"use strict";"function"==typeof define&&define.amd?define([],function(){return t.apply(n)}):"object"==typeof exports?module.exports=t.call(n):n.Waves=t.call(n)}("object"==typeof global?global:this,function(){"use strict";function c(n){return null!==n&&n===n.window}function l(n){return c(n)?n:9===n.nodeType&&n.defaultView}function f(n){var t=typeof n;return"function"===t||"object"===t&&!!n}function a(n){return f(n)&&n.nodeType>0}function r(n){var t=s.call(n);return"[object String]"===t?p(n):f(n)&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(t)&&n.hasOwnProperty("length")?n:a(n)?[n]:[]}function e(n){var t,i,r={top:0,left:0},u=n&&n.ownerDocument;return t=u.documentElement,"undefined"!=typeof n.getBoundingClientRect&&(r=n.getBoundingClientRect()),i=l(u),{top:r.top+i.pageYOffset-t.clientTop,left:r.left+i.pageXOffset-t.clientLeft}}function u(n){var i="";for(var t in n)n.hasOwnProperty(t)&&(i+=t+":"+n[t]+";");return i}function v(t,i,r){var f;if(r){r.classList.remove("waves-rippling");var h=r.getAttribute("data-x"),c=r.getAttribute("data-y"),e=r.getAttribute("data-scale"),o=r.getAttribute("data-translate"),l=Date.now()-Number(r.getAttribute("data-hold")),s=350-l;0>s&&(s=0);"mousemove"===t.type&&(s=150);f="mousemove"===t.type?2500:n.duration;setTimeout(function(){var n={top:c+"px",left:h+"px",opacity:"0","-webkit-transition-duration":f+"ms","-moz-transition-duration":f+"ms","-o-transition-duration":f+"ms","transition-duration":f+"ms","-webkit-transform":e+" "+o,"-moz-transform":e+" "+o,"-ms-transform":e+" "+o,"-o-transform":e+" "+o,transform:e+" "+o};r.setAttribute("style",u(n));setTimeout(function(){try{i.removeChild(r)}catch(n){return!1}},f)},s)}}function y(n){if(i.allowEvent(n)===!1)return null;for(var r=null,t=n.target||n.srcElement;null!==t.parentElement;){if(t.classList.contains("waves-effect")&&!(t instanceof SVGElement)){r=t;break}t=t.parentElement}return r}function o(t){var r;if(i.registerEvent(t),r=y(t),null!==r)if("touchstart"===t.type&&n.delay){var e=!1,u=setTimeout(function(){u=null;n.show(t,r)},n.delay),f=function(i){u&&(clearTimeout(u),u=null,n.show(t,r));e||(e=!0,n.hide(i,r))},o=function(n){u&&(clearTimeout(u),u=null);f(n)};r.addEventListener("touchmove",o,!1);r.addEventListener("touchend",f,!1);r.addEventListener("touchcancel",f,!1)}else n.show(t,r),h&&(r.addEventListener("touchend",n.hide,!1),r.addEventListener("touchcancel",n.hide,!1)),r.addEventListener("mouseup",n.hide,!1),r.addEventListener("mouseleave",n.hide,!1)}var t=t||{},p=document.querySelectorAll.bind(document),s=Object.prototype.toString,h="ontouchstart"in window,n={duration:750,delay:200,show:function(t,i,r){var o,f,c;if(2===t.button)return!1;i=i||this;o=document.createElement("div");o.className="waves-ripple waves-rippling";i.appendChild(o);var l=e(i),a=t.pageY-l.top,v=t.pageX-l.left,h="scale("+i.clientWidth/100*3+")",s="translate(0,0)";r&&(s="translate("+r.x+"px, "+r.y+"px)");"touches"in t&&t.touches.length&&(a=t.touches[0].pageY-l.top,v=t.touches[0].pageX-l.left);o.setAttribute("data-hold",Date.now());o.setAttribute("data-x",v);o.setAttribute("data-y",a);o.setAttribute("data-scale",h);o.setAttribute("data-translate",s);f={top:a+"px",left:v+"px"};o.classList.add("waves-notransition");o.setAttribute("style",u(f));o.classList.remove("waves-notransition");f["-webkit-transform"]=h+" "+s;f["-moz-transform"]=h+" "+s;f["-ms-transform"]=h+" "+s;f["-o-transform"]=h+" "+s;f.transform=h+" "+s;f.opacity="1";c="mousemove"===t.type?2500:n.duration;f["-webkit-transition-duration"]=c+"ms";f["-moz-transition-duration"]=c+"ms";f["-o-transition-duration"]=c+"ms";f["transition-duration"]=c+"ms";o.setAttribute("style",u(f))},hide:function(n,t){t=t||this;for(var r=t.getElementsByClassName("waves-rippling"),i=0,u=r.length;u>i;i++)v(n,t,r[i])}},w={input:function(n){var i=n.parentNode,t;if("i"!==i.tagName.toLowerCase()||!i.classList.contains("waves-effect")){t=document.createElement("i");t.className=n.className+" waves-input-wrapper";n.className="waves-button-input";i.replaceChild(t,n);t.appendChild(n);var r=window.getComputedStyle(n,null),u=r.color,f=r.backgroundColor;t.setAttribute("style","color:"+u+";background:"+f);n.setAttribute("style","background-color:rgba(0,0,0,0);")}},img:function(n){var t=n.parentNode,i;"i"===t.tagName.toLowerCase()&&t.classList.contains("waves-effect")||(i=document.createElement("i"),t.replaceChild(i,n),i.appendChild(n))}},i={touches:0,allowEvent:function(n){var t=!0;return/^(mousedown|mousemove)$/.test(n.type)&&i.touches&&(t=!1),t},registerEvent:function(n){var t=n.type;"touchstart"===t?i.touches+=1:/^(touchend|touchcancel)$/.test(t)&&setTimeout(function(){i.touches&&(i.touches-=1)},500)}};return t.init=function(t){var r=document.body;t=t||{};"duration"in t&&(n.duration=t.duration);"delay"in t&&(n.delay=t.delay);h&&(r.addEventListener("touchstart",o,!1),r.addEventListener("touchcancel",i.registerEvent,!1),r.addEventListener("touchend",i.registerEvent,!1));r.addEventListener("mousedown",o,!1)},t.attach=function(n,t){n=r(n);"[object Array]"===s.call(t)&&(t=t.join(" "));t=t?" "+t:"";for(var i,u,f=0,e=n.length;e>f;f++)i=n[f],u=i.tagName.toLowerCase(),-1!==["input","img"].indexOf(u)&&(w[u](i),i=i.parentElement),i.className+=" waves-effect"+t},t.ripple=function(t,i){var o,a;if(t=r(t),o=t.length,i=i||{},i.wait=i.wait||0,i.position=i.position||null,o)for(var u,s,h,f={},c=0,l={type:"mousedown",button:1},v=function(t,i){return function(){n.hide(t,i)}};o>c;c++)(u=t[c],s=i.position||{x:u.clientWidth/2,y:u.clientHeight/2},h=e(u),f.x=h.left+s.x,f.y=h.top+s.y,l.pageX=f.x,l.pageY=f.y,n.show(l,u),i.wait>=0&&null!==i.wait)&&(a={type:"mouseup",button:1},setTimeout(v(a,u),i.wait))},t.calm=function(t){t=r(t);for(var u={type:"mouseup",button:1},i=0,f=t.length;f>i;i++)n.hide(u,t[i])},t.displayEffect=function(n){console.error("Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect");t.init(n)},t})