diff --git a/cufon.module b/cufon.module
index 51b5b86..2c69075 100644
--- a/cufon.module
+++ b/cufon.module
@@ -1,4 +1,5 @@
 <?php
+// $Id: cufon.module,v 1.6 2009/08/26 21:33:54 eads Exp $
 /**
  * @file
  * Adds simple Cufón support to Drupal. 
@@ -18,12 +19,15 @@ function cufon_perm() {
  */
 function cufon_init() {
   $js = drupal_get_path('module', 'cufon') .'/js';
+  if(module_exists('libraries') && file_exists(libraries_get_path('cufon') .'/cufon-yui.js')) {
+    $js = libraries_get_path('cufon');
+  }
   if (!file_exists($js .'/cufon-yui.js')) {
     drupal_set_message(t('<strong>Cufón:</strong> You must download <a href="http://cufon.shoqolate.com/js/cufon-yui.js">cufon-yui.js</a> and install it to <code>@js</code>.', array('@js' => $js)));
     return;
   }
   drupal_add_js($js .'/cufon-yui.js', 'module');
-  drupal_add_js($js .'/cufon-drupal.js', 'module', 'footer');
+  drupal_add_js(drupal_get_path('module', 'cufon') .'/cufon-drupal.js', 'module', 'footer');
 }
 
 /**
