Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php	(revision 8626)
+++ /extensions/Autosize/autosize.inc.php	(revision 8627)
@@ -27,8 +27,84 @@
 
 class autosize_controler {
-	/*
-	*
-	*/
-	
+ //============================================================
+ /*
+  *  cl_autosize_script_1
+ */
+ static public function cl_autosize_script_1()
+	{
+		global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
+	 	if(isset($page['body_id']) &&	$page['body_id'] == 'theAdminPage' ) return ; 
+		$ma_page=isset($page['body_id'])?$page['body_id']:"" ;
+ 		if ($ma_page=='thePiwiShackControllerPage') return ;
+	    $my_path = dirname(__FILE__).'/';
+		$template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) );	
+		$DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 
+		$autosize_parametres =	 cl_autosize_Get_Options() ;			
+		$theme=$user['theme'];
+		$url = get_root_url();   		 
+  		$template->assign(
+  						array(   
+						'autosize_parametres' => $autosize_parametres ,
+						'cl_plugins' => $cl_plugin ,
+						'cl_version' => $cl_plugin['version'] ,
+						'name' => $cl_plugin['name'] ,						 
+						'MY_ROOT' => $url,
+						'theme' => $theme  ,
+						'DEBUG' => $DEBUG   ,
+						'AUTOSIZE_PATH' => AUTOSIZE_PATH)
+						 );
+ 
+		return $template->parse( 'autosize_init', false);
+	}// function cl_autosize_script_1
+ //===========================================================
+ /*
+  * cl_autosize_script_2
+ */
+ static public function cl_autosize_script_2()
+ {
+	   global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
+			$my_path = dirname(__FILE__).'/';
+			$DEBUG =  isset($conf['cl_debug']) ? $conf['cl_debug'] : "false"  ; 
+			$ma_page=isset($page['body_id'])?$page['body_id']:"" ;
+			$theme=$user['theme'];
+ 			if ($ma_page=='thePiwiShackControllerPage') return ;
+			
+			$template->assign(
+  					array(
+					'cl_version' => $cl_plugin['version'] ,
+					'name' => $cl_plugin['name'] ,
+					'ma_page' =>	$ma_page,
+					
+					'theme' => $theme  ,
+					'DEBUG' => $DEBUG   ,
+					'AUTOSIZE_PATH' => AUTOSIZE_PATH
+					)
+						);
+						 
+			$autoscript="<script type='text/javascript'>
+			/* cl_autosize_script_2 */
+			if (typeof (save_framework) == 'function')
+			   save_framework('".$ma_page."');
+			</script>";
+		$template->append('footer_elements',$autoscript);  
+		return ; 
+ }// function cl_autosize_script_2
+
+	//================================================================
+	/*
+	* cl_autosize_admin
+	*/
+	static public function cl_autosize_admin($menu)
+		{
+		global  $lang ;
+		array_push($menu, array('NAME' => 'Autosize',
+		'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php')));
+		return $menu;
+	} //function cl_autosize_admin
+
+    //===============================================================
+	/*
+	*
+	*/	
 	static public function cl_autosize_affiche()
 	{
@@ -40,17 +116,8 @@
 		load_language('lang', AUTOSIZE_PATH);
 		$my_path = dirname(__FILE__).'/';
-
-
-
 		 if (isset( $page['body_id']) && $page['body_id']=='thePicturePage'  ) {
 			if ( isset($picture['current'])){	
-					
-			
-	
-				
 				$autosize_parametres = cl_autosize_Get_Options();
-				include (AUTOSIZE_PATH."include/affiche.php"); 	
-				
-				
+				include (AUTOSIZE_PATH."include/affiche.php"); 		
 				if($autosize_parametres->check_icon_v == 'on'){				 
 						$template->assign('cl_autosize_button', 
@@ -62,6 +129,5 @@
 								)
 
-							);
- 
+							); 
 					$template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl'));
 					$template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true));
@@ -76,15 +142,6 @@
 
 	} //public function cl_autosize_affiche
-	/*
-	*
-	*/
-	static public function cl_autosize_admin($menu)
-		{
-		global  $lang ;
-		array_push($menu, array('NAME' => 'Autosize',
-		'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php')));
-		return $menu;
-	} //function cl_autosize_admin
-	/*
+	//===============================================================
+		/*
 	*
 	*/
@@ -92,5 +149,5 @@
 		{
 		 global $template,$infos_message,$erreur_message, $user ;
-		global  $conf,$lang ;
+		 global  $conf,$lang ;
 	
 		 //==============================================================
@@ -118,144 +175,40 @@
 		
 		} // function cl_autosize_aff_infos_plus
-
-
-
- /*
- * conflit =============================================
- */
- static public function cl_autosize_script_3($content)
- {
-		global  $template,$user,$conf,$picture ,$page,$cl_plugin;
- 
-		$my_path =  basename(dirname(__FILE__)).'/' ;
-		$my_path = dirname(__FILE__).'/';
-		$DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 
-		
-		$ThePicture = $template->get_template_vars('current');
-		$tpl_name =   $user['theme'] ;
-
- $autosizejs ='<!--- cl_autosize_script_3 -->';
-		$autosizejs = $autosizejs.'<script type="text/javascript" id="jquery" charset="utf-8"  src="';
-		$autocss =   $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n"; 
-	//	$template->append('head_elements',$autocss);
- 
-		$autocss="<script type='text/javascript'>
-		/* cl_autosize_script_3 */
-		var DEBUG=\"".$DEBUG."\" ;
-	 	if (fade_in !=0) jQuery('#theImage').css({opacity:'0.0'});
-	 	if (fade_in !=0) jQuery('#theImage').css({opacity:'1.0'});
+	//===============================================================
+	/*
+	 *
+	*/
+	static public function cl_ajuste_data($content){
+		global  $template,$user,$conf,$picture ;
+		$my_path = realpath(AUTOSIZE_PATH .'/');
+		$userdata=$user;
+		$fields = array( 'maxwidth', 'maxheight' );
 	 
-</script>";
-
-	//	$template->append('footer_elements',"\n".$autocss);
- 
-		if ( !empty($content) )   {  return $content;  }	
-		if ($ThePicture['is_picture'] <> 1 )  	{ 
-		 return $content;  ; 
-		 }	
-
-
-		return $content ;
-
- }// function cl_autosize_script_3
- //=================================================================================
- static public function cl_autosize_script_2()
- {
-	   global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
-	 
-			$my_path =  basename(dirname(__FILE__)).'/' ;
-			$my_path = dirname(__FILE__).'/';
-			$DEBUG =  isset($conf['cl_debug']) ? $conf['cl_debug'] : "false"  ; 
-			$ma_page=isset($page['body_id'])?$page['body_id']:"" ;
-			$theme=$user['theme'];
-			$template->assign(
-  					array(
-					'cl_version' => $cl_plugin['version'] ,
-					'name' => $cl_plugin['name'] ,
-					'ma_page' =>	$ma_page,
-					
-					'theme' => $theme  ,
-					'DEBUG' => $DEBUG   ,
-					'AUTOSIZE_PATH' => AUTOSIZE_PATH
-					)
-						);
-						 
-$autoscript="<script type='text/javascript'>
-/* cl_autosize_script_2 */
-var DEBUG=\"".$DEBUG."\" ;
-if (typeof (save_framework) == 'function')
-   save_framework('".$ma_page."');
-</script>";
-			 $template->append('footer_elements',$autoscript);  
-			 return ; 
-
- }// function cl_autosize_script_2
- //============================================================
- /*
-  *  cl_autosize_script
- */
- static public function cl_autosize_script()
-	{
-	   global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
-	 	if(isset($page['body_id']) &&	$page['body_id'] == 'theAdminPage' ) return ; 
-
-	    $my_path = dirname(__FILE__).'/';
-		$template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) );	
-		$DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 
-		$autosize_parametres =	 cl_autosize_Get_Options() ;			
-		$theme=$user['theme'];
-		$url = get_root_url();   
+		$ThePicture = $template->get_template_vars('current'); 
+		$data = array();
+	 return $content;
+
+		$data['maxwidth'] = '1200';
+		$data['maxheight'] ='250';
+		$data['user_id'] = $userdata['id'];
+		foreach ($fields as $field)
+		{
+			if (isset($_POST[$field]))
+			{
+				$data[$field] = $_POST[$field];
+			}
+		}
+	
+		if($data['maxwidth'] != "" )
+			{
+			$picture['current']['scaled_width']=$data['maxwidth'];
+			$picture['current']['scaled_height']=$data['maxheight'];
+			mass_updates(USER_INFOS_TABLE,
+					array('primary' => array('user_id'), 'update' => $fields),
+					array($data));	
+			}
 		 
-  		$template->assign(
-  						array(   
-						'autosize_parametres' => $autosize_parametres ,
-						'cl_plugins' => $cl_plugin ,
-						'cl_version' => $cl_plugin['version'] ,
-						'name' => $cl_plugin['name'] ,
-						 
-						 'MY_ROOT' => get_root_url(),
-						'theme' => $theme  ,
-						'DEBUG' => $DEBUG   ,
-						'AUTOSIZE_PATH' => AUTOSIZE_PATH)
-						 );
- 
-		return $template->parse( 'autosize_init', false);
-	}// function cl_autosize_script
-//===============================================================
-/*
- *
-*/
-static public function cl_ajuste_data($content){
-	global  $template,$user,$conf,$picture ;
-	$my_path = realpath(AUTOSIZE_PATH .'/');
-	$userdata=$user;
-	$fields = array( 'maxwidth', 'maxheight' );
-	 
-	$ThePicture = $template->get_template_vars('current'); 
-	$data = array();
- return $content;
-
-	$data['maxwidth'] = '1200';
-	$data['maxheight'] ='250';
-	$data['user_id'] = $userdata['id'];
-	foreach ($fields as $field)
-	{
-		if (isset($_POST[$field]))
-		{
-			$data[$field] = $_POST[$field];
-		}
-	}
-	
-	if($data['maxwidth'] != "" )
-		{
-		$picture['current']['scaled_width']=$data['maxwidth'];
-		$picture['current']['scaled_height']=$data['maxheight'];
-		mass_updates(USER_INFOS_TABLE,
-				array('primary' => array('user_id'), 'update' => $fields),
-				array($data));	
-		}
-		 
-		return $content;										 
-	 }
+			return $content;										 
+		 }
 
 } // class
Index: /extensions/Autosize/include/constants.php
===================================================================
--- /extensions/Autosize/include/constants.php	(revision 8626)
+++ /extensions/Autosize/include/constants.php	(revision 8627)
@@ -2,5 +2,5 @@
 global $prefixeTable;
 if (!defined('CL_AUTOSIZE_TABLE')) define('CL_AUTOSIZE_TABLE', $prefixeTable.'cl_autosize');
-$path = AUTOSIZE_PATH;
+		$path = AUTOSIZE_PATH;
           $plg_data = implode( '', file($path.'main.inc.php') );
           if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 8626)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 8627)
@@ -1,7 +1,2 @@
-if (typeof jQuery == 'undefined') {  
-    // jQuery n'est pas chargé
-} else {
-    // jQuery est chargé
-}
 
 //Chrome,Firefox,safari diaporama + GMaps incompatible pas de load.
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js	(revision 8626)
+++ /extensions/Autosize/js/conflit.js	(revision 8627)
@@ -72,6 +72,6 @@
 function conflit(element, nc) {
     //--- cl_conflit 
-if (typeof MooTools=="undefined" && typeof  Prototype=="undefined" ) {
-       ret_element = jQuery(element);
+    if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {
+        ret_element = jQuery(element);
         return ret_element;
     }
@@ -82,5 +82,5 @@
             return ret_element;
         }
-    
+
     }
 
@@ -94,14 +94,13 @@
     }
     else if (retour.match(RegExp("rv_gmaps", "gi"))) {
-    try{
-        ret_element = myjQuery().$Prototype(element);
-        }
-        catch(e)
-        {
-
-         ret_element = myjQuery().$Prototype(element);
-
-        }
-    } else if (retour.match(RegExp("GMaps", "gi"))) {      
+        try {
+            ret_element = myjQuery().$Prototype(element);
+        }
+        catch (e) {
+
+            ret_element = myjQuery().$Prototype(element);
+
+        }
+    } else if (retour.match(RegExp("GMaps", "gi"))) {
 
         ret_element = jQuery(element);
@@ -113,8 +112,8 @@
 
         }
-       
+
 
     } else if (retour.match(RegExp("luciano", "gi"))) {
-         
+
 
         ret_element = jQuery().$Luciano(element, nc);
@@ -168,51 +167,26 @@
 //======================================================
 jQuery(document).ready(
-       function (jQuery) {
-           jQuery(window).load(function () {
-               //============================================================
-               jQuery("#icon_gmaps").bind('click', function () {
-
-                   jQuery('html,body').stop().scrollTop(0);
-                   jQuery('html,body').stop().scrollLeft(0);
-                   jQuery(".ui-widget-overlay").css("opacity", "0.75");
-
-                   l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2;
-                   h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2;
-
-                   jQuery(".gmapsPopup").css("left", l1 + "px");
-                   jQuery(".gmapsPopup").css("top", h1 + "px");
-               })
-               //=============================================================  
-               if (typeof (Parent) == "undefined")
-                   Parent = "#theImage";
-               info_image = jQuery(Parent).infos();
-               p0 = jQuery(Parent);
-               if (p0.length > 0) {
-                   //======================================================
-                   if (info_image.position != "static") {
-                       try {
-                           if (theme.match("gally", "gi")) {
-                               if (typeof gallyPP != "undefined") {
-                                  
-                               } else if (jQuery.isFunction(inittoolbar)) {
-                                   if (typeof (currentTab) == "undefined") inittoolbar();
-                                   else initializeImageMode("resize");
-                               };
-                               //==== compatibilité Gally/LLGBO ===
-                               //--- passage relative ==> static ===/
-                               jQuery(Parent).css({ position: "static" });
-                               jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
-
-                           }
-                       } catch (e) {
-                       }
-
-                   }
-               }
-               //   jQuery(window).resize();
-           });
-           //=============================================================        
-           //  $ = _$2; ;
-       });
+    function (jQuery) {
+        jQuery(window).load(function () {
+            //============================================================
+            jQuery("#icon_gmaps").bind('click', function () {
+
+                jQuery('html,body').stop().scrollTop(0);
+                jQuery('html,body').stop().scrollLeft(0);
+                jQuery(".ui-widget-overlay").css("opacity", "0.75");
+
+                l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2;
+                h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2;
+
+                jQuery(".gmapsPopup").css("left", l1 + "px");
+                jQuery(".gmapsPopup").css("top", h1 + "px");
+            })
+            //=============================================================  
+
+            //   jQuery(window).resize();
+        });
+        //=============================================================        
+        //  $ = _$2; ;
+    });
 
 
@@ -222,11 +196,11 @@
 jQuery.fn.extend({
 
-//---------------- luciano -------------------------------
-$Luciano: function (el, nc) {
-return document.id(el, nc, this.document);
-},
-//=============== PaMOOramics ===========================
-
-$Pamoorama: function (B) {
+    //---------------- luciano -------------------------------
+    $Luciano: function (el, nc) {
+        return document.id(el, nc, this.document);
+    },
+    //=============== PaMOOramics ===========================
+
+    $Pamoorama: function (B) {
 
 
@@ -345,5 +319,5 @@
                         callstack.push("jQuery");
                         isCallstackPopulated = true;
-                     
+
                         break;
                     }
@@ -448,23 +422,23 @@
 
                 states.push('paMOOramics');
-              break;
-          }
-          //window_1290934905697_top
-          if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {
-              states.push('rv_gmaps');
-              break;
-          }
-          if (fn.match(RegExp("that.overlayOpacity", "gi"))) {
-              states.push('rv_gmaps');
-              break;
-          }
-          if (fn.match(RegExp("For backward compatibility like win", "gi"))) {
-              states.push('rv_gmaps');
-              break;
-          }
-          if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) {
-              states.push('rv_gmaps');
-              break;
-          }
+                break;
+            }
+            //window_1290934905697_top
+            if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {
+                states.push('rv_gmaps');
+                break;
+            }
+            if (fn.match(RegExp("that.overlayOpacity", "gi"))) {
+                states.push('rv_gmaps');
+                break;
+            }
+            if (fn.match(RegExp("For backward compatibility like win", "gi"))) {
+                states.push('rv_gmaps');
+                break;
+            }
+            if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) {
+                states.push('rv_gmaps');
+                break;
+            }
 
             if (fn.match(RegExp("__content|__method|observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) {
@@ -474,6 +448,6 @@
 
 
-            if (all_functions.length > 50) 
-            break;
+            if (all_functions.length > 50)
+                break;
 
 
@@ -482,8 +456,8 @@
 
     }
-  // state_ff + "|" +
+    // state_ff + "|" +
     state = states.join('\n');
     if (state == "") {
-        
+
         if (DEBUG == "true") {
             Fn = all_functions.join('\n');
@@ -494,14 +468,14 @@
         }
 
- 
+
         state = state_ff;
     }
 
     Fn = all_functions;
-    return { state: state, fn: callstack.join('\n'),fn1:fn2 };
+    return { state: state, fn: callstack.join('\n'), fn1: fn2 };
 }
 //====================================
 test_conflit = false;
- librairies =new Array;
+librairies = new Array;
 
 
@@ -509,4 +483,7 @@
 $_ = $;
 function save_framework(page) {
+    // theGategoryPage,theRegisterPage
+    // thePicturePage
+    // si admin.php page = "",theIdentificationPage
     try {
         Conflit = { version: cl_version, name: cl_plugin };
@@ -514,67 +491,88 @@
 
     }
-        $_2 = $;
+    if (typeof (Parent) == "undefined")
+        Parent = "#theImage";
+    info_image = jQuery(Parent).infos();
+    p0 = jQuery(Parent);
+    if (p0.length > 0) {
+        //======================================================
+        if (info_image.position != "static") {
+            try {
+                if (theme.match("gally", "gi")) {
+                    if (typeof gallyPP != "undefined") {
+
+                    } else if (jQuery.isFunction(inittoolbar)) {
+                        if (typeof (currentTab) == "undefined") inittoolbar();
+                        else initializeImageMode("resize");
+                    };
+                    //==== compatibilité Gally/LLGBO ===                 
+                    jQuery(Parent).css({ position: "static" });
+
+                }
+            } catch (e) {
+            }
+
+        }
+    }
+
+    $_2 = $;
     return
-    }
+}
 
 (function ($) {
-    $(document).ready(function () {    
-          //=================================================
-          if (typeof  jQuery.fn.infos !="function")
-          {
-               jQuery=myjQuery;
-               $=my$ ;
-               }
-        });
+    $(document).ready(function () {
+        //=================================================
+        if (typeof jQuery.fn.infos != "function") {
+            jQuery = myjQuery;
+            $ = my$;
+        }
+    });
 
 })(jQuery);
 
-if(test_conflit!=true)
-{
-//-------------------------------------------------------------- 
-$_0 = $;
- 
-        function $(element, nc0) {
-            if (typeof  jQuery.fn.infos !="function")  
-             if (typeof  myjQuery !="undefined") 
-                 jQuery=myjQuery;    
-             a = conflit(element, nc0);
-            return a;
-        }
-       
-        if (typeof ($.ajax) != "function") {
-            $.ajax = function (origSettings) {
-                jQuery.ajax(origSettings);
-            }
-
-
-            $.parseJSON = function (msg) {
-                return jQuery.parseJSON(msg);
-            }
-
-
-        }
-        //============================================
-        /* url (String): URl de la page à charger 
-        * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 
-        * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 
-        * type (String): (optionnel) format des données renvoyées à la fonction de callback 
-        */
-        if (typeof ($.get) != "function") {
-            $.get = function ( a, b, c, d) {
-                return jQuery.get(a, b, c,d );
-            }
-        }
-        if (typeof ($.post) != "function") {
-
-            $.post = function (a, b, c,d) {
-                return jQuery.post(a, b, c, d);
-            }
-            ;
-
-        }
-        
-
- 
+if (test_conflit != true) {
+    //-------------------------------------------------------------- 
+    $_0 = $;
+
+    function $(element, nc0) {
+        if (typeof jQuery.fn.infos != "function")
+            if (typeof myjQuery != "undefined")
+                jQuery = myjQuery;
+        a = conflit(element, nc0);
+        return a;
+    }
+
+    if (typeof ($.ajax) != "function") {
+        $.ajax = function (origSettings) {
+            jQuery.ajax(origSettings);
+        }
+
+
+        $.parseJSON = function (msg) {
+            return jQuery.parseJSON(msg);
+        }
+
+
+    }
+    //============================================
+    /* url (String): URl de la page à charger 
+    * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 
+    * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 
+    * type (String): (optionnel) format des données renvoyées à la fonction de callback 
+    */
+    if (typeof ($.get) != "function") {
+        $.get = function (a, b, c, d) {
+            return jQuery.get(a, b, c, d);
+        }
+    }
+    if (typeof ($.post) != "function") {
+
+        $.post = function (a, b, c, d) {
+            return jQuery.post(a, b, c, d);
+        }
+        ;
+
+    }
+
 }
 //-------------------------------------------------------------- 
Index: /extensions/Autosize/js/jquery.dimensions.js
===================================================================
--- /extensions/Autosize/js/jquery.dimensions.js	(revision 8626)
+++ /extensions/Autosize/js/jquery.dimensions.js	(revision 8627)
@@ -19,45 +19,45 @@
     */
     jQuery.each(['Height', 'Width'],
-            function (i, name) {
-                jQuery.fn['inner' + name] = function () {
-                    if (!this[0]) return;
-                    var torl = name == 'Height' ? 'Top' : 'Left',
-                        borr = name == 'Height' ? 'Bottom' : 'Right';
-                    return this.is(':visible') ? this[0]['client' + name] : num(this, name.toLowerCase()) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
-                };
-
-                jQuery.fn['outer' + name] = function (options) {
-                    if (!this[0]) return;
-                    var torl = name == 'Height' ? 'Top' : 'Left',
-                        borr = name == 'Height' ? 'Bottom' : 'Right';
-                    options = options || false;
-                    options = jQuery.extend({ margin: options });
-
-                    var val = this.is(':visible') ? this[0]['offset' + name] :
-                        num(this,
-                        name.toLowerCase()) +
-                        num(this, 'border' + torl + 'Width') +
-                        num(this, 'border' + borr + 'Width') +
-                        num(this, 'padding' + torl) +
-                        num(this, 'padding' + borr)
-
-                        ;
-                    return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
-                };
-            });
+        function (i, name) {
+            jQuery.fn['inner' + name] = function () {
+                if (!this[0]) return;
+                var torl = name == 'Height' ? 'Top' : 'Left',
+                    borr = name == 'Height' ? 'Bottom' : 'Right';
+                return this.is(':visible') ? this[0]['client' + name] : num(this, name.toLowerCase()) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
+            };
+
+            jQuery.fn['outer' + name] = function (options) {
+                if (!this[0]) return;
+                var torl = name == 'Height' ? 'Top' : 'Left',
+                    borr = name == 'Height' ? 'Bottom' : 'Right';
+                options = options || false;
+                options = jQuery.extend({ margin: options });
+
+                var val = this.is(':visible') ? this[0]['offset' + name] :
+                    num(this,
+                    name.toLowerCase()) +
+                    num(this, 'border' + torl + 'Width') +
+                    num(this, 'border' + borr + 'Width') +
+                    num(this, 'padding' + torl) +
+                    num(this, 'padding' + borr)
+
+                    ;
+                return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
+            };
+        });
     /*
     *
     */
     jQuery.each(['Left', 'Top'],
-      function (i, name) {
-          jQuery.fn['scroll' + name] = function (val) {
-              if (!this[0]) return;
-              return val != undefined ? this.each(function () {
-                  this == window || this == document ? window.scrollTo(name == 'Left' ? val : $(window)['scrollLeft'](),
-           name == 'Top' ? val : $(window)['scrollTop']()) : this['scroll' + name] = val;
-              }) : this[0] == window || this[0] == document ? self[(name == 'Left' ? 'pageXOffset' : 'pageYOffset')] || jQuery.boxModel && document.documentElement['scroll' + name] || document.body['scroll' + name] : this[0]['scroll' + name];
-          };
-
-      });
+    function (i, name) {
+        jQuery.fn['scroll' + name] = function (val) {
+            if (!this[0]) return;
+            return val != undefined ? this.each(function () {
+                this == window || this == document ? window.scrollTo(name == 'Left' ? val : $(window)['scrollLeft'](),
+        name == 'Top' ? val : $(window)['scrollTop']()) : this['scroll' + name] = val;
+            }) : this[0] == window || this[0] == document ? self[(name == 'Left' ? 'pageXOffset' : 'pageYOffset')] || jQuery.boxModel && document.documentElement['scroll' + name] || document.body['scroll' + name] : this[0]['scroll' + name];
+        };
+
+    });
     jQuery.fn.extend({
 
@@ -106,5 +106,5 @@
                 if (elem.nodeName) nodeName = elem.nodeName;
 
-               
+
                 if (elem == window) {
 
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 8626)
+++ /extensions/Autosize/main.inc.php	(revision 8627)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.4.2.5
+Version: 1.4.2.6
 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
@@ -8,24 +8,18 @@
 Author URI:http://cljosse.free.fr
 */
+
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 if (!defined('AUTOSIZE_PATH')) 
 define(  'AUTOSIZE_PATH',   PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' );
-//=================================================================================
-		
- include(AUTOSIZE_PATH."include/constants.php"); 	   
- include_once(AUTOSIZE_PATH.'autosize.inc.php');
+//==================================================================
+	include(AUTOSIZE_PATH."include/constants.php"); 	   
+	include_once(AUTOSIZE_PATH.'autosize.inc.php');
 //==================================================================
 $autosize_controler = new autosize_controler();
 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
 
+add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL  );
 
-add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL  );
-add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script'),  EVENT_HANDLER_PRIORITY_NEUTRAL  ,  2);	
-
- add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_2'),  EVENT_HANDLER_PRIORITY_NEUTRAL );
- add_event_handler('render_element_content',
- array(&$autosize_controler, 'cl_autosize_script_3'),  EVENT_HANDLER_PRIORITY_NEUTRAL-1,  2  );
-
-
- 
+add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'),  EVENT_HANDLER_PRIORITY_NEUTRAL+20  ,  2);	
+add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_2'),  EVENT_HANDLER_PRIORITY_NEUTRAL );
 ?>
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 8626)
+++ /extensions/Autosize/template/autosize.tpl	(revision 8627)
@@ -46,14 +46,10 @@
      </script>
 
-
+{known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"}
 <link href="{$AUTOSIZE_PATH}css/autosize.css" rel="stylesheet" type="text/css" />
  <!--  << autosize/template/autosize.tpl   --> 
 {/html_head} 
-
- 
-{known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"}
 <script type="text/javascript">
-    var DEBUG = '{$DEBUG}';
-    var visible = '{$visible}';
+       var visible = '{$visible}';
    </script>
 {if $DEBUG == "true"}
Index: /extensions/Autosize/template/conflit.tpl
===================================================================
--- /extensions/Autosize/template/conflit.tpl	(revision 8626)
+++ /extensions/Autosize/template/conflit.tpl	(revision 8627)
@@ -1,28 +1,25 @@
 {html_head} 
+<!--- cl_conflit/template/confilt.tpl ---> 
  {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"  now=1} 
  {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 
  {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 
-
+ {/html_head}
 <script type="text/javascript">
-    var DEBUG = '{$DEBUG}';
+ var DEBUG = '{$DEBUG}';
+    var theme = '{$theme}';
+    var cl_version = '{$cl_version}';
+    var cl_plugin = '{$name}';
+{if $DEBUG == "true"}
+    var cl_query = '{$autosize_parametres->query}';
+    var cl_type = '{$autosize_parametres->type}';
+    var cl_plugins=new Array();
+     {if not empty($cl_plugins )}
+       {foreach from=$cl_plugins item=cl_plug }
+            value="{$cl_plug}";cl_plugins.push(value);           
+        {/foreach}
+     {/if}
+{/if}
 </script>
 
 
-<script type="text/javascript">
-    var theme = '{$theme}';
-    var cl_version = '{$cl_version}';
-    var cl_plugin = '{$name}';
-    var cl_query = '{$autosize_parametres->query}';
-    var cl_type = '{$autosize_parametres->type}';
-    var cl_plugins=new Array();
-{if $DEBUG}
- {if not empty($cl_plugins )}
-   {foreach from=$cl_plugins item=cl_plug }
-        value="{$cl_plug}";cl_plugins.push(value);           
-    {/foreach}
- {/if}
-{/if}
-</script>
-
-{/html_head}
  
