xorse.PARSING="xorse.App";xorse.require("xorse.Module");xorse.require("xorse.hash");xorse.require("xorse.maphat.MapHat");xorse.require("google.maps");
xorse.App=function(g,a){var b=this,d=b.pri;d.initialize_environment=function(){xorse.maphat.DEBUG=xorse.DEBUG;xorse.maphat.DEFAULT_LATLNG=xorse.maphat.google.LatLng(32.2217429,-110.926479);xorse.maphat.DEFAULT_ZOOM=12;xorse.maphat.DEFAULT_MAPTYPE=xorse.maphat.google.RoadMap();xorse.maphat.DEFAULT_ICON="base";xorse.maphat.MAP_VERSION=xorse.maphat.MAP_VERSION===undefined?3:xorse.maphat.MAP_VERSION;xorse.maphat.REFINEMENTS={bedrooms:xorse.hash.read("bedrooms",1),bathrooms:xorse.hash.read("bathrooms",
0),rate:xorse.hash.read("rate",0),staylength:xorse.hash.read("staylength","nightly"),pets:xorse.hash.read("pets",0),smoking:xorse.hash.read("smoking",0),sleeps:xorse.hash.read("sleeps",0),internet:xorse.hash.read("internet",0),handicap:xorse.hash.read("handicap",0),property:xorse.hash.read("property",null),search:xorse.hash.read("search",null)};xorse.maphat.LISTVIEW=true;xorse.maphat.RECENTLY_VIEWED=xorse.authenticated;xorse.maphat.FAVORITES=xorse.authenticated;xorse.maphat.CLUSTERING={enable:false};
xorse.maphat.URLS={cluster_data:function(){return"/cluster/data/"},cluster_children_data:function(){return"/cluster/children/info/"},map_data:function(){return"/map/data/"},property_data:function(c){return"/property/"+c+"/info/"},directions_polyline:function(c){return"/property/"+c+"/polyline/"},recently_viewed:function(){return"/account/recentlyviewed/"},listview:function(){return"/map/listview/"},get_latlng:function(c){var e=c.match(/^#?(\d{7,})$/);if(e){c=e[e.length-1];type="property"}else type=
"location";return"/map/latlng/"+type+"/?arg="+c},favorite:function(c){return c?"/property/"+c+"/favorite/":"/account/favorites/"},detail:function(c,e,f){xorse.hash.remove("search");window.location="/property/"+c+"/detail/?l="+e+"%2c"+f+location.hash}};xorse.maphat.INFOWINDOW={template:{node:document.getElementById("infowindow-template"),class_name:"infowindow"},content:{node:document.getElementById("infowindow-content"),class_name:"html"},shadow:{node:function(){var c=document.createElement("img");
c.src="/static/img/map-icons/infowindow/info-shadow.png";return c}(),class_name:"infowindow-shadow"},close:document.getElementById("infowindow-close"),loading:{content:'<div style="width: 300px; text-align: center;"><img src="/static/img/site-icons/ajax-bar.gif"></div>',shadow:function(){var c=document.createElement("img");c.src="/static/img/map-icons/tooltipwindow/shadow.png";return c}(),class_name:"infowindow-shadow"}};xorse.maphat.TOOLTIP_INFOWINDOW={template:{node:document.getElementById("tooltipwindow-template"),
class_name:"tooltipwindow"},content:{node:document.getElementById("tooltipwindow-content"),class_name:"html"},shadow:{node:function(){var c=document.createElement("img");c.src="/static/img/map-icons/tooltipwindow/shadow.png";return c}(),class_name:"infowindow-shadow"},close:document.getElementById("tooltipwindow-close"),shadow_same_pane:true,loading:{content:'<div style="width: 300px; text-align: center;"><img src="/static/img/site-icons/ajax-bar.gif"></div>',shadow:function(){var c=document.createElement("img");
c.src="/static/img/map-icons/tooltipwindow/shadow.png";return c}(),class_name:"infowindow-shadow"}};xorse.maphat.MARKER_OVERRIDES={marker:{click:false,dblclick:false,mouseup:false,mousedown:false,mouseover:false,mouseout:false,tooltip:function(c,e){var f='<div class="tooltip"><img align="left" style="padding-right: 5px" height="50px" src="/property/'+e.id+'/thumbnail/">';f+='<h1 class="ui-corner-all ui-widget-header standard">'+e.json.title+"</h1>";f+=c.directions?'<p class="distance">'+c.directions.distance+
" to the red marker.</p>":c.directions===null?'<p class="distance">Loading directions...</p>':'<p class="distance">Directions are not available from this point.</p>';f+="</div>";return f}},cluster_marker:{click:false,dblclick:false,mouseup:false,mousedown:false,mouseover:false,mouseout:false},directions:{color:"#FF0000",weight:5}};xorse.maphat.CENTER_MARKER_CONFIG={settings:{icon:G_DEFAULT_ICON,dragCrossMove:false,title:"Drag Me!",clickable:false,draggable:true,bouncy:true,bounceGravity:1,autoPan:true,
zIndexProcess:function(){return 1},hide:false,click:false},force_center:false,event_overrides:{click:false,dblclick:false,mouseup:false,mousedown:false,mouseover:false,mouseout:false,dragstart:false,dragend:false,drag:false}}};d.initialize_map=function(){var c={dom_node:document.getElementById(g),zoom:xorse.maphat.DEFAULT_ZOOM,center:xorse.maphat.DEFAULT_LATLNG,mapTypeId:xorse.maphat.DEFAULT_MAPTYPE,default_icon:xorse.maphat.DEFAULT_ICON,refinements:xorse.maphat.REFINEMENTS,infowindow:xorse.maphat.INFOWINDOW,
tooltip:xorse.maphat.TOOLTIP_INFOWINDOW,url_schema:xorse.maphat.URLS,clustering:xorse.maphat.CLUSTERING,overrides:xorse.maphat.MARKER_OVERRIDES,center_marker_cfg:xorse.maphat.CENTER_MARKER_CONFIG,enable_favorites:xorse.maphat.FAVORITES,enable_recently_viewed:xorse.maphat.RECENTLY_VIEWED,enable_listview:xorse.maphat.LISTVIEW};b.maphat=new xorse.maphat.MapHat(c,a);window.onunload=function(){b.maphat.deconstructor()}};d.constructor=function(){document.createElement("img").src="/static/img/site-icons/ajax-bar.gif";
d.initialize_environment();d.initialize_map()};d.constructor()};xorse.App.prototype=new xorse.Module("xorse.App");xorse.PARSING="xorse.Layout";xorse.maphat=xorse.maphat===undefined?{}:xorse.maphat;xorse.require("xorse.maphat.MapHat");
xorse.Layout=function(){var g=this,a=g.pri;a.elements={};a.elements.search=$("#content-container");a.elements.header=$("div.header");a.elements.auth=$("#fh-authbox");a.elements.logo=$("#logo");a.elements.window=$(window);a.elements.map=$("#map");a.elements.map_container=$("#map-container");a.elements.footer=$("div.footer");a.elements.viewing_bar=$("#nearby-localities > div");a.elements.nearby_localities=a.elements.viewing_bar.parent();a.elements.refinement_string=$("#refinement-string");a.elements.list_nav=
$("#list-nav");a.elements.list_nav_tabs=$("#list-nav-tabs");a.elements.favorites_tab=$("#favorites-tab");a.elements.favorites_tab_link=$("#favorites-tab-link");a.elements.favorites_table=$("#favorites-table");a.elements.listview_tab=$("#listview-tab");a.elements.listview_loading=$("#listview-loading");a.elements.listview_table=$("#listview-table");a.elements.recently_viewed_tab=$("#recently-viewed-tab");a.elements.recently_viewed_tab_link=$("#recently-viewed-tab-link");a.elements.recently_viewed_table=
$("#recently-viewed-table");a.elements.cluster_tab=$("#cluster-tab");a.elements.cluster_table=$("#cluster-table");a.elements.excess_data=$("#excess-data");a.elements.wait=$("#wait");a.elements.tick=$("#tick");a.elements.cross=$("#cross");a.elements.rate=$("#rate-input");a.elements.rate_remove=$("#rate-remove");a.elements.rate_submit=$("#rate-submit");a.elements.stay_length=$("#stay-length");a.elements.bedrooms=$("#bedrooms");a.elements.bathrooms=$("#bathrooms");a.elements.sleeps=$("#sleeps");a.elements.internet_access=
$("#internet-access");a.elements.pet_friendly=$("#pet-friendly");a.elements.smoking_friendly=$("#smoking-friendly");a.elements.handicap_access=$("#handicap-access");a.elements.search_text=$("#search-text");a.elements.search_form=$("#search-form");a.elements.minimize=$("#minimize");a.elements.restore=$("#restore");a.elements.maximize=$("#maximize");a.preload=["/static/img/map-icons/basic/image.png","/static/img/map-icons/basic/shadow.png","/static/img/map-icons/basic/transparent.png","/static/img/map-icons/basic/favorite-image.png",
"/static/img/map-icons/basic/favorite-shadow.png","/static/img/map-icons/basic/favorite-transparent.png","/static/img/map-icons/basic/viewed-image.png","/static/img/map-icons/basic/viewed-shadow.png","/static/img/map-icons/basic/viewed-transparent.png","/static/img/map-icons/basic/favorite-viewed-image.png","/static/img/map-icons/basic/favorite-viewed-shadow.png","/static/img/map-icons/basic/favorite-viewed-transparent.png","/static/img/map-icons/standard/image.png","/static/img/map-icons/standard/shadow.png",
"/static/img/map-icons/standard/transparent.png","/static/img/map-icons/standard/favorite-image.png","/static/img/map-icons/standard/favorite-shadow.png","/static/img/map-icons/standard/favorite-transparent.png","/static/img/map-icons/standard/viewed-image.png","/static/img/map-icons/standard/viewed-shadow.png","/static/img/map-icons/standard/viewed-transparent.png","/static/img/map-icons/standard/favorite-viewed-image.png","/static/img/map-icons/standard/favorite-viewed-shadow.png","/static/img/map-icons/standard/favorite-viewed-transparent.png",
"/static/img/map-icons/preferred/image.png","/static/img/map-icons/preferred/shadow.png","/static/img/map-icons/preferred/transparent.png","/static/img/map-icons/preferred/favorite-image.png","/static/img/map-icons/preferred/favorite-shadow.png","/static/img/map-icons/preferred/favorite-transparent.png","/static/img/map-icons/preferred/viewed-image.png","/static/img/map-icons/preferred/viewed-shadow.png","/static/img/map-icons/preferred/viewed-transparent.png","/static/img/map-icons/preferred/favorite-viewed-image.png",
"/static/img/map-icons/preferred/favorite-viewed-shadow.png","/static/img/map-icons/preferred/favorite-viewed-transparent.png"];a.maphat=null;a.favorites={};g.set_maphat=function(b){a.maphat=b;a.maphat.disable_unnecessary_updates=true;a.elements.map_layer=$("div:first > div:first",a.elements.map);g.update_refinement_string();a.overlay=$("<div/>").appendTo(a.maphat.pro.map.getPane(G_MAP_MARKER_PANE));a.overlay.css({top:a.elements.map.offset().top,left:a.elements.map.offset().left}).addClass("opacity-overlay");
xorse.maphat.FAVORITES&&a.elements.favorites_tab_link.show();xorse.maphat.RECENTLY_VIEWED&&a.elements.recently_viewed_tab_link.show()};g.update_favorites=function(){if(a.maphat!==null){var b=[],d=a.favorites=a.maphat.marker_manager.favorites;for(var c in d){var e=d[c];b.push(['<img src="'+e.thumbnail+'" width="60px", height="45px">',e.id,e.plan,e.title,e.bed,e.bath,e.location,e.rate])}a.favorites_datatable.fnClearTable();b.length&&a.favorites_datatable.fnAddData(b)}};g.update_refinement_string=function(){if(a.maphat)if(xorse.authenticated){var b=
{bedrooms:{"1":"have 1+ bedrooms","2":"have 2+ bedrooms","3":"have 3+ bedrooms","4":"have 4+ bedrooms"},bathrooms:{"1":"have 1+ bathrooms","2":"have 2+ bathrooms","3":"have 3+ bathrooms","4":"have 4+ bathrooms"},sleeps:{"5":"sleep 5+","10":"sleep 10+","15":"sleep 15+"},internet:{"1":"have internet access"},pets:{"1":"are pet friendly"},smoking:{"1":"are smoking friendly"},handicap:{"1":"have handicap access"}},d=a.maphat.refinement_manager.get_all(),c=[];for(var e in d)try{var f=b[e][d[e]];f&&c.push(f)}catch(h){e===
"rate"&&d[e]!=0&&d.staylength&&c.push("rents for or under $"+d[e]+"/"+d.staylength+" USD")}if(c.length>2)c[c.length-1]="and "+c[c.length-1]+".";if(c.length==2){c[c.length-2]+=" and "+c[c.length-1];delete c[c.length-1]}a.elements.refinement_string.html("Showing properties that "+c.join(", "))}else a.elements.refinement_string.html('<span style="font-size: 12px; font-weight: bold"><a href="/account/login/?next='+window.location+'">Hey, why not sign in or register?!</a> You will have benefits recently-viewed, favorites, and more.</span>')};
g.update_listview=function(b){for(var d=[],c=0;c<b.length;c++){var e=b[c];d.push(['<img src="'+e.thumbnail+'" width="60px", height="45px">',e.id,e.plan,e.title,e.bed,e.bath,e.location,e.rate])}a.listview_datatable.fnClearTable();d.length&&a.listview_datatable.fnAddData(d);a.elements.excess_data.hide();a.elements.listview_loading.hide();a.listview_datatable.parent().show()};g.update_recently_viewed=function(){if(a.maphat!==null){var b=[],d=a.recently_viewed=a.maphat.marker_manager.recently_viewed,
c=9999;for(var e in d){var f=d[e];b.push(['<img src="'+f.thumbnail+'" width="60px", height="45px">',c,f.id,f.plan,f.title,f.bed,f.bath,f.location,f.rate]);c-=1}a.recently_viewed_datatable.fnClearTable();b.length&&a.recently_viewed_datatable.fnAddData(b)}};a.favorite=function(b,d,c){var e=b.attr("src");a.maphat!==null&&xorse.ajax.post(a.maphat.pro.maphat_cfg.url_schema.favorite(c),{},{"200":function(){if(/gray/.test(e)){b.attr("src",e.replace("-gray",""));b.attr("title","This property is a favorite!");
d.html("Remove favorite");xorse.send_signal("marker_"+c+"_favorite")}else{b.attr("src",e.replace("star","star-gray"));b.attr("title",'Click to "favorite" this property.');d.html("Add favorite");xorse.send_signal("marker_"+c+"_unfavorite")}xorse.send_signal("marker_"+c+"_clear_cache");a.maphat.get_favorites()},"401":function(){alert("Please login before favoriting properties")}})};a.initialize_signals=function(){xorse.signal("maphat_properties_loaded","layout",function(b){var d=b.properties.length;
if(a.maphat.pro.clustering)d=a.maphat.pro.property_length;a.update_property_count(d);a.update_nearby_localities(b.nearby)});xorse.signal("maphat_listview_length_error","layout",function(){a.listview_datatable.parent().hide();a.elements.excess_data.show();a.elements.listview_loading.hide()});xorse.signal("maphat_requesting_properties","layout",function(){a.show_search_in_progress()});xorse.signal("maphat_request_not_found","layout",function(b){new FhBaux('<div style="width: 400px; font-size: 14px; text-align: center">Your request "'+
b.arg+'" could not be found. If you meant to enter a property id, just type "#ID", where ID is your desired property id</div>')});xorse.signal("favorites_loaded","layout",function(){g.update_favorites()});xorse.signal("maphat_listview_loaded","layout",function(b){g.update_listview(b.new_set,b.old_set)});xorse.signal("recently_viewed_loaded","layout",function(){g.update_recently_viewed()});xorse.signal("favorite","layout",function(b){var d=$("#favorite-image-"+b),c=$("#favorite-link-"+b);a.favorite(d,
c,b)});xorse.signal("refinement_update","layout",function(){g.update_refinement_string()});xorse.signal("marker_data_loaded","layout",function(b){var d=$("div.info-slideshow-control span.counter");$("div.thumbnails",b).cycle({fx:"scrollHorz",prev:".prev",next:".next",after:function(c,e,f){d.html(1+f.currSlide)}})});xorse.signal("maphat_request_not_found","layout",function(b){alert("Could not find your request: "+b.arg)});xorse.signal("property_detail","layout",function(b){var d=a.maphat.pro.center_marker.pri.marker.getLatLng();
return a.maphat.pro.maphat_cfg.url_schema.detail(b.id,d.lat(),d.lng(),false)})};a.initialize_dom=function(){var b=a.elements,d={"0":"basic","1":"standard","2":"preferred"};xorse.maphat.FAVORITES||b.favorites_tab_link.hide();xorse.maphat.RECENTLY_VIEWED||b.recently_viewed_tab_link.hide();b.list_nav.resizable({resize:function(){a.list_nav_resizing=true;b.window.resize()},start:function(){a.list_nav_restore_height=$(this).height();a.list_nav_minimized=false;a.list_nav_maximized=false},delay:0,handles:"",
maxHeight:a.elements.window.height()/2,distance:0,grid:[5,5]}).tabs({select:function(c,e){(c=a.list_nav_minimized)&&a.elements.restore.click();if(e.index!==0&&a.maphat)a.maphat.disable_unnecessary_updates=true;else if(e.index===0&&a.maphat){if(c){a.elements.listview_loading.show();a.listview_datatable.parent().hide()}else a.maphat.refresh();a.maphat.disable_unnecessary_updates=false}}}).tabs("selected",-1);$(".ui-tabs-selected").removeClass("ui-state-active").removeClass("ui-tabs-selected").addClass("ui-state-default");
a.listview_datatable=b.listview_table.dataTable({bJQueryUI:true,bFilter:true,bPaginate:true,bAutoWidth:false,bAutoHeight:false,fnRowCallback:function(c,e){$(c).addClass(d[e[2]]).attr({id:"listing-"+e[1],property:e[1]});return c},aaSorting:[[2,"desc"]],aoColumns:[{sTitle:"Thumbnail",bSortable:false},{sTitle:"Id"},{sTitle:"Plan",bVisible:false},{sTitle:"Title"},{sTitle:"Bed"},{sTitle:"Bath"},{sTitle:"Location"},{sTitle:"Rate"}]});a.recently_viewed_datatable=b.recently_viewed_table.dataTable({bJQueryUI:true,
bFilter:true,bPaginate:false,bAutoWidth:false,fnRowCallback:function(c,e){$(c).addClass(d[e[3]]).attr({id:"listing-"+e[2],property:e[2]});return c},aaSorting:[[1,"desc"]],aoColumns:[{sTitle:"Thumbnail",bSortable:false},{sTitle:"Visited",bVisible:false},{sTitle:"Id"},{sTitle:"Plan",bVisible:false},{sTitle:"Title"},{sTitle:"Bed"},{sTitle:"Bath"},{sTitle:"Location"},{sTitle:"Rate"}]});a.favorites_datatable=b.favorites_table.dataTable({bJQueryUI:true,bFilter:true,bPaginate:true,bAutoWidth:false,fnRowCallback:function(c,
e){$(c).addClass(d[e[2]]).attr({id:"listing-"+e[1],property:e[1]});return c},aaSorting:[[2,"desc"]],aoColumns:[{sTitle:"Thumbnail",bSortable:false},{sTitle:"Id"},{sTitle:"Plan",bVisible:false},{sTitle:"Title"},{sTitle:"Bed"},{sTitle:"Bath"},{sTitle:"Location"},{sTitle:"Rate"}]});$("tbody > tr",b.listview_table).live("mouseover",function(){xorse.send_signal("marker_"+$(this).attr("property")+"_mouseover_bulge",null,function(){a.overlay.show()})}).live("mouseout",function(){xorse.send_signal("marker_"+
$(this).attr("property")+"_mouseout",null,function(){a.overlay.hide()})}).live("click",function(){xorse.send_signal("marker_"+$(this).attr("property")+"_click")});$("tbody > tr",b.recently_viewed_table).live("click",function(){var c=$(this).attr("property");if(xorse.send_signal("marker_"+c+"_click")===false){a.maphat.prevent_listview_update();a.maphat.request_and_center(c,function(){xorse.send_signal("marker_"+c+"_click")})}});$("tbody > tr",b.favorites_table).live("click",function(){var c=$(this).attr("property");
if(xorse.send_signal("marker_"+c+"_click")===false){a.maphat.prevent_listview_update();a.maphat.request_and_center(c,function(){xorse.send_signal("marker_"+c+"_click")})}})};a.initialize_binds=function(){var b=a.elements;b.window.resize(function(){var c=b.search.width(),e=b.auth.outerHeight(true),f=b.header.outerHeight(true),h=b.window.height();f=h-e-f;e=b.logo.height();c=b.window.width()-c-20;e=f-e-5;var i=f-85;if(a.list_nav_resizing){f=b.list_nav.height();if(f>h/2){f=h/2;b.list_nav.height(f)}i=
i-f}else{f=235;i=i-f;b.list_nav.height(f).width(c)}b.map.width(c).height(i);b.map_container.width(c);a.overlay&&a.overlay.height(i).width(c);b.search.height(e);b.nearby_localities.width(c);b.footer.width(c);$("html, body").css({overflow:"hidden",height:h});b.list_nav.width(c);b.list_nav.resizable("option","maxHeight",h/2);if(a.list_nav_minimized)$(".ui-tabs-panel",b.list_nav).hide();else{$(".ui-tabs-panel",b.list_nav).show().height(f-b.list_nav_tabs.height()-30);h=b.list_nav.tabs("option","selected");
b.list_nav.tabs("option","selected",h);h=$("div.ui-tabs-panel:visible",b.list_nav).height();c=$("div.ui-tabs-panel:visible",b.list_nav).width();$("table",b.list_nav).parent().height(h).width(c)}xorse.send_signal("window_resized")});b.window.resize();var d={bedrooms:xorse.hash.read("bedrooms",1),bathrooms:xorse.hash.read("bathrooms",1),staylength:xorse.hash.read("staylength",0),sleeps:xorse.hash.read("sleeps",0),internet:xorse.hash.read("internet",0),pets:xorse.hash.read("pets",0),smoking:xorse.hash.read("smoking",
0),handicap:xorse.hash.read("handicap",0)};xorse.hash.read("search")&&b.search_text.val(decodeURIComponent(xorse.hash.read("search")));xorse.signal("search","layout",function(c){b.search_text.val(c);b.search_form.submit()});b.search_form.submit(function(){var c=b.search_text.val();a.maphat.refinement_manager.set_property(null,true);a.maphat.refinement_manager.set_search(escape(c),true);if(c==="")return false;a.maphat.request_and_center(c);return false});if(xorse.hash.read("rate")!=0){b.rate.val(xorse.hash.read("rate"));
b.rate_remove.show().html("Show All")}b.rate_submit.click(function(){b.rate_remove.show().html("Show All");a.maphat.refinement_manager.set_rate(b.rate.val())});$("input",b.stay_length).click(function(){a.maphat.refinement_manager.set_staylength(this.value)}).filter('[value="'+d.staylength+'"]').attr("checked",true);b.rate_remove.click(function(){b.rate.val("");a.maphat.refinement_manager.set_rate(0);b.rate_remove.hide()});$("input",b.bedrooms).click(function(){a.maphat.refinement_manager.set_bedrooms(this.value)}).filter('[value="'+
d.bedrooms+'"]').attr("checked",true);$("input",b.bathrooms).click(function(){a.maphat.refinement_manager.set_bathrooms(this.value)}).filter('[value="'+d.bathrooms+'"]').attr("checked",true);$("input",b.sleeps).click(function(){a.maphat.refinement_manager.set_sleeps(this.value)}).filter('[value="'+d.sleeps+'"]').attr("checked",true);b.internet_access.click(function(){$(this).is(":checked")?a.maphat.refinement_manager.set_internet(1):a.maphat.refinement_manager.set_internet(0)});d.internet!=0?b.internet_access.attr("checked",
true):b.internet_access.removeAttr("checked");b.pet_friendly.click(function(){$(this).is(":checked")?a.maphat.refinement_manager.set_pets(1):a.maphat.refinement_manager.set_pets(0)});d.pets!=0?b.pet_friendly.attr("checked",true):b.pet_friendly.removeAttr("checked");b.smoking_friendly.click(function(){$(this).is(":checked")?a.maphat.refinement_manager.set_smoking(1):a.maphat.refinement_manager.set_smoking(0)});d.smoking!=0?b.smoking_friendly.attr("checked",true):b.smoking_friendly.removeAttr("checked");
b.handicap_access.click(function(){$(this).is(":checked")?a.maphat.refinement_manager.set_handicap(1):a.maphat.refinement_manager.set_handicap(0)});d.handicap!=0?b.handicap_access.attr("checked",true):b.handicap_access.removeAttr("checked");$.map([b.minimize,b.maximize,b.restore],function(c){c.hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")})});b.minimize.click(function(){if(!a.list_nav_minimized){if(!a.list_nav_maximized)a.list_nav_restore_height=
b.list_nav.height();b.list_nav.height(50);a.list_nav_resizing=true;a.list_nav_minimized=true;a.list_nav_maximized=false;a.maphat.disable_unnecessary_updates=true;$(".ui-tabs-selected").removeClass("ui-state-active").removeClass("ui-tabs-selected").addClass("ui-state-default");b.window.resize()}});b.restore.click(function(){var c=b.list_nav.height();if(!a.list_nav_restore_height)a.list_nav_restore_height=235;b.list_nav.height(a.list_nav_restore_height);if(a.list_nav_restore_height<=50)return b.minimize.click();
else if(a.list_nav_restore_height===b.window.height()/2)return b.maximize.click();else{a.maphat.disable_unnecessary_updates=true;if(a.list_nav_minimized){a.elements.listview_loading.show();a.listview_datatable.parent().hide()}a.list_nav_minimized=false}a.list_nav_resizing=true;b.window.resize();a.list_nav_restore_height=c});b.maximize.click(function(){if(!a.list_nav_maximized){if(!a.list_nav_minimized)a.list_nav_restore_height=b.list_nav.height();b.list_nav.height(b.window.height()/2);a.list_nav_resizing=
true;a.list_nav_minimized=false;a.list_nav_maximized=true;a.maphat.disable_unnecessary_updates=false;b.window.resize()}})};a.initialize_preloads=function(){for(var b=a.preload.length,d=0;d<b;d++)document.createElement("img").src=a.preload[d]};a.not_authenticated=function(){};a.update_nearby_localities=function(b){if(b.length){for(var d=[],c=b.length,e=0;e<c;e+=1){d.push("<span class='fh-viewing-locality link' onclick='xorse.send_signal(\"search\", \""+b[e].fullname+"\")'>"+b[e].name+"</span>");d.push("(<span class='fh-viewing-count'>"+
b[e].count+"</span>),")}if(e>0){b=d.join(" ");b=b.slice(0,-1);a.elements.viewing_bar.append('<span class="fh-localities"> &raquo; '+b+"</span>")}}};a.update_property_count=function(b){var d=a.elements;d.wait.hide();if(b===0){d.tick.hide();d.cross.show();d.viewing_bar.html("<strong>No properties found</strong> ")}else if(b===1){d.cross.hide();d.tick.show();d.viewing_bar.html("<strong>"+b+"</strong> property shown")}else{d.cross.hide();d.tick.show();d.viewing_bar.html("<strong>"+b+"</strong> properties shown")}};
a.show_search_in_progress=function(){var b=a.elements;b.tick.hide();b.cross.hide();b.wait.show();b.viewing_bar.html("<strong>Please wait...</strong> Requesting properties")};a.constructor=function(){a.list_nav_resizing=true;a.list_nav_minimized=true;a.list_nav_maximized=false;a.initialize_dom();a.initialize_signals();a.initialize_binds();a.initialize_preloads();xorse.authenticated||a.not_authenticated()};a.constructor()};xorse.Layout.prototype=new xorse.Module("xorse.Layout");xorse.PARSING="xorse.Project";xorse.require("xorse.App");xorse.require("xorse.Layout");xorse.Project=function(){var g=this,a=g.pri;g.initialize_layout=function(){a.layout=new xorse.Layout};g.setup=function(){a.app=new xorse.App("map",function(){a.layout.set_maphat(this)})};a.constructor=function(){g.initialize_layout()};a.constructor()};xorse.Project.prototype=new xorse.Module("xorse.Project");

