       @showArtistList() if @category?
       @showAlbumList() if @artist?
       
+      $("#dropbox").offset state.dropbox if state.dropbox
+      
       log state.currentView
       
       @displayScreen state.currentView, null
+      
+      
+  ## DROPBOX ##
+  
+  loadDropbox: ->
+    $("#dropbox .imagelist").html("")
+    @showImageInDropbox id for id in @imageCookie.getAll() if @imageCookie.getAll()?
+
+    $("#dropbox").droppable {
+      drop: (ev, ui) =>
+        id = ui.draggable.data('id')
+        if not @imageCookie.contains id
+          @imageCookie.add id
+          @showImageInDropbox id
+        else
+          alert 'already here'
+    }
+    $("#dropbox").draggable {
+      stop: =>
+        @saveState()
+    }
+
+  showImageInDropbox: (imageId, imageMeta) ->
+    if imageMeta?
+      $("#dropbox .imagelist").append @view('dropboximage',{ image: imageMeta })
+    else
+      @model.getImage imageId, {}, @callback('showImageInDropbox', imageId)  
+      
+  '#dropbox .cancel click': (el) -> #TODO: fix
+    @imageCookie.clear()
+    $("#dropbox .imagelist").html("")
+
+  setDraggable: (el) ->
+    el.draggable {
+      containment: 'document'
+      helper: 'clone'
+      zIndex: 100
+      start: ->
+        $("#dropbox .active").show()
+      stop: ->
+        $("#dropbox .active").hide()
+    }   
+      
   
   ## GENERAL DISPLAY
   

  init: ->
    @imageCookie = new Dreamcatcher.Classes.CookieHelper "imagebank"
    @stateCookie = new Dreamcatcher.Classes.CookieHelper "ib_state"
    @restoreState()
    @loadDropbox()
    
    
  ## STATE MANAGEMENT
    
  saveState: (currentView) ->
    state = {
      section: @section
      type: @type
      category: @category
      artist: @artist
      currentView: currentView
    }
    @stateCookie.set JSON.stringify(state)
    log state

    $(".counter").text("1/"+imageIds.length)    
    @model.findImagesById imageIds.join(','), {}, (images) =>
      @displayScreen 'slideshow', @view('slideshow', { images: images })




    
