Index: /extensions/Autosize/admin/template/admin.tpl
===================================================================
--- /extensions/Autosize/admin/template/admin.tpl	(revision 6982)
+++ /extensions/Autosize/admin/template/admin.tpl	(revision 6983)
@@ -1,22 +1,25 @@
 {html_head} 
-    <script type="text/javascript">
-        var img_width={$IMG_WIDTH       }
-        var img_height={ $IMG_HEIGHT     }
-        var marge_basse={ $MARGE_BASSE    }
-        var echelle_max={ $ECHELLE_MAX   }
-        var mini_width={ $MINI_WIDTH   }
-        var mini_height={ $MINI_HEIGHT   }
-        var webmaster_width={$webmaster_width   }
-        var webmaster_height={ $webmaster_height   }
-        var admin_width={ $admin_width   }
-        var admin_height={ $admin_height   }
-        var generic_width={ $generic_width   }
-        var generic_height={ $generic_height   }
-        var guest_width={ $guest_width   }
-        var guest_height={ $guest_height   }
-        var normal_width={ $normal_width   }
-        var normal_height={ $normal_height   }
-        var user_status={ $user_status   }
+ <script type="text/javascript">
+     var theme = '{$theme}';
+     var img_width = '{$IMG_WIDTH }';
+     var img_height = '{ $IMG_HEIGHT }';
+     var marge_basse = '{ $MARGE_BASSE }';
+     var echelle_max = '{ $ECHELLE_MAX }';
+     var mini_width = '{ $MINI_WIDTH   }';
+     var mini_height = '{ $MINI_HEIGHT   }';
 
+     var webmaster_width = '{$webmaster_width   }';
+     var webmaster_height = '{ $webmaster_height   }';
+     var admin_width = '{ $admin_width   }';
+     var admin_height = '{ $admin_height   }';
+     var generic_width = '{ $generic_width   }';
+     var generic_height = '{ $generic_height   }';
+     var guest_width = '{ $guest_width   }';
+     var guest_height = '{$guest_height}';
+     var normal_width = '{$normal_width}';
+     var normal_height = '{$normal_height}';
+     var user_status = '{$user_status}';
+     var user_status = '{$user_status}';
+     var check_auto_w = '{$check_auto_w}';
      </script>
     {known_script id="jquery" src="themes/default/js/jquery.packed.js"}
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 6982)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 6983)
@@ -1,6 +1,8 @@
-﻿jQuery.noConflict();
+﻿
+if (!theme.match(RegExp("gally", "g")))
+    jQuery.noConflict();
+ 
+
 jQuery(document).ready(
-
-
 function (jQuery) {
     function Marge_haute(myObj, ajoute_h) {
@@ -30,4 +32,9 @@
         if (Image.length > 0) {
             Type_Img = "embed";
+        } else if (jQuery("#map").length) {
+
+            Type_Img = "map";
+
+
         } else if (jQuery("#pamoorama").length) {
 
@@ -44,4 +51,12 @@
         //=================================================================
         switch (Type_Img) {
+            case "map":
+                var Image = jQuery("#map");
+                var TheImg = jQuery("#map").get(0);
+                position = jQuery("#map").position();
+
+                img_height = jQuery(window).height() - position.top;
+                img_width = jQuery(window).width() - position.left;
+                break
             case "img":
                 var Image = jQuery("#theImage").find("img");
@@ -78,5 +93,6 @@
         if (!sel0) return;
         type_pos = jQuery(TheImg).css("position"); //static
-        if (jQuery(TheImg).css("position") == "relative") {
+        if (sel0.top  == 0) {
+            sel0.top = 0;
             sel0.top += Marge_haute("#theHeader", true);
             sel0.top += Marge_haute("#imageHeaderBar", true);
@@ -97,6 +113,9 @@
         H0 = parseInt(img_height);
         if (H0 < parseInt(mini_height)) return;
-
-        var rapport = (W0 / H0);
+        if (Type_Img != "map")
+            var rapport = (W0 / H0);
+        else
+            var rapport = -1;
+
         //==========================================================================
         var Licence = jQuery("#theImage").find(".licencetag");
@@ -149,6 +168,8 @@
         }
 
-        var Image_Width = parseInt(Image_height * rapport);
-
+        if (rapport > 0)
+            var Image_Width = parseInt(Image_height * rapport);
+        else
+            var Image_Width = parseInt(W0);
         //===============================================================
         twidth = jQuery("#imageHeaderBar").width();
@@ -158,5 +179,5 @@
         var winwidth = jQuery(window).width();
         var width_user = eval(user_status + "_width");
-         
+        align_auto = "center";
         if (check_auto_w == 'checked="checked"') {
             if (Type_Img != "pamoorama") {
@@ -176,8 +197,8 @@
                     }
                     Image_Width = parseInt(W0 * echelle_w);
-                     
+
                     align_auto = "left";
                 } else {
-                    
+
                     align_auto = "center";
                 }
@@ -218,5 +239,5 @@
             if (jQuery("#theImg").css("textAlign"))
                 jQuery("#theImg").css("textAlign", align_auto);
- 
+
             jQuery(TheImg).height(Image_height + "px");
             jQuery(TheImg).width(Image_Width + "px");
@@ -239,5 +260,6 @@
 
     jQuery(window).resize();
-
+   
+   
 });    
 
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 6982)
+++ /extensions/Autosize/main.inc.php	(revision 6983)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.0.7
+Version: 1.0.7192
 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
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 6982)
+++ /extensions/Autosize/template/autosize.tpl	(revision 6983)
@@ -5,5 +5,5 @@
 {*jQuery is always available by default*} 
  <script type="text/javascript">
-	//test
+     var theme = '{$theme}';
         var img_width='{$IMG_WIDTH }';
         var img_height='{ $IMG_HEIGHT }';
