diff --git a/js/media.admin.js b/js/media.admin.js
index f396b13..b79e4c4 100644
--- a/js/media.admin.js
+++ b/js/media.admin.js
@@ -1,4 +1,3 @@
-
 /**
  * @file
  * Javascript for the interface at admin/content/media and also for interfaces
@@ -14,18 +13,15 @@
  */
 Drupal.behaviors.mediaAdmin = {
   attach: function (context) {
-    var show_confirm_if_existing_selections = function () {
+    // Show a javascript confirmation dialog if a user has files selected and
+    // they try to switch between the "Thumbnail" and "List" local tasks.
+    $('.media-display-switch a').bind('click', function () {
       if ($(':checkbox:checked', $('form#media-admin')).length != 0) {
         return confirm(Drupal.t('If you switch views, you will lose your selection.'));
       }
-    }
+    });
 
-    $('.media-display-switch a').bind('click', show_confirm_if_existing_selections)
     // Configure the "Add file" link to fire the media browser popup.
-    $('ul.action-links li', context).hide();
-    if ($('form.media-list-operation', context).length != 0) {
-      return;
-    }
     var $launcherLink = $('<a class="media-launcher" href="#"></a>').html(Drupal.t('Add file'));
     $launcherLink.bind('click', function () {
       // This option format needs *serious* work.
@@ -43,9 +39,12 @@ Drupal.behaviors.mediaAdmin = {
         return false;
       }, options);
     });
-    $('ul.action-links', context).append($('<li></li>').append($launcherLink));
+    $('ul.action-links', context).prepend($('<li></li>').append($launcherLink));
 
 
+    if ($('form.media-list-operation', context).length != 0) {
+      return;
+    }
     if ($('body.page-admin-content-media-thumbnails').length != 0) {
       // Implements 'select all/none' for thumbnail view.
       // @TODO: Support grabbing more than one page of thumbnails.
@@ -146,4 +145,3 @@ Drupal.behaviors.mediaTypesAdmin = {
 
 
 })(jQuery);
-
