diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 6bf7ded..6ff1fbe 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,7 @@
 
 jQuery 7.x-1.x, xxxx-xx-xx
 --------------------------
+#763378 by Rob Loach: Update to latest additions in Libraries API and Drush.
 #1190398 by pillarsdotnet, sun: Updated for libraries_detect().
 by sun: First stab at Libraries API integration.
 by sun: Initial baseline of module files.
diff --git a/jquery.info b/jquery.info
index de3d129..8fab0fb 100644
--- a/jquery.info
+++ b/jquery.info
@@ -1,6 +1,6 @@
 name = jQuery
 description = Allows to use jQuery libraries and update to later versions.
 core = 7.x
-dependencies[] = libraries
+dependencies[] = libraries (2.x)
 files[] = jquery.module
 files[] = tests/jquery.test
diff --git a/jquery.install b/jquery.install
index 788cdc8..eda7fe5 100644
--- a/jquery.install
+++ b/jquery.install
@@ -5,3 +5,25 @@
  * Installation functions for jQuery module.
  */
 
+/**
+ * Implements hook_requirements().
+ */
+function jquery_requirements($phase) {
+  $requirements = array();
+
+  switch ($phase) {
+    case 'runtime':
+      // Display the jQuery version on the system report page.
+      $library = libraries_detect('jquery');
+      $jquery = drupal_get_library('system', 'jquery');
+      $requirements['jquery'] = array(
+        'title' => t('jQuery'),
+        'value' => $jquery['version'],
+        'description' => $library['installed'] ? '' : t('The <em>jQuery</em> library is currently not being upgraded.'),
+        'severity' => $library['installed'] ? REQUIREMENT_OK : REQUIREMENT_WARNING,
+      );
+      break;
+  }
+
+  return $requirements;
+}
diff --git a/jquery.module b/jquery.module
index bd8adb3..fa5b323 100644
--- a/jquery.module
+++ b/jquery.module
@@ -5,49 +5,51 @@
  * jQuery libraries functionality.
  */
 
-function jquery_init() {
-  return;
-  $name = 'jquery';
-  $library = libraries_detect($name);
-  dsm($library);
-  #libraries_load($name, 'minified');
-}
-
 /**
  * Implements hook_library_alter().
  */
 function jquery_library_alter(&$libraries, $module) {
   if ($module == 'system') {
+
     // @todo Abstract to conditionally replace all jQuery libraries in core.
+
+    // Update jQuery.
     $name = 'jquery';
     $library = libraries_detect($name);
-
     if ($library['installed']) {
-      $libraries[$name]['version'] = $library['version'];
+      $libraries['jquery']['version'] = $library['version'];
 
-      // @todo Hardcoded for now.
-      $variant = &$library['variants']['minified'];
+      // @TODO: Support variant files. For now, just focus on the main one.
+      //$variant = &$library['variants']['minified'];
 
-      // $libraries always uses an array structure for 'js' files. Each file can
-      // have an individual weight and group. This hack assumes that the
-      // replacement version contains the exact same files. Additionally,
-      // Libraries API file definitions do not contain an absolute path to the
-      // file, since the actual path can vary and is automatically detected and
-      // stored as 'library path'.
-      // @todo Libraries API should transpose + default all 'files' definitions
-      //   to always use the array structure, too.
-      foreach ($libraries[$name]['js'] as $filename => $args) {
-        $basename = basename($filename);
-        if (isset($variant['files']['js'][$basename])) {
-          $replacement = $library['library path'] . '/' . $variant['files']['js'][$basename]['data'];
-          $libraries[$name]['js'][$filename]['data'] = $replacement;
+      // Make sure the new data paths are relative to the library's new path.
+      foreach ($library['files']['js'] as $file => $options) {
+        $library['files']['js'][$file]['data'] = $library['library path'] . '/' . $options['data'];
+      }
 
-          // @todo Integration files for later versions also need to be assigned
-          //   here, since libraries_load() is not going to be invoked.
+      // Replace all the Javascript files.
+      $libraries['jquery']['js'] = $library['files']['js'];
+    }
 
-          // All remaining files in the replacement library need to be added
-          // in a second step somehow.
-          unset($variant['files']['js'][$basename]);
+    // Replace jQuery UI.
+    $library = libraries_detect('jquery_ui');
+    $components = array('ui', 'ui.accordion', 'ui.autocomplete', 'ui.button',
+      'ui.datepicker', 'ui.dialog', 'ui.draggable', 'ui.droppable', 'ui.mouse',
+      'ui.position', 'ui.progressbar', 'ui.resizable', 'ui.selectable',
+      'ui.slider', 'ui.sortable', 'ui.tabs', 'ui.widget', 'effects',
+      'effects.blind', 'effects.bounce', 'effects.clip', 'effects.drop',
+      'effects.explode', 'effects.fade', 'effects.fold', 'effects.highlight',
+      'effects.pulsate', 'effects.scale', 'effects.shake', 'effects.slide',
+      'effects.transfer');
+    foreach ($components as $component) {
+      // Replace all the JavaScript and CSS for the associated libraries.
+      foreach (array('js', 'css') as $asset) {
+        if (isset($libraries[$component]['files'][$asset])) {
+          // Reference each file relative from the library's path.
+          foreach ($libraries[$component]['files'][$asset] as $file => $options) {
+            $libraries[$component]['files'][$asset][$file]['data'] = $library['library path'] . '/' . $options['data'];
+          }
+          $libraries[$component][$asset] = array_intersect_assoc($library['files'][$asset], $libraries[$component][$asset]);
         }
       }
     }
@@ -57,81 +59,90 @@ function jquery_library_alter(&$libraries, $module) {
 /**
  * Implements hook_libraries_info().
  *
- * @todo Downloaded library is not an archive but the JS file itself, and
- *   contains the library version and variant; e.g., jquery-1.4.3.min.js.
- *   Not a single 'files' property can be defined, because the values are always
- *   different. Same applies to the 'file' argument of 'version arguments'.
- * @todo Default version callback documentation, phpDoc, and example pattern is
- *   wrong. 'pattern' always needs to capture the entire version string in \1.
  * @todo Local/remote variants are different kind of variants than the usual
  *   source/minified/etc variants. They are additional, not substitutes.
  * @todo All variants are marked as installed by the version callback, even
  *   though only one variant exists.
  */
 function jquery_libraries_info() {
+  // jQuery
   $libraries['jquery'] = array(
     'name' => 'jQuery',
     'vendor url' => 'http://jquery.com',
     'download url' => 'http://docs.jquery.com/Downloading_jQuery',
+    'download' => array(
+      'url' => 'http://code.jquery.com/jquery-1.7.1.min.js',
+      'type' => 'get',
+      'filename' => 'jquery.js',
+      'directory_name' => 'jquery',
+    ),
     'files' => array(
-      'js' => array('jquery.js'),
+      'js' => array(
+        'misc/jquery.js' => array(
+          'data' => 'jquery.js',
+          'group' => JS_LIBRARY,
+          'weight' => -20,
+        ),
+      ),
     ),
-    'version callback' => 'jquery_libraries_get_version',
     'version arguments' => array(
       'file' => 'jquery.js',
-      // 1.4.3+: jQuery JavaScript Library v1.4.3
-      'pattern' => '/v((?:\d+\.?){2,3})$/',
+      // ! jQuery v1.7.1 jquery.com | jquery.org/license */
+      'pattern' => '@v([0-9\.-]{2,})@',
       'lines' => 2,
     ),
-  );
-  $libraries['jquery']['variants'] = array(
-    'minified' => array(
-      'files' => array(
-        'js' => array('jquery.min.js'),
+    // @TODO: Support variants.
+    'variants' => array(
+      'minified' => array(
+        'files' => array(
+          'js' => array('jquery.min.js'),
+        ),
+      ),
+      'source' => array(
+      ),
+      // @TODO: Support CDNs.
+      'cdn-jquery' => array(
+        'library path' => 'http://code.jquery.com',
+        'files' => array(
+          'js' => array('jquery-1.7.1.min.js'),
+        ),
       ),
     ),
-    'source' => array(
+  );
+
+  // jQuery UI
+  $libraries['jquery_ui'] = array(
+    'name' => 'jQuery UI',
+    'vendor url' => 'http://jqueryui.com/',
+    'download url' => 'http://jqueryui.com/download',
+    'download' => array(
+      'url' => 'http://jqueryui.com/download/jquery-ui-1.8.16.custom.zip',
+      'type' => 'get',
     ),
-    'cdn-jquery' => array(
-      'library path' => 'http://code.jquery.com',
-      'files' => array(
-        'js' => array('jquery-1.4.3.min.js'),
+    // @TODO: Is the library sub-path retained?
+    'path' => 'development-bundle',
+    'files' => array(
+      'js' => array(
+        // @TODO: Add the other JavaScript files.
+        'misc/ui/jquery.ui.core.min.js' => array(
+          'data' => 'ui/minified/jquery.ui.core.min.js',
+          'group' => JS_LIBRARY,
+          'weight' => -11,
+        ),
+      ),
+      // TODO: Add all the CSS files.
+      'css' => array(
+        'misc/ui/jquery.ui.core.css' => array(
+          'data' => 'themes/jquery.ui.core.css',
+        ),
       ),
     ),
+    'version arguments' => array(
+      'file' => 'development-bundle/version.txt',
+      'pattern' => '@([0-9\.-]{2,})@',
+      'lines' => 1,
+    ),
   );
   return $libraries;
 }
 
-/**
- * Libraries version callback for jQuery library.
- */
-function jquery_libraries_get_version(&$library, &$options) {
-  // Figure out the actual library file name.
-  $dir = DRUPAL_ROOT . '/' . $library['library path'];
-  $files = file_scan_directory($dir, '@^jquery.*\.js$@', array(
-    'key' => 'filename',
-    'recurse' => FALSE,
-  ));
-  if (!empty($files)) {
-    // Change 'version arguments' accordingly.
-    $options['file'] = key($files);
-    // @todo Change respective 'files' definitions in $library accordingly. Ugh.
-    foreach ($files as $filename => $file) {
-      // @todo Special handling for the purpose of replacing core libraries; in
-      //   hook_library_alter(), we need to figure out, what core files need to
-      //   be replaced, and, which files not contained in core (but contained in
-      //   a later version) need to be added to the library files. Ugh.
-      $js_files = array(
-        'jquery.js' => array('data' => $filename),
-      );
-      if (strpos($filename, '.min') !== FALSE) {
-        $library['variants']['minified']['files']['js'] = $js_files;
-      }
-      else {
-        $library['files']['js'] = $js_files;
-      }
-    }
-
-    return libraries_get_version($library, $options);
-  }
-}
