     $confirmation = $('<div style="display: none" id="alchemyConfirmation" />')
     $confirmation.appendTo "body"
     $confirmation.html "<p>" + options.message + "</p>"
-    Alchemy.ConfirmationWindow = $confirmation.dialog(
+    Alchemy.ConfirmationWindow = $confirmation.dialog
       resizable: false
       minHeight: 100
       minWidth: 300

      options.height = $(window).height() - 50
    $dialog = $('<div style="display: none" id="alchemyOverlay" />')
    $dialog.appendTo "body"
    $dialog.html Alchemy.getOverlaySpinner(
      width: (if options.width is "auto" then 400 else options.width)
      height: (if options.height is "auto" then 300 else options.height)
    )
    Alchemy.CurrentWindow = $dialog.dialog(
      modal: options.modal
      minWidth: (if options.width is "auto" then 400 else options.width)
      minHeight: (if options.height is "auto" then 300 else options.height)


    # Opens the trash window
    open: (page_id, title) ->
      Alchemy.TrashWindow.current = Alchemy.openWindow(
        Alchemy.routes.admin_trash_path(page_id),
        title: title,
        width: 380,
        height: 450,
        maxHeight: $(window).height() - 50,
        modal: false
      )

    # Refreshes the trash window
    refresh: (page_id) ->
      if Alchemy.TrashWindow.current
        Alchemy.TrashWindow.current.html Alchemy.getOverlaySpinner(width: 380, height: 270)
        $.get Alchemy.routes.admin_trash_path(page_id), (html) ->
          Alchemy.TrashWindow.current.html html

  # Adds onClick events for Alchemy overlays
  #
