").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];$(e.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(e){e.target===t.element[0]||e.target===i||$.contains(i,e.target)||t.close()})})},menufocus:function(e,t){var i;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){$(e.target).trigger(e.originalEvent)});i=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:i})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(i.value),(i=t.item.attr("aria-label")||i.value)&&$.trim(i).length&&(this.liveRegion.children().hide(),$("").text(i).appendTo(this.liveRegion))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=$("",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e=!(e=!(e=e&&(e.jquery||e.nodeType?$(e):this.document.find(e).eq(0)))||!e[0]?this.element.closest(".ui-front"):e).length?this.document[0].body:e},_initSource:function(){var i,n,s=this;$.isArray(this.options.source)?(i=this.options.source,this.source=function(e,t){t($.ui.autocomplete.filter(i,e.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,t){s.xhr&&s.xhr.abort(),s.xhr=$.ajax({url:n,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),i=n.altKey||n.ctrlKey||n.metaKey||n.shiftKey;e&&(!e||t||i)||(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length").text(t.value).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),$.extend($.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var i=new RegExp($.ui.autocomplete.escapeRegex(t),"i");return $.grep(e,function(e){return i.test(e.label||e.value||e)})}}),$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1").text(t).appendTo(this.liveRegion))}});var autocomplete=$.ui.autocomplete;function guessDeviceFromSize(){return window.responsiveSize?"mobile"==window.responsiveSize||"phone"==window.responsiveSize||"phoneWide"==window.responsiveSize?"mobile":"small"==window.responsiveSize?"tablet":"normal"==window.responsiveSize||"large"==window.responsiveSize?"desktop":"unknown":"unknown"}function getDistance(e,t,i,n){function s(e){return e*Math.PI/180}return 6371*Math.acos(Math.cos(s(e))*Math.cos(s(i))*Math.cos(s(n)-s(t))+Math.sin(s(e))*Math.sin(s(i)))}function truncate(e,s,o,t){var a,e=$(e),r=0;"undefined"==typeof o&&(o="..."),e.data("original-content")||e.data("original-content",e.html()),e.data("original-content"),s&&((a=function(e){if(e.childNodes.length)for(var t=0;ts&&(e.textContent=n.substring(0,s-r),e.textContent=e.textContent.replace(/[^A-Za-z0-9\-_]+[A-Za-z0-9\-_]*$/,""),o&&(e.textContent+=o)),r+=n.length}})(e[0]),t&&e.append(t))}function untruncate(e){e=$(e);e.data("original-content")&&e.html(e.data("original-content"))}function untruncate_ancestor(e,t){t=t||"[data-truncate]";t=$(e).closest(t);console.log(e),untruncate(t)}!function(){if("undefined"==typeof console&&(console={}),!console.log||"function"!=typeof console.log&&"object"!=typeof console.log)for(var e=["log","info","warn","error","assert","dir","clear","profile","profileEnd","time","timeEnd"],t=0;tRead More')})});var ThemeEngine={version:"0.2",basePath:"",environment:"development",flags:{},init:function(){var e=arguments.length?arguments[0]:{};this.version=e.version||this.version,this.basePath=e.basePath||this.basePath,this.environment=e.environment||this.environment}};function ThemeEngineMap(){this.initialize=function(e){var t=this;this.mapOptions={},this.mapOptions.apiKey=e.apiKey||"";var i="";this.mapOptions.apiKey.length&&(i="&key="+this.mapOptions.apiKey),this.mapOptions.apiSrc=e.apiSrc||"//maps.google.com/maps/api/js?v=3"+i,this.googleMap={type:"text/javascript",src:this.mapOptions.apiSrc,callback:"drawGoogleMap"},this.mapOptions.mapReadyCallback=e.mapReadyCallback||!1,this.mapOptions.map_id=e.map_id||"map",this.mapOptions.wrapper_id=e.wrapper_id||this.mapOptions.map_id+"-wrapper",this.mapOptions.animate=e.animate||!1,this.mapOptions.speed=e.speed||300,this.mapOptions.dataElement=e.dataElement||"article.apartment",this.mapOptions.dataType=e.dataType||"apartment",this.mapOptions.templateSelector=e.templateSelector||"#custom-info-window",this.mapOptions.latitude=e.latitude||43.1849669,this.mapOptions.longitude=e.longitude||-79.2002143,this.mapOptions.zoom=e.zoom||null,this.mapOptions.maxZoom=e.maxZoom||15,this.mapOptions.directOptions=e.directOptions||{},e.markers||(e.markers={}),this.mapOptions.markers={},e.markers.hasOwnProperty("onClick")&&!1===e.markers.onClick?this.mapOptions.markers.onClick=!1:this.mapOptions.markers.onClick=e.markers.onClick||"showInfoWindow",this.mapOptions.markers.customIcon=e.markers.customIcon||!1,this.mapOptions.markers.customShadow=e.markers.customShadow||!1,this.mapOptions.markers.iconColor=e.markers.iconColor||"ff776b",this.mapOptions.markers.iconLabels=e.markers.iconLabels||!1,this.mapOptions.markers.animate=!(e.markers.hasOwnProperty("animate")&&!1===e.markers.animate),e.markers.scrollToBuildingOptions||(e.markers.scrollToBuildingOptions={}),this.mapOptions.markers.scrollToBuildingOptions={},this.mapOptions.markers.scrollToBuildingOptions.offset=e.markers.scrollToBuildingOptions.offset||0,this.mapOptions.markers.scrollToBuildingOptions.offsetElement=e.markers.scrollToBuildingOptions.offsetElement||"",this.mapOptions.markers.scrollToBuildingOptions.changeMarkerColor=e.markers.scrollToBuildingOptions.changeMarkerColor||!1,this.mapOptions.markers.scrollToBuildingOptions.highlightMarkerColor=e.markers.scrollToBuildingOptions.highlightMarkerColor||"a7daee",this.mapOptions.markers.scrollToBuildingOptions.highlightBuilding=e.markers.scrollToBuildingOptions.highlightBuilding||!1,this.mapOptions.primaryMarker=e.primaryMarker||!1,this.mapOptions.primaryMarker&&(e.primaryMarker.hasOwnProperty("onClick")&&!1===e.primaryMarker.onClick?this.mapOptions.primaryMarker.onClick=!1:this.mapOptions.primaryMarker.onClick=e.primaryMarker.onClick||this.mapOptions.markers.onClick,e.primaryMarker.hasOwnProperty("customIcon")&&!1===e.primaryMarker.customIcon?this.mapOptions.primaryMarker.customIcon=!1:this.mapOptions.primaryMarker.customIcon=e.primaryMarker.customIcon||this.mapOptions.markers.customIcon,e.primaryMarker.hasOwnProperty("customShadow")&&!1===e.primaryMarker.customShadow?this.mapOptions.primaryMarker.customShadow=!1:this.mapOptions.primaryMarker.customShadow=e.primaryMarker.customShadow||this.mapOptions.markers.customShadow,e.primaryMarker.hasOwnProperty("animate")&&!1===e.primaryMarker.animate?this.mapOptions.primaryMarker.animate=!1:this.mapOptions.primaryMarker.animate=e.primaryMarker.animate||this.mapOptions.markers.animate,this.mapOptions.primaryMarker.iconColor=e.primaryMarker.iconColor||this.mapOptions.markers.iconColor,this.mapOptions.primaryMarker.iconLabels=e.primaryMarker.iconLabels||this.mapOptions.markers.iconLabels,this.mapOptions.primaryMarker.dataElement=e.primaryMarker.dataElement||this.mapOptions.dataElement,this.mapOptions.primaryMarker.dataType=e.primaryMarker.dataType||this.mapOptions.dataType,this.mapOptions.primaryMarker.templateSelector=e.primaryMarker.templateSelector||this.mapOptions.templateSelector,this.mapOptions.primaryMarker.draggable=e.primaryMarker.draggable||!1,this.mapOptions.primaryMarker.dragCallback=e.primaryMarker.dragCallback||function(e){t.GoogleMap.updateCircle({centerLat:e.latLng.lat(),centerLng:e.latLng.lng()})},this.mapOptions.circle=e.primaryMarker.circle||!1,this.mapOptions.circle&&(this.mapOptions.circle.centerLat=e.primaryMarker.circle.centerLat||0,this.mapOptions.circle.centerLng=e.primaryMarker.circle.centerLng||0,this.mapOptions.circle.radius=e.primaryMarker.circle.radius||0,this.mapOptions.circle.fillColor=e.primaryMarker.circle.fillColor||"#ff776b",this.mapOptions.circle.fillOpacity=e.primaryMarker.circle.fillOpacity||.1,this.mapOptions.circle.strokeColor=e.primaryMarker.circle.strokeColor||"#ff776b",this.mapOptions.circle.strokeOpacity=e.primaryMarker.circle.strokeOpacity||.8,this.mapOptions.circle.strokeWeight=e.primaryMarker.circle.strokeWeight||2,this.mapOptions.circle.extendsBounds=e.primaryMarker.circle.extendsBounds||!1)),this.install()},this.install=function(){var e,t,i,o=this;0<$("#"+o.mapOptions.map_id).length&&(e=$("head"),i=o.googleMap.src+"&callback="+o.googleMap.callback,t='