Index: /trunk/template-extension/distributed/samples/my-picture.tpl
===================================================================
--- /trunk/template-extension/distributed/samples/my-picture.tpl	(revision 12879)
+++ /trunk/template-extension/distributed/samples/my-picture.tpl	(revision 12880)
@@ -96,5 +96,5 @@
 </div> <!-- imageToolBar -->
 
-<div id="theImage">
+<div id="imageWrap">
 {$ELEMENT_CONTENT}
 
Index: /trunk/themes/Sylvia/theme.css
===================================================================
--- /trunk/themes/Sylvia/theme.css	(revision 12879)
+++ /trunk/themes/Sylvia/theme.css	(revision 12880)
@@ -333,5 +333,5 @@
 }
 
-#theImage A, .illustration A, A.navThumb, A.navThumb { 
+#imageWrap A, .illustration A, A.navThumb, A.navThumb { 
 	border-bottom-width: 0; 
 }
Index: /trunk/themes/clear/theme.css
===================================================================
--- /trunk/themes/clear/theme.css	(revision 12879)
+++ /trunk/themes/clear/theme.css	(revision 12880)
@@ -24,5 +24,5 @@
 }
 
-#theImage IMG {
+#imageWrap IMG {
   border: 3px solid #d3d3d3;
 }
Index: /trunk/themes/dark/theme.css
===================================================================
--- /trunk/themes/dark/theme.css	(revision 12879)
+++ /trunk/themes/dark/theme.css	(revision 12880)
@@ -8,4 +8,5 @@
 H2, #menubar DT {
 	color: #ffff80;
+	background-image: url(images/tableh1_bg.png);
 }
 
@@ -21,11 +22,6 @@
 }
 
-H2, #menubar DT {
-	background-image: url(images/tableh1_bg.png);
-}
-
 #imageHeaderBar H2 {
 	background-image: none;
-	border: 0;
 }
 
@@ -39,5 +35,5 @@
 }
 
-H2, #menubar DT, #imageToolBar {
+#menubar DT, #imageToolBar {
 	border-bottom: 1px solid #000;
 }
@@ -51,9 +47,6 @@
 
 .thumbnails .wrap2:hover,
-.content .thumbnailCategories .thumbnailCategory:hover,
-.content .thumbnailCategories .thumbnailCategory:hover A {
-	background-color: #faebd7;
+.content .thumbnailCategories .thumbnailCategory:hover{
 	border-color: yellow;	/* thumbnails border color when mouse cursor is over it */
-	color: black;
 }
 
Index: /trunk/themes/default/template/picture.tpl
===================================================================
--- /trunk/themes/default/template/picture.tpl	(revision 12879)
+++ /trunk/themes/default/template/picture.tpl	(revision 12880)
@@ -80,5 +80,5 @@
 </div>{*<!-- imageToolBar -->*}
 
-<div id="theImage">
+<div id="imageWrap">
 {$ELEMENT_CONTENT}
 
Index: /trunk/themes/default/template/picture_content.tpl
===================================================================
--- /trunk/themes/default/template/picture_content.tpl	(revision 12879)
+++ /trunk/themes/default/template/picture_content.tpl	(revision 12880)
@@ -1,3 +1,3 @@
-<img src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()} alt="{$ALT_IMG}" id="theMainImage"
+<img src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}"
 {if isset($COMMENT_IMG)}
 	title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
@@ -5,5 +5,5 @@
 {if count($current.unique_derivatives)>1}
 {footer_script}{literal}
-function changeImgSrc(url,type,display)
+function changeImgSrc(url,typeSave,typeMap,typeDisplay)
 {
 	var theImg = document.getElementById("theMainImage");
@@ -13,7 +13,8 @@
 		theImg.src = url;
 		var elt = document.getElementById("derivativeSwitchLink");
-		if (elt) elt.innerHTML = display;
+		if (elt) elt.innerHTML = typeDisplay;
+		theImg.useMap = "#map"+typeMap;
 	}
-	document.cookie = 'picture_deriv=' + type;
+	document.cookie = 'picture_deriv=' + typeSave;
 }
 
@@ -36,9 +37,22 @@
 <div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
 {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
-<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}', '{$derivative_type}', '{$derivative->get_type()|@translate|@escape:javascript}')" style="cursor:pointer">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
+<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}','{$derivative->get_type()|@translate|@escape:javascript}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
 {/foreach}
 {if isset($U_ORIGINAL)}
-<a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" title="{'Click on the photo to see it in high definition'|@translate}">{'original'|@translate}</a>
+<a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'original'|@translate}</a>
 {/if}
 </div>
 {/if}
+
+{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}
+<map name="map{$derivative->get_type()}" id="map{$derivative->get_type()}">
+{assign var='size' value=$derivative->get_size()}
+{if isset($previous)}
+<area shape=rect coords="0,0,{$size[0]/4|@intval},{$size[1]}" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" alt="{$previous.TITLE}">
+{/if}
+<area shape=rect coords="{$size[0]/4|@intval},0,{$size[0]/1.34|@intval},{$size[1]/4|@intval}" href="{$U_UP}" title="{'Thumbnails'|@translate}" alt="{'Thumbnails'|@translate}">
+{if isset($next)}
+<area shape=rect coords="{$size[0]/1.33|@intval},0,{$size[0]},{$size[1]}" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" alt="{$next.TITLE}">
+{/if}
+</map>
+{/strip}{/foreach}
Index: /trunk/themes/default/template/slideshow.tpl
===================================================================
--- /trunk/themes/default/template/slideshow.tpl	(revision 12879)
+++ /trunk/themes/default/template/slideshow.tpl	(revision 12880)
@@ -15,5 +15,5 @@
 </div>
 
-<div id="theImage">
+<div id="imageWrap">
   {$ELEMENT_CONTENT}
   {if isset($COMMENT_IMG)}
Index: /trunk/themes/default/theme.css
===================================================================
--- /trunk/themes/default/theme.css	(revision 12879)
+++ /trunk/themes/default/theme.css	(revision 12880)
@@ -215,7 +215,8 @@
 
 .thumbnailCategories LI {
-	margin:0;
-	padding:0;
-	float:left;
+	margin: 0;
+	padding: 0;
+	float: left;
+	width: 49.7%;    /* 49.7% for 2 per line, 33.2% for 3 per line*/
 }
 
@@ -329,5 +330,5 @@
 	text-align: center;
 	clear: both;
-	margin-bottom: 4px;
+	margin-bottom: 2px;
 	padding: 0;
 	height: 28px;
@@ -343,5 +344,5 @@
 	position: absolute;
 	left: 5px;
-	top: 100px;
+	top: 10%;
 }
 
@@ -352,10 +353,11 @@
 }
 
-#theImage {
+#imageWrap {
 	clear: left;
 	text-align: center;
-}
-
-#theImage>IMG {
+	position: relative; /*so that the drivative switch link is positioned relative to us*/
+}
+
+#imageWrap>IMG {
 	display: block;
 	margin: 0 auto;
@@ -419,5 +421,5 @@
 
 .contentWithMenu #imageToolBar, 
-.contentWithMenu #theImage { 
+.contentWithMenu #imageWrap { 
 	clear: none;
 }
@@ -695,10 +697,4 @@
 }
 
-
-/* Category thumbnails on main page */
-.thumbnailCategories LI {
-  width: 49.7%;    /* 49.7% for 2 per line, 33.2% for 3 per line*/
-}
-
 /* Set defaults for thumbnails legend */
 .thumbnails SPAN.thumbLegend {
