 
   show: ->
     @el.toggleClass 'hidden', false
-    $(@associated)?.toggleClass 'showing-overlay', true
+    $(@associated).toggleClass 'showing-overlay', true
     @hidden = false
-    addEventListener 'click', @onClick, false
     addEventListener 'hashchange', @onHashChange, false
     addEventListener 'keydown', @onKeyDown, false
 
   hide: ->
     @el.toggleClass 'hidden', true
-    $(@associated)?.toggleClass 'showing-overlay', false
+    $(@associated).toggleClass 'showing-overlay', false
     @hidden = true
-    removeEventListener 'click', @onClick, false
     removeEventListener 'hashchange', @onHashChange, false
     removeEventListener 'keydown', @onKeyDown, false
 


  hidden: true

  clickedVeryRecently: false

  constructor: ->
    super
    @el.addClass @constructor::className

    @hide() if @hidden
    @el.prependTo document.body

  onHashChange: =>
    setTimeout (=> @hide()), 250

  onKeyDown: (e) =>
    if e.which is ESC
