       e.preventDefault()
       e.stopPropagation()
       tree.jstree('toggle_node', $(this).parent())
+
+    tree.on 'click', "li[rel=server] > a", (e) ->
+      hash = '#' + $(this).parent().attr('id')
+      if history.pushState
+        history.pushState(null, null, hash);
+      else
+        location.hash = hash;
+
 
     treeGroup.on 'keypress keydown keyup blur', 'input.search', ->
       search = $(this)

        show_only_matches: true
      themes:
        theme: 'classic'

      types:
        types:
          root:


      json_data:
        data: data


    # On load
    tree.bind "loaded.jstree", ->
      # hack... :(
      setTimeout ->
        tree.find('a.jstree-clicked').click()
      , 50

  else
    $.jstree._focused()._get_settings().json_data.data = data
