xorse.PARSING="xorse.App";xorse.require("xorse.Module");xorse.require("xorse.hash");xorse.require("xorse.maphat.MapHat");xorse.require("google.maps");
xorse.App=function(f,b){var c=this,d=c.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(a){return"/property/"+a+"/info/"},directions_polyline:function(a){return"/property/"+a+"/polyline/"},recently_viewed:function(){return"/account/recentlyviewed/"},listview:function(){return"/map/listview/"},get_latlng:function(a){var e=a.match(/^#?(\d{7,})$/);if(e){a=e[e.length-1];type="property"}else type=
"location";return"/map/latlng/"+type+"/?arg="+a},favorite:function(a){return a?"/property/"+a+"/favorite/":"/account/favorites/"},detail:function(a,e,g){xorse.hash.remove("search");window.location="/property/"+a+"/detail/?l="+e+"%2c"+g+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 a=document.createElement("img");
a.src="/static/img/map-icons/infowindow/info-shadow.png";return a}(),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 a=document.createElement("img");a.src="/static/img/map-icons/tooltipwindow/shadow.png";return a}(),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 a=document.createElement("img");a.src="/static/img/map-icons/tooltipwindow/shadow.png";return a}(),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 a=document.createElement("img");
a.src="/static/img/map-icons/tooltipwindow/shadow.png";return a}(),class_name:"infowindow-shadow"}};xorse.maphat.MARKER_OVERRIDES={marker:{click:false,dblclick:false,mouseup:false,mousedown:false,mouseover:false,mouseout:false,tooltip:function(a,e){var g='<div class="tooltip"><img align="left" style="padding-right: 5px" height="50px" src="/property/'+e.id+'/thumbnail/">';g+='<h1 class="ui-corner-all ui-widget-header standard">'+e.json.title+"</h1>";g+=a.directions?'<p class="distance">'+a.directions.distance+
" to the red marker.</p>":'<p class="distance">Loading directions...</p>';g+="</div>";return g}},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 a={dom_node:document.getElementById(f),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};c.maphat=new xorse.maphat.MapHat(a,b);window.onunload=function(){c.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 f=this,b=f.pri;b.elements={};b.elements.nearby_text=$("#nearby-text");b.elements.nearby_places=$("#nearby-places");b.elements.twitter_feed=$("#twitter-feed");b.preload=["/static/img/site-icons/ajax-loader.gif","/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/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"];b.maphat=null;f.set_app=function(c){b.app=c};f.set_maphat=function(c){b.maphat=c};b.initialize_dom=function(){};b.initialize_binds=function(){$("a.contact-bio").click(function(){var c=xorse.authenticated?window.open($(this).attr("href"),"Contact_Bio","height=365,width=480"):window.open($(this).attr("href"),"Contact_Bio","height=590,width=480");window.focus&&c.focus();return false});
$("#new-review input").click(function(){var c=$("#new-review"),d=$("textarea.comment",c).val(),a=$("#review-type").val();if(d.length===0){alert("You did not enter a comment.");return false}$(".waiting",c).show();$.post("/property/"+g_property+"/review/",{comment:d,"review-type":a},function(e,g){if(g==="error")alert(e);else{a==="0"?c.addClass("negative"):c.addClass("positive");$("div.content",c).html(d);$("span.delete",c).html("(Delete)").attr("id",e);$("input, select",c).hide();$(".review-count").html(parseInt($(".review-count:first").html())+
1)}});$(".waiting",c).hide();return false});$("span.delete").live("click",function(){var c=this.id,d=$(this);$.ajax({url:"/property/"+g_property+"/review/?comment_id="+c,type:"DELETE",complete:function(a,e){if(e==="error")alert("Your comment could not be deleted. Please contact support.");else{d.parent().parent().remove();$(".review-count").html(parseInt($(".review-count:first").html())-1)}}})});$("a.contact-owner").click(function(){var c=xorse.authenticated?window.open($(this).attr("href"),"Contact_Owner",
"height=600,width=600"):window.open($(this).attr("href"),"Contact_Owner","height=800,width=600");window.focus&&c.focus();return false});$("#amenity-tab").tabs().show()};b.initialize_preloads=function(){for(var c=b.preload.length,d=0;d<c;d++)document.createElement("img").src=b.preload[d];xorse.signal("property_detail","layout",function(a){var e=b.maphat.pro.center_marker.pri.marker.getLatLng();return b.maphat.pro.maphat_cfg.url_schema.detail(a.id,e.lat(),e.lng(),false)})};b.constructor=function(){b.initialize_dom();
b.initialize_binds();b.initialize_preloads();$(".corner").corner()};b.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 f=this,b=f.pri;f.initialize_layout=function(){b.layout=new xorse.Layout};f.setup=function(){b.app=new xorse.App("map",function(){b.layout.set_maphat(this)})};b.constructor=function(){f.initialize_layout()};b.constructor()};xorse.Project.prototype=new xorse.Module("xorse.Project");

