     $('.panel').each ->
       node = $(this).parent('.panel-container')
       if node.hasClass(parentId)
-
         content = $(this).find('.panel_contents')
         if parentContent.is(':visible')
           content.show 0, ->
             uptHorizontalLine(node) unless $(node).hasClass('panel-root')
             changeVerticalOfEachParent(node)
-
         else
           content.hide 0, ->
             uptHorizontalLine(node) unless $(node).hasClass('panel-root')
             changeVerticalOfEachParent(node)
+      # todo: speed up: 1) by self vert. line; 2) by self + parent
 
   # select user
   $('.panel-header').on 'click', ->

          document.styleSheets[0].addRule ruleName, properies, 0
        else
          document.styleSheets[0].insertRule ruleName + " { #{properies} }", 0
  # find half height of the node (px)
  middleOfHeight = (node) ->
    Math.abs $(node).height() / 2

        newDistance = verticalBranchDist(element, lastChild)
        line = getCSSRule('[id="' + nodeId + '"]::before')
        line.style.height = newDistance.toString().concat('px')
    )

  # inherit color from parent panel on load
  # if parent has no color, inherit from parent of parent
