o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1318603679.1006091pa: @value{ I" length:EFi˜ I" digest; F"%ca7bb499636585e64a07b09cf4011e78I" source; FI"˜ (function() { String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); }; String.prototype.titleize = function() { var parts, res; res = []; parts = this.split(" "); $.each(parts, function(index, part) { return res.push(part.capitalize()); }); return res.join(" "); }; Handlebars.registerHelper("rounded", function(number) { if (number !== void 0) { return parseFloat(number).toFixed(2); } }); Handlebars.registerHelper("titleize", function(string) { if (string !== void 0) { return string.titleize(); } }); Handlebars.registerHelper("address_without_comma", function(lab) { if (this.address !== void 0) { return this.address.replace(/(\s*,\s*$)/g, "").titleize(); } }); window.Lab = (function() { Lab.prototype.marker = null; Lab.prototype.map_tooltip_template = Handlebars.compile("{{titleize name}}\n{{address_without_comma address}}\n{{titleize city}},{{state}} "); function Lab(data) { this.data = data; } Lab.prototype.clearMarker = function() { if (this.marker) { this.marker.setMap(null); return this.marker = null; } }; Lab.prototype.setMarker = function(map, markerBounds) { this.point = new google.maps.LatLng(this.data.lat, this.data.lng); this.marker = this.makeMarker(map); if (markerBounds) { return markerBounds.extend(this.point); } }; Lab.prototype.makeMarker = function(map) { return new google.maps.Marker({ position: this.point, map: map, title: this.map_tooltip_template(this.data), icon: this.makeIcon() }); }; Lab.prototype.makeIcon = function() { return new google.maps.MarkerImage("/assets/medivo/lab.png"); }; return Lab; })(); window.LabList = (function() { LabList.prototype.show_number = 3; function LabList(lab_info, show_number) { this.labs = []; if (show_number) { this.show_number = show_number; } console.log(this.show_number); this.setLabs(lab_info); } LabList.prototype.getLabs = function() { return this.labs.slice(0, this.show_number); }; LabList.prototype.setLabs = function(lab_info) { var labs; this.clearMarkers(); labs = this.labs = []; return $.each(lab_info, function(index, lab_data) { return labs.push(new Lab(lab_data)); }); }; LabList.prototype.clearMarkers = function() { return $.each(this.labs, function(index, lab) { return lab.clearMarker(); }); }; return LabList; })(); }).call(this); ; FI" _version; F"%ed6c41d3ca51aa79f091861ad850e323