function scrollToTop(){return $("html, body").animate({scrollTop:0},"slow"),!1}function styleAllButtons(){$("button, input:submit, #appMenuButtons .appMenuButton, .appButton").button().css("font-size","75%")}function styleWall(){$("#wallPagination .pagination a").attr("data-remote","true");var a=parseInt($("#current_server_time").attr("title"));$.timeago.offsetMillis=(new Date).getTime()-(isNaN(a)?(new Date).getTime():a*1e3),$.timeago.now=function(){return(new Date).getTime()+$.timeago.offsetMillis},$("abbr.timeago").timeago()}function styleProperties(){$(".propertyListing").button().click(function(){var a=$(this).find('a.propertyThumb[href^="'+window.location.host+'"]').attr("href");return a?(window.location=a,!1):(a=$(this).find('a.propertyThumb[href^="/"]').attr("href"),a?(window.location=a,!1):(a=$(this).find("a.propertyThumb").attr("href"),a&&window.open(a,"_blank"),!1))})}function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage:"en",autoDisplay:!1,layout:google.translate.TranslateElement.InlineLayout.SIMPLE},"google_translate_element")}function openFrame(a,b){$("#bannerWindow").html('<iframe id="ifrm" width="978" height="400"></iframe>').dialog({dialogClass:"bannerDialog",width:"auto",height:"auto",title:b,position:"top"}),$("#ifrm").attr("src",a)}function showBannerDialog(a,b,c){(c||(new Date).getTime()-bannerLastTime>6e4)&&!$(".bannerDialog").is(":visible")&&(bannerLastTime=(new Date).getTime(),$("html, body").animate({scrollTop:0},"slow",openFrame(a,b)))}var addthis_config={async:1,services_exclude:"print"};jQuery(function(a){a.ajaxSetup({cache:!1}),a("#appContainer").height()<a(document).height()-10&&a("#appContainer").height(a(document).height()-10),a("#site_list").accordion({collapsible:!0,autoHeight:!1,active:!1,header:"h4"}),a("#appMenu a.menuTab").button().removeClass("ui-corner-all").addClass("ui-corner-top"),a("#appMenu a.menuTabSelected").unbind(),a("#appMenu a.icon-home").button({icons:{primary:"ui-icon-home"},text:!0}),setTimeout(function(){a(".appNotice").fadeOut(3e3)},15e3),a(".userSettingsContainer").addClass("ui-widget ui-widget-content ui-corner-all"),styleAllButtons(),styleWall(),styleProperties();var b=a(".ui-state-default").css("color");a("#appContainer").css("border-color",b),a(".ec-event-bg").addClass("ui-widget ui-state-default"),a(".ec-event-bg").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}),a("td.ec-today-header").addClass("ui-widget ui-state-highlight"),a("td.ec-today-header").hover(function(){a(this).removeClass("ui-state-highlight")},function(){a(this).addClass("ui-state-highlight")}),a(".ec-today-bg").addClass("ui-widget-content").css("opacity",.5),a(".ec-day-header").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}),a(".ec-day-header").click(function(){window.location=a(this).children("a:first").attr("href")})});var bannerLastTime=0
