       @overlay.removeClass 'show'
     @
 
+  open: (cid) ->
+    @updateImage cid if @images[cid]?
+    @
+
   next: ->
     next = @current + 1
 


    @createThumbnails() if @options.thumbnails
    @overlay.addClass 'show'
    @updateImage cid
    @

  close: ->

    @current = cid

    @container.removeClass 'show'

    if isHistory and updateHistory
      title = if @images[cid].title then 'Image: ' + @images[cid].title else null
      history.pushState null, title, '#image' + cid

    @updateThumbnails() if @options.thumbnails

    @getImageSize cid, (cid) ->
      @container.addClass 'show'

