diff --git a/README.txt b/README.txt
index b6eeacd..a5abccd 100644
--- a/README.txt
+++ b/README.txt
@@ -88,6 +88,7 @@ this:
         'callback' => 'example_somefunction',
         'includes' => array('theme', 'unicode'),
         'dependencies' => array('locale', 'filter', 'user'),
+        'file' => 'includes/example.inc'
       ),
     );
   }
diff --git a/js.php b/js.php
index 2a2f20d..74544cb 100644
--- a/js.php
+++ b/js.php
@@ -43,7 +43,7 @@ function js_execute_callback($phase = 1) {
   global $locale;
   
   // remember between phases
-  static $full_bootstrap, $modules, $info, $args, $dependencies; 
+  static $full_bootstrap, $modules, $module, $info, $args, $dependencies; 
   
   // first phase bootstraps, loads includes
   // and prepares the module list to determine whether 
@@ -156,6 +156,12 @@ function js_execute_callback($phase = 1) {
           module_invoke_all('init');
         }
       }
+
+      // If the callback function is located in another file, load that file now.
+      if (isset($info['file']) && ($filepath = drupal_get_path('module', $module) . '/' . $info['file']) && file_exists($filepath)) {
+        require_once $filepath;
+      }
+
       // Invoke callback function.
       return call_user_func_array($info['callback'], $args);
       break;
