diff --git dialog.module dialog.module
index 451a27f..22eddc7 100644
--- dialog.module
+++ dialog.module
@@ -43,6 +43,9 @@ function dialog_add_js() {
     return;
   }
 
+  // Include CTools ajax so it can preprocess the page.
+  ctools_include('ajax');
+
   $settings = array(
     'Dialog' => array(
       'throbber' => theme('image', ctools_image_path('throbber.gif'), t('Loading...'), t('Loading')),
@@ -50,7 +53,7 @@ function dialog_add_js() {
       'width' => variable_get('dialog_default_width', '600px'),
     )
   );
-  
+
   drupal_add_js($settings, 'setting');
   drupal_add_js('misc/jquery.form.js');
   ctools_add_js('ajax-responder');
@@ -172,13 +175,13 @@ function dialog_form_render($form_state, $output) {
 /**
  * Generic dialog replacement for drupal_get_form().  Suitable for use as the
  * page callback in a menu item.
- * 
- * This function introduces a new form callback function to handle the 
+ *
+ * This function introduces a new form callback function to handle the
  * post-submit dialog commands, in the ajax context.  This function takes the
- * form of form_id_dialog_success.  If this function is found, it will be 
+ * form of form_id_dialog_success.  If this function is found, it will be
  * automatically called after a valid submission of the form has been detected.
- * If the function does not exist, a redirect will be issued based on the 
- * redirect value in the form_state array.  As the final fallback, if the 
+ * If the function does not exist, a redirect will be issued based on the
+ * redirect value in the form_state array.  As the final fallback, if the
  * redirect value is missing or empty, a client-side reload command is issued.
  *
  * @param $id
@@ -225,6 +228,6 @@ function dialog_get_form($form_id, $js) {
  * Process variables for dialog-content.tpl.php.
  */
 function template_preprocess_dialog_content(&$variables) {
-  $variables['help'] = theme('help');  
+  $variables['help'] = theme('help');
   $variables['messages'] = theme('status_messages');
 }
