         .fail ->
           $("#memory .spinner").fadeOut ->
             $("#memory .clear").css(display: 'inline-block')
-
-    $('#toggle-memory').click ->
-      if $('#memorypanel').hasClass('hidden')
-        $('#memorypanel').removeClass 'hidden'
-      else
-        $('#memorypanel').addClass 'hidden'
+            
 
 $ ->
   Utils.registerPage(AgentShowPage, forPathsMatching: /^agents\/\d+/)
+

    if tab = window.location.href.match(/tab=(\w+)\b/i)?[1]
      if tab in ["details", "logs"]
        $(".agent-show .nav-pills li a[href='##{tab}']").click()

  fetchLogs: (e) ->
    agentId = $(e.target).closest("[data-agent-id]").data("agent-id")

          $("#logs .refresh, #logs .clear").show()

  clearMemory: (e) ->

    if confirm("Are you sure you want to clear memory of this Agent?")
      agentId = $(e.target).closest("[data-agent-id]").data("agent-id")
      e.preventDefault()
