         })
 
   apply_to: (items) ->
+    filtered = 0
+
     items.each (i, element) =>
       event_name = element.className.replace /alert\s+/, ""
       if @filter_set(element).is_filtered(event_name)
-        #console.log "Filtering: #{event_name} on #{@repo_name(element)}"
-        #$(element).css "opacity", 0.2
-        $(element).remove()
+        $(element).css "opacity", 0.4
+        $(element).hide()
+        filtered++
+
+    @increment_counter(filtered)
 
   maybe_load_more: ->
     if @$alerts().length < 20

    $("#dashboard > .news")

  $alerts: ->
    @$news().find(".alert")

  filter_set: (element) ->
    new FilterSet(@repo_name(element))


class NewsFeedFilter
  inject: ->
    $("head").append "<style>#{@css()}</style>"
    @rebind_events()
    @inject_counter()
    @apply_to(@$alerts())
    @maybe_load_more()

  inject_counter: ->
    @$news().prepend("""
      <div class="amck-gh-filter-counter">
        Filtered <span>0</span> events
        <a href="">Show all</a>
      </div>
    """)

    @$news().find(".amck-gh-filter-counter a").click (event) =>
      @$news().find(".alert:hidden").show()
      event.preventDefault()

  rebind_events: ->
    @$news().delegate ".ajax_paginate", "click", (event) =>
