--- shadowbox.module.orig	2008-11-13 17:02:13.000000000 -0700
+++ shadowbox.module	2009-01-23 16:44:57.000000000 -0700
@@ -690,8 +690,15 @@ function theme_shadowbox_formatter_shado
  */
 function theme_imagefield_image_imagecache_shadowbox($view_preset, $item, $attributes = NULL, $gallery, $gallery_id = "") {
   $filepath = $item['filepath'];
-  $alt = $item['data']['alt'];
-  $title = $item['data']['title'];
+  if (is_string($item['data'])) {
+    $image_data = unserialize($item['data']);
+  }
+  // if no title text set, use alt text
+  $title = (!empty($image_data['title']) ? $image_data['title'] : $image_data['alt']);
+  // if no alt text set, use description text
+  $title = (!empty($title) ? $title : $image_data['description']);
+  // if no alt text set, use title
+  $alt = (!empty($image_data['alt']) ? $image_data['alt'] : $title);
   $rel = ($gallery) ? 'shadowbox['. $gallery_id .']' : 'shadowbox';
   $link_attributes = array(
     'rel' => $rel,
