Index: /extensions/Juza/js/juzascript.js
===================================================================
--- /extensions/Juza/js/juzascript.js	(revision 4481)
+++ /extensions/Juza/js/juzascript.js	(revision 4482)
@@ -6,33 +6,34 @@
     $(this).addClass('bigImg').attr('src', $(this).attr('src').replace('thumbnail/TN-', ''));
   });
+	$('.thumbnailCategories li').addClass('Juza-cat');
+	$('.description li').removeClass('Juza-cat');
+  $nav = $('#content .navigationBar').html();
+	if ($nav == null) $nav = '';
+	$('#content .navigationBar').hide(); 
+	$('div.titrePage h2').after('<div id="Juza-Thumbs"></div>'+$nav); 
+  $reltag = $('#menubar #mbTags').html();
+	if ($reltag == null) $reltag = '';
+	$reltag = '<div id="relTag">' + $reltag + '</div>';
+	$('#copyright').before('<div id="jquery_local_img">' + $reltag + '</div>');
+  $('span.wrap2 a img').click(function() {
+    $scr = $(this).attr('src').replace('thumbnail/TN-', '');
+    $href = $(this).parent('a').attr('href');
+    $alt = $(this).attr('alt');
+    $(this).parent('h3 a').attr('href', '#Juza-Thumbs');
+    $temp = $href.substr($href.indexOf('/')+1);
+    $temp = $temp.substr(0,$temp.indexOf('/'));
+    $title = $('#ix-desc .Thumb-'+$temp).attr('title');
+    $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$scr+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
+	  $(this).hover(function() { },function() {
+	    $(this).parent('h3 a').eq(0).attr('href', $href);
+	  });
+});
+
+	if ($reltag == '') $('#jquery_local_img').hide();
   $('.thumbnailCategory .description h3 a').each(function() {
     $cat_url = $(this).attr('href');
     $cat_tree = $('#menubar #mbCategories dd ul li a[href="'+$cat_url+'"]').next('.menuInfoCatByChild').next().html();
     if ($cat_tree == null) $cat_tree = '';
-    $(this).parent('h3').next('.text').after('<ul>'+$cat_tree+'</ul>');
+    $(this).parent('h3').eq(0).next('.text').after('<ul>'+$cat_tree+'</ul>');
   }); 
-	$('.thumbnailCategories li').addClass('Juza-cat');
-	$('.description li').removeClass('Juza-cat');
-  $reltag = $('#menubar #mbTags').html();
-	if ($reltag == null) $reltag = '';
-	$reltag = '<div id="relTag">' + $reltag + '</div>';
-	$('#copyright').before('<div id="jquery_local_img">' + $reltag + '</div>');
-  $reltag = $('#content .navigationBar').html();
-	if ($reltag == null) $reltag = '';
-	$('#content .navigationBar').css('display','none'); 
-	$('div.titrePage h2').after('<div id="Juza-Thumbs"></div>'+$reltag); 
-  $('span.wrap2 a img').click(function() {
-    $scr = $(this).attr('src').replace('thumbnail/TN-', '');
-    $href = $(this).parent('a').attr('href');
-    $alt = $(this).attr('alt');
-    $(this).parent('a').attr('href', '#Juza-Thumbs');
-    $temp = $href.substr($href.indexOf('/')+1);
-    $temp = $temp.substr(0,$temp.indexOf('/'));
-    $title = $('#ix-desc .Thumb-'+$temp).attr('title');
-    $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$scr+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
-  });
-  $('span.wrap2 a img').hover(function() { },function() {
-    $(this).parent('a').attr('href', $href);
-  });
-	if ($reltag == '') $('#jquery_local_img').hide();
 });
Index: /extensions/Juza/script.tpl
===================================================================
--- /extensions/Juza/script.tpl	(revision 4481)
+++ /extensions/Juza/script.tpl	(revision 4482)
@@ -22,2 +22,53 @@
 </div>
 {/if}
+{php}
+  global $template;
+  if ( is_admin() )
+    $template->append('footer_elements', ' - Juza Theme <a title="Juza Configuration" href="index.php?&Juza_config=true">' . l10n('Configuration') .'</a>');
+  if ( isset($_GET['Juza_config']) ) $this->assign('Juza_config', true);
+{/php}
+{if isset($Juza_config)}
+<form id="Juza_config" method="post" class="properties" action="index.php?&Juza_config=true&Juza_viewed=true">
+<fieldset id="Juza_config_fs">
+  <ul>
+    <li>
+      <label>
+        <span class="property">{'Activate Juza handlers'|@translate}</span>
+        <input type="checkbox" name="Juza_handlers" {$Juza_handlers} />
+        <span class="range">{'Browser refresh is needed on new value'|@translate}</span>
+     </label>
+    </li>
+    <li>
+      <span class="property">
+        <label for="Width">{'Index picture max-width'|@translate}</label>
+      </span>
+      <input type="text" size="4" maxlength="4" name="Juza_width" id="Juza_width" value="{$Juza_width}" />
+      <span class="range">{'[300:885]'|@translate}</span>
+    </li>
+    <li>
+      <span class="property">
+        <label for="Height">{'Index picture cropping-height'|@translate}</label>
+      </span>
+      <input type="text" size="4" maxlength="4" name="Juza_height" id="Juza_height" value="{$Juza_height}" />
+       <span class="range">{'[110:400]'|@translate}</span>
+   </li>
+    <li>
+      <span class="property">
+        <label for="Shift">{'Index picture top-shift'|@translate}</label>
+      </span>
+      <input type="text" size="4" maxlength="4" name="Juza_shift" id="Juza_height" value="{$Juza_shift}" />
+      <span class="range">{'[-320:0]'|@translate}</span>
+    </li>
+    <li>
+      <label>
+        <span class="property">{'Auto cropping and shifting'|@translate}</span>
+        <input type="checkbox" name="Juza_Auto_CS" {$Juza_Auto_CS} />
+      </label>
+    </li>
+  </ul>
+</fieldset>
+  <p>
+    <input class="submit" type="submit" name="Juza_submit" value="{'Submit'|@translate}">
+  </p>
+</form>
+{/if}
Index: /extensions/Juza/theme.css
===================================================================
--- /extensions/Juza/theme.css	(revision 4481)
+++ /extensions/Juza/theme.css	(revision 4482)
@@ -21,18 +21,19 @@
 
 .content div.titrePage ul.categoryActions { display: none; } 
-.content div.thumbnailCategory div.description { height:155px !important; position:relative; width:100%; z-index:10; top:-252px; overflow: visible; }
-.bigImg { left:265px; position:relative; top:-160px; width:885px !important; }
+.content div.thumbnailCategory div.description { height:565px !important; position:relative; width:100%; z-index:10; top:-252px; overflow: hidden; }
+.bigImg { position:relative; top:-160px; width:885px !important; }
 .content ul.thumbnails span, .content ul.thumbnails label, .content div.thumbnailCategory div.illustration { width:135px; }
 .content { margin:0 3em !important; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10pt; }
 div.illustration { overflow: hidden; }
 div.illustration img { border: 0; margin-left: 0px; }
-.maxIllustration a { max-height: 240px; height: 240px; overflow: hidden; display: block; position:relative; z-index:12; }
+.maxIllustration a { max-height: 240px; height: 240px; overflow: hidden; display: block; position:relative; z-index:12; float:right; width:885px; }
 .maxIllustration { left:20px; margin-bottom:35px; max-width:100% !important; position:relative; top:30px; width:100% !important; }
-.content .thumbnailCategory { border: 0 solid #383838 !important; border-top-width: 0.5px !important; margin-bottom:15px; height:155px; min-height:280px; }
-.content div.thumbnailCategory div.description h3 { position:relative; top:10px; }
+.content .thumbnailCategory { border: 0 solid #383838 !important; border-top-width: 0.5px !important; margin-bottom:15px; /* height:155px; min-height:280px;*/ }
+.content div.thumbnailCategory div.description h3 { position:relative; top:10px; z-index:11; }
 .content div.thumbnailCategory div.description ul { margin: 10px 5px 5px 30px; }
 
 .content ul.thumbnailCategories li { width:100%; }
-.content ul.thumbnailCategories li.Juza-cat { max-height:295px; height:295px; }
+.content ul.thumbnailCategories li.Juza-cat { margin:0 0 20px; height:295px; min-height:295px; }
+
 a.home { position: absolute; left: 20px; top: 20px; font-size:9px; }
 .content ul.thumbnails span.wrap1 { background-color: #000 !important; width: 140px; height: 140px; min-width: 140px; min-height: 140px; max-width: 140px; max-height: 140px; margin:0 2px 2px 0; border: 1px solid #444; }
@@ -42,5 +43,5 @@
 .content ul.thumbnails span.wrap2 { -moz-border-radius: 0; border-radius: 0; }
 .content ul.thumbnails span.wrap2 img.thumbnail { margin:auto; border: 1px solid #111; }
-#jquery_local_img { text-align: center; margin-top: 5px; min-height: 850px; height: 850px; }
+#jquery_local_img { text-align: center; margin-top: 5px; min-height: 600px; height: 600px; /* linked to Area Mapping */ }
 input[type="text"], input[type="password"], input[type="button"], input[type="submit"], input[type="reset"], input[type="file"] {
   background-color:#D3D3D3 !important; }
@@ -54,4 +55,7 @@
 #imageToolBar  .randomButtons img[alt="slideshow"] { display: inline; }
 div.description div.text p.Nb_images { border-width: 0; }
-#copyright { margin-top: 200px; }
+#Juza_config input[type="text"], #Juza_config input[type="checkbox"] { float:left; margin:6px auto auto 4px; }
+#Juza_config input[type="submit"] { margin:10px auto 15px;  }
+#Juza_config .range { text-align: left; float: left; margin-left: 10px; font-style:italic; }
+#copyright { margin-top: 885px; }
 #copyright * { color: #383838; }
Index: /extensions/Juza/themeconf.inc.php
===================================================================
--- /extensions/Juza/themeconf.inc.php	(revision 4481)
+++ /extensions/Juza/themeconf.inc.php	(revision 4482)
@@ -1,21 +1,33 @@
 <?php
+/*
+Plugin Name: Juza
+Version: 2.0.1
+Description: Juza is an advanced theme of Piwigo
+Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=auto
+Author: Piwigo team
+Author URI: http://www.vdigital.org
+*/
+define('JUZA_VER', '2.0.1'); 
+define('JUZA_DIR' , basename(dirname(__FILE__)));
+define('JUZA_PATH' , 'template/yoga/theme/' . JUZA_DIR . '/');
 $themeconf = array(
   'template' => 'yoga',
-  'theme' => 'Juza',
-  'icon_dir' => 'template/yoga/theme/Juza/icon',
+  'theme' => JUZA_DIR,
+  'icon_dir' => JUZA_PATH . 'icon',
   'admin_icon_dir' => 'template/yoga/icon/admin',
-  'mime_icon_dir' => 'template/yoga/theme/Juza/icon/mimetypes/',
-  'local_head' => '
-<!--[if IE]> 
-  <link rel="stylesheet" href="template/yoga/theme/Juza/theme-ie.css" type="text/css">
-<![endif]-->
-  ',
-  'juza-handler' => create_function('$arg', 'global $template, $themeconf;
-    $template->set_filenames(array("juza"=>"theme/Juza/script.tpl"));
-    $template->parse("juza");
-    return $arg;'),
+  'mime_icon_dir' => JUZA_PATH . 'icon/mimetypes/',
+  'local_head' => '',
 );
-global $user;
+global $user, $conf;
 $user["expand"] = true; /* Forced to assign subcategory links inside each category on index page */
-add_event_handler('loc_after_page_header', $themeconf['juza-handler']);
+if (!isset($conf['Juza_active'])) $conf['Juza_active'] = true; /* Missing = active */
+
+/* No handlers at all or Open ? */
+if ($conf['enable_plugins'] and $conf['Juza_active']) { 
+  include_once(JUZA_PATH.'include/functions.inc.php');
+  add_event_handler('loc_after_page_header', 'Juza_hook', 20);
+  if (isset($_GET['Juza_config'])) {
+    add_event_handler('loc_after_page_header', 'Juza_admin', 10);
+  }
+}
 ?>
