     #   4. If we are in the middle of sleeping, stop and speed up our waking
     #      transition.
     #   5. Update our trigger cache.
-    wakeByTrigger: ($t, evt, cb) ->
+    wakeByTrigger: ($trigger, event, onWake) ->
       # - Check.
-      triggerChanged = not $t.is @_$tCurrent
+      triggerChanged = not $trigger.is @_$currentTrigger
       if triggerChanged
-        @_inflateByTrigger $t
-        @_$tCurrent = $t
+        @_inflateByTrigger $trigger
+        @_$currentTrigger = $trigger
       # - Guard.
-      if @_state is 'awake' and cb?
-        cb()
+      if @_state is 'awake' and onWake?
+        onWake()
         @debugLog 'quick update'
         return yes
-      if evt? then @debugLog evt.type
+      if event? then @debugLog event.type
       return no if @_state in ['awake', 'waking']
       # - Prepare.
-      delay = @o.ms.delay.in
-      duration = @o.ms.duration.in
+      delay = @ms.delay.in
+      duration = @ms.duration.in
       wake = =>
-        @onShow triggerChanged, evt
+        @onShow triggerChanged, event
         @$tip.fadeIn duration, =>
           if triggerChanged
-            cb() if cb?
-          if @o.safeToggle is on then @$tip.siblings(@o.cls.tip).fadeOut()
-          @afterShow triggerChanged, evt
+            onWake() if onWake?
+          if @safeToggle is on then @$tip.siblings(@classNames.tip).fadeOut()
+          @afterShow triggerChanged, event
           @_state = 'awake'
       # - Run.
       if @_state is 'sleeping'

        when 'class'  then 'js-snap-tips'
        else 'hlf.snapTip'

    defaults: do (pre='js-snap-tip-') ->
      $.extend true, {}, hlf.tip.defaults,
        snap:
          toTrigger: on
          toXAxis: off
          toYAxis: off
        cls: (->
          cls =
            snap: {}
          _.each
            toXAxis:   'x-side'
            toYAxis:   'y-side'
            toTrigger: 'trigger'
          , (val, key) -> cls.snap[key] = "#{pre}#{val}"
          cls.tip = 'js-tip js-snap-tip'
          return cls
        )()

  # Tip API
  # -------
  class Tip

    constructor: (@$ts, @o, @$ctx) ->
      _.bindAll @, '_onTriggerMouseMove', '_setBounds'
      @$tip = $ '<div>'
      @doStem = @o.cls.stem isnt ''
      @doFollow = @o.cls.follow isnt ''
      # - Toggle state: `awake`, `asleep`, `waking`, `sleeping`.
      @_state = 'asleep'
      @_$tCurrent = null
      # - Process tip
      @_render()
      @_bind()
      # - Process triggers
      @$ts.each (idx, el) =>
        $t = $ el
        $t.addClass @o.cls.trigger
        @_saveTriggerContent $t
        @_bindTrigger $t
        @_updateDirectionByTrigger $t

    # ###Protected

    _defaultHtml: ->
      do (c=@o.cls) =>
        cDir = $.trim _.reduce @o.defaultDirection, ((cls, dir) => "#{cls} #{c[dir]}"), ''
        containerClass = $.trim [c.tip, c.follow, cDir].join ' '
        stemHtml = "<div class='#{c.stem}'></div>" if @doStem is on
        # - Not using block strings b/c Docco 0.3.0 can't correctly parse them.
        html = "<div class=\"#{containerClass}\"><div class=\"#{c.inner}\">#{stemHtml}<div class='#{c.content}'>"+
               "</div></div></div>"

    _saveTriggerContent: ($t) ->
      title = $t.attr 'title'
      if title then $t.data(@attr('content'), title).removeAttr 'title'

    # - Link the trigger to the tip for:
    #   1. mouseenter, mouseleave (uses special events)
    #   2. mousemove
    _bindTrigger: ($t) ->
      $t.on @evt('truemouseenter'), (evt) =>
        @debugLog evt
        @_onTriggerMouseMove evt
      $t.on @evt('truemouseleave'), (evt) => @sleepByTrigger $t
      if @doFollow is on
        if window.requestAnimationFrame?
          onMouseMove = (evt) =>
            requestAnimationFrame (timestamp) =>
              @_onTriggerMouseMove evt
        else 
          onMouseMove = _.throttle @_onTriggerMouseMove, 16
        $t.on 'mousemove', onMouseMove

    # - Bind to the tip on hover so the toggling makes an exception.
    _bind: () ->
      @$tip
        .on 'mouseenter', (evt) =>
          @debugLog 'enter tip'
          if @_$tCurrent?
            @_$tCurrent.data @attr('is-active'), yes
            @wakeByTrigger @_$tCurrent
        .on 'mouseleave', (evt) =>
          @debugLog 'leave tip'
          if @_$tCurrent?
            @_$tCurrent.data @attr('is-active'), no
            @sleepByTrigger @_$tCurrent
      # - Handle adapting to window resize.
      if @o.autoDirection is on
        $(window).resize _.debounce @_setBounds, 300

    # - The tip should only need to be rendered once.

      defaultDirection: ['south', 'east']
      safeToggle: on
      autoDirection: on
      classNames: do ->
        classNames = {}
        keys = ['inner', 'content', 'stem', 'north', 'east', 'south', 'west', 'follow', 'trigger']
        (classNames[key] = "#{pre}#{key}") for key in keys
        classNames.tip = 'js-tip'
        classNames

  # Snap-Tip
  # --------
