     
     balloonCenter: ->
       offset = @balloon.offset()
-      {x: offset.left + @balloon.width()/2, y: offset.top + @balloon.height()/2}
+      {x: offset.left + @balloon.outerWidth()/2, y: offset.top + @balloon.outerHeight()/2}
       
     targetCenter: ->
       offset = @targetElement.offset()
-      {x: offset.left + @targetElement.width()/2, y: offset.top + @targetElement.height()/2}
+      {x: offset.left + @targetElement.outerWidth()/2, y: offset.top + @targetElement.outerHeight()/2}
     
     # Give a line from the center of a rectangle to lineEnd, return the
     # point of intersection of the line and rectangle.

      origFrom = @balloonCenter()
      origTo = @targetCenter()
      
      # Move the points to the edge of the elements.
      from = @pointOnRectangle(origFrom, @balloon.width(), @balloon.height(), origTo)
      to = @pointOnRectangle(origTo, @targetElement.width(), @targetElement.height(), origFrom)
      
      segments = []
      segments.push("M", from.x, from.y)

      balloonOffset = @options['offset'] || {horz: -60, vert: -20}
      
      if balloonOffset.horz < 0
        left = targetPosition.left + balloonOffset.horz - @balloon.outerWidth()
      else
        left = targetPosition.left + @targetElement.outerWidth() + balloonOffset.horz
      
      top = targetPosition.top + balloonOffset.vert
        
