Index: /extensions/akBookStyle/trunk/css/admin.css
===================================================================
--- /extensions/akBookStyle/trunk/css/admin.css	(revision 10862)
+++ /extensions/akBookStyle/trunk/css/admin.css	(revision 10863)
@@ -1,3 +1,12 @@
-#content{text-align:left;padding-left:20px;}
-fieldset,fieldset p{text-align:left;}
-fieldset p.field input[type="radio"],fieldset p.field input[type="checkbox"]{margin:0 3px 0 15px;}
+#content { 
+  text-align: left;
+  padding-left: 20px;
+}
+
+fieldset, fieldset p { 
+  text-align: left;
+}
+
+fieldset p.field  input[type="radio"], fieldset p.field  input[type="checkbox"] {
+  margin:0 3px 0 15px;
+}
Index: /extensions/akBookStyle/trunk/css/style.css
===================================================================
--- /extensions/akBookStyle/trunk/css/style.css	(revision 10862)
+++ /extensions/akBookStyle/trunk/css/style.css	(revision 10863)
Index: /extensions/akBookStyle/trunk/include/akContent.class.php
===================================================================
--- /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 10862)
+++ /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 10863)
@@ -89,13 +89,4 @@
     $template->assign('AK_THUMBNAILS_LOC', $this->plugin_config->ak_thumbnails_loc); 
     $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture]));
-		  $url = duplicate_picture_url(
-        array(
-          'image_id' => $images[$this->current_picture]['id'] ,
-          'image_file' => $images[$this->current_picture]['file']
-        ),
-        array('start')
-      );
-
-    $template->assign('AK_PIC_URL', $url);
 
     $template->assign('AK_NEXT', $this->getNextPicture($this->current_picture, $images));
@@ -141,5 +132,4 @@
       $tpl_vars = $GLOBALS['template']->smarty->_tpl_vars;
       $response['AK_PIC_SRC'] = $tpl_vars['SRC_IMG'];
-      $response['AK_PIC_URL'] = $tpl_vars['current']['url'];
       $response['AK_PIC_ALT'] = $tpl_vars['ALT_IMG'];
       if (isset($tpl_vars['ALT_IMG'])) {
Index: /extensions/akBookStyle/trunk/js/ak_jquery-load.js
===================================================================
--- /extensions/akBookStyle/trunk/js/ak_jquery-load.js	(revision 10862)
+++ /extensions/akBookStyle/trunk/js/ak_jquery-load.js	(revision 10863)
@@ -1,53 +1,62 @@
-$(function () {
+$(function() {
     next_link = $('table.thumbnails div.navbar a[rel=next]');
-    if (next_link.length != 0) {
-        $('#akNextPicture').css('visibility', 'visible')
+    if (next_link.length!=0) {
+      $('#akNextPicture').css('visibility', 'visible');
     }
     previous_link = $('table.thumbnails div.navbar a[rel=previous]');
-    if (previous_link.length != 0) {
-        $('#akPreviousPicture').css('visibility', 'visible')
+    if (previous_link.length!=0) {
+      $('#akPreviousPicture').css('visibility', 'visible');
     }
-    $("a.load").bind(ak_mouse_event, function () {
-        $('table.thumbnails tr td.ncol').each(function () {
-            if ($(this).hasClass('selected')) {
-                $(this).removeClass('selected')
+    
+    $("a.load")
+      .bind(ak_mouse_event, function() {
+          $('table.thumbnails tr td.ncol').each(function() {
+              if ($(this).hasClass('selected')) {
+                $(this).removeClass('selected');
+              }
+            });
+
+	  $a = $(this);
+          next_thumbnail = $('table.thumbnails a[href='+$(this).attr('href')+']');          
+          if (next_thumbnail.length==0) {
+	    if ($a.attr('id')=='akNextPicture') {
+	      rel = 'next';
+	    } else {
+	      rel = 'previous';
+	    }
+            next_link = $('table.thumbnails div.navbar a[rel='+rel+']');
+            if (next_link.length!=0) {
+              window.location = next_link.attr('href');
             }
-        });
-        $a = $(this);
-        //next_thumbnail = $('table.thumbnails a[href=' + $(this).attr('href') + ']');
-        next_thumbnail = $('table.thumbnails a');
-        if (next_thumbnail.length == 0) {
-            if ($a.attr('id') == 'akNextPicture') {
-                rel = 'next'
-            } else {
-                rel = 'previous'
-            }
-            next_link = $('table.thumbnails div.navbar a[rel=' + rel + ']');
-            if (next_link.length != 0) {
-                window.location = next_link.attr('href')
-            }
-        } else {
+          } else {
             next_thumbnail.parent().parent().parent().addClass('selected');
-            try {
-                $.get($a.attr('href'), {}, function success(data) {
-											$('#akPicture').attr('src', data.AK_PIC_SRC).attr('alt', data.AK_PIC_ALT).attr('title', data.AK_PIC_TITLE);
-											$('.ak_pic a').attr('href', data.AK_PIC_URL);
-                    if (data.AK_PREVIOUS) {
-                        $('#akPreviousPicture').removeClass('hide').attr('href', data.AK_PREVIOUS)
-                    } else {
-                        $('#akPreviousPicture').addClass('hide')
-                    }
-                    if (data.AK_NEXT) {
-                        $('#akNextPicture').removeClass('hide').attr('href', data.AK_NEXT)
-                    } else {
-                        $('#akNextPicture').addClass('hide')
-                    }
-                    $a.click(function (e) {
-                        e.preventDefault()
-                    })
-                }, 'json')
-            } catch (e) {}
-        }
-        return false
-    })
-});
+	    try {
+	      $.get($a.attr('href'),{},
+		    function success(data) { 		    
+		      $('#akPicture')
+			.attr('src', data.AK_PIC_SRC)
+			.attr('alt', data.AK_PIC_ALT)
+			.attr('title', data.AK_PIC_TITLE);
+
+		      if (data.AK_PREVIOUS) {
+			$('#akPreviousPicture')
+			  .removeClass('hide')
+			  .attr('href', data.AK_PREVIOUS);
+		      } else {
+			$('#akPreviousPicture').addClass('hide');
+		      }
+		      if (data.AK_NEXT) {
+			$('#akNextPicture')
+			  .removeClass('hide')
+			  .attr('href', data.AK_NEXT);
+		      } else {
+			$('#akNextPicture').addClass('hide');
+		      }
+		      $a.click(function(e) { e.preventDefault();}); 
+		    },
+		    'json');	    
+	    } catch (e) {}
+          }
+	  return false;
+	});
+  });
Index: /extensions/akBookStyle/trunk/main.inc.php
===================================================================
--- /extensions/akBookStyle/trunk/main.inc.php	(revision 10862)
+++ /extensions/akBookStyle/trunk/main.inc.php	(revision 10863)
@@ -29,4 +29,5 @@
 Author URI: http://www.nikrou.net/
 */
+
 if (!defined('PHPWG_ROOT_PATH')) {
   die('Hacking attempt!');
Index: /extensions/akBookStyle/trunk/template/admin.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/admin.tpl	(revision 10862)
+++ /extensions/akBookStyle/trunk/template/admin.tpl	(revision 10863)
@@ -34,10 +34,12 @@
   </p>
   <p class="field">
-    {'Event to show medium picture.'|translate}
+    <label>{'Event to show medium picture.'|translate}
       {html_radios name='ak_mouse_event' values=$AK_AVAILABLE_EVENTS output=$AK_EVENTS_LABELS|translate selected=$AK_MOUSE_EVENT}
+    </label>
   </p>
   <p class="field">
-    {'Thumbnails location'|translate}
+    <label>{'Thumbnails location'|translate}
       {html_radios name="ak_thumbnails_loc" values=$AK_THUMBNAILS_LOCATIONS_KEYS output=$AK_THUMBNAILS_LOCATIONS_VALUES|translate selected="$AK_THUMBNAILS_LOC"}
+    </label>
   </p>
 </fieldset>
Index: /extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl	(revision 10862)
+++ /extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl	(revision 10863)
@@ -10,7 +10,5 @@
 
       <td class="ak_pic"> 
-				<a href="{$AK_PIC_URL}">
-        	<img src="{$AK_PIC_SRC}" alt="{$AK_PIC_ALT}" title="{$AK_PIC_TITLE}" id="akPicture">
-        </a>
+	<img src="{$AK_PIC_SRC}" alt="{$AK_PIC_ALT}" title="{$AK_PIC_TITLE}" id="akPicture">
       </td>
       <td class="ncol"> 
Index: /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl	(revision 10862)
+++ /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl	(revision 10863)
@@ -1,6 +1,5 @@
-{combine_script id='ak_jquery' require='jquery' path=$AK_PLUGIN_JS|@cat:'/ak_jquery-load.js'}
-{combine_css path=$AK_PLUGIN_CSS|@cat:'/style.css'}
-
+{known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"}
 {html_head} 
+<link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/style.css">
 <script type="text/javascript">
 var dir_thumbnail = '{$AK_DIR_THUMBNAIL}';
@@ -8,4 +7,5 @@
 var ak_mouse_event = '{$AK_MOUSE_EVENT}';
 </script>
+<script type="text/javascript" src="{$AK_PLUGIN_JS}/ak_jquery-load.js"></script>
 {/html_head}
 
