-
 define [
   'jquery'
 ], ($) ->

      @trigger = $(clickEvent.currentTarget)
      @el = $(@content)
              .addClass('carat-bottom')
              .attr( "role", "dialog" )
              .data('popover', this)
              .keyup (event) =>
                @hide() if event.keyCode is $.ui.keyCode.ESCAPE
      @el.delegate '.popover_close', 'click', (event) =>
        event.preventDefault()
        @hide()

      @show(clickEvent)


        activePopovers.splice(index, 1) if this is popover

      @el.detach()
      @trigger.attr 'aria-expanded', false
      clearInterval @positionInterval
      $(window).unbind 'click', @outsideClickHandler

    ignoreOutsideClickSelector: '.ui-dialog'

