   openInstance = ($target) ->
     instId = 'tt' + instCounter++
     inTooltip = false
-    inTarget = true
+    inTarget = true #opened on hover over target
 
     $tooltip = options.makeTooltip $el, $target
     $tooltip.hoverIntent

  #makeTooltip: $el, $target -> $tooltip
  #removeTooltip: $el, $target, $tooltip ->

ttCounter = 0

#returns an object with a close method which when called
#removes all open tooltips
Backbone.Factlink.TooltipJQ = (options) ->
  uid = ttCounter++
  uidStr = 'tooltipUid-' + uid
  instCounter = 0
  instances = {}

  $el = options.$el

  hoverTarget = (inTarget) -> (e) ->
    $target = $(e.currentTarget)
    ttActions = instances[$target.data(uidStr)]
    if ttActions #this is a known (i.e. open) tooltip
      ttActions.setTargetHover inTarget
    else if inTarget #target has no tooltip but is hovered
      openInstance $target

  $el.hoverIntent
