 
       }
 
-    this.bind 'deletePost', ->
+    @bind 'deletePost', ->
       target = "##{context.params['post_id']} .bubble"
       $.ajax {
         type: "DELETE",

      else
        document.title = context.title

    this.bind 'audioNotification', ->
      $('body').append '<audio id="player" src="/sound.mp3" autoplay />'
      audio = $('#player')
      $(audio).bind 'ended', ->
        $(this).remove

    this.bind 'moveTo', (e, data) ->
      $.each [window.location.hash, data.hash], (index, value) ->
        if value?
          $(value).livequery () ->
            $(this).addClass('anchor')
            $('html,body').animate({scrollTop: $(this).offset().top},'slow')
            $(value).livequery().expire()

    this.bind 'subscribeToWS', (e, data) ->
      id = data.id
      unless pusher.channels.channels[id]
        channel = pusher.subscribe id

          context.trigger 'hideLoadingNotification'
      }

    @bind 'showContent', (e, data) ->
      $(data.target).show().html data.data
      @trigger 'updateTitle'

    @bind 'addContent', (e, data) ->
      id = data.target || "#contents"
      $(id).append(data.data)

    @bind 'replaceContent', (e, data) ->
      $(data.target).html(data.data)

    @bind 'updateTitle', ->
      title = $('.page-title').attr 'title'
      $("#page-title").html title
      document.title = "Blabbr - #{title}"

    @bind 'notify', ->
      context.trigger 'lostFocus'
      context.trigger 'blinkTitle', 1
      if current_user.audio?
        @trigger 'audioNotification'

    @bind 'lostFocus', ->
      window.isActive = false

    @bind 'blinkTitle', (e, state) ->
      unless window.isActive
        if state == 1
          document.title = "[new!] - #{context.title}";
