Index: public/sites/all/modules/shadowbox/shadowbox.module
===================================================================
--- public/sites/all/modules/shadowbox/shadowbox.module	(revision )
+++ public/sites/all/modules/shadowbox/shadowbox.module	(revision )
@@ -503,11 +503,11 @@
   else {
     $output = theme('image', $image);
   }
-
-  if ($variables['image_link']) {
-    $path = image_style_path($style_name, $item['uri']);
+  $linked_style = $variables['image_link'];
+  if ($linked_style) {
+    $path = image_style_path($linked_style, $item['uri']);
     if (!file_exists($path)) {
-      $path = image_style_url($style_name, $item['uri']);
+      $path = image_style_url($linked_style, $item['uri']);
     }
   }
   else {
