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(e,f){var d=$("#modal").css("display");if(d=="none"){if(!(f)){$("#modal").addClass("fail")}$("#modal").fadeIn()}$("#msgFlash").hide();$("#msgFlash").html(e);if(f){$("#modal").addClass("success");$("#msgFlash").fadeIn();setTimeout("closeModalForm()",2000)}else{$("#msgFlash").fadeIn()}}function validateForm(h){var e="";if((h.phone1.value==null||h.phone1.value=="")||(h.phone1.value==null||h.phone1.value=="")||(h.phone1.value==null||h.phone1.value=="")){h.phone.value=null;e="I need your <strong>PHONE NUMBER</strong>, please."}else{h.phone.value=h.phone1.value+h.phone2.value+h.phone3.value;if(h.phone.value!=null){h.phone.value=h.phone.value.replace(/\D/g,"");if(h.phone.value.length<10){e="A <strong>PHONE NUMBER</strong> needs to be<br/> <strong>10 Digits</strong>. <br/> Example:(888)555 - 1234"}else{if(h.email.value==null||h.email.value==""){e="Need an <strong>EMAIL</strong> just in case."}else{if(h.email.value.length<6){e="Wait, <strong>"+h.email.value+"</strong> is way too short to be a <br/> <strong>VALID EMAIL</strong>."}else{var f=h.email.value.indexOf("@");var g=h.email.value.lastIndexOf(".");if(f<1||g-f<2){e="Hold on! <strong>"+h.email.value+"</strong> doesn't look like a<br/> <strong>VALID EMAIL</strong>."}}}}}}if(e.length>0){alertModal(e,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(f,d,e){return this.animate({opacity:"toggle"},f,d,e)};jQuery.fn.toggleText=function(a,b){return this.each(function(){jQuery(this).text(jQuery(this).text()==a?b:a)})};