diff --git a/js/media.js b/js/media.js
index 4e7fdd9..a7a4050 100644
--- a/js/media.js
+++ b/js/media.js
@@ -21,10 +21,11 @@ Drupal.behaviors.mediaElement = {
           // The user has JavaScript enabled, so display the browse field and hide
           // the upload and attach fields which are only used as a fallback in
           // case the user is unable to use the media browser.
-          $(selector, context).children('.browse').show();
-          $(selector, context).children('.upload').hide();
-          $(selector, context).children('.attach').hide();
-          $(selector, context).children('.browse').once().bind('click', {configuration: configuration}, Drupal.media.openBrowser);
+          var $element = $(this);
+          $element.children('.browse').show();
+          $element.children('.upload').hide();
+          $element.children('.attach').hide();
+          $element.children('.browse').once().bind('click', {configuration: configuration}, Drupal.media.openBrowser);
         });
       });
     }
