 window.App.Members =
   first_time: true,
+  requests_pool: [],
 
   init: ->
     $("#tab_loader").show()
 
-    $(".members_tabs a").bind "ajax:complete", (request) ->
+    $(".members_tabs a").bind "ajax:complete", (event, request) ->
       $("#tab_loader").hide()
+
+    $(".members_tabs a").bind "ajax:beforeSend", (event, request) ->
+      window.App.Members.abort_requests()
+      window.App.Members.requests_pool.push(request)
 
     $(document).on "click", ".members_tabs a", ->
       $("#tab_loader, #activity_loader, #cards_loader").show()

      url: url
      method: "GET"
      async: true
    ).done ->
      $("#tab_loader").hide()
      $("#activity_loader").hide()


      window.App.Members.first_time = false

  abort_requests: ->
    console.log window.App.Members.requests_pool
    $.each window.App.Members.requests_pool, (idx, request) ->
      if request.readyState != 4
        request.abort()

    window.App.Members.requests_pool = []

  save_state: (a_selector)->
    state = { tab_id: a_selector.prop("id"), path: a_selector.prop("href") }
    if window.App.Members.first_time
