       allParents  = $(node).prevAll('.panel-parent')
       parentIds   = $.map(allParents, (el) -> $(el).attr 'id')
       actualIds   = similarItems(nodeClasses, parentIds)
+
       # add current node id
       actualIds.push $(node).attr('id')
       # get array of jquery elements from actual ids
       actualCollection = getElements(actualIds)
       # update vertical pseudoelement of actual elements
-      $.each actualCollection, (i, element) ->
-        this.uptVertical(element)
+      that = this
+      $.each(actualCollection, (i, element) ->
+        that.uptVertical(element)
+      )
 
   findPanelHeader = (object) ->
     object.find('.panel').find('.panel-header')

    item for item in arr2 when item in arr1

  getElements = (arrayOfIds) ->
    $.map(arrayOfIds, (id) ->
      $("##{id}").get()
    )

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

      Math.abs $(sourceNode).offset().top - $(targetNode).offset().top

    verticalBranch: (node, lastChild) ->
      @betweenTop(node, lastChild) + @middleHeight(lastChild)

  branchProp =
    base:
