Index: /extensions/akBookStyle/trunk/css/ak_style_h.css
===================================================================
--- /extensions/akBookStyle/trunk/css/ak_style_h.css	(revision 3828)
+++ /extensions/akBookStyle/trunk/css/ak_style_h.css	(revision 3829)
@@ -2,2 +2,6 @@
   margin-right:10%;
 }
+
+.fleft, .fright { 
+  padding:33% 0;
+}
Index: /extensions/akBookStyle/trunk/include/akContent.class.php
===================================================================
--- /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3828)
+++ /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3829)
@@ -35,11 +35,11 @@
 
   public function loc_begin_index_thumbnails($images) {
-    global $template;
+    global $template, $page;
 
     $this->category_url = make_index_url(array('section' => 'category',
-					       'category' => $GLOBALS['page']['category'],
-					       'start' => $GLOBALS['page']['start']
-					       ) 
-					 );
+                 'category' => $GLOBALS['page']['category'],
+                 'start' => $GLOBALS['page']['start']
+                 ) 
+           );
     $this->current_picture = $this->getPictureId($images);
 
@@ -58,6 +58,16 @@
     $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 (isset($page['navigation_bar'])) {
+			$nav = explode(' | ', $page['navigation_bar']);
+			if (substr($nav[1],0,2)=='<a') {
+				$this->navbar['URL_PREV'] = substr($nav[1],9,stripos($nav[1],'" rel="'));
+			}
+			if (substr($nav[3],0,2)=='<a') {
+				$this->navbar['URL_NEXT'] = substr($nav[3],9,stripos($nav[3],'" rel="'));
+			}
+			$template->assign('navbar', $this->navbar); 
+		}
+}
 
   public function loc_end_index_thumbnails($tpl_vars, $images) {
@@ -85,5 +95,5 @@
   private function getPictureId($images) {
     if ($GLOBALS['conf']['question_mark_in_urls']==false and
-	isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) ) {
+      isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) ) {
       $rewritten = $_SERVER["PATH_INFO"];
       $rewritten = str_replace('//', '/', $rewritten);
@@ -91,18 +101,18 @@
       $rewritten = '';
       foreach (array_keys($_GET) as $keynum => $key) {
-	$rewritten = $key;
-	break;
+        $rewritten = $key;
+        break;
       }
     }
     $rewritten = make_index_url().$rewritten;
     $pattern = sprintf('`^%s/(?:start\-\d+/)?picture/(\d+)$`',
-		       str_replace('?', '\?', $this->category_url)
-		       );
+           str_replace('?', '\?', $this->category_url)
+           );
 
     if (preg_match($pattern, $rewritten, $matches)) {
       foreach ($images as $index => $image) {
-	if ($image['id']==$matches[1]) {
-	  return $index;
-	}
+        if ($image['id']==$matches[1]) {
+          return $index;
+        }
       }
       return false;
Index: /extensions/akBookStyle/trunk/template/ak_horizontal.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_horizontal.tpl	(revision 3828)
+++ /extensions/akBookStyle/trunk/template/ak_horizontal.tpl	(revision 3829)
@@ -1,28 +1,22 @@
+{assign var=AK_THUMB_COUNT value=$thumbnails|@count}
+{assign var=AK_BY_COLUMNS value=$AK_THUMB_COUNT/$AK_BY_LINE|@round}
 <td>
-  {if !empty($navbar) and isset($navbar.URL_PREV)}
-  <div class="navbar fleft">
-    <a class="navButton" href="{$navbar.URL_PREV}" 
-       title="{'previous_page'|@translate}">
-      <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" 
-           class="button" alt="{'previous_page'|@translate}">
-    </a>       
-  </div> 
-  {/if}
-  {if !empty($navbar) and isset($navbar.URL_NEXT)}
-  <div class="navbar fright">
-    <a class="navButton" href="{$navbar.URL_NEXT}" 
-       title="{'next_page'|@translate}">
-      <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" 
-           class="button" alt="{'next_page'|@translate}">
-    </a> 
-  </div> 
-  {/if}
-
   <table class="thumbnails">
-    {assign var=AK_THUMB_COUNT value=$thumbnails|@count}
-    {assign var=AK_BY_COLUMNS value=$AK_THUMB_COUNT/$AK_BY_LINE|@round}
     {foreach from=$thumbnails item=thumbnail name=tn}
     {if ($smarty.foreach.tn.index % $AK_BY_COLUMNS == 0)}
     <tr class="nline">
+      {/if}
+      {if ($smarty.foreach.tn.first)}
+          <td class="ncol" rowspan="{$AK_BY_LINE}">{* Left thumbnail navigation 
+          *}{if !empty($navbar) and isset($navbar.URL_PREV)}{*
+            *}<div class="navbar fright">
+              <a class="navButton" href="{$navbar.URL_PREV}" 
+                 title="{'previous_page'|@translate}">
+                <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" 
+                     class="button" alt="{'previous_page'|@translate}">
+              </a>       
+            </div> 
+          {/if}
+          </td>
       {/if}
       <td class="ncol">
@@ -36,4 +30,18 @@
 	</div>
       </td>
+      {if ($smarty.foreach.tn.index == $AK_BY_COLUMNS) or ($smarty.foreach.tn.index < $AK_BY_COLUMNS and $smarty.foreach.tn.last)}
+          <td class="ncol" rowspan="{$AK_BY_LINE}">{* Right thumbnail navigation *}
+          {if !empty($navbar) and isset($navbar.URL_NEXT)}
+            <div class="navbar fleft">
+              <a class="navButton" href="{$navbar.URL_NEXT}" 
+                 title="{'next_page'|@translate}">
+                <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" 
+                     class="button" alt="{'next_page'|@translate}">
+              </a> 
+            </div> 
+          {/if}
+          </td>
+      {/if}
+
       {if ($smarty.foreach.tn.iteration % $AK_BY_COLUMNS == 0) or $smarty.foreach.tn.last }
     </tr>
Index: /extensions/akBookStyle/trunk/template/ak_vertical.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_vertical.tpl	(revision 3828)
+++ /extensions/akBookStyle/trunk/template/ak_vertical.tpl	(revision 3829)
@@ -1,13 +1,26 @@
-    {if !empty($navbar) and isset($navbar.URL_PREV)}
-    <td class="navbar fleft">
-      <a class="navButton" href="{$navbar.URL_PREV}" 
-         title="{'previous_page'|@translate}">
-        <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" 
-             class="button" alt="{'previous_page'|@translate}">
-      </a>       
-    </td> 
-    {/if}
     <td>
       <table class="thumbnails">
+        <tr class="nline"> {* Top thumbnail navigation *}
+          <td class="ncol" colspan="{$AK_BY_LINE}">
+          {if !empty($navbar) and isset($navbar.URL_PREV)}
+            <div class="navbar fleft">
+              <a class="navButton" href="{$navbar.URL_PREV}" 
+                 title="{'previous_page'|@translate}">
+                <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" 
+                     class="button" alt="{'previous_page'|@translate}">
+              </a>       
+            </div> 
+          {/if}
+          {if !empty($navbar) and isset($navbar.URL_NEXT)}
+            <div class="navbar fright">
+              <a class="navButton" href="{$navbar.URL_NEXT}" 
+                 title="{'next_page'|@translate}">
+                <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" 
+                     class="button" alt="{'next_page'|@translate}">
+              </a> 
+            </div> 
+          {/if}
+          </td>
+        </tr>
         {foreach from=$thumbnails item=thumbnail name=tn}
         {if $smarty.foreach.tn.index % $AK_BY_LINE == 0}
@@ -15,12 +28,11 @@
           {/if}
           <td class="ncol">
-	    <div class="clipwrapper" style="width:{$AK_THUMBNAIL_SIZE}px;height:{$AK_THUMBNAIL_SIZE}px">
-	      <div class="clip" style="clip:rect({$thumbnail.CLIP_TOP}px {$thumbnail.CLIP_RIGHT}px {$thumbnail.CLIP_BOTTOM}px {$thumbnail.CLIP_LEFT}px);top:-{$thumbnail.CLIP_TOP}px;left:-{$thumbnail.CLIP_LEFT}px">
-		<a href="{$thumbnail.AK_URL}" class="load">
-		  <img class="thumbnail" src="{$thumbnail.TN_SRC}" 
-		       alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
-		</a>
-	      </div>
-	    </div>
+            <div class="clipwrapper" style="width:{$AK_THUMBNAIL_SIZE}px;height:{$AK_THUMBNAIL_SIZE}px">
+              <div class="clip" style="clip:rect({$thumbnail.CLIP_TOP}px {$thumbnail.CLIP_RIGHT}px {$thumbnail.CLIP_BOTTOM}px {$thumbnail.CLIP_LEFT}px);top:-{$thumbnail.CLIP_TOP}px;left:-{$thumbnail.CLIP_LEFT}px">
+                <a href="{$thumbnail.AK_URL}" class="load">
+                  <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
+                </a>
+              </div>
+            </div>
           </td>
         {if ($smarty.foreach.tn.iteration % $AK_BY_LINE == 0) or $smarty.foreach.tn.last }
@@ -28,14 +40,26 @@
         {/if}
         {/foreach}
-      </table> {* end of Thumbnails *}
+        <tr class="nline">  {* Bottom thumbnail navigation *}
+          <td class="ncol" colspan="{$AK_BY_LINE}">
+          {if !empty($navbar) and isset($navbar.URL_PREV)}
+            <div class="navbar fleft">
+              <a class="navButton" href="{$navbar.URL_PREV}" 
+                 title="{'previous_page'|@translate}">
+                <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" 
+                     class="button" alt="{'previous_page'|@translate}">
+              </a>       
+            </div> 
+          {/if}
+          {if !empty($navbar) and isset($navbar.URL_NEXT)}
+            <div class="navbar fright">
+              <a class="navButton" href="{$navbar.URL_NEXT}" 
+                 title="{'next_page'|@translate}">
+                <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" 
+                     class="button" alt="{'next_page'|@translate}">
+              </a> 
+            </div> 
+          {/if}
+          </td>
+        </tr>
+        </table> {* end of Thumbnails *}
     </td>
-    {if !empty($navbar) and isset($navbar.URL_NEXT)}
-    <td class="navbar fright">
-      <a class="navButton" href="{$navbar.URL_NEXT}" 
-         title="{'next_page'|@translate}">
-        <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" 
-             class="button" alt="{'next_page'|@translate}">
-      </a> 
-    </td> 
-    {/if}
-
