function GetMediaQuery(){return currentMediaQuery=$(".mq640").css("display")!="none"?"640":$(".mq767").css("display")!="none"?"767":$(".mq968").css("display")!="none"?"968":"desktop"}function lazyLoadFlexsliderStart(n,t){var r=n.count-1,i=t?"img.lazy":"img.lazy:eq(0)";n.find(i).each(function(){var n=$(this).attr("data-src");$(this).attr("src",n).removeAttr("data-src")});n.find(".flex-control-paging a").empty()}function lazyLoadFlexsliderBefore(n){var u=n.slides,i=n.animatingTo,r=$(u[i]),o=r.find("img[data-src]"),t=i,f=t+1,e=t-1;r.parent().find("img.lazy:eq("+t+"), img.lazy:eq("+e+"), img.lazy:eq("+f+")").each(function(){var n=$(this).attr("data-src");$(this).attr("src",n).removeAttr("data-src")})}function lastNav(){$(".mainNavLiItem:visible").last().addClass("lastMainNavItem");$(".secondaryNavLink:visible").last().addClass("lastSecondaryNavLink");$(".topLinks li:visible").last().addClass("lastVisibleNavItem");$(".footerNav li:visible").last().addClass("lastVisibleNavItem")}function calloutRowCount(){$(".calloutRow").each(function(){var n="columns";n+=$(this).children(".callout").length;$(this).addClass(n)})}function updateGalleryStart(n){n.is(".rightThumbnails, .leftThumbnails")?n.find(".flex-control-thumbs").insertAfter(n).addClass("sideThumbs"):n.hasClass("topThumbnails")&&n.find(".flex-control-thumbs").prependTo(n);n.find(".flex-direction-nav").appendTo(n.find(".flex-viewport"))}function customForms(n,t){n.each(function(){var n=$(this),t,i;n.wrap('
');n.after("<\/span><\/span>");t=n.children("option:selected").text();n.next(".selecttext").text(t);n.change(function(){var t=n.children("option:selected").text();n.hasClass("sortDropDown")&&n.children("option:selected").trigger("click");n.closest("#NealContactForm").length>0||n.closest("#NealRealtorForm").length>0||n.closest("#GehanVIPForm").length>0?n.parent().find(".selecttext").text(t):n.next(".selecttext").text(t)});$(".ie9, .lt-ie9").length>0&&(i=n.outerWidth(),n.css({"padding-right":"0","padding-left":"0"}).width(i))});n.on("focusin",function(){$(this).parent().addClass("focused")}).on("focusout",function(){$(this).parent().removeClass("focused")});t&&($('input[type="radio"], input[type="checkbox"] ').uniform(),$("input, textarea").placeholder())}function showCalcAfter(){customForms($("#MortgageTerm"),!1)}function multiSelect(){var n=$(".multiple-select");if(n.length){n.each(function(){var n=$(this),t=n.data("label-text")!=undefined?n.data("label-text"):"",i="All "+t,r="Select All "+t,u=i+" Selected";n.multiselect({includeSelectAllOption:!0,selectAllText:r,nonSelectedText:i,allSelectedText:u,onInitialized:function(n,t){var i=t.find(".multiselect-container");t.find(".dropdown-toggle").on("click",function(n){n.preventDefault();$(this).next().toggle();$(this).next().focus()})}})});$(document).on("mouseup",function(n){var t=$(".multiselect-native-select .btn-group");t.each(function(){var t=$(this);t.is(n.target)||t.has(n.target).length!==0||t.find(".multiselect-container").hide()})})}}function searchFilterDatePicker(){$("#searchFilterDatepicker").datepicker({beforeShow:function(){var n=$("#ui-datepicker-div");n.addClass("bdxSearchFilterCalendar")},firstDay:1,minDate:1})}function adjustIframes(){$("iframe[src*='player.vimeo.com'],iframe[src*='youtube.com'], frame[src*='youtube-nocookie.com'], iframe[src*='kickstarter.com'][src*='video.html'], .featureVideo iframe").each(function(){var u;$(this).parent().hasClass("calloutEmbedHolder")&&$(this).css("width","100%");var n=$(this),r=n.attr("width"),t=n.attr("height")/r,i=n.width();n.data("proportion",t);i!=r?n.css({height:Math.round(i*t)+"px","max-width":"100%",margin:"0"}):(n.css({"max-width":"100%"}),u=n.width(),n.css({height:Math.round(i*t)+"px",margin:"0"}))})}function transparentIframe(){$("iframe[src*='player.vimeo.com'],iframe[src*='youtube.com'], frame[src*='youtube-nocookie.com'], iframe[src*='kickstarter.com'][src*='video.html'], .featureVideo iframe").each(function(){var n=$(this).attr("src");n.indexOf("output=embed")===-1&&(n=n.indexOf("?")>=0?n+"&wmode=transparent":n+"?wmode=transparent",$(this).attr({src:n,wmode:"Opaque"}))})}function fancyboxOnUpdateAjax(){adjustIframes()}function fancyboxAfterLoadIframe(){adjustIframes();window.setTimeout(function(){$.fancybox.update()},750)}function fancyboxOnUpdate(){adjustIframes();window.setTimeout(function(){$(".fancybox-iframe").hasClass("fancyboxUpdated")||($(".fancybox-iframe").addClass("fancyboxUpdated"),$.fancybox.update())},750)}function updateIframeMobile(){var n=$("body").outerWidth();$(".fancybox-overlay-fixed").css("maxWidth",n);$(".fancybox-type-iframe").css("left","20px");$(".fancybox-iframe").removeClass("fancyboxUpdated");$.fancybox.update();$.fancybox.reposition()}function sameHeightCommunityListing(){var r=0,n=0,t=0,i=0;$(".searchListings .comm").each(function(){var u=$(this),f;u.css("height","").next().css("height","").next().css("height","");r=u.outerHeight();t=u.next().children("li:first-child").outerHeight();i=u.next().children("li:nth-child(2)").outerHeight();f=[r,t,i];n=Math.max.apply(null,f);u.height(n).next().children("li:first-child").height(n).next().height(n)});$(".ie9, .lt-ie9").length>0&&$(".listColumns2, .favoritesHomeWrapper.listColumns3 ").each(function(){$(this).children().length>2&&$(this).children("li:nth-child(2n+3)").each(function(){var r=$(this),u;r.addClass("ie-only").css("height","").next().addClass("ie-only-next").css("height","");t=r.outerHeight();i=r.next().outerHeight();u=[t,i];n=Math.max.apply(null,u);r.height(n).next().height(n)})})}function resizeDetailVideo(){$(".videoModal .divModal > div").height("").width("");$(".videoModal .divModal object, .videoModal .divModal iframe").each(function(){var n=$(this),t;n.css({"max-width":"100%",margin:"0"});var i=n.attr("width"),r=n.attr("height")/i,u=$(".videoModal .divModal").width();n.data("proportion",r);u!=i&&(t=Math.round(u*r),n.css({height:t+"px","max-width":"100%",margin:"0"}),$(this).parent().height(t).parent().height(t))})}function scrollToTop(){$("#backToTop").on("click",function(){return $("html, body").animate({scrollTop:0},"slow"),!1})}function bdxJumpLinks(){$("#mapJumpLink").on("click",function(){loadAllImageOnLinkAnchor();var n=$(".directionsSection").offset();$("html, body").animate({scrollTop:n.top},1e3)});$("#plansJumpLink").on("click",function(){loadAllImageOnLinkAnchor();var n=$("#plansJumpLocation").offset();$("html, body").animate({scrollTop:n.top},1e3)});$("#plansJumpLinkComm").on("click",function(){loadAllImageOnLinkAnchor();var n=$("#plansJumpLocationComm").offset();$("html, body").animate({scrollTop:n.top},1e3)});$("#amenitiesJumpLink").on("click",function(){loadAllImageOnLinkAnchor();var n=$("#amenitiesJumpLocation").offset();$("html, body").animate({scrollTop:n.top},1e3)});$("#qmisJumpLink").on("click",function(){loadAllImageOnLinkAnchor();var n=$("#qmisJumpLocation").offset();$("html, body").animate({scrollTop:n.top},1e3)})}function updateBrowser(){if($(".lt-ie9").length>0)$("body").css("padding-top","40px").prepend("Sorry, an error occurred. Please try again later.<\/p>"):$("div.fancybox-inner .serverErrors").html("
Sorry, an error occurred. Please try again later.<\/p>"),t.hide(),r.removeAttr("disabled")},error:function(){t.hide();$("div.fancybox-inner").html("
Sorry, an error occurred. Please try again later.<\/p>");$.fancybox.update()}})}return!1}function ShowSignInModal(n){return signinRedirect="",n&&n.length>0&&(signinRedirect=n),$.fancybox({href:"/StandardModalSignIn",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!0,scrolling:!1,afterShow:function(){validateSignInForm();updatePlaceholderText()}}),!1}function ShowSignInModalMyFolder(){return signinRedirect="",$.fancybox({href:"/StandardModalSignIn",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!0,scrolling:!1,afterShow:function(){validateSignInForm();updatePlaceholderText();$("form#SignInForm").submit(SubmitSignInFormMyFolder);modalLoadEvent.RaiseEvent(this,"SignInForm")},afterClose:function(){self.location="../401-unauthorized.aspx"}}),!1}function ShowSignInModalSaveCommunity(){return signinRedirect="",$.fancybox({href:"/StandardModalSignIn",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!0,scrolling:!1,afterShow:function(){validateSignInForm();updatePlaceholderText();$("form#SignInForm").submit(SubmitSignInFormCommunity);modalLoadEvent.RaiseEvent(this,"SignInForm")}}),!1}function ShowSignInModalSaveHome(){return signinRedirect="",$.fancybox({href:"/StandardModalSignIn",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!0,scrolling:!1,afterShow:function(){validateSignInForm();updatePlaceholderText();$("form#SignInForm").submit(SubmitSignInFormHome);modalLoadEvent.RaiseEvent(this,"SignInForm")}}),!1}function SubmitSignInForm(n){return $.ajax({type:"POST",url:"/ex2webarchitect/account/signin",data:$(n).serialize(),success:function(t){if(t.IsSuccess){DisplayPersonalization(!0);UpdateGlobalPersonalization(t.FirstName);var i=new UpdatePagePersonalizationEventArgs(!0);updatePagePersonalizationEvent.RaiseEvent(n,i);UpdateSaveLinks();UpdateGlobalAlternativeLogin();UpdateMobileLogin();signinRedirect!=""&&(parent.location.href=signinRedirect);$.fancybox.close()}else $(".loginError p").text(t.Error),$.fancybox.update()}}),!1}function validateSignInForm(){$(".formLoginArea").validate({rules:{EmailAddress:{required:!0,email:!0},Password:{required:!0}},submitHandler:function(n){SubmitSignInForm(n)}})}function SubmitSignInFormCommunity(){return $.ajax({type:"POST",url:"/ex2webarchitect/account/signin",data:$(this).serialize(),success:function(n){if(n.IsSuccess){DisplayPersonalization(!0);UpdateGlobalPersonalization(n.FirstName);var t=new UpdatePagePersonalizationEventArgs(!0);updatePagePersonalizationEvent.RaiseEvent(this,t);UpdateGlobalAlternativeLogin();UpdateMobileLogin();$.fancybox.update();SaveCommunityToSavedItems(builderId,communityId,siteMarketId);$.fancybox.close()}else $(".loginError p").text(n.Error),$.fancybox.update()}}),!1}function SubmitSignInFormHome(){return $.ajax({type:"POST",url:"/ex2webarchitect/account/signin",data:$(this).serialize(),success:function(n){if(n.IsSuccess){DisplayPersonalization(!0);UpdateGlobalPersonalization(n.FirstName);var t=new UpdatePagePersonalizationEventArgs(!0);updatePagePersonalizationEvent.RaiseEvent(this,t);UpdateGlobalAlternativeLogin();UpdateMobileLogin();$.fancybox.update();SaveHomeToSavedItems(builderId,communityId,planId,specificationId,siteMarketId);$.fancybox.close()}else $(".loginError p").text(n.Error),$.fancybox.update()}}),!1}function SubmitSignInFormMyFolder(){return $.ajax({type:"POST",url:"/ex2webarchitect/account/signin",data:$(this).serialize(),success:function(n){n.IsSuccess?location.reload():($(".loginError p").text(n.Error),$.fancybox.update())}}),!1}function RegisterCommunityPageEventHandlers(){updatePagePersonalizationEvent.AddEvent(function(n,t){t.IsAuthenticated&&$.ajax({type:"POST",url:"/ex2webarchitect/account/GetSavedItemStatus",data:{builderId:builderId,communityId:communityId},success:function(n){n.IsSaved?$("div#SaveCommunity").html(savedCommunityHtml):$("div#SaveCommunity").html(String.format('{2}<\/a>',builderId,communityId,saveCommunityHtml))}})})}function ShowForgotPasswordModal(){return $.fancybox({href:"/StandardModalForgotPassword",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!0,afterShow:function(){updatePlaceholderText();validatePasswordRetrieval()}}),!1}function SubmitForgotPasswordForm(n){return $.ajax({type:"POST",url:"/ex2webarchitect/account/forgotpassword",data:$(n).serialize(),success:function(n){n.IsSuccess?($(".formForgotPassword").html('Your password has been sent to your email address. <\/span>'),$.fancybox.update()):$(".formForgotPassword span.error").length===0&&($(".formForgotPassword").append('This email address cannot be found in our system.<\/span>'),$.fancybox.update())},error:function(){$(".formForgotPassword span.error").length===0&&($(".formForgotPassword").append('test This email address cannot be found in our system.<\/span>'),$.fancybox.update())}}),!1}function validatePasswordRetrieval(){$(".formForgotPassword").validate({rules:{EmailAddress:{required:!0,email:!0}},submitHandler:function(n){SubmitForgotPasswordForm(n)}})}function ShowRegisterModal(){return $.fancybox({href:"/StandardModalRegister",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!0,afterShow:function(){validateRegisterForm();updatePlaceholderText()}}),!1}function validateRegisterForm(){$(".registerForm").validate({rules:{EmailAddress:{required:!0,email:!0},ConfirmEmailAddress:{equalTo:".registerForm #EmailAddress"},FirstName:"required",LastName:"required",Password:"required",ConfirmPassword:{equalTo:".registerForm #Password"}},submitHandler:function(n){SubmitRegisterForm(n)}})}function SubmitRegisterForm(n){return preventDoubleSubmit(n)&&$.ajax({type:"POST",url:"/ex2webarchitect/account/register",data:$(n).serialize(),success:function(t){if(typeof unlockForm!="undefined"&&unlockForm(),t.IsSuccess){DisplayPersonalization(!0);UpdateGlobalPersonalization(t.FirstName);var i=new UpdatePagePersonalizationEventArgs(!0);updatePagePersonalizationEvent.RaiseEvent(n,i);$("div.fancybox-inner").html(t.Response);UpdateSaveLinks();UpdateGlobalAlternativeLogin();UpdateMobileLogin();$.fancybox.close()}else $(".registerError p").text(t.Error),$.fancybox.update()}}),!1}function SubmitFacebookLogin(n){return $.ajax({type:"POST",url:"/ex2webarchitect/account/facebooklogin",data:n,success:function(n){if(console.log("FB login result",n),n.IsSuccess){DisplayPersonalization(!0);UpdateGlobalPersonalization(n.FirstName);var t=new UpdatePagePersonalizationEventArgs(!0);updatePagePersonalizationEvent.RaiseEvent($("body"),t);$("div.fancybox-inner").html(n.Response);UpdateSaveLinks();UpdateGlobalAlternativeLogin();UpdateMobileLogin();$.fancybox.close()}else $(".registerError p").text(n.Error),$.fancybox.update()}}),!1}function validateMortgageCalculatorForm(){jQuery.validator.addMethod("notEqualZero",function(n,t,i){return this.optional(t)||n!=i},"Invalid number cannot be 0.");$("#MortgageCalculatorForm").validate({rules:{PurchasePrice:{required:!0,number:!0},DownPayment:{required:!0,number:!0},AnnualInterestRate:{required:!0,number:!0,notEqualZero:"0"},MortgageTerm:{required:!0,number:!0},AnnualPropertyTax:{number:!0},AnnualPropertyInsurance:{number:!0}},submitHandler:function(n){SubmitMortgageCalculatorForm(n)}});$("#CalloutMortgageCalculatorForm").validate({rules:{PurchasePrice:{required:!0,number:!0},DownPayment:{required:!0,number:!0},AnnualInterestRate:{required:!0,number:!0,notEqualZero:"0"},MortgageTerm:{required:!0,number:!0},AnnualPropertyTax:{number:!0},AnnualPropertyInsurance:{number:!0}},submitHandler:function(n){SubmitMortgageCalculatorForm(n)}})}function ShowMortgageCalculatorModal(n,t,i){return $.fancybox({href:"/StandardModalMortgageCalculator",type:"ajax",minWidth:300,autoResize:!0,scrollOutside:!1,fitToView:!1,afterShow:function(){$("#PurchasePrice").val(n);validateMortgageCalculatorForm();$("#calculate-button").attr("data-event-code",t);$("#calculate-button").attr("data-event-action",i);$("#calculate-button").on("click",function(){bdxApiLogging.logEvent($("#calculate-button"))});updatePlaceholderText();typeof showCalcAfter=="function"&&showCalcAfter()}}),!1}function SubmitMortgageCalculatorForm(n){var i;if(preventDoubleSubmit(n)){var u=$(n).attr("action"),r=$("form#MortgageCalculatorForm"),t=$(document.createElement("div"));t.attr("id","blockDiv");t.attr("style","float:right");t.html(' "+r.Response+"<\/p>"),t.hide(),i.removeAttr("disabled"),$.isFunction(window.submitMortgageCaclulatorComplete)&&submitMortgageCaclulatorComplete())},error:function(){t.hide();$(n).find("#calcResult").not(".customFinishingMessage").empty().prepend(" Sorry, an error occurred. Please try again later.<\/p>");i.removeAttr("disabled");$.isFunction(window.submitMortgageCaclulatorComplete)&&submitMortgageCaclulatorComplete()}})}return!1}function ShowVideo(n){ShowVideoModal(n)}function ShowVideoModal(n){n!=null||n!=""?$.fancybox({href:"http://players.brightcove.net/689254969001/default_default/index.html?autoplay=true&videoId=ref:"+n,type:"iframe",autoResize:!0,width:486,height:412,scrollOutside:!1,fitToView:!0,wrapCSS:"videoModal",afterShow:function(){$(".videoModal .fancybox-inner > div").wrap('
Processing...');i=r.find(".ModalButtonEstimatePayment");i.attr("disabled","disabled");r.after(t);$.ajax({type:"POST",url:u,data:$(n).serialize(),dataType:"json",success:function(r){r.IsSuccess?($(n).find("#calcResult").not(".customFinishingMessage").empty().prepend('Your estimated monthly payment is .<\/span><\/span>').append('This is only an estimate. Please contact a qualified professional for additional information.'),$(n).find("#calcResult .mortgagePaymentEstimate").prepend(r.Response),t.hide(),i.removeAttr("disabled"),$.isFunction(window.submitMortgageCaclulatorComplete)&&submitMortgageCaclulatorComplete()):($(n).find("#calcResult").not(".customFinishingMessage").empty().prepend("
Processing...'),$(n).after(t),i=$(n).attr("action"),$.ajax({type:"POST",url:i,data:$(n).serialize(),dataType:"json",success:function(n){$(".nealContactForm").html(n==null?"Successfully submitted!":n);t.hide()},error:function(){}}))}function validateNealContactForm(n){typeof n=="undefined"&&(n=$("#NealContactForm"));$.validator.addMethod("phone",function(n){return/^$|^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(n)},"Please enter a valid phone number.");n.validate({rules:{FirstName:"required",LastName:"required",Email:{required:!0,email:!0},PhoneNumber:{phone:!0},CommunityOfInterest:"required",WhatBestDefinesYou:"required"},submitHandler:function(n){return SubmitContactForm(n),!1}})}function SubmitRealtorForm(n){var t,i;preventDoubleSubmit(n)&&(t=$(document.createElement("div")),t.attr("id","blockDiv"),t.attr("style","clear:both; margin-top:5px;"),t.html('
Processing...'),$(n).after(t),i=$(n).attr("action"),$.ajax({type:"POST",url:i,data:$(n).serialize(),dataType:"json",success:function(n){$(".nealRealtorForm").html(n==null?"Successfully submitted!":n);t.hide()},error:function(){}}))}function validateNealRealtorForm(n){typeof n=="undefined"&&(n=$("#NealRealtorForm"));$.validator.addMethod("phone",function(n){return/^$|^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(n)},"Please enter a valid phone number.");n.validate({rules:{FirstName:"required",LastName:"required",Email:{required:!0,email:!0},PhoneNumber:{phone:!0},CommunityOfInterest:"required",WhatBestDefinesYou:"required"},submitHandler:function(n){return SubmitRealtorForm(n),!1}})}function SubmitVIPForm(n){var t,i;preventDoubleSubmit(n)&&(t=$(document.createElement("div")),t.attr("id","blockDiv"),t.attr("style","clear:both; margin-top:5px;"),t.html('
Processing...'),$(n).after(t),i=$(n).attr("action"),$.ajax({type:"POST",url:i,data:$(n).serialize(),dataType:"json",success:function(n){$(".gehanVIPForm").html(n==null?"Successfully submitted!":n);t.hide()},error:function(){}}))}function validateGehanVIPForm(n){typeof n=="undefined"&&(n=$("#GehanVIPForm"));$.validator.addMethod("phone",function(n){return/^$|^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(n)},"Please enter a valid phone number.");n.validate({rules:{FirstName:"required",LastName:"required",Email:{required:!0,email:!0},Phone:{phone:!0},ProjectId:"required"},submitHandler:function(n){return SubmitVIPForm(n),!1}})}function bindLinkImageOnHover(){$("a.calloutLinkImage").mouseenter(function(){$(this).find(".linkImageHover").length>0&&($(this).find(".linkImageHover").show(),$(this).find(".linkImage").hide())});$("a.calloutLinkImage").mouseleave(function(){$(this).find(".linkImageHover").hide();$(this).find(".linkImage").show()});$("a.footer9Section1").mouseenter(function(){$(this).find(".footer9Section1ImageHover").length>0&&($(this).find(".footer9Section1ImageHover").show(),$(this).find(".footer9Section1Image").hide())});$("a.footer9Section1").mouseleave(function(){$(this).find(".footer9Section1ImageHover").hide();$(this).find(".footer9Section1Image").show()});$("a.footer9Section2").mouseenter(function(){$(this).find(".footer9Section2ImageHover").length>0&&($(this).find(".footer9Section2ImageHover").show(),$(this).find(".footer9Section2Image").hide())});$("a.footer9Section2").mouseleave(function(){$(this).find(".footer9Section2ImageHover").hide();$(this).find(".footer9Section2Image").show()})}function bindTabLayout(){var n=!1;$("ul.nav-tabs").each(function(){var t,i,r=$(this).find("a");t=$(r[0]);i=$(t[0].hash);$(this).on("click","a",function(r){t.removeClass("active");i.hide();t=$(this);i=$(this.hash);t.addClass("active");i.show();sameHeightDetailListings();r.preventDefault();$(this).attr("href")!="#direction"||n||(n=!0,ex2Map.addDrivingDirectionsMap(),ex2Map.DisableScrolling())})});$(".sortDropDown").click(function(){setTimeout(function(){$("ul.xCommunityHomesWrappercustom_plan_homes").find("li:visible").appendTo("ul.xCommunityHomesWrappercustom_plan_homes");$("ul.xCommunityHomesWrappercustom_available_now_homes").find("li:visible").appendTo("ul.xCommunityHomesWrappercustom_available_now_homes")},1200)});$(".all").click(function(){$("#xCommunityHomesWrappercustom_plan_homes").show();$("#xCommunityHomesWrappercustom_available_now_homes").show();$(".innerTab a").removeClass("active");$(".innerTab li a.all").addClass("active");$("#communityDetailsHomeListings .hrStyles").show();sameHeightDetailListings()});$(".plans").click(function(){$("#xCommunityHomesWrappercustom_plan_homes").show();$("#xCommunityHomesWrappercustom_available_now_homes").hide();$(".innerTab a").removeClass("active");$(".innerTab li a.plans").addClass("active");$("#communityDetailsHomeListings .hrStyles").hide();sameHeightDetailListings()});$(".qmis").click(function(){$("#xCommunityHomesWrappercustom_plan_homes").hide();$("#xCommunityHomesWrappercustom_available_now_homes").show();$(".innerTab a").removeClass("active");$(".innerTab li a.qmis").addClass("active");sameHeightDetailListings()})}function bindListingGallery(){var n=$("#lightgallery");if(n.length>0){n.lightGallery();n.on("onSlideItemLoad.lg",function(){if($(".fancyboxSocial .facebook").length)$(".fancyboxSocial .facebook").on("click",function(){var n=document.location.protocol+"//"+document.location.hostname+document.location.pathname;n+="?galleryImage="+$(this).data("image-id");addthis.update("share","url",n);addthis.update("share","title",$(this).data("title"));addthis.update("share","description",$(this).data("description"));addthis.update("share","media",$(this).data("image"));$("#facebookTrigger").trigger("click")})})}}function bindButtonEvent(){var n,t;$("#hide-directions-button").length>0&&$("#hide-directions-button").click(function(){$("#message-get-driving-direction").show();$("#directions-address-error").css("margin-top","0")});$(".btnContainer").find("button").click(function(){ClearLocalStorage()});$(".stickyHeader").length>0&&(n=$("#siteHeader").height(),$(".siteHeader8").length>0&&(n+=$(".navDropdown").height()),$(".siteHeader4").length>0?(n=0,$("#bodyContainer").css("margin-top",n)):$(".siteHeader2").length>0?$(".mainFeature div[class*=feature]").length>0?$("#bodyContainer").css("margin-top",0):$("#bodyContainer").css("margin-top",n+10):$(".siteHeader6").length>0?$(".mainFeature").css("min-height",n+10):$(".siteHead12").length>0?(t=n,$(".stayInformedStyles").length>0&&(t+=$(".stayInformedStyles").height()),$("#bodyContainer").css("margin-top",t)):$(".siteHeader1").length>0?(t=n+$("#navigation").height(),$("#bodyContainer").css("margin-top",t)):$(".siteHeader5").length>0||$("#bodyContainer").css("margin-top",n));$(".stayInformedFormStickyFooter9").length>0&&$("#footerSecFour").css("padding-bottom",$(".stayInformedFormStickyFooter9").height());$(".siteFooter9").length==0&&($(".stayInformedFormStickyHeader12").length>0?$(".siteHeader2").length>0?$(window).outerWidth()<=1024?$("#siteHeader").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$("#bodyContainer").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$(".siteHeader1").length>0?$(window).outerWidth()<=1024?$("#navigation").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$("#siteHeader").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$(".siteHeader4").length>0?($("#siteHeader").css("margin-top",$(".stayInformedFormStickyHeader12").height()),$(window).outerWidth()>1024&&$("#bodyContainer").css("margin-top",$(".stayInformedFormStickyHeader12").height())):$(".siteHeader5").length>0||$("#siteHeader").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$(".stayInformedStyles").length>0&&($(".siteHeader1").length>0?$(window).outerWidth()<=1024&&$("#navigation").css("margin-top",$(".stayInformedStyles").height()+25):$(".siteHeader3").length>0?$(".siteHeader3").css("position","relative"):$(".siteHeader4").length>0?$(window).outerWidth()>1024&&$("#siteHeader").css("margin-top",$(".stayInformedStyles").height()+25):$(".siteHeader7").length>0||$(".siteHeader9").length>0||$(".siteHeader10").length>0||$(".siteHeader11").length>0||$(".siteHeader12").length>0||$("#siteHeader").css("margin-top",$(".stayInformedStyles").height()+25)));$(".moreLessDiv").length>0&&$(".moreLessFilter").click(function(){var n=$(".moreLessDiv");n.css("display")=="none"?(n.show(),$(this).find("a#lessFilter").show(),$(this).find("a#moreFilter").hide()):(n.hide(),$(this).find("a#moreFilter").show(),$(this).find("a#lessFilter").hide())})}function stopMuliformSubmissionContourForm(){var n=!1;$(".contour form").submit(function(t){var i=$(".contour form").validate();n&&(t.preventDefault?t.preventDefault():t.returnValue=!1);i.errorList.length==0&&(n=!0)})}function qmiMarketTabs(){$("#qmi-market-tabs li").live("click",function(){var t=$(this),n;$("#qmi-market-tabs li").removeClass("active");t.addClass("active");n=t.data("filter");n==0?$(".bdxSearchResults .commGroup").show():($(".bdxSearchResults .commGroup").hide(),$(".bdxSearchResults .commGroup[data-market='"+n+"']").show())});$("#qmi-market-tabs-sorting").live("click",function(){var i=$(this),n=$(".bdxSearchResults"),t;i.hasClass("city")?(t=n.find(".commGroup").sort(function(n,t){return String($(n).data("city")+","+$(n).data("community")).localeCompare(String($(t).data("city")+","+$(t).data("community")))}),n.empty().append(t),$("#qmi-market-tabs-sorting .sortCommunity").show(),$("#qmi-market-tabs-sorting .sortCity").hide(),i.removeClass("city")):(t=n.find(".commGroup").sort(function(n,t){return String($(n).data("community")).localeCompare(String($(t).data("community")))}),n.empty().append(t),$("#qmi-market-tabs-sorting .sortCommunity").hide(),$("#qmi-market-tabs-sorting .sortCity").show(),i.addClass("city"))})}function scrollOnIframe(n){$("."+n).removeClass("scrolloff")}function scrollOffIframe(n){$("."+n).addClass("scrolloff")}function showCommunityPromoModal(){if($(".autoPromoModal .promoAndEvents .promotions").length){var n="communityPopupDisplayed"+$(".communityDetailPage").data("community-id"),t=sessionStorage.getItem(n);t==null&&(displayInModalInline("#promoModal"),sessionStorage.setItem(n,"true"))}}function updateMainSliderStart(n){n.find(".flex-control-nav").length>0?(n.find(".flex-control-nav").wrap('