         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>"

    sidebar = L.control.sidebar 'sidebar',
        position: 'left'
    map.addControl sidebar
    sidebar.on 'hide', () ->
        sidebar._active_marker.closePopup()

    map.on 'click', (ev) ->
        sidebar.hide()

