diff --git a/jquery_ui.module b/jquery_ui.module
index 8e47caa..83e971e 100644
--- a/jquery_ui.module
+++ b/jquery_ui.module
@@ -19,7 +19,7 @@
  *   An array of what additional files (other than UI core) should be loaded
  *   on the page, or a string with a single file name.
  */
-function jquery_ui_add($files = array()) {
+function jquery_ui_add($files = array(), $theme = null) {
   static $loaded_files, $ui_core, $effects_core;
 
   $jquery_ui_path = jquery_ui_get_path();
@@ -28,6 +28,12 @@ function jquery_ui_add($files = array()) {
   }
   $jquery_ui_path .= '/ui';
   $compression = variable_get('jquery_update_compression_type', 'mini');
+  
+  // Select theme to use.
+  if ($theme == NULL) {
+    $theme = variable_get('jquery_ui_theme', 'base');
+  }
+  $theme_path = jquery_ui_get_path() . '/themes/' . $theme;
 
   // Convert file to an array if it's not one already, to compensate for
   // lazy developers. ;)
@@ -39,6 +45,17 @@ function jquery_ui_add($files = array()) {
   if (!isset($ui_core)) {
     $ui_core = TRUE;
     jquery_ui_add(array('ui.core'));
+
+    // Add minimal CSS when using base theme, otherwise add full themeroller
+    // style.
+    if ($theme == 'base') {
+      drupal_add_css($theme_path . '/ui.theme.css');
+    }
+    else {
+      drupal_add_css($theme_path . '/ui.all.css');
+      $css_path = $theme_path . '/jquery-ui-'.jquery_ui_get_version().'.custom.css';
+      drupal_add_css($css_path);
+    }
   }
 
   // Loop through list of files to include and add them to the page.
@@ -67,6 +84,11 @@ function jquery_ui_add($files = array()) {
       }
       $js_path = $jquery_ui_path . '/' . $file_path;
       drupal_add_js($js_path);
+
+      // Add modular CSS files when using base theme.
+      if ($theme == 'base') {
+        drupal_add_css($theme_path . '/' . $file . '.css');
+      }
       $loaded_files[$file] = $js_path;
     }
   }
@@ -134,3 +156,38 @@ function jquery_ui_get_version() {
   return $version;
 }
 
+/**
+ * Implementation of hook_menu()
+ */
+function jquery_ui_menu() {
+  $items['admin/settings/jquery_ui'] = array(
+    'title' => 'jQuery UI',
+    'description' => 'Configure settings for jQuery UI module.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('jquery_ui_settings'),
+    'access arguments' => array('administer site configuration'),
+  );
+  return $items;
+}
+
+/**
+ * Menu callback to display settings form.
+ */
+function jquery_ui_settings() {
+  $theme_path = jquery_ui_get_path() . '/themes';
+  $options = array('base' => '&lt;' . t('default') . '&gt;');
+
+  $files = file_scan_directory($theme_path, '.*', array('.', '..', 'CVS', 'base', '.DS_Store'), 0, FALSE, 'basename');
+  foreach ($files as $name => $file) {
+    $options[$name] = $name;
+  }
+
+  $form['jquery_ui_theme'] = array(
+    '#type' => 'radios',
+    '#title' => t('Select jQuery UI theme'),
+    '#default_value' => variable_get('jquery_ui_theme', 'base'),
+    '#options' => $options,
+  );
+
+  return system_settings_form($form);
+}
\ No newline at end of file
