var _siUtils;(function(n){n.fn.siSerializeObject=function(t){var i={},r=this.serializeArray();return t=t||!1,n.each(r,function(){(!t||t&&this.value&&this.value.length>0)&&(i[this.name]!==undefined?(i[this.name].push||(i[this.name]=[i[this.name]]),i[this.name].push(this.value||"")):i[this.name]=this.value||"")}),i}})(jQuery);$.validator.methods.email=function(n,t){return this.optional(t)||/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)};$.validator.addMethod("siPhone",function(n,t){return this.optional(t)||!siteData.leadIntlPhone||$(t).intlTelInput("isValidNumber")});_siUtils=function(n){return{isDefined:function(n){return n&&n.length>0},getValue:function(n){return _siUtils.isDefined(n)?n.val():""},formatCurrency:function(n,t){var u,r,i;for(t=t||!1,n=n.toString().replace(/\$|\,/g,""),isNaN(n)&&(n="0"),u=n==(n=Math.abs(n)),n=Math.floor(n*100+.50000000001),n=Math.floor(n/100).toString(),r="",t&&n>=1e6&&(n<1e7?(n=Math.round(n/1e5)/10,r="M"):n<1e9?(n=Math.round(n/1e6),r="M"):n<1e12&&(n=Math.round(n/1e9),r="B")),i=0;i<Math.floor((n.length-(1+i))/3);i++)n=n.substring(0,n.length-(4*i+3))+","+n.substring(n.length-(4*i+3));return(u?"":"-")+"$"+n+r},formatNumber:function(n){n=n.toString().replace(/\$|\,/g,"");isNaN(n)&&(n="0");for(var t=0;t<Math.floor((n.length-(1+t))/3);t++)n=n.substring(0,n.length-(4*t+3))+","+n.substring(n.length-(4*t+3));return n},parseNumber:function(n){return n=n.toString().replace(/\$|\,/g,""),n=parseInt(n,10),isNaN(n)&&(n=0),n},handleKeyPress:function(n,t){return jQuery(n.target).is("textarea")?!0:n.which&&n.which===13||n.keyCode&&n.keyCode===13?(t(),!1):void 0},formatShortDate:function(n){if(n.length===0)return"";var t=new Date(n);return t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear().toString().substr(2,2)},initPhoneValidation:function(n){if(siteData.leadIntlPhone){var t="";/\(\d{3}\)\s\d{3}-\d{4}/g.test(n.val())&&(t=n.val(),t="+1"+t.match(/\d+/g).join(""));n.removeAttr("placeholder");n.intlTelInput({preferredCountries:["us","ca"],separateDialCode:!0,utilsScript:"/assets/plugins/intl-tel-input/js/utils.js"});t.length>0&&n.intlTelInput("setNumber",t)}else n.mask("(999) 999-9999")},getPhoneValue:function(t){var i={country:siteData.country.toUpperCase(),number:""};return t.val().length===0?i:(siteData.leadIntlPhone?t.intlTelInput("isValidNumber")&&(i.country=t.intlTelInput("getSelectedCountryData").iso2.toUpperCase(),i.number=n.inArray(i.country,["US","CA","PR"])>-1?t.intlTelInput("getNumber",intlTelInputUtils.numberFormat.NATIONAL):t.intlTelInput("getNumber",intlTelInputUtils.numberFormat.INTERNATIONAL)):i.number=t.val(),i)},truncateUserConsentDisclaimer:function(n){var t=n.find(".js-user-consent-disclaimer");t.length>0&&t.siReadMore({count:250,showLess:!1})}}}(jQuery),function(n){n.fn.siSlick=function(t,i){var r=this,f=1.5,e,u=!1,s=n.extend({},{slidesToShow:1,slidesToScroll:1,draggable:!1,slide:"div",lazyLoad:"ondemand"},t),o;if(i=i||"",o=function(n){var o,t,h,s,c;u||(u=!0,o=n.eq(0).width(),o!==e&&(e=o,i==="image"?(n.addClass("si-responsive-img"),t=o/f,n.height(t),h=n.eq(0).find("img"),h.length>0&&(s=h.height(),s>0&&s<=t&&(t=s),n.height(t)),r.find(".slick-list").height(t)):i==="slide"?(n.addClass("si-responsive-img"),n.height(o/f)):(c=r.find(i),c.addClass("si-responsive-img si-responsive-img--4by3"))),u=!1)},r.slick(s),i.length>0){r.on("setPosition",function(n,t){o(t.$slides)});r.slick("setPosition")}return r}}(jQuery);var _siCaptcha=function(){return{execute:function(n){typeof grecaptcha!="undefined"&&typeof SI_CAPTCHA_KEY!="undefined"&&grecaptcha.ready(function(){grecaptcha.execute(SI_CAPTCHA_KEY,{action:"property_site_contact_request"}).then(function(t){n(t)})})}}}(),validCaptcha=!1,onCaptchaLoad=function(){grecaptcha.render("spsRecaptcha",{sitekey:SI_CAPTCHA_KEY,callback:verifyReCaptcha})},verifyReCaptcha=function(n){n===grecaptcha.getResponse()&&(validCaptcha=!0)};(function(n){n(function(){new PropertySite});PropertySite=function(){var t=this;t.heroImage=null;t.navToggle=null;t.navCollapse=null;t.stickyNav=null;t.stickyNavHeight=null;t.stickyNavLinks=null;t.stickyNavScrollTo=null;t.lastScrolled=null;t.openHouseLiveVideoPlaceholder=null;t.openHouseLiveVideoContainer=null;t.openHouseLiveVideoDatetime=null;t.openHouseLiveVideoTimer=null;t.fullPhotoModal=null;t.fullPhotoCarousel=null;t.fullPhotoCarouselStatus=null;t.fullPhotoModalHeader=null;t.fullPhotoModalTitle=null;t.fullPhotoModalBody=null;t.fullPhotoModalFooter=null;t.fullPhotoModalLoaded=!1;t.fullPhotoCarouselWrap=null;t.currentPhotoIdx=0;t.fullNeighborhoodPhotoModal=null;t.fullNeighborhoodPhotoCarousel=null;t.fullNeighborhoodPhotoCarouselStatus=null;t.fullNeighborhoodPhotoModalHeader=null;t.fullNeighborhoodPhotoModalTitle=null;t.fullNeighborhoodPhotoModalBody=null;t.fullNeighborhoodPhotoModalFooter=null;t.fullNeighborhoodPhotoModalLoaded=!1;t.fullNeighborhoodPhotoCarouselWrap=null;t.currentNeighborhoodPhotoIdx=0;t.mapContainerId="mapCanvas";t.mapContainer=null;t.contactForm=null;t.submitButton=null;t.contactMessage=null;t.reCaptchaMessage=null;t.showFullDesc=null;t.shortDesc=null;t.fullDesc=null;init=function(){t.heroImage=n(".js-hero");t.heroVideo=n(".js-hero-video");t.navToggle=n(".js-navbar-toggle");t.navCollapse=n(".js-navbar-collapse");t.stickyNav=n(".js-sticky-nav");t.stickyNavHeight=t.stickyNav.outerHeight()-42;t.stickyNavLinks=t.stickyNav.find(".navbar-nav a");t.stickyNavScrollTo=t.stickyNavLinks.map(function(){var t=n(n(this).attr("href"));if(t.length)return t});t.fullPhotoModal=n("#fullSizePhotosModal");t.fullPhotoCarousel=n(".js-full-photo-carousel");t.fullPhotoCarouselStatus=n(".js-full-photo-status");t.fullNeighborhoodPhotoModal=n("#fullSizeNeighborhoodPhotosModal");t.fullNeighborhoodPhotoCarousel=n(".js-full-neighborhood-photo-carousel");t.fullNeighborhoodPhotoCarouselStatus=n(".js-full-neighborhood-photo-status");t.mapContainer=n("#mapCanvas");t.contactForm=n(".js-contact-form");t.submitButton=n(".js-form-submit");t.contactMessage=n(".js-form-message");t.reCaptchaMessage=n("#spsRecaptchaMessage");t.navToggle.click(function(){t.navCollapse.slideToggle();n("body").toggleClass("menu-open")});t.navCollapse.click(function(){t.navToggle.is(":visible")&&(t.navCollapse.slideToggle(),n("body").removeClass("menu-open"))});t.stickyNavLinks.click(function(i){var r=n(this).attr("href"),u=r==="#"?0:n(r).offset().top-t.stickyNavHeight+1;n("html, body").stop().animate({scrollTop:u},300);i.preventDefault()});initOpenHouseLiveVideo();n(".js-full-size-photo").on("click",function(i){if(t.currentPhotoIdx=n(i.target).data("idx")?parseInt(n(i.target).data("idx")):0,!t.fullPhotoModalLoaded){t.fullPhotoModalHeader=t.fullPhotoModal.find(".modal-header");t.fullPhotoModalTitle=t.fullPhotoModal.find("#fullSizePhotosModalLabel");t.fullPhotoModalBody=t.fullPhotoModal.find(".modal-body");t.fullPhotoModalFooter=t.fullPhotoModal.find(".modal-footer");t.fullPhotoCarouselWrap=t.fullPhotoModal.find(".carousel-wrap");t.fullPhotoCarousel.siSlick({slidesToShow:1,prevArrow:"#fullSizePhotosModal .js-prev",nextArrow:"#fullSizePhotosModal .js-next",fade:!0});t.fullPhotoCarousel.on("afterChange",function(n,i,r){t.fullPhotoCarouselStatus.html(r+1+"/"+i.slideCount)});t.fullPhotoModal.modal();t.fullPhotoModal.on("shown.bs.modal",function(){setFullPhotoCarouselWidth();t.fullPhotoCarousel.slick("slickGoTo",t.currentPhotoIdx)});t.fullPhotoModalLoaded=!0}t.fullPhotoModal.modal("show");setTimeout(function(){n(window).trigger("resize")},200)});n(".js-full-size-neighborhood-photo").on("click",function(i){if(t.currentNeighborhoodPhotoIdx=n(i.target).data("idx")?parseInt(n(i.target).data("idx")):0,!t.fullNeighborhoodPhotoModalLoaded){t.fullNeighborhoodPhotoModalHeader=t.fullNeighborhoodPhotoModal.find(".modal-header");t.fullNeighborhoodPhotoModalTitle=t.fullNeighborhoodPhotoModal.find("#fullSizeNeighborhoodPhotosModalLabel");t.fullNeighborhoodPhotoModalBody=t.fullNeighborhoodPhotoModal.find(".modal-body");t.fullNeighborhoodPhotoModalFooter=t.fullNeighborhoodPhotoModal.find(".modal-footer");t.fullNeighborhoodPhotoCarouselWrap=t.fullNeighborhoodPhotoModal.find(".carousel-wrap");t.fullNeighborhoodPhotoCarousel.siSlick({slidesToShow:1,prevArrow:"#fullSizeNeighborhoodPhotosModal .js-prev",nextArrow:"#fullSizeNeighborhoodPhotosModal .js-next",fade:!0});t.fullNeighborhoodPhotoCarousel.on("afterChange",function(n,i,r){t.fullNeighborhoodPhotoCarouselStatus.html(r+1+"/"+i.slideCount)});t.fullNeighborhoodPhotoModal.modal();t.fullNeighborhoodPhotoModal.on("shown.bs.modal",function(){setFullNeighborhoodPhotoCarouselWidth();t.fullNeighborhoodPhotoCarousel.slick("slickGoTo",t.currentNeighborhoodPhotoIdx)});t.fullNeighborhoodPhotoModalLoaded=!0}t.fullNeighborhoodPhotoModal.modal("show");setTimeout(function(){n(window).trigger("resize")},200)});initMap();n(".js-scroll-to").click(function(t){t.preventDefault();n(this).removeClass("hover");n("html,body").animate({scrollTop:n(this.hash).offset().top-62},400)});t.contactForm.validate({highlight:function(t){n(t).closest(".form-group").addClass("has-error")},unhighlight:function(t){n(t).closest(".form-group").removeClass("has-error")},errorElement:"div",errorClass:"contact-error-msg",errorPlacement:function(n,t){n.insertAfter(t)},rules:{Name:"required",Email:{required:!0,email:!0},Phone:{required:!0,siPhone:!0}},messages:{FirstName:"Please enter your name",Email:"Please enter a valid email address",Phone:"Please enter a valid phone number"}});t.showFullDesc=n(".js-show-full-desc");t.shortDesc=n(".js-short-desc");t.fullDesc=n(".js-full-desc");t.showFullDesc.click(function(n){n.preventDefault();t.shortDesc.addClass("hidden").removeClass("visible-xxs");t.fullDesc.removeClass("hidden-xxs")});t.contactForm.find('input[type="tel"]').length>0&&_siUtils.initPhoneValidation(t.contactForm.find('input[type="tel"]'));t.contactForm.find(":input[type=text], :input[type=email], :input[type=tel]").keypress(function(n){return _siUtils.handleKeyPress(n,function(){sendContactRequest()})});t.submitButton.on("click",function(){sendContactRequest()});_siUtils.truncateUserConsentDisclaimer(t.contactForm);n(window).on("resize",function(){t.fullPhotoModal.is(":visible")&&setFullPhotoCarouselWidth()});n(window).on("scroll",function(){scrollToSection()})};setFullPhotoCarouselWidth=function(){var i=t.fullPhotoModalHeader.outerHeight(),r=t.fullPhotoModalFooter.outerHeight(),u=window.innerHeight?window.innerHeight-5:n(window).height();n(".modal .slick-slide").css("height",u-i-r)};setFullNeighborhoodPhotoCarouselWidth=function(){var i=t.fullNeighborhoodPhotoModalHeader.outerHeight(),r=t.fullNeighborhoodPhotoModalFooter.outerHeight(),u=window.innerHeight?window.innerHeight-5:n(window).height();n(".modal .slick-slide").css("height",u-i-r)};scrollToSection=function(){var f=n(window).scrollTop()+t.stickyNavHeight,i=t.stickyNavScrollTo.map(function(){if(n(this).offset().top<f)return this}),r,u;i=i[i.length-1];r=i&&i.length?i[0].id:"";t.lastScrolled!==r&&(t.lastScrolled=r,t.stickyNavLinks.parent().removeClass("active").end().filter("[href='#"+r+"']").parent().addClass("active"));u=t.stickyNav.offset().top;u>400?t.stickyNav.addClass("scrolling"):t.stickyNav.removeClass("scrolling")};initMap=function(){var n,s,h;if(mapData.show)if(n=mapData.mapType==="GeneralArea",mapData.staticMap){var u=t.mapContainer.find("img"),f=u.attr("data-src"),e=11;n||(t.mapContainer.addClass("marker"),e=13);f+="&center="+mapData.lat+","+mapData.lon+"&zoom="+e;u.attr("src",f).attr("data-src","")}else{setMapContainerSize();var i=new google.maps.LatLng(mapData.lat,mapData.lon),o={zoom:n?11:13,center:i,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.Default,position:google.maps.ControlPosition.TOP_RIGHT},zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.DEFAULT,position:google.maps.ControlPosition.TOP_LEFT},mapTypeControl:!0,streetViewControl:!0,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1},r=new google.maps.Map(document.getElementById(t.mapContainerId),o);n||(s=new google.maps.Marker({map:r,position:i,icon:"/assets/layout2/images/marker-main-large.png"}));n&&(h=new google.maps.Circle({strokeColor:"#000000",strokeOpacity:.8,strokeWeight:2,fillColor:"#939393",fillOpacity:.4,map:r,center:i,radius:8046}));google.maps.event.addDomListener(window,"resize",function(){setMapContainerSize();google.maps.event.trigger(r,"resize");r.setCenter(i)})}};setMapContainerSize=function(){if(n(window).width()<768)t.mapContainer.height(n(window).height()*.8-20);else{var i=t.mapContainer.width()*.75;t.mapContainer.height(i>540?540:i)}};sendContactRequest=function(){var i,r,u,f;if(t.contactForm.valid()){if(t.reCaptchaMessage.hide(),!validCaptcha){t.reCaptchaMessage.html("Please complete reCAPTCHA below and click Submit button").show();return}t.submitButton.html('<i class="fa fa-circle-o-notch fa-fw fa-spin"><\/i> Please Wait...').prop("disabled",!0);t.contactMessage.removeClass("contact-error-msg contact-success-msg").empty().hide();i=t.contactForm.siSerializeObject();r=t.contactForm.find('[name="UserConsent"]');r.length>0&&(i.UserConsent=r.prop("checked"));t.contactForm.find('input[type="tel"]').length>0&&(u=_siUtils.getPhoneValue(t.contactForm.find('input[type="tel"]')),i.Phone=u.number,i.PhoneCountry=u.country);f=n("#g-recaptcha-response");f.length>0&&(i.siGRCToken=f.val());n.ajax({type:"POST",url:"/Home/SendContactRequest",data:JSON.stringify(i),async:!0,normalizeJSON:!1,evalResponse:!0,cache:!1,contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){n.ResponseCode==0?t.contactMessage.addClass("contact-success-msg").html("Your contact request was sent successfully!").show():t.contactMessage.addClass("contact-error-msg").html("An error occurred and your contact request could not be sent. Please try again.").show();t.submitButton.html("Submit").prop("disabled",!1);grecaptcha.reset();validCaptcha=!1;t.reCaptchaMessage.hide()},error:function(){t.submitButton.html("Submit").prop("disabled",!1);t.contactMessage.addClass("contact-error-msg").html("An error occurred and your contact request could not be sent. Please try again.").show();grecaptcha.reset();validCaptcha=!1;t.reCaptchaMessage.hide()}})}};initOpenHouseLiveVideo=function(){(t.openHouseLiveVideoContainer=n("#description .js-open-house-live-video"),t.openHouseLiveVideoContainer.length!==0)&&(t.openHouseLiveVideoPlaceholder=n("#description .js-open-house-live-video-placeholder"),t.openHouseLiveVideoDatetime=new Date(t.openHouseLiveVideoContainer.attr("data-datetime")+" UTC"),showOpenHouseLiveVideo(),t.openHouseLiveVideoTimer=setInterval(showOpenHouseLiveVideo,1e4))};showOpenHouseLiveVideo=function(){var i=new Date,n;t.openHouseLiveVideoDatetime<=i?(typeof t.openHouseLiveVideoTimer!="undefined"&&clearTimeout(t.openHouseLiveVideoTimer),t.openHouseLiveVideoPlaceholder.hide(),t.openHouseLiveVideoPlaceholder.removeAttr("data-time"),t.openHouseLiveVideoContainer.show()):(n=t.openHouseLiveVideoDatetime-i,n=Math.round(n/6e4),n<=15&&(t.openHouseLiveVideoPlaceholder.show(),t.openHouseLiveVideoPlaceholder.attr("data-time",n<=1?".":", in "+n+" minutes.")))};init()}})(jQuery)