Index: extensions/akBookStyle/trunk/css/ak_style.css
===================================================================
--- extensions/akBookStyle/trunk/css/ak_style.css	(revision 3837)
+++ extensions/akBookStyle/trunk/css/ak_style.css	(revision 3838)
@@ -57,4 +57,8 @@
 }
 
+a.hide { 
+  visibility: hidden;
+}
+
 /******************/
 #theHeader, #menubar, .navigationBar, .titrePage { 
Index: extensions/akBookStyle/trunk/css/ak_style_h.css
===================================================================
--- extensions/akBookStyle/trunk/css/ak_style_h.css	(revision 3837)
+++ 	(revision )
@@ -1,7 +1,0 @@
-table.ak_display {
-  margin-right:10%;
-}
-
-.fleft, .fright { 
-  padding:33% 0;
-}
Index: extensions/akBookStyle/trunk/include/akContent.class.php
===================================================================
--- extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3837)
+++ extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3838)
@@ -32,4 +32,6 @@
     $this->plugin_config = $config;
     $this->current_picture = 0;
+    $this->next_picture = null;
+    $this->previous_picture = null;
   }
 
@@ -50,5 +52,4 @@
     $template->assign('AK_DIR_THUMBNAIL', isset($GLOBALS['conf']['dir_thumbnail'])?$GLOBALS['conf']['dir_thumbnail']:'thumbnail');
     $template->assign('AK_PREFIX_THUMBNAIL', $GLOBALS['conf']['prefix_thumbnail']);
-    $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture]));
     $template->assign('AK_BY_LINE', $this->plugin_config->ak_by_line);
     $template->assign('AK_MOUSE_EVENT', $this->plugin_config->ak_mouse_event);
@@ -58,16 +59,9 @@
     $template->assign('AK_HORIZONTAL_TPL', AK_PLUGIN_TEMPLATE. '/ak_horizontal.tpl');
     $template->assign('AK_THUMBNAILS_LOC', $this->plugin_config->ak_thumbnails_loc); 
-		/* Thumbnail Nav */
-		if (!empty($page['navigation_bar'])) {
-			$nav = explode('|', $page['navigation_bar']);
-			if (substr($nav[1],1,2)=='<a') {
-				$this->navbar['URL_PREV'] = substr($nav[1],10,stripos($nav[1],'" rel="'));
-			}
-			if (substr($nav[3],1,2)=='<a') {
-				$this->navbar['URL_NEXT'] = substr($nav[3],10,stripos($nav[3],'" rel="'));
-			}
-			$template->assign('navbar', $this->navbar); 
-		}
-}
+    $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture]));
+
+    $template->assign('AK_NEXT', $this->getNextPicture($this->current_picture, $images));
+    $template->assign('AK_PREVIOUS', $this->getPreviousPicture($this->current_picture, $images));
+  }
 
   public function loc_end_index_thumbnails($tpl_vars, $images) {
@@ -121,4 +115,30 @@
     }
   }
+
+  private function getPreviousPicture($current, $images) {
+    $previous = $current--;
+    if ($previous>0) {
+      return $this->makeAkUrl(array('ID' => $images[$previous]['id']));
+    } else {
+      return null;
+    }
+  }
+
+  private function getNextPicture($current, $images) {
+    $index_current = null;
+    foreach ($images as $index => $image) {
+      if ($image['id']==$current) {
+	$index_current = $index;
+	break;
+      }
+    }
+
+    $next = $index_current+1;
+    if ($next<count($images)) {
+      return $this->makeAkUrl(array('ID' => $images[$next]['id']));
+    } else {
+      return null;
+    }
+  }
 }
 ?>
Index: extensions/akBookStyle/trunk/js/ak_jquery-load.js
===================================================================
--- extensions/akBookStyle/trunk/js/ak_jquery-load.js	(revision 3837)
+++ extensions/akBookStyle/trunk/js/ak_jquery-load.js	(revision 3838)
@@ -2,5 +2,44 @@
     $("a.load")
       .bind(ak_mouse_event, function() {
-  	  $('#akPicture').attr('src', $(this).children('img').attr('src').replace(dir_thumbnail+'\/'+prefix_thumbnail, ''));
+	  $a = $(this);
+	  $thumbnails = $('.thumbnails a[class="load"]');
+	  $nbThumbnails = $thumbnails.length;
+
+	  $previous_link = $current_link = $next_link = null;
+	  
+	  $('.thumbnails a[class="load"]')
+	    .each( function(i) {
+		if ($(this).attr('href')==$a.attr('href')) {
+		  $current_link = $(this);
+		  if (i>0) {
+		    $previous_link = $thumbnails[i-1];
+		  }
+		  if (i<$nbThumbnails) {
+		    $next_link = $thumbnails[i+1];
+		  }
+		}
+	      });
+
+	  $current_link = $('.thumbnails a[href='+$(this).attr('href')+']');
+	  $src = $current_link.children('img').attr('src');
+	  $src = $src.replace(dir_thumbnail+'\/'+prefix_thumbnail, '');
+
+  	  $('#akPicture').attr('src', $src);
+	  if ($previous_link) {
+	    if ($('#akPreviousPicture').hasClass('hide')) {
+	      $('#akPreviousPicture').removeClass('hide');
+	    }
+	    $('#akPreviousPicture').attr('href', $($previous_link).attr('href'));
+	  } else {
+	    $('#akPreviousPicture').addClass('hide');
+	  }
+	  if ($next_link) {
+	    if ($('#akNextPicture').hasClass('hide')) {
+	      $('#akNextPicture').removeClass('hide');
+	    }
+	    $('#akNextPicture').attr('href', $($next_link).attr('href'));
+	  } else {
+	    $('#akNextPicture').addClass('hide');
+	  }
 	  return false;
 	});
Index: extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl
===================================================================
--- extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl	(revision 3837)
+++ extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl	(revision 3838)
@@ -3,8 +3,6 @@
   <table class="picture">
     <tr class="nline">
-      <td class="ncol">
-	{if isset($AK_PREVIOUS) }
-
-	<a class="{$AK_PREVIOUS.load} navButton" href="{$AK_PREVIOUS.U_PIC}" 
+      <td class="ncol">	
+	<a id="akPreviousPicture" class="{if empty($AK_PREVIOUS)}hide {/if}load navButton" href="{$AK_PREVIOUS}" 
 	   title="{'previous_page'|@translate} : {$AK_PREVIOUS.TITLE}" 
 	   rel="prev">
@@ -12,5 +10,4 @@
 	       class="button" alt="{'previous_page'|@translate}">
 	</a>
-	{/if}
       </td>
     </tr>
@@ -24,6 +21,5 @@
     <tr class="nline">
       <td class="ncol"> 
-	{if !empty($AK_NEXT) }
-	<a class="{$AK_NEXT.load} navButton" href="{$AK_NEXT.U_PIC}" 
+	<a id="akNextPicture" class="{if empty($AK_NEXT)}hide {/if}load navButton" href="{$AK_NEXT}" 
 	   title="{'next_page'|@translate} : {$AK_NEXT.TITLE}" 
 	   rel="next">
@@ -31,5 +27,4 @@
 	       class="button" alt="{'next_page'|@translate}">
 	</a>
-	{/if}
       </td>
     </tr>
