Index: /extensions/akBookStyle/trunk/include/akContent.class.php
===================================================================
--- /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3829)
+++ /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3830)
@@ -59,11 +59,11 @@
     $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 (!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],0,2)=='<a') {
-				$this->navbar['URL_NEXT'] = substr($nav[3],9,stripos($nav[3],'" 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); 
Index: /extensions/akBookStyle/trunk/template/ak_horizontal.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_horizontal.tpl	(revision 3829)
+++ /extensions/akBookStyle/trunk/template/ak_horizontal.tpl	(revision 3830)
@@ -7,7 +7,6 @@
     <tr class="nline">
       {/if}
-      {if ($smarty.foreach.tn.first)}
+      {if ($smarty.foreach.tn.first) and !empty($navbar) and isset($navbar.URL_PREV)}
           <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}" 
@@ -17,33 +16,27 @@
               </a>       
             </div> 
-          {/if}
           </td>
       {/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.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>
+	      {if ( !empty($navbar) and isset($navbar.URL_NEXT) and !isset($done) )}
+				{assign var=done value=true}
+	      <td class="ncol" rowspan="{$AK_BY_LINE}">{* Right thumbnail navigation *}
+	        <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> 
+	      </td>
+	      {/if}
+      </tr>
     {/if}
     {/foreach}
