         srv_html += "</ul>"
         html += srv_html
         $("#sidebar").html html
+        sidebar._active_marker = marker
         sidebar.show()
 
 


    $("#search input").typeahead {highlight: true}, sections[0], sections[1]

    show_unit_details = (unit) ->
        console.log "show details"
        console.log unit
        html = "<h3>#{unit.name[LANGUAGE]}</h3>"

                markerColor: color
                prefix: icon.family if icon?
            coords = unit.location.coordinates
            marker = L.marker([coords[1], coords[0]], icon: icon)
                .bindPopup(L.popup({closeButton: false})
                .setContent(unit.name.fi))
                .addTo map

            marker.unit = unit
            marker.on 'click', (ev) ->
                marker = ev.target
                show_unit_details marker

            markers.push marker

