Index: colorbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/colorbox/colorbox.module,v
retrieving revision 1.19.2.3
diff -u -p -u -p -r1.19.2.3 colorbox.module
--- colorbox.module	25 Jul 2010 17:35:28 -0000	1.19.2.3
+++ colorbox.module	23 Aug 2010 05:45:42 -0000
@@ -171,18 +171,6 @@ function _colorbox_doheader() {
     return; // Don't add the JavaScript and CSS on specified paths.
   }
 
-  $path = drupal_get_path('module', 'colorbox');
-  $style = variable_get('colorbox_style', 'default');
-  switch ($style) {
-    case 'default':
-      drupal_add_css($path .'/styles/default/colorbox_default_style.css');
-      break;
-    case 'none':
-      break;
-    default:
-      drupal_add_css($style .'/colorbox.css');
-  }
-
   // Insert options and translated strings as javascript settings.
   if (variable_get('colorbox_custom_settings_activate', 0)) {
     $js_settings = array(
@@ -222,6 +210,28 @@ function _colorbox_doheader() {
       'maxHeight' => '100%',
     );
   }
+
+
+  $path = drupal_get_path('module', 'colorbox');
+  $style = variable_get('colorbox_style', 'default');
+
+  // Give other modules the possibility to override Colorbox settings and
+  // style.
+  $data = &$js_settings;
+  $data['__drupal_alter_by_ref'] = array(&$style);
+  drupal_alter('colorbox_settings', $data);
+
+  // Add CSS based on selected style.
+  switch ($style) {
+    case 'none':
+      break;
+    case 'default':
+      drupal_add_css($path .'/styles/default/colorbox_default_style.css');
+      break;
+    default:
+      drupal_add_css($style .'/colorbox.css');
+  }
+
   drupal_add_js(array('colorbox' => $js_settings), 'setting');
 
   if (module_exists('image') && variable_get('colorbox_auto_image_nodes', 0)) {
Index: js/colorbox.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/colorbox/js/colorbox.js,v
retrieving revision 1.6.2.1
diff -u -p -u -p -r1.6.2.1 colorbox.js
--- js/colorbox.js	11 Jul 2010 12:34:24 -0000	1.6.2.1
+++ js/colorbox.js	23 Aug 2010 05:45:42 -0000
@@ -3,23 +3,10 @@
 
 Drupal.behaviors.initColorbox = function (context) {
   var settings = Drupal.settings.colorbox;
-  $('a, area, input', context).filter('.colorbox:not(.initColorbox-processed)').addClass('initColorbox-processed').colorbox({
-    transition:settings.transition,
-    speed:settings.speed,
-    opacity:settings.opacity,
-    slideshow:settings.slideshow,
-    slideshowSpeed:settings.slideshowSpeed,
-    slideshowAuto:settings.slideshowAuto,
-    slideshowStart:settings.slideshowStart,
-    slideshowStop:settings.slideshowStop,
-    current:settings.current,
-    previous:settings.previous,
-    next:settings.next,
-    close:settings.close,
-    overlayClose:settings.overlayClose,
-    maxWidth:settings.maxWidth,
-    maxHeight:settings.maxHeight
-  });
+  $('a, area, input', context)
+    .filter('.colorbox:not(.initColorbox-processed)')
+    .addClass('initColorbox-processed')
+    .colorbox(Drupal.settings.colorbox);
 };
 
 })(jQuery);
