       marginLeft = parseInt($tip.css('margin-left'), 10)
 
       # we must check for NaN for ie 8/9
-      marginTop  = 0 if isNaN(marginTop)
-      marginLeft = 0 if isNaN(marginLeft)
-
-      offset.top  = offset.top  + marginTop
-      offset.left = offset.left + marginLeft
+      offset.top  = offset.top  + if isNaN(marginTop)  then 0 else marginTop
+      offset.left = offset.left + if isNaN(marginLeft) then 0 else marginLeft
 
       # $.fn.offset doesn't round pixel values
       # so we use setOffset directly with our own function B-0

    getCalculatedOffset: (placement, pos, actualWidth, actualHeight) ->
      return if placement == 'bottom' then { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } else
             if placement == 'top'    then { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } else
             if placement == 'left'   then { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } else { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }

    getViewportAdjustedDelta: (placement, pos, actualWidth, actualHeight) ->
      delta = { top: 0, left: 0 }

      @

    fixTitle: ->
      @$element.attr('data-original-title', @$element.attr('title') or '').removeAttr('title') if @$element.attr('title') or typeof (@$element.attr('data-original-title')) != 'string'

    getPosition: ($element) ->
      $element  = $element or @$element
