 
     children.each ->
       link = $(this).prev('a')
-      $('<span class="closed"></span>').insertBefore(link)
-      $(this).hide()
-      App.TreeNavigator.closeNodes($(this).children())
+      $('<span class="open"></span>').insertBefore(link)
+      App.TreeNavigator.setNodes($(this).children())
 
   initialize: ->
     elem = $('[data-tree-navigator]')


    ul = elem.find('ul:eq(0)')
    if(ul.length && ul.children().length)
      App.TreeNavigator.closeNodes(ul.children())

    $('[data-tree-navigator] span').on
      click: (e) ->

App.TreeNavigator =
  setNodes: (nodes) ->
    children = nodes.children('ul')

    if(children.length == 0)
