diff --git a/timeago.install b/timeago.install
index 064ef61..2bec66a 100644
--- a/timeago.install
+++ b/timeago.install
@@ -9,24 +9,109 @@
  * Implements hook_requirements().
  */
 function timeago_requirements($phase) {
+  // Path to library
+  if (module_exists('libraries') && $path = libraries_get_path('timeago')) {
+    $path .= '/' . TIMEAGO_LIBRARY_FILENAME;
+  }
+  else {
+    $path = drupal_get_path('module', 'timeago') . '/' . TIMEAGO_LIBRARY_FILENAME;
+  }
   $t = get_t();
   $requirements = array('timeago' => array(
     'title' => $t('Time ago library'),
-    'value' => '0.9.3',
   ));
-  $exists = file_exists(drupal_get_path('module', 'timeago') . '/jquery.timeago.js');
-  if ($exists) {
-    $requirements['timeago']['description'] = $t('Library exists.');
-    $requirements['timeago']['severity'] = REQUIREMENT_OK;
+
+  // If file exists...
+  if (file_exists($path)) {
+    // Get version information
+    $version = timeago_get_version($path);
+    $requirements['timeago']['value'] = $version;
+
+    // Check for updates, cache remote library file...
+    if ($cache = cache_get('timeago_update_version')) {
+      $update_version = $cache->data;
+    }
+    else {
+      $update_version = timeago_get_version(TIMEAGO_LIBRARY_DOWNLOAD_URL);
+      $bin = 'cache';
+      $expires = strtotime('+1 week');
+      cache_set('timeago_update_version', $update_version, $bin, $expires);
+    }
+
+    // No update info
+    if (!$update_version) {
+      $requirements['timeago']['description'] = $t('Library exists; no update information was found. If desired, you can manually check <a href="@library_download_url">@library_download_url</a> for a newer version of the library.', array('@library_download_url' => TIMEAGO_LIBRARY_DOWNLOAD_URL));
+      $requirements['timeago']['severity'] = REQUIREMENT_WARNING;
+    }
+    // Update available
+    elseif (version_compare($version, $update_version, '<')) {
+      $requirements['timeago']['description'] = $t('A newer version of the library is available. You may wish to download the latest version from <a href="@library_download_url">@library_download_url</a> and overwrite the current version located at @path.', array('@library_download_url' => TIMEAGO_LIBRARY_DOWNLOAD_URL, '@path' => $path));
+      $requirements['timeago']['severity'] = REQUIREMENT_WARNING;
+    }
+    // Everything okay
+    else {
+      $requirements['timeago']['description'] = $t('Library exists and is up to date.');
+      $requirements['timeago']['severity'] = REQUIREMENT_OK;
+    }
   }
+
+  // File does not exist
   else {
-    $requirements['timeago']['description'] = $t('Library does not exist. <a href="http://timeago.yarp.com/jquery.timeago.js">Download the library</a> and put it in the timeago module folder.');
+    if (module_exists('libraries')) {
+      // If libraries module exists, but timeago library is not yet installed, recommend default libraries directory for installation
+      $path = 'sites/all/libraries/timeago/' . TIMEAGO_LIBRARY_FILENAME;
+    }
+    $requirements['timeago']['value'] = NULL;
+    $requirements['timeago']['description'] = $t('Library does not exist. <a href="@library_download_url">Download the library</a> and put it at @path.', array('@library_download_url' => TIMEAGO_LIBRARY_DOWNLOAD_URL, '@path' => $path));
     $requirements['timeago']['severity'] = ($phase == 'runtime' ? REQUIREMENT_ERROR : REQUIREMENT_WARNING);
   }
+
   return $requirements;
 }
 
 /**
+ * Gets the version information from a file.
+ *
+ * @param $path
+ *   The path of the file to check.
+ * @param $options
+ *   An associative array containing with the following keys:
+ *   - pattern: A string containing a regular expression (PCRE) to match the
+ *     library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'.
+ *   - lines: (optional) The maximum number of lines to search the pattern in.
+ *     Defaults to 20.
+ *   - cols: (optional) The maximum number of characters per line to take into
+ *     account. Defaults to 200. In case of minified or compressed files, this
+ *     prevents reading the entire file into memory.
+ *
+ * @return
+ *   A string containing the version of a file, or FALSE if no version detected or file fails to open.
+ *
+ * @see libraries_get_version().
+ */
+function timeago_get_version($path, $options = array()) {
+  $version = FALSE;
+  // Provide defaults.
+  $options += array(
+    'pattern' => '@version\s+([0-9a-zA-Z\.-]+)@',
+    'lines' => 20,
+    'cols' => 200,
+  );
+  $file = fopen($path, 'r');
+  if ($file) {
+    while ($options['lines'] && $line = fgets($file, $options['cols'])) {
+      if (preg_match($options['pattern'], $line, $matches)) {
+        $version = $matches[1];
+        break;
+      }
+      $options['lines']--;
+    }
+    fclose($file);
+  }
+  return $version;
+}
+
+/**
  * Implements hook_uninstall().
  */
 function timeago_uninstall() {
diff --git a/timeago.module b/timeago.module
index cd2b65e..b412639 100644
--- a/timeago.module
+++ b/timeago.module
@@ -5,6 +5,10 @@
  *   Adds support for the Timeago jQuery library.
  */
 
+define('TIMEAGO_LIBRARY_WEBSITE', 'http://timeago.yarp.com/');
+define('TIMEAGO_LIBRARY_FILENAME', 'jquery.timeago.js');
+define('TIMEAGO_LIBRARY_DOWNLOAD_URL', 'http://timeago.yarp.com/jquery.timeago.js');
+
 /**
  * Converts a timestamp into a Timeago date.
  *
@@ -24,10 +28,10 @@ function timeago_format_date($timestamp, $date = NULL) {
   $elem = variable_get('timeago_elem', 'span');
   $time = format_date($timestamp, 'custom', 'c');
   if ($elem == 'time') {
-    return '<time class="timeago" datetime="'. $time .'">'. $date .'</time>';
+    return '<time class="timeago" datetime="' . $time . '">' . $date . '</time>';
   }
   else {
-    return '<'. $elem .' class="timeago" title="'. $time .'">'. $date .'</abbr>';
+    return '<' . $elem . ' class="timeago" title="' . $time . '">' . $date . '</abbr>';
   }
   return $date;
 }
@@ -82,10 +86,10 @@ function timeago_library() {
   return array(
     'timeago' => array(
       'title' => t('Time ago'),
-      'website' => 'http://timeago.yarp.com/',
-      'version' => '0.9.3',
+      'website' => TIMEAGO_LIBRARY_WEBSITE,
+      'version' => '0.11.1',
       'js' => array(
-        $path . '/jquery.timeago.js' => array(),
+        $path . '/' . TIMEAGO_LIBRARY_FILENAME => array(),
         $path . '/timeago.js' => array(),
       ),
     ),
@@ -93,6 +97,28 @@ function timeago_library() {
 }
 
 /**
+ * Implements hook_libraries_info().
+ */
+function timeago_libraries_info() {
+  return array(
+    'timeago' => array(
+      'name' => t('Time ago'),
+      'vendor url' => TIMEAGO_LIBRARY_WEBSITE,
+      'download url' => TIMEAGO_LIBRARY_DOWNLOAD_URL,
+      'version arguments' => array(
+        'file' => TIMEAGO_LIBRARY_FILENAME,
+        'pattern' => '@version\s+([0-9a-zA-Z\.-]+)@', // e.g. @version 0.10.0
+      ),
+      'files' => array(
+        'js' => array(
+          TIMEAGO_LIBRARY_FILENAME => array(),
+        ),
+      ),
+    ),
+  );
+}
+
+/**
  * Implements hook_process_node().
  *
  * We have to use process instead of preprocess because some themes (notably
@@ -167,13 +193,22 @@ function timeago_tokens($type, $tokens, array $data = array(), array $options =
 function timeago_add_js() {
   // Add the Timeago library, the module's helper JS, and the default Drupal
   // translation of Timeago date terms.
-  drupal_add_library('timeago', 'timeago');
+  if (module_exists('libraries')) {
+    $library_path = libraries_get_path('timeago');
+    $path = drupal_get_path('module', 'timeago') . '/timeago.js';
+    drupal_add_js($path);
+    libraries_load('timeago');
+  }
+  else {
+    $library_path = drupal_get_path('module', 'timeago');
+    drupal_add_library('timeago', 'timeago');
+  }
   // Some languages (Arabic, Polish, Russian, Ukranian, etc.) have different
   // suffixes depending on the numbers used in the dates, so we may need to
   // have more complex translations than Drupal allows. To support these cases,
   // we allow adding a script that will override the translations. Examples
   // are available at https://gist.github.com/6251.
-  $path = drupal_get_path('module', 'timeago') . '/jquery.timeago.' . $GLOBALS['language']->language . '.js';
+  $path = $library_path . '/jquery.timeago.' . $GLOBALS['language']->language . '.js';
   if (file_exists($path)) {
     drupal_add_js($path);
   }
