function pageSetup(){var t=$(window).height(),i=$(window).width(),r=450,n,u;$("#is-agent-site").val()&&(r=500);n=$("#hasFetLis").html();u=t-$("#pageheader").height()-$(".hp").height();i<=768?($(".search_container, .search").css("height",r+"px"),n=="False"?($("#bottom-fixed-subnav").css("height","0"),$("#bottom-fixed-subnav").hide()):($("#bottom-fixed-subnav").css("height",$("#is-facelift").val()=="1"?"auto":"320px"),$("#bottom-fixed-subnav").css("padding-left","8%"),$("#bottom-fixed-subnav").css("padding-right","8%"),$("#bottom-fixed-subnav").css("padding-top",$("#is-facelift").val()=="1"?"0":"8%"))):($(".search_container, .slideshow, .search").css("height",u+"px"),t<=768?($(".scroll-arrow-container").show(),$("#bottom-fixed-subnav").show(),n=="False"?$("#bottom-fixed-subnav").css("height","0"):($("#bottom-fixed-subnav").css("height",$("#is-facelift").val()=="1"?"auto":"360px"),$("#bottom-fixed-subnav").css("padding-left","8%"),$("#bottom-fixed-subnav").css("padding-right","8%"))):($(".scroll-arrow-container").show(),$("#bottom-fixed-subnav").show(),n=="False"?$("#bottom-fixed-subnav").css("height","70px"):(i<=1e3?$("#bottom-fixed-subnav").css("height",$("#is-facelift").val()=="1"?"auto":"360px"):$("#bottom-fixed-subnav").css("height",$("#is-facelift").val()=="1"?"auto":"300px"),$("#bottom-fixed-subnav").css("padding-left","4%"),$("#bottom-fixed-subnav").css("padding-right","4%"))),t<=700?$("#home-find-executives").hide():$("#home-find-executives").show());$(".h1-lets-find").quickfit({min:24,max:40})}function searchAgentsOrOffices(n){var t=$("#search-string").val().trim();$("#frmAgentSearch input#address").val(t);$("#frmAgentSearch").attr("action","../"+n);$("#frmAgentSearch").submit()}function mobileViewSearch(){var n=$(window).width();n<=768&&$("#viewmap_submit").click()}function GoldenRetriever(n){for(var v=n.fadeInDelay?n.fadeInDelay:600,t=1,e,y=n.interval?n.interval:8e3,i=n.photoArray,o=i.length,s=[],h=0;h<o;h++)s.push(5);var u=n.focusArray?n.focusArray:s,r=n.baseUrl,f={1:"left top",2:"center top",3:"right top",4:"left center",5:"center center",6:"right center",7:"left bottom",8:"center bottom",9:"right bottom"},c=function(n){clearInterval(e);$("#home-photo-gallery2").css("background-image","url("+r+i[t-1]+")");$("#home-photo-gallery2").css("background-position",f[u[t-1]]);$("#home-photo-gallery-btn-"+t).removeClass("home_gallery3");t=n;$("#home-photo-gallery1").hide();$("#home-photo-gallery1").css("background-image","url("+r+i[t-1]+")");$("#home-photo-gallery1").css("background-position",f[u[t-1]]);$("#home-photo-gallery-btn-"+t).addClass("home_gallery3");$("#home-photo-gallery1").fadeIn(v);l()},l=function(){var n=t;e=setInterval(function(){n++;n=n>o?1:n;c(n)},y)},a=function(n){$(".home_gallery1").height($(".slideshow").height());$(".home_gallery1").width($(".slideshow").width());$("#home-photo-gallery1, #home-photo-gallery2").css("background-image","url("+r+i[n-1]+")");$("#home-photo-gallery1, #home-photo-gallery2").css("background-position",f[u[t-1]])},p=function(){for(var n=0;n<i.length;n++)$("<img />").attr("src",r+i[n])};$(document).ready(function(){a(t);$(window).resize(function(){a(t)});$("#home-photo-gallery-btn-"+t).addClass("home_gallery3");l();$(".home_gallery2").on("click",function(){var n=this.id.split("-");c(n[n.length-1])});p()})}var AutoCompleteSearchRequest=null;$(document).ready(function(){var n,t,i,r;pageSetup();$("#home-page-image-array-type").val()&&(t=$("#home-page-image-array").val().split(","),n="https://static1.realtyexecutives.com/site-files/",i={interval:8e3,fadeInDelay:600,photoArray:t,baseUrl:n},r=new GoldenRetriever(i));$(window).resize(function(){pageSetup()});$("#min-price-range").change(function(){var n=$("#min-price-range").val(),t=$("#max-price-range").val();n!=""&&t!=""&&parseInt(n)>parseInt(t)&&($("#min-price-range").val(t),$("#max-price-range").val(n))});$("#max-price-range").change(function(){var n=$("#min-price-range").val(),t=$("#max-price-range").val();n!=""&&t!=""&&parseInt(t)<parseInt(n)&&($("#min-price-range").val(t),$("#max-price-range").val(n))});$("#is-agent-site").val()&&$("#agent-only-search").show()})