diff --git a/core/modules/views/views_ui/js/views-admin.js b/core/modules/views/views_ui/js/views-admin.js
index c5a3fc0..c34819d 100644
--- a/core/modules/views/views_ui/js/views-admin.js
+++ b/core/modules/views/views_ui/js/views-admin.js
@@ -4,76 +4,78 @@
  */
 Drupal.viewsUi = {};
 
-Drupal.behaviors.viewsUiEditView = {};
+(function($){
+
+"use strict";
 
 /**
  * Improve the user experience of the views edit interface.
  */
-Drupal.behaviors.viewsUiEditView.attach = function (context, settings) {
-
-  "use strict";
+Drupal.behaviors.viewsUiEditView = {
+  attach: function () {
 
-  // Only show the SQL rewrite warning when the user has chosen the
-  // corresponding checkbox.
-  jQuery('#edit-query-options-disable-sql-rewrite').click(function () {
-    jQuery('.sql-rewrite-warning').toggleClass('js-hide');
-  });
+    // Only show the SQL rewrite warning when the user has chosen the
+    // corresponding checkbox.
+    $('#edit-query-options-disable-sql-rewrite').click(function () {
+      $('.sql-rewrite-warning').toggleClass('js-hide');
+    });
+  }
 };
 
-Drupal.behaviors.viewsUiAddView = {};
-
 /**
  * In the add view wizard, use the view name to prepopulate form fields such as
  * page title and menu link.
  */
-Drupal.behaviors.viewsUiAddView.attach = function (context, settings) {
-
-  "use strict";
-
-  var $ = jQuery;
-  var exclude, replace, suffix;
-  // Set up regular expressions to allow only numbers, letters, and dashes.
-  exclude = new RegExp('[^a-z0-9\\-]+', 'g');
-  replace = '-';
-
-  // The page title, block title, and menu link fields can all be prepopulated
-  // with the view name - no regular expression needed.
-  var $fields = $(context).find('[id^="edit-page-title"], [id^="edit-block-title"], [id^="edit-page-link-properties-title"]');
-  if ($fields.length) {
-    if (!this.fieldsFiller) {
-      this.fieldsFiller = new Drupal.viewsUi.FormFieldFiller($fields);
-    }
-    else {
-      // After an AJAX response, this.fieldsFiller will still have event
-      // handlers bound to the old version of the form fields (which don't exist
-      // anymore). The event handlers need to be unbound and then rebound to the
-      // new markup. Note that jQuery.live is difficult to make work in this
-      // case because the IDs of the form fields change on every AJAX response.
-      this.fieldsFiller.rebind($fields);
+Drupal.behaviors.viewsUiAddView = {
+  attach: function (context) {
+
+    var exclude,
+      replace,
+      suffix,
+      $context = $(context);
+    // Set up regular expressions to allow only numbers, letters, and dashes.
+    exclude = new RegExp('[^a-z0-9\\-]+', 'g');
+    replace = '-';
+
+    // The page title, block title, and menu link fields can all be prepopulated
+    // with the view name - no regular expression needed.
+    var $fields = $context.find('[id^="edit-page-title"], [id^="edit-block-title"], [id^="edit-page-link-properties-title"]');
+    if ($fields.length) {
+      if (!this.fieldsFiller) {
+        this.fieldsFiller = new Drupal.viewsUi.FormFieldFiller($fields);
+      }
+      else {
+        // After an AJAX response, this.fieldsFiller will still have event
+        // handlers bound to the old version of the form fields (which don't exist
+        // anymore). The event handlers need to be unbound and then rebound to the
+        // new markup. Note that jQuery.live is difficult to make work in this
+        // case because the IDs of the form fields change on every AJAX response.
+        this.fieldsFiller.rebind($fields);
+      }
     }
-  }
 
-  // Prepopulate the path field with a URLified version of the view name.
-  var $pathField = $(context).find('[id^="edit-page-path"]');
-  if ($pathField.length) {
-    if (!this.pathFiller) {
-      this.pathFiller = new Drupal.viewsUi.FormFieldFiller($pathField, exclude, replace);
-    }
-    else {
-      this.pathFiller.rebind($pathField);
+    // Prepopulate the path field with a URLified version of the view name.
+    var $pathField = $context.find('[id^="edit-page-path"]');
+    if ($pathField.length) {
+      if (!this.pathFiller) {
+        this.pathFiller = new Drupal.viewsUi.FormFieldFiller($pathField, exclude, replace);
+      }
+      else {
+        this.pathFiller.rebind($pathField);
+      }
     }
-  }
 
-  // Populate the RSS feed field with a URLified version of the view name, and
-  // an .xml suffix (to make it unique).
-  var $feedField = $(context).find('[id^="edit-page-feed-properties-path"]');
-  if ($feedField.length) {
-    if (!this.feedFiller) {
-      suffix = '.xml';
-      this.feedFiller = new Drupal.viewsUi.FormFieldFiller($feedField, exclude, replace, suffix);
-    }
-    else {
-      this.feedFiller.rebind($feedField);
+    // Populate the RSS feed field with a URLified version of the view name, and
+    // an .xml suffix (to make it unique).
+    var $feedField = $context.find('[id^="edit-page-feed-properties-path"]');
+    if ($feedField.length) {
+      if (!this.feedFiller) {
+        suffix = '.xml';
+        this.feedFiller = new Drupal.viewsUi.FormFieldFiller($feedField, exclude, replace, suffix);
+      }
+      else {
+        this.feedFiller.rebind($feedField);
+      }
     }
   }
 };
@@ -96,9 +98,6 @@ Drupal.behaviors.viewsUiAddView.attach = function (context, settings) {
  */
 Drupal.viewsUi.FormFieldFiller = function ($target, exclude, replace, suffix) {
 
-  "use strict";
-
-  var $ = jQuery;
   this.source = $('#edit-human-name');
   this.target = $target;
   this.exclude = exclude || false;
@@ -123,13 +122,11 @@ Drupal.viewsUi.FormFieldFiller = function ($target, exclude, replace, suffix) {
  */
 Drupal.viewsUi.FormFieldFiller.prototype.bind = function () {
 
-  "use strict";
-
   this.unbind();
   // Populate the form field when the source changes.
-  this.source.bind('keyup.viewsUi change.viewsUi', this.populate);
+  this.source.on('keyup.viewsUi change.viewsUi', this.populate);
   // Quit populating the field as soon as it gets focus.
-  this.target.bind('focus.viewsUi', this.unbind);
+  this.target.on('focus.viewsUi', this.unbind);
 };
 
 /**
@@ -137,8 +134,6 @@ Drupal.viewsUi.FormFieldFiller.prototype.bind = function () {
  */
 Drupal.viewsUi.FormFieldFiller.prototype.getTransliterated = function () {
 
-  "use strict";
-
   var from = this.source.val();
   if (this.exclude) {
     from = from.toLowerCase().replace(this.exclude, this.replace);
@@ -151,8 +146,6 @@ Drupal.viewsUi.FormFieldFiller.prototype.getTransliterated = function () {
  */
 Drupal.viewsUi.FormFieldFiller.prototype._populate = function () {
 
-  "use strict";
-
   var transliterated = this.getTransliterated();
   this.target.val(transliterated);
 };
@@ -162,10 +155,8 @@ Drupal.viewsUi.FormFieldFiller.prototype._populate = function () {
  */
 Drupal.viewsUi.FormFieldFiller.prototype._unbind = function () {
 
-  "use strict";
-
-  this.source.unbind('keyup.viewsUi change.viewsUi', this.populate);
-  this.target.unbind('focus.viewsUi', this.unbind);
+  this.source.off('keyup.viewsUi change.viewsUi', this.populate);
+  this.target.off('focus.viewsUi', this.unbind);
 };
 
 /**
@@ -173,33 +164,27 @@ Drupal.viewsUi.FormFieldFiller.prototype._unbind = function () {
  */
 Drupal.viewsUi.FormFieldFiller.prototype.rebind = function ($fields) {
 
-  "use strict";
-
   this.target = $fields;
   this.bind();
 };
 
-Drupal.behaviors.addItemForm = {};
-Drupal.behaviors.addItemForm.attach = function (context) {
+Drupal.behaviors.addItemForm = {
+  attach: function (context) {
 
-  "use strict";
-
-  var $ = jQuery;
-  // The add item form may have an id of views-ui-add-item-form--n.
-  var $form = $(context).find('form[id^="views-ui-add-item-form"]').first();
-  // Make sure we don't add more than one event handler to the same form.
-  $form = $form.once('views-ui-add-item-form');
-  if ($form.length) {
-    new Drupal.viewsUi.addItemForm($form);
+    // The add item form may have an id of views-ui-add-item-form--n.
+    var $form = $(context).find('form[id^="views-ui-add-item-form"]').first();
+    // Make sure we don't add more than one event handler to the same form.
+    $form = $form.once('views-ui-add-item-form');
+    if ($form.length) {
+      new Drupal.viewsUi.addItemForm($form);
+    }
   }
 };
 
 Drupal.viewsUi.addItemForm = function($form) {
 
-  "use strict";
-
   this.$form = $form;
-  this.$form.find('.views-filterable-options :checkbox').click(jQuery.proxy(this.handleCheck, this));
+  this.$form.find('.views-filterable-options :checkbox').click($.proxy(this.handleCheck, this));
   // Find the wrapper of the displayed text.
   this.$selected_div = this.$form.find('.views-selected-options').parent();
   this.$selected_div.hide();
@@ -208,18 +193,15 @@ Drupal.viewsUi.addItemForm = function($form) {
 
 Drupal.viewsUi.addItemForm.prototype.handleCheck = function (event) {
 
-  "use strict";
-
-  var $target = jQuery(event.target);
-  var label = jQuery.trim($target.next().text());
+  var $target = $(event.target);
+  var label = $.trim($target.next().text());
   // Add/remove the checked item to the list.
   if ($target.is(':checked')) {
     this.$selected_div.show();
     this.checkedItems.push(label);
   }
   else {
-    var length = this.checkedItems.length;
-    var position = jQuery.inArray(label, this.checkedItems);
+    var position = $.inArray(label, this.checkedItems);
     // Delete the item from the list and take sure that the list doesn't have undefined items left.
     for (var i = 0; i < this.checkedItems.length; i++) {
       if (i === position) {
@@ -241,8 +223,6 @@ Drupal.viewsUi.addItemForm.prototype.handleCheck = function (event) {
  */
 Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function() {
 
-  "use strict";
-
   // Perhaps we should precache the text div, too.
   this.$selected_div.find('.views-selected-options').html(this.checkedItems.join(', '));
   Drupal.viewsUi.resizeModal('', true);
@@ -253,55 +233,53 @@ Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function() {
  * The following behavior detaches the <input> elements from the DOM, wraps them
  * in an unordered list, then appends them to the list of tabs.
  */
-Drupal.behaviors.viewsUiRenderAddViewButton = {};
+Drupal.behaviors.viewsUiRenderAddViewButton = {
+  attach: function (context) {
 
-Drupal.behaviors.viewsUiRenderAddViewButton.attach = function (context, settings) {
+    // Build the add display menu and pull the display input buttons into it.
+    var $menu = context.find('#views-display-menu-tabs').once('views-ui-render-add-view-button-processed');
 
-  "use strict";
-
-  var $ = jQuery;
-  // Build the add display menu and pull the display input buttons into it.
-  var $menu = $('#views-display-menu-tabs', context).once('views-ui-render-add-view-button-processed');
-
-  if (!$menu.length) {
-    return;
-  }
-  var $addDisplayDropdown = $('<li class="add"><a href="#"><span class="icon add"></span>' + Drupal.t('Add') + '</a><ul class="action-list" style="display:none;"></ul></li>');
-  var $displayButtons = $menu.nextAll('input.add-display').detach();
-  $displayButtons.appendTo($addDisplayDropdown.find('.action-list')).wrap('<li>')
-    .parent().first().addClass('first').end().last().addClass('last');
-  // Remove the 'Add ' prefix from the button labels since they're being palced
-  // in an 'Add' dropdown.
-  // @todo This assumes English, but so does $addDisplayDropdown above. Add
-  //   support for translation.
-  $displayButtons.each(function () {
-    var label = $(this).val();
-    if (label.substr(0, 4) === 'Add ') {
-      $(this).val(label.substr(4));
+    if (!$menu.length) {
+      return;
     }
-  });
-  $addDisplayDropdown.appendTo($menu);
+    var $addDisplayDropdown = $('<li class="add"><a href="#"><span class="icon add"></span>' + Drupal.t('Add') + '</a><ul class="action-list" style="display:none;"></ul></li>');
+    var $displayButtons = $menu.nextAll('input.add-display').detach();
+    $displayButtons.appendTo($addDisplayDropdown.find('.action-list')).wrap('<li>')
+      .parent().first().addClass('first').end().last().addClass('last');
+    // Remove the 'Add ' prefix from the button labels since they're being palced
+    // in an 'Add' dropdown.
+    // @todo This assumes English, but so does $addDisplayDropdown above. Add
+    //   support for translation.
+    $displayButtons.each(function () {
+      var $this = $(this),
+        label = $this.val();
+      if (label.substr(0, 4) === 'Add ') {
+        $this.val(label.substr(4));
+      }
+    });
+    $addDisplayDropdown.appendTo($menu);
 
-  // Add the click handler for the add display button
-  $('li.add > a', $menu).bind('click', function (event) {
-    event.preventDefault();
-    var $trigger = $(this);
-    Drupal.behaviors.viewsUiRenderAddViewButton.toggleMenu($trigger);
-  });
-  // Add a mouseleave handler to close the dropdown when the user mouses
-  // away from the item. We use mouseleave instead of mouseout because
-  // the user is going to trigger mouseout when she moves from the trigger
-  // link to the sub menu items.
-  // We use the live binder because the open class on this item will be
-  // toggled on and off and we want the handler to take effect in the cases
-  // that the class is present, but not when it isn't.
-  $('li.add', $menu).on('mouseleave', function (event) {
-    var $this = $(this);
-    var $trigger = $this.children('a[href="#"]');
-    if ($this.children('.action-list').is(':visible')) {
+    // Add the click handler for the add display button
+    $menu.find('li.add > a').on('click', function (event) {
+      event.preventDefault();
+      var $trigger = $(this);
       Drupal.behaviors.viewsUiRenderAddViewButton.toggleMenu($trigger);
-    }
-  });
+    });
+    // Add a mouseleave handler to close the dropdown when the user mouses
+    // away from the item. We use mouseleave instead of mouseout because
+    // the user is going to trigger mouseout when she moves from the trigger
+    // link to the sub menu items.
+    // We use the live binder because the open class on this item will be
+    // toggled on and off and we want the handler to take effect in the cases
+    // that the class is present, but not when it isn't.
+    $menu.find('li.add').on('mouseleave', function () {
+      var $this = $(this),
+      $trigger = $this.children('a[href="#"]');
+      if ($this.children('.action-list').is(':visible')) {
+        Drupal.behaviors.viewsUiRenderAddViewButton.toggleMenu($trigger);
+      }
+    });
+  }
 };
 
 /**
@@ -310,25 +288,20 @@ Drupal.behaviors.viewsUiRenderAddViewButton.attach = function (context, settings
  */
 Drupal.behaviors.viewsUiRenderAddViewButton.toggleMenu = function ($trigger) {
 
-  "use strict";
-
   $trigger.parent().toggleClass('open');
   $trigger.next().slideToggle('fast');
 };
 
-Drupal.behaviors.viewsUiSearchOptions = {};
-
-Drupal.behaviors.viewsUiSearchOptions.attach = function (context) {
-
-  "use strict";
+Drupal.behaviors.viewsUiSearchOptions = {
+  attach: function (context) {
 
-  var $ = jQuery;
-  // The add item form may have an id of views-ui-add-item-form--n.
-  var $form = $(context).find('form[id^="views-ui-add-item-form"]').first();
-  // Make sure we don't add more than one event handler to the same form.
-  $form = $form.once('views-ui-filter-options');
-  if ($form.length) {
-    new Drupal.viewsUi.OptionsSearch($form);
+    // The add item form may have an id of views-ui-add-item-form--n.
+    var $form = $(context).find('form[id^="views-ui-add-item-form"]').first();
+    // Make sure we don't add more than one event handler to the same form.
+    $form = $form.once('views-ui-filter-options');
+    if ($form.length) {
+      new Drupal.viewsUi.OptionsSearch($form);
+    }
   }
 };
 
@@ -341,12 +314,10 @@ Drupal.behaviors.viewsUiSearchOptions.attach = function (context) {
  */
 Drupal.viewsUi.OptionsSearch = function ($form) {
 
-  "use strict";
-
   this.$form = $form;
   // Add a keyup handler to the search box.
   this.$searchBox = this.$form.find('#edit-options-search');
-  this.$searchBox.keyup(jQuery.proxy(this.handleKeyup, this));
+  this.$searchBox.keyup($.proxy(this.handleKeyup, this));
   // Get a list of option labels and their corresponding divs and maintain it
   // in memory, so we have as little overhead as possible at keyup time.
   this.options = this.getOptions(this.$form.find('.filterable-option'));
@@ -369,9 +340,6 @@ Drupal.viewsUi.OptionsSearch = function ($form) {
  */
 Drupal.viewsUi.OptionsSearch.prototype.getOptions = function ($allOptions) {
 
-  "use strict";
-
-  var $ = jQuery;
   var i, $label, $description, $option;
   var options = [];
   var length = $allOptions.length;
@@ -394,9 +362,7 @@ Drupal.viewsUi.OptionsSearch.prototype.getOptions = function ($allOptions) {
 /**
  * Keyup handler for the search box that hides or shows the relevant options.
  */
-Drupal.viewsUi.OptionsSearch.prototype.handleKeyup = function (event) {
-
-  "use strict";
+Drupal.viewsUi.OptionsSearch.prototype.handleKeyup = function () {
 
   var found, i, j, option, search, words, wordsLength, zebraClass, zebraCounter;
 
@@ -437,51 +403,46 @@ Drupal.viewsUi.OptionsSearch.prototype.handleKeyup = function (event) {
   }
 };
 
-Drupal.behaviors.viewsUiPreview = {};
-Drupal.behaviors.viewsUiPreview.attach = function (context, settings) {
-
-  "use strict";
+Drupal.behaviors.viewsUiPreview = {
+  attach: function (context) {
 
-  var $ = jQuery;
-
-  // Only act on the edit view form.
-  var contextualFiltersBucket = $('.views-display-column .views-ui-display-tab-bucket.contextual-filters', context);
-  if (contextualFiltersBucket.length === 0) {
-    return;
-  }
+    // Only act on the edit view form.
+    var contextualFiltersBucket = context.find('.views-display-column .views-ui-display-tab-bucket.contextual-filters');
+    if (contextualFiltersBucket.length === 0) {
+      return;
+    }
 
-  // If the display has no contextual filters, hide the form where you enter
-  // the contextual filters for the live preview. If it has contextual filters,
-  // show the form.
-  var contextualFilters = $('.views-display-setting a', contextualFiltersBucket);
-  if (contextualFilters.length) {
-    $('#preview-args').parent().show();
-  }
-  else {
-    $('#preview-args').parent().hide();
-  }
+    // If the display has no contextual filters, hide the form where you enter
+    // the contextual filters for the live preview. If it has contextual filters,
+    // show the form.
+    var contextualFilters = contextualFiltersBucket.find('.views-display-setting a');
+    if (contextualFilters.length) {
+      $('#preview-args').parent().show();
+    }
+    else {
+      $('#preview-args').parent().hide();
+    }
 
-  // Executes an initial preview.
-  if ($('#edit-displays-live-preview').once('edit-displays-live-preview').is(':checked')) {
-    $('#preview-submit').once('edit-displays-live-preview').click();
+    // Executes an initial preview.
+    if ($('#edit-displays-live-preview').once('edit-displays-live-preview').is(':checked')) {
+      $('#preview-submit').once('edit-displays-live-preview').click();
+    }
   }
 };
 
-Drupal.behaviors.viewsUiRearrangeFilter = {};
-Drupal.behaviors.viewsUiRearrangeFilter.attach = function (context, settings) {
-
-  "use strict";
+Drupal.behaviors.viewsUiRearrangeFilter = {
+  attach: function (context) {
 
-  var $ = jQuery;
-  // Only act on the rearrange filter form.
-  if (typeof Drupal.tableDrag === 'undefined' || typeof Drupal.tableDrag['views-rearrange-filters'] === 'undefined') {
-    return;
-  }
+    // Only act on the rearrange filter form.
+    if (typeof Drupal.tableDrag === 'undefined' || typeof Drupal.tableDrag['views-rearrange-filters'] === 'undefined') {
+      return;
+    }
 
-  var table = $('#views-rearrange-filters', context).once('views-rearrange-filters');
-  var operator = $('.form-item-filter-groups-operator', context).once('views-rearrange-filters');
-  if (table.length) {
-    new Drupal.viewsUi.rearrangeFilterHandler(table, operator);
+    var table = context.find('#views-rearrange-filters').once('views-rearrange-filters');
+    var operator = context.find('.form-item-filter-groups-operator').once('views-rearrange-filters');
+    if (table.length) {
+      new Drupal.viewsUi.rearrangeFilterHandler(table, operator);
+    }
   }
 };
 
@@ -490,9 +451,6 @@ Drupal.behaviors.viewsUiRearrangeFilter.attach = function (context, settings) {
  */
 Drupal.viewsUi.rearrangeFilterHandler = function (table, operator) {
 
-  "use strict";
-
-  var $ = jQuery;
   // Keep a reference to the <table> being altered and to the div containing
   // the filter groups operator dropdown (if it exists).
   this.table = table;
@@ -500,11 +458,11 @@ Drupal.viewsUi.rearrangeFilterHandler = function (table, operator) {
   this.hasGroupOperator = this.operator.length > 0;
 
   // Keep a reference to all draggable rows within the table.
-  this.draggableRows = $('.draggable', table);
+  this.draggableRows = table.find('.draggable');
 
   // Keep a reference to the buttons for adding and removing filter groups.
   this.addGroupButton = $('input#views-add-group');
-  this.removeGroupButtons = $('input.views-remove-group', table);
+  this.removeGroupButtons = table.find('input.views-remove-group');
 
   // Add links that duplicate the functionality of the (hidden) add and remove
   // buttons.
@@ -527,9 +485,9 @@ Drupal.viewsUi.rearrangeFilterHandler = function (table, operator) {
   // next to the filters in each group, and bind a handler so that they change
   // based on the values of the operator dropdown within that group.
   this.redrawOperatorLabels();
-  $('.views-group-title select', table)
+  table.find('.views-group-title select')
     .once('views-rearrange-filter-handler')
-    .bind('change.views-rearrange-filter-handler', $.proxy(this, 'redrawOperatorLabels'));
+    .on('change.views-rearrange-filter-handler', $.proxy(this, 'redrawOperatorLabels'));
 
   // Bind handlers so that when a "Remove" link is clicked, we:
   // - Update the rowspans of cells containing an operator dropdown (since they
@@ -537,10 +495,10 @@ Drupal.viewsUi.rearrangeFilterHandler = function (table, operator) {
   // - Redraw the operator labels next to the filters in the group (since the
   //   filter that is currently displayed last in each group is not supposed to
   //   have a label display next to it).
-  $('a.views-groups-remove-link', this.table)
+  this.table.find('a.views-groups-remove-link')
     .once('views-rearrange-filter-handler')
-    .bind('click.views-rearrange-filter-handler', $.proxy(this, 'updateRowspans'))
-    .bind('click.views-rearrange-filter-handler', $.proxy(this, 'redrawOperatorLabels'));
+    .on('click.views-rearrange-filter-handler', $.proxy(this, 'updateRowspans'))
+    .on('click.views-rearrange-filter-handler', $.proxy(this, 'redrawOperatorLabels'));
 };
 
 /**
@@ -548,10 +506,6 @@ Drupal.viewsUi.rearrangeFilterHandler = function (table, operator) {
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.insertAddRemoveFilterGroupLinks = function () {
 
-  "use strict";
-
-  var $ = jQuery;
-
   // Insert a link for adding a new group at the top of the page, and make it
   // match the action links styling used in a typical page.tpl.php. Note that
   // Drupal does not provide a theme function for this markup, so this is the
@@ -561,12 +515,12 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.insertAddRemoveFilterGroupLinks
     // When the link is clicked, dynamically click the hidden form button for
     // adding a new filter group.
     .once('views-rearrange-filter-handler')
-    .bind('click.views-rearrange-filter-handler', $.proxy(this, 'clickAddGroupButton'));
+    .on('click.views-rearrange-filter-handler', $.proxy(this, 'clickAddGroupButton'));
 
   // Find each (visually hidden) button for removing a filter group and insert
   // a link next to it.
   var length = this.removeGroupButtons.length;
-  for (i = 0; i < length; i++) {
+  for (var i = 0; i < length; i++) {
     var $removeGroupButton = $(this.removeGroupButtons[i]);
     var buttonId = $removeGroupButton.attr('id');
     $('<a href="#" class="views-remove-group-link">' + Drupal.t('Remove group') + '</a>')
@@ -574,7 +528,7 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.insertAddRemoveFilterGroupLinks
       // When the link is clicked, dynamically click the corresponding form
       // button.
       .once('views-rearrange-filter-handler')
-      .bind('click.views-rearrange-filter-handler', {buttonId: buttonId}, $.proxy(this, 'clickRemoveGroupButton'));
+      .on('click.views-rearrange-filter-handler', {buttonId: buttonId}, $.proxy(this, 'clickRemoveGroupButton'));
   }
 };
 
@@ -583,8 +537,6 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.insertAddRemoveFilterGroupLinks
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.clickAddGroupButton = function () {
 
-  "use strict";
-
   // Due to conflicts between Drupal core's AJAX system and the Views AJAX
   // system, the only way to get this to work seems to be to trigger both the
   // .mousedown() and .submit() events.
@@ -602,12 +554,10 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.clickAddGroupButton = function (
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.clickRemoveGroupButton = function (event) {
 
-  "use strict";
-
   // For some reason, here we only need to trigger .submit(), unlike for
   // Drupal.viewsUi.rearrangeFilterHandler.prototype.clickAddGroupButton()
   // where we had to trigger .mousedown() also.
-  jQuery('input#' + event.data.buttonId, this.table).submit();
+  this.table.find('input#' + event.data.buttonId).submit();
   event.preventDefault();
 };
 
@@ -617,12 +567,10 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.clickRemoveGroupButton = functio
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.duplicateGroupsOperator = function () {
 
-  "use strict";
-
-  var $ = jQuery;
   var dropdowns, newRow;
 
-  var titleRows = $('tr.views-group-title'), titleRow;
+  var $titleRows = $('tr.views-group-title'),
+    $titleRow;
 
   // Get rid of the explanatory text around the operator; its placement is
   // explanatory enough.
@@ -633,21 +581,21 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.duplicateGroupsOperator = functi
   dropdowns = this.operator;
 
   // Move the operator to a new row just above the second group.
-  titleRow = $('tr#views-group-title-2');
+  $titleRow = $('tr#views-group-title-2');
   newRow = $('<tr class="filter-group-operator-row"><td colspan="5"></td></tr>');
   newRow.find('td').append(this.operator);
-  newRow.insertBefore(titleRow);
-  var i, length = titleRows.length;
+  newRow.insertBefore($titleRow);
+  var i, length = $titleRows.length;
   // Starting with the third group, copy the operator to a new row above the
   // group title.
   for (i = 2; i < length; i++) {
-    titleRow = $(titleRows[i]);
+    $titleRow = $($titleRows[i]);
     // Make a copy of the operator dropdown and put it in a new table row.
     var fakeOperator = this.operator.clone();
     fakeOperator.attr('id', '');
     newRow = $('<tr class="filter-group-operator-row"><td colspan="5"></td></tr>');
     newRow.find('td').append(fakeOperator);
-    newRow.insertBefore(titleRow);
+    newRow.insertBefore($titleRow);
     dropdowns = dropdowns.add(fakeOperator);
   }
 
@@ -659,14 +607,12 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.duplicateGroupsOperator = functi
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.syncGroupsOperators = function () {
 
-  "use strict";
-
   if (this.dropdowns.length < 2) {
     // We only have one dropdown (or none at all), so there's nothing to sync.
     return;
   }
 
-  this.dropdowns.change(jQuery.proxy(this, 'operatorChangeHandler'));
+  this.dropdowns.change($.proxy(this, 'operatorChangeHandler'));
 };
 
 /**
@@ -676,9 +622,6 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.syncGroupsOperators = function (
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.operatorChangeHandler = function (event) {
 
-  "use strict";
-
-  var $ = jQuery;
   var $target = $(event.target);
   var operators = this.dropdowns.find('select').not($target);
 
@@ -688,8 +631,6 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.operatorChangeHandler = function
 
 Drupal.viewsUi.rearrangeFilterHandler.prototype.modifyTableDrag = function () {
 
-  "use strict";
-
   var tableDrag = Drupal.tableDrag['views-rearrange-filters'];
   var filterHandler = this;
 
@@ -709,11 +650,11 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.modifyTableDrag = function () {
       // Make sure the row that just got moved (this.group) is inside one of
       // the filter groups (i.e. below an empty marker row or a draggable). If
       // it isn't, move it down one.
-      var thisRow = jQuery(this.group);
-      var previousRow = thisRow.prev('tr');
-      if (previousRow.length && !previousRow.hasClass('group-message') && !previousRow.hasClass('draggable')) {
+      var $thisRow = $(this.group);
+      var $previousRow = $thisRow.prev('tr');
+      if ($previousRow.length && !$previousRow.hasClass('group-message') && !$previousRow.hasClass('draggable')) {
         // Move the dragged row down one.
-        var next = thisRow.next();
+        var next = $thisRow.next();
         if (next.is('tr')) {
           this.swap('after', next);
         }
@@ -729,18 +670,16 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.modifyTableDrag = function () {
    * Override the onDrop method from tabledrag.js.
    */
   tableDrag.onDrop = function () {
-    var $ = jQuery;
-
     // If the tabledrag change marker (i.e., the "*") has been inserted inside
     // a row after the operator label (i.e., "And" or "Or") rearrange the items
     // so the operator label continues to appear last.
-    var changeMarker = $(this.oldRowElement).find('.tabledrag-changed');
-    if (changeMarker.length) {
+    var $changeMarker = $(this.oldRowElement).find('.tabledrag-changed');
+    if ($changeMarker.length) {
       // Search for occurrences of the operator label before the change marker,
       // and reverse them.
-      var operatorLabel = changeMarker.prevAll('.views-operator-label');
+      var operatorLabel = $changeMarker.prevAll('.views-operator-label');
       if (operatorLabel.length) {
-        operatorLabel.insertAfter(changeMarker);
+        operatorLabel.insertAfter($changeMarker);
       }
     }
 
@@ -749,7 +688,7 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.modifyTableDrag = function () {
     // implementation of tableDrag.onDrop().
     var groupRow = $(this.rowObject.element).prevAll('tr.group-message').get(0);
     var groupName = groupRow.className.replace(/([^ ]+[ ]+)*group-([^ ]+)-message([ ]+[^ ]+)*/, '$2');
-    var groupField = $('select.views-group-select', this.rowObject.element);
+    var groupField = this.rowObject.element.find('select.views-group-select', this.rowObject.element);
     if ($(this.rowObject.element).prev('tr').is('.group-message') && !groupField.is('.views-group-select-' + groupName)) {
       var oldGroupName = groupField.attr('class').replace(/([^ ]+[ ]+)*views-group-select-([^ ]+)([ ]+[^ ]+)*/, '$2');
       groupField.removeClass('views-group-select-' + oldGroupName).addClass('views-group-select-' + groupName);
@@ -763,14 +702,11 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.modifyTableDrag = function () {
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.redrawOperatorLabels = function () {
 
-  "use strict";
-
-  var $ = jQuery;
-  for (i = 0; i < this.draggableRows.length; i++) {
+  for (var i = 0; i < this.draggableRows.length; i++) {
     // Within the row, the operator labels are displayed inside the first table
     // cell (next to the filter name).
     var $draggableRow = $(this.draggableRows[i]);
-    var $firstCell = $('td:first', $draggableRow);
+    var $firstCell = $draggableRow.find('td:first');
     if ($firstCell.length) {
       // The value of the operator label ("And" or "Or") is taken from the
       // first operator dropdown we encounter, going backwards from the current
@@ -811,9 +747,6 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.redrawOperatorLabels = function
  */
 Drupal.viewsUi.rearrangeFilterHandler.prototype.updateRowspans = function () {
 
-  "use strict";
-
-  var $ = jQuery;
   var i, $row, $currentEmptyRow, draggableCount, $operatorCell;
   var rows = $(this.table).find('tr');
   var length = rows.length;
@@ -841,65 +774,59 @@ Drupal.viewsUi.rearrangeFilterHandler.prototype.updateRowspans = function () {
   }
 };
 
-Drupal.behaviors.viewsFilterConfigSelectAll = {};
-
 /**
  * Add a select all checkbox, which checks each checkbox at once.
  */
-Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
-
-  "use strict";
-
-  var $ = jQuery;
-  // Show the select all checkbox.
-  $('#views-ui-config-item-form div.form-item-options-value-all', context).once(function() {
-    $(this).show();
-  })
-  .find('input[type=checkbox]')
-  .click(function() {
-    var checked = $(this).is(':checked');
-    // Update all checkbox beside the select all checkbox.
-    $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() {
-      $(this).attr('checked', checked);
+Drupal.behaviors.viewsFilterConfigSelectAll = {
+  attach: function(context) {
+
+    // Show the select all checkbox.
+    $(context).find('#views-ui-config-item-form div.form-item-options-value-all').once(function() {
+      $(this).show();
+    })
+    .find('input[type=checkbox]')
+    .click(function() {
+      var checked = $(this).is(':checked');
+      // Update all checkbox beside the select all checkbox.
+      $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() {
+        $(this).attr('checked', checked);
+      });
     });
-  });
-  // Uncheck the select all checkbox if any of the others are unchecked.
-  $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function() {
-    $(this).click(function() {
-      if ($(this).is('checked') === 0) {
-        $('#edit-options-value-all').removeAttr('checked');
-      }
+    // Uncheck the select all checkbox if any of the others are unchecked.
+    $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function() {
+      $(this).click(function() {
+        if ($(this).is('checked') === 0) {
+          $('#edit-options-value-all').removeAttr('checked');
+        }
+      });
     });
-  });
+  }
 };
 
 /**
  * Remove icon class from elements that are themed as buttons or dropbuttons.
  */
-Drupal.behaviors.viewsRemoveIconClass = {};
-Drupal.behaviors.viewsRemoveIconClass.attach = function (context, settings) {
+Drupal.behaviors.viewsRemoveIconClass = {
+  attach: function (context) {
 
-  "use strict";
-
-  jQuery(context).find('.dropbutton').once('dropbutton-icon', function () {
-    jQuery(this).find('.icon').removeClass('icon');
-  });
+    $(context).find('.dropbutton').once('dropbutton-icon', function () {
+      $(this).find('.icon').removeClass('icon');
+    });
+  }
 };
 
 /**
  * Change "Expose filter" buttons into checkboxes.
  */
-Drupal.behaviors.viewsUiCheckboxify = {};
-Drupal.behaviors.viewsUiCheckboxify.attach = function (context, settings) {
-
-  "use strict";
-
-  var $ = jQuery;
-  var $buttons = $('#edit-options-expose-button-button, #edit-options-group-button-button').once('views-ui-checkboxify');
-  var length = $buttons.length;
-  var i;
-  for (i = 0; i < length; i++) {
-    new Drupal.viewsUi.Checkboxifier($buttons[i]);
+Drupal.behaviors.viewsUiCheckboxify = {
+  attach: function () {
+
+    var $buttons = $('#edit-options-expose-button-button, #edit-options-group-button-button').once('views-ui-checkboxify');
+    var length = $buttons.length;
+    var i;
+    for (i = 0; i < length; i++) {
+      new Drupal.viewsUi.Checkboxifier($buttons[i]);
+    }
   }
 };
 
@@ -907,30 +834,28 @@ Drupal.behaviors.viewsUiCheckboxify.attach = function (context, settings) {
  * Change the default widget to select the default group according to the
  * selected widget for the exposed group.
  */
-Drupal.behaviors.viewsUiChangeDefaultWidget = {};
-Drupal.behaviors.viewsUiChangeDefaultWidget.attach = function (context, settings) {
-
-  "use strict";
-
-  var $ = jQuery;
-  function change_default_widget(multiple) {
-    if (multiple) {
-      $('input.default-radios').hide();
-      $('td.any-default-radios-row').parent().hide();
-      $('input.default-checkboxes').show();
-    }
-    else {
-      $('input.default-checkboxes').hide();
-      $('td.any-default-radios-row').parent().show();
-      $('input.default-radios').show();
+Drupal.behaviors.viewsUiChangeDefaultWidget = {
+  attach: function () {
+
+    function change_default_widget(multiple) {
+      if (multiple) {
+        $('input.default-radios').hide();
+        $('td.any-default-radios-row').parent().hide();
+        $('input.default-checkboxes').show();
+      }
+      else {
+        $('input.default-checkboxes').hide();
+        $('td.any-default-radios-row').parent().show();
+        $('input.default-radios').show();
+      }
     }
+    // Update on widget change.
+    $('input[name="options[group_info][multiple]"]').change(function() {
+      change_default_widget($(this).attr("checked"));
+    });
+    // Update the first time the form is rendered.
+    $('input[name="options[group_info][multiple]"]').trigger('change');
   }
-  // Update on widget change.
-  $('input[name="options[group_info][multiple]"]').change(function() {
-    change_default_widget($(this).attr("checked"));
-  });
-  // Update the first time the form is rendered.
-  $('input[name="options[group_info][multiple]"]').trigger('change');
 };
 
 /**
@@ -941,9 +866,6 @@ Drupal.behaviors.viewsUiChangeDefaultWidget.attach = function (context, settings
  */
 Drupal.viewsUi.Checkboxifier = function (button) {
 
-  "use strict";
-
-  var $ = jQuery;
   this.$button = $(button);
   this.$parent = this.$button.parent('div.views-expose, div.views-grouped');
   this.$input = this.$parent.find('input:checkbox, input:radio');
@@ -958,9 +880,7 @@ Drupal.viewsUi.Checkboxifier = function (button) {
 /**
  * When the checkbox is checked or unchecked, simulate a button press.
  */
-Drupal.viewsUi.Checkboxifier.prototype.clickHandler = function (e) {
-
-  "use strict";
+Drupal.viewsUi.Checkboxifier.prototype.clickHandler = function () {
 
   this.$button.mousedown();
   this.$button.submit();
@@ -969,52 +889,51 @@ Drupal.viewsUi.Checkboxifier.prototype.clickHandler = function (e) {
 /**
  * Change the Apply button text based upon the override select state.
  */
-Drupal.behaviors.viewsUiOverrideSelect = {};
-Drupal.behaviors.viewsUiOverrideSelect.attach = function (context, settings) {
-
-  "use strict";
-
-  var $ = jQuery;
-  $('#edit-override-dropdown', context).once('views-ui-override-button-text', function() {
-    // Closures! :(
-    var $submit = $('#edit-submit', context);
-    var old_value = $submit.val();
-
-    $submit.once('views-ui-override-button-text')
-      .bind('mouseup', function() {
-        $(this).val(old_value);
-        return true;
-      });
-
-    $(this).bind('change', function() {
-      if ($(this).val() === 'default') {
-        $submit.val(Drupal.t('Apply (all displays)'));
-      }
-      else if ($(this).val() === 'default_revert') {
-        $submit.val(Drupal.t('Revert to default'));
-      }
-      else {
-        $submit.val(Drupal.t('Apply (this display)'));
-      }
-    })
-    .trigger('change');
-  });
-
+Drupal.behaviors.viewsUiOverrideSelect = {
+  attach: function (context) {
+    context.find('#edit-override-dropdown').once('views-ui-override-button-text', function() {
+      // Closures! :(
+      var $submit = context.find('#edit-submit');
+      var old_value = $submit.val();
+
+      $submit.once('views-ui-override-button-text')
+        .on('mouseup', function() {
+          $(this).val(old_value);
+          return true;
+        });
+
+      $(this).on('change', function() {
+        var value = $(this).val();
+        if (value === 'default') {
+          $submit.val(Drupal.t('Apply (all displays)'));
+        }
+        else if (value === 'default_revert') {
+          $submit.val(Drupal.t('Revert to default'));
+        }
+        else {
+          $submit.val(Drupal.t('Apply (this display)'));
+        }
+      })
+      .trigger('change');
+    });
+  }
 };
 
 Drupal.viewsUi.resizeModal = function (e, no_shrink) {
 
-  "use strict";
-
-  var $ = jQuery;
-  var $modal = $('.views-ui-dialog');
-  var $scroll = $('.scroll', $modal);
+  var $modal = $('.views-ui-dialog'),
+    $scroll = $modal.find('.scroll');
   if ($modal.size() === 0 || $modal.css('display') === 'none') {
     return;
   }
 
-  var maxWidth = parseInt($(window).width() * .85); // 70% of window
-  var minWidth = parseInt($(window).width() * .6); // 70% of window
+  var windowWidth = $(window).width(),
+    windowHeight = $(window).height();
+
+  // 70% of window
+  var maxWidth = parseInt(windowWidth * 0.85, 10);
+  // 70% of window
+  var minWidth = parseInt(windowWidth * 0.6, 10);
 
   // Set the modal to the minwidth so that our width calculation of
   // children works.
@@ -1022,8 +941,8 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
   var width = minWidth;
 
   // Don't let the window get more than 80% of the display high.
-  var maxHeight = parseInt($(window).height() * .8);
-  var minHeight = 200;
+  var maxHeight = parseInt(windowHeight * 0.8, 10),
+    minHeight = 200;
   if (no_shrink) {
     minHeight = $modal.height();
   }
@@ -1037,8 +956,8 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
   // Calculate the height of the 'scroll' region.
   var scrollHeight = 0;
 
-  scrollHeight += parseInt($scroll.css('padding-top'));
-  scrollHeight += parseInt($scroll.css('padding-bottom'));
+  scrollHeight += parseInt($scroll.css('padding-top'), 10);
+  scrollHeight += parseInt($scroll.css('padding-bottom'), 10);
 
   $scroll.children().each(function() {
     var w = $(this).innerWidth();
@@ -1052,13 +971,13 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
   // will be.
 
   var difference = 0;
-  difference += parseInt($scroll.css('padding-top'));
-  difference += parseInt($scroll.css('padding-bottom'));
+  difference += parseInt($scroll.css('padding-top'), 10);
+  difference += parseInt($scroll.css('padding-bottom'), 10);
   difference += $('.views-override').outerHeight(true);
   difference += $('.views-messages').outerHeight(true);
   difference += $('#views-ajax-title').outerHeight(true);
   difference += $('.views-add-form-selected').outerHeight(true);
-  difference += $('.form-buttons', $modal).outerHeight(true);
+  difference += $modal.find('.form-buttons').outerHeight(true);
 
   height = scrollHeight + difference;
 
@@ -1076,8 +995,8 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
   }
 
   // Get where we should move content to
-  var top = ($(window).height() / 2) - (height / 2);
-  var left = ($(window).width() / 2) - (width / 2);
+  var top = (windowHeight / 2) - (height / 2);
+  var left = (windowWidth / 2) - (width / 2);
 
   $modal.css({
     'top': top + 'px',
@@ -1096,10 +1015,11 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
 
 };
 
-jQuery(function() {
-
-  "use strict"
-
-  jQuery(window).bind('resize', Drupal.viewsUi.resizeModal);
-  jQuery(window).bind('scroll', Drupal.viewsUi.resizeModal);
+$(function() {
+  $(window).on({
+    resize: Drupal.viewsUi.resizeModal,
+    scroll: Drupal.viewsUi.resizeModal
+  });
 });
+
+})(jQuery);
