function sendSearch(){window.location.replace(site+"/search?q="+$("#header_searchfield").val().replace(/ /g,"+"))}function checkURL(n,t,i){console.log(n+": ");console.log($(n).val());var r=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,f=new RegExp(r),u=$(n).val().match(r);console.log("reg: "+u);new RegExp(r).test($(n).val())?($(t).removeClass("d-none"),disableButton(i)):($(t).addClass("d-none"),disableButton(i))}function disableButton(n){$(".urlmsg").is(":visible")?$(n).addClass("disabled"):$(n).removeClass("disabled")}$(document).ready(function(){window.location.href.indexOf("#CommentAboutError")>-1&&(console.log("comment about error"),$("#errorMessage").html('<div class="alert alert-danger" role="alert">There was an error processing your comment. Please try again later<\/div>'))});$("#btnSearch").click(function(){console.log("buttonSearch");sendSearch()});$("#header_searchfield").bind("enterKey",function(){sendSearch()});$("#header_searchfield").keyup(function(n){n.keyCode==13&&$(this).trigger("enterKey")});var pathname=window.location.pathname.split("/"),site="";switch(pathname[1]){case"clerk":site="/clerk";break;case"surveyor":site="/surveyor";break;case"clark-planetarium":site="/clark-planetarium";break;case"district-attorney":site="/district-attorney";break;case"recorder":site="/recorder"}$(document).ready(function(){$("#plustext").click(function(){var n=$(".fontSize").css("font-size"),t=parseFloat(n,10),i=t*1.1;return console.log(n+" "+t+" "+i),$(".fontSize").css("font-size",i),!1});$("#minustext").click(function(){var n=$(".fontSize").css("font-size"),t=parseFloat(n,10),i=t*.9;return console.log(n+" "+t+" "+i),$(".fontSize").css("font-size",i),!1})});$("#message").blur(function(){checkURL("#message","#urlInMessageMailTo","#MailToSubmit")});$("#name").blur(function(){checkURL("#name","#urlInNameMailTo","#MailToSubmit")});$("#CommentFormData_message").blur(function(){checkURL("#CommentFormData_message","#urlInMessageComment","#CommentSubmit")});$("#CommentFormData_name").blur(function(){checkURL("#CommentFormData_name","#urlInNameComment","#CommentSubmit")});$(document).ready(function(){window.location.href.indexOf("?PageCommentPosted=")>-1&&window.location.href.indexOf("#CommentAbout")>-1&&(console.log("comment about submitted"),$("#CommentForm").html("<strong>Comment submitted.<\/strong>"),$("#CommentAbout").modal("show"))})