       li = $('<li class="file"></li>').append(link)
       $("#asset-results ul").amplePanels('append', li)
       @load_img(link, el.sizes.tn)
+    @active_panel = $("#asset-results ul")
+    
 
   build: (el) ->
     ref = this

    if @options.pages[i]['panel_selector']
      @active_panel = @options.pages[i]['panel_selector']
      $(@options.pages[i]['panel_selector']).amplePanels('enable') 
      $('nav.controls').show()

  already_loaded: (i) ->
    @log "already_loaded(#{i})"
    typeof @options.pages[i]['loaded'] == 'boolean' && @options.pages[i]['loaded']

  remove: (el) ->

    down = 40
    escape = 27
    $(document).keydown (e) =>
      # return unless @keys_enabled or @active_panel
      switch e.keyCode
        when previous
          $(@active_panel).amplePanels('previous')
