--- imagecrop.module	2009-10-10 13:45:22.000000000 +0200
+++ imagecrop-shadowbox.module	2009-10-10 14:53:39.000000000 +0200
@@ -118,6 +118,9 @@ function imagecrop_settings() {
   if (module_exists('thickbox')) {
     $popups['thickbox'] = t('Thickbox');
   }
+  if (module_exists('shadowbox')) {
+    $popups['shadowbox'] = t('Shadowbox');
+  }
   
   $form['imagecrop_popup'] = array(
     '#type' => 'radios',
@@ -357,6 +360,9 @@ function imagecrop_linkitem($fid, $modul
   if ($popup == 'thickbox' && module_exists('thickbox')) {
     return '<a class="thickbox" href="'. $url .'?KeepThis=true&TB_iframe=true&height='. $height .'&width='. $width .'">'. t('Crop this image') .'</a>';
   }
+  elseif ($popup == 'shadowbox' && module_exists('shadowbox')) {
+    return '<a rel="shadowbox;height='.$height.';width='.$width.';player=iframe" href="'. $url .'">'. t('Crop this image') .'</a>';
+  }
   else {
     return '<a href="javascript:;" onclick="window.open(\''. $url .'\',\'imagecrop\',\'menubar=0,scrollbars=1,resizable=1,width='. $width .',height='. $height .'\');">'. t('Crop this image') .'</a>';
   }
