var submitMessageF="Message Send Failed.";var submitMessageS="Your Message was Sent!";var numOfNav,navLength,currentNav;function initListing(){initModal()}function initModal(){$("#hideModal").click(function(){$("#modal").fadeOut()});$(window).scroll(function(){$("#modal").css("top",$(window).scrollTop()+"px")})}function openModal(){$("#modal").fadeIn()}function closeModal(){$("#modal").fadeOut(function(){$("#msgFlash").html("");$("#msgFlash").hide();$("#modal").removeClass("fail");$("#modal").removeClass("success")})}function contact(d,c){openModal();$("#modalTitle span").html(d);$("#listingId").val(c)}function closeModalForm(){$("#modal").fadeOut(function(){$("#msgFlash").html("");$("#modal").removeClass("success");$("#modal form").show();$("#msgFlash").hide()})}function alertModal(d,e){var f=$("#modal").css("display");if(f=="none"){if(!(e)){$("#modal").addClass("fail")}$("#modal").fadeIn()}$("#msgFlash").hide();$("#msgFlash").html(d);if(e){$("#modal").addClass("success");$("#msgFlash").fadeIn();setTimeout("closeModalForm()",2000)}else{$("#msgFlash").fadeIn()}}function validateForm(f){var g="";if((f.phone1.value==null||f.phone1.value=="")||(f.phone1.value==null||f.phone1.value=="")||(f.phone1.value==null||f.phone1.value=="")){f.phone.value=null;g="I need your <strong>PHONE NUMBER</strong>, please."}else{f.phone.value=f.phone1.value+f.phone2.value+f.phone3.value;if(f.phone.value!=null){f.phone.value=f.phone.value.replace(/\D/g,"");if(f.phone.value.length<10){g="A <strong>PHONE NUMBER</strong> needs to be<br/> <strong>10 Digits</strong>. <br/> Example:(888)555 - 1234"}else{if(f.email.value==null||f.email.value==""){g="Need an <strong>EMAIL</strong> just in case."}else{if(f.email.value.length<6){g="Wait, <strong>"+f.email.value+"</strong> is way too short to be a <br/> <strong>VALID EMAIL</strong>."}else{var h=f.email.value.indexOf("@");var e=f.email.value.lastIndexOf(".");if(h<1||e-h<2){g="Hold on! <strong>"+f.email.value+"</strong> doesn't look like a<br/> <strong>VALID EMAIL</strong>."}}}}}}if(g.length>0){alertModal(g,false);return false}alertModal(submitMessageS,true);return true}function validateClaimForm(c){var d="";if((c.phone1.value==null||c.phone1.value=="")||(c.phone1.value==null||c.phone1.value=="")||(c.phone1.value==null||c.phone1.value=="")){c.phone.value=null;d="I need your <strong>PHONE NUMBER</strong>, please."}else{if(c.first_name.value==null||c.first_name.value==""){c.first_name.value=null;d="I need your <strong>NAME</strong>."}else{c.phone.value=c.phone1.value+c.phone2.value+c.phone3.value;if(c.phone.value!=null){c.phone.value=c.phone.value.replace(/\D/g,"");if(c.phone.value.length<10){d="A <strong>PHONE NUMBER</strong> needs to be<br/> <strong>10 Digits</strong>. <br/> Example:(888)555 - 1234"}}}}if(d.length>0){alertModal(d,false);return false}return true}function togglingFilter(c){var d=$(c).parent().parent();$(d).children(".hide").fadeToggle();$(c).parent().toggleClass("expand");$(c).toggleText("Shorten this List","View All")}function loadDirectionsTab(){var b=$("#tabNav li").length-1;if(b>0){$("#tabs").tabs("select",b)}}function animateSkybox(){$("#wrapper").animate({backgroundPosition:"(0 0)"},{queue:false,duration:5000})}function loadYodleArticles(b){$.ajax({url:b,type:"GET",dataType:"html",error:function(){},success:function(a){if(a!=""){$("#articles").html(a);$("#articlesBlock").show()}}})}jQuery.fn.vjustify=function(){var b=0;this.each(function(){if(this.offsetHeight>b){b=this.offsetHeight}});this.each(function(){$(this).height(b+"px");if(this.offsetHeight>b){$(this).height((b-(this.offsetHeight-b))+"px")}})};jQuery.fn.fadeToggle=function(e,f,d){return this.animate({opacity:"toggle"},e,f,d)};jQuery.fn.toggleText=function(a,b){return this.each(function(){jQuery(this).text(jQuery(this).text()==a?b:a)})};