Index: /extensions/gally/gally-default/conf/default.conf
===================================================================
--- /extensions/gally/gally-default/conf/default.conf	(revision 12591)
+++ /extensions/gally/gally-default/conf/default.conf	(revision 12592)
@@ -146,10 +146,12 @@
 tabsVisible=250
 
-# -- 1.2.0 --
+# -- 1.4.3 --
 # The 'tabsPosition' option can take theses values :
-#   "top"     => display the tabs area at the bottom of the image toobar area
-#                (top of the page)
-#   "bottom"  => display the tabs area at the top of the copyright area
-#                (bottom of the page)
+#   "top"           => display the tabs area at the bottom of the image toobar area
+#                      (top of the page)
+#   "bottom"        => display the tabs area at the top of the copyright area
+#                      (bottom of the page)
+#   "pictureTop"    => display the tabs area at the top of the image area
+#   "pictureBottom" => display the tabs area at the bottom of the image area
 tabsPosition="top"
 
Index: /extensions/gally/gally-default/css/picture.css
===================================================================
--- /extensions/gally/gally-default/css/picture.css	(revision 12591)
+++ /extensions/gally/gally-default/css/picture.css	(revision 12592)
@@ -175,5 +175,5 @@
 
 
-#theImg {
+#theMainImage {
   position:relative;
   left:0px;
Index: /extensions/gally/gally-default/css/theme.css
===================================================================
--- /extensions/gally/gally-default/css/theme.css	(revision 12591)
+++ /extensions/gally/gally-default/css/theme.css	(revision 12592)
@@ -16,2 +16,7 @@
   cursor:pointer;
 }
+
+.button {
+  cursor:pointer;
+  display:inline-block;
+}
Index: /extensions/gally/gally-default/js/gallyjs-tcp.js
===================================================================
--- /extensions/gally/gally-default/js/gallyjs-tcp.js	(revision 12591)
+++ /extensions/gally/gally-default/js/gallyjs-tcp.js	(revision 12592)
@@ -4,5 +4,5 @@
   ------------------------------------------------------------------------------
   file: gally/gallyjs-tcp.js
-  file release: 1.4.0
+  file release: 1.4.4
   ------------------------------------------------------------------------------
   author: grum at piwigo.org
@@ -32,4 +32,6 @@
   initContentDesc = function()
   {
+    var tmpInfo='';
+
     if(($("#additional_infoTOP").length + $("#additional_infoBOTTOM").length)<2)
     {
@@ -70,5 +72,5 @@
 
     // <!--up-down--> tag
-    txt = $("#additional_infoLEFT").attr("innerHTML");
+    txt = $("#additional_infoLEFT").prop("innerHTML");
     if(txt==null) { txt=""; }
     tmp = txt.indexOf("<!--up-down-->");
@@ -76,5 +78,5 @@
     if(tmp>-1)
     { // tag is not managed by the ExtendedDescription plugin
-      $("#additional_infoTOP").attr("innerHTML", txt.slice(0,tmp));
+      $("#additional_infoTOP").prop("innerHTML", txt.slice(0,tmp));
       txt=txt.substr(tmp+14); //remove the tag
     }
@@ -85,5 +87,5 @@
           if(this.id=="")
           {
-            $("#additional_infoTOP").attr("innerHTML", $("#additional_infoTOP").attr("innerHTML")+this.innerHTML);
+            $("#additional_infoTOP").prop("innerHTML", $("#additional_infoTOP").prop("innerHTML")+this.innerHTML);
             this.parentNode.removeChild(this);
           }
@@ -97,9 +99,9 @@
     if(tmp>-1)
     { // tag is present, cut the right text to the
-      $("#additional_infoBOTTOM").attr("innerHTML", txt.slice(0,tmp));
+      $("#additional_infoBOTTOM").prop("innerHTML", txt.slice(0,tmp));
       txt=txt.substr(tmp+17);
     }
 
-    $("#additional_infoLEFT").attr("innerHTML", txt);
+    $("#additional_infoLEFT").prop("innerHTML", txt);
 
     if((txt.replace(/\s*/im, "")=="")&&($("#additional_infoID").length>0))
@@ -110,5 +112,8 @@
     $(".additional_info").css("visibility", "visible");
 
-    if($("#additional_infoBOTTOM").attr("innerHTML").replace(/\s*/im, "")=="")
+    tmpInfo=$("#additional_infoBOTTOM").prop("innerHTML");
+    if(tmpInfo==null) tmpInfo='';
+
+    if(tmpInfo.replace(/\s*/im, "")=="")
     {
       // remove the bottom area if empty
@@ -120,5 +125,7 @@
     }
 
-    if($("#additional_infoTOP").attr("innerHTML").replace(/\s*/im, "")=="")
+    tmpInfo=$("#additional_infoTOP").prop("innerHTML");
+    if(tmpInfo==null) tmpInfo='';
+    if(tmpInfo.replace(/\s*/im, "")=="")
     {
       // remove the top area if empty
@@ -138,5 +145,5 @@
         {
           visibility:"hidden",
-          top: $("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'
+          top: $("#titrePageID").prop("offsetTop")+$("#titrePageID").prop("offsetHeight")-2+'px'
         }
       );
@@ -167,6 +174,6 @@
         function (index, elem)
         {
-          //alert($(this.parentNode).attr('offsetWidth')+"---"+$(this.parentNode).attr('id'));
-          $(this).css("min-width", $(this.parentNode).attr('offsetWidth'));
+          //alert($(this.parentNode).prop('offsetWidth')+"---"+$(this.parentNode).prop('id'));
+          $(this).css("min-width", $(this.parentNode).prop('offsetWidth'));
           if(jQuery.browser.msie)
           {
@@ -194,5 +201,5 @@
             height:"auto"
           }).fadeTo(options.animateDelay,1);
-          $("#icon_menu").attr("className", "button2");
+          $("#icon_menu").toggleClass("button button2");
           menuState=true;
           break;
@@ -204,5 +211,5 @@
             });
           });
-          $("#icon_menu").attr("className", "button");
+          $("#icon_menu").toggleClass("button button2");
           menuState=false;
       }
@@ -217,5 +224,5 @@
             height:"auto"
           });
-          $("#icon_menu").attr("className", "button2");
+          $("#icon_menu").toggleClass("button button2");
           menuState=true;
           break;
@@ -225,5 +232,5 @@
             height:"0px"
           });
-          $("#icon_menu").attr("className", "button");
+          $("#icon_menu").toggleClass("button button2");
           menuState=false;
       }
Index: /extensions/gally/gally-default/js/gallyjs-tcp.min.js
===================================================================
--- /extensions/gally/gally-default/js/gallyjs-tcp.min.js	(revision 12591)
+++ /extensions/gally/gally-default/js/gallyjs-tcp.min.js	(revision 12592)
@@ -1,43 +1,2 @@
-/* file: gally-tcp.js - v1.4.0 | minified on 2011/05/01 with http://jscompress.com/ */
-var gallyCP=null;$(document).ready(function()
-{gallyCP=new GallyCP();});function GallyCP()
-{var menuState,initContentDesc=function()
-{if(($("#additional_infoTOP").length+$("#additional_infoBOTTOM").length)<2)
-{return(false);}
-txt=$("#additional_infoLEFT").attr("innerHTML");if(txt==null){txt="";}
-tmp=txt.indexOf("<!--up-down-->");if(tmp>-1)
-{$("#additional_infoTOP").attr("innerHTML",txt.slice(0,tmp));txt=txt.substr(tmp+14);}
-else
-{$(".additional_info").each(function(i)
-{if(this.id=="")
-{$("#additional_infoTOP").attr("innerHTML",$("#additional_infoTOP").attr("innerHTML")+this.innerHTML);this.parentNode.removeChild(this);}});}
-tmp=txt.indexOf("<!--right-left-->");if(tmp>-1)
-{$("#additional_infoBOTTOM").attr("innerHTML",txt.slice(0,tmp));txt=txt.substr(tmp+17);}
-$("#additional_infoLEFT").attr("innerHTML",txt);if((txt.replace(/\s*/im,"")=="")&&($("#additional_infoID").length>0))
-{$("#additional_infoID").get(0).parentNode.removeChild($("#additional_infoID").get(0));}
-$(".additional_info").css("visibility","visible");if($("#additional_infoBOTTOM").attr("innerHTML").replace(/\s*/im,"")=="")
-{$("#additional_infoBOTTOM").get(0).parentNode.removeChild($("#additional_infoBOTTOM").get(0));}
-else
-{$("#additional_infoBOTTOM").css("visibility","visible");}
-if($("#additional_infoTOP").attr("innerHTML").replace(/\s*/im,"")=="")
-{$("#additional_infoTOP").get(0).parentNode.removeChild($("#additional_infoTOP").get(0));}
-else
-{$("#additional_infoTOP").css("visibility","visible");}},initMenu=function()
-{if(options.menuAnimated!="noswitch")
-{$("#menubar").css({visibility:"hidden",top:$("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'});switchmenu('n');switch(options.menuWidth)
-{case"auto":$("#menubar").css("width","auto");maxwidth=options.menuMaxWidth;regexp=/[1234567]\./i;if(jQuery.browser.msie&&jQuery.browser.version.match(regexp))
-{maxwidth=options.menuMSIEMaxWidth;}
-if(maxwidth>0){$("#menubar").css("max-width",maxwidth+"px");}
-break;case"info":$("#menubar").css("width",$(".additionnal_info").css("width"));break;default:$("#menubar").css("width",options.menuWidth+"px");}}
-else
-{$("#menubar dl dd").each(function(index,elem)
-{$(this).css("min-width",$(this.parentNode).attr('offsetWidth'));if(jQuery.browser.msie)
-{$(this).css("max-width",options.menuMSIEMaxWidth+"px");}});}},switchmenu=function(force,iconpath)
-{if(force=='')
-{(!menuState)?force='y':force='n';}
-if(options.menuAnimated=="fade")
-{switch(force)
-{case'y':$("#menubar").css({visibility:"visible",height:"auto"}).fadeTo(options.animateDelay,1);$("#icon_menu").attr("className","button2");menuState=true;break;default:$("#menubar").fadeTo(options.animateDelay,0,function(){$("#menubar").css({visibility:"hidden",height:"0px"});});$("#icon_menu").attr("className","button");menuState=false;}}
-else
-{switch(force)
-{case'y':$("#menubar").css({visibility:"visible",height:"auto"});$("#icon_menu").attr("className","button2");menuState=true;break;default:$("#menubar").css({visibility:"hidden",height:"0px"});$("#icon_menu").attr("className","button");menuState=false;}}};this.switchmenu=function(force,iconpath){switchmenu(force,iconpath);};initMenu();initContentDesc();}
+/* file: gally-tcp.js - v1.4.4 | minified on 2011/11/10 with http://jscompress.com/ */
+function GallyCP(){var a,b=function(){var a="";if($("#additional_infoTOP").length+$("#additional_infoBOTTOM").length<2){return false}txt=$("#additional_infoLEFT").prop("innerHTML");if(txt==null){txt=""}tmp=txt.indexOf("<!--up-down-->");if(tmp>-1){$("#additional_infoTOP").prop("innerHTML",txt.slice(0,tmp));txt=txt.substr(tmp+14)}else{$(".additional_info").each(function(a){if(this.id==""){$("#additional_infoTOP").prop("innerHTML",$("#additional_infoTOP").prop("innerHTML")+this.innerHTML);this.parentNode.removeChild(this)}})}tmp=txt.indexOf("<!--right-left-->");if(tmp>-1){$("#additional_infoBOTTOM").prop("innerHTML",txt.slice(0,tmp));txt=txt.substr(tmp+17)}$("#additional_infoLEFT").prop("innerHTML",txt);if(txt.replace(/\s*/im,"")==""&&$("#additional_infoID").length>0){$("#additional_infoID").get(0).parentNode.removeChild($("#additional_infoID").get(0))}$(".additional_info").css("visibility","visible");a=$("#additional_infoBOTTOM").prop("innerHTML");if(a==null)a="";if(a.replace(/\s*/im,"")==""){$("#additional_infoBOTTOM").get(0).parentNode.removeChild($("#additional_infoBOTTOM").get(0))}else{$("#additional_infoBOTTOM").css("visibility","visible")}a=$("#additional_infoTOP").prop("innerHTML");if(a==null)a="";if(a.replace(/\s*/im,"")==""){$("#additional_infoTOP").get(0).parentNode.removeChild($("#additional_infoTOP").get(0))}else{$("#additional_infoTOP").css("visibility","visible")}},c=function(){if(options.menuAnimated!="noswitch"){$("#menubar").css({visibility:"hidden",top:$("#titrePageID").prop("offsetTop")+$("#titrePageID").prop("offsetHeight")-2+"px"});d("n");switch(options.menuWidth){case"auto":$("#menubar").css("width","auto");maxwidth=options.menuMaxWidth;regexp=/[1234567]\./i;if(jQuery.browser.msie&&jQuery.browser.version.match(regexp)){maxwidth=options.menuMSIEMaxWidth}if(maxwidth>0){$("#menubar").css("max-width",maxwidth+"px")}break;case"info":$("#menubar").css("width",$(".additionnal_info").css("width"));break;default:$("#menubar").css("width",options.menuWidth+"px")}}else{$("#menubar dl dd").each(function(a,b){$(this).css("min-width",$(this.parentNode).prop("offsetWidth"));if(jQuery.browser.msie){$(this).css("max-width",options.menuMSIEMaxWidth+"px")}})}},d=function(b,c){if(b==""){!a?b="y":b="n"}if(options.menuAnimated=="fade"){switch(b){case"y":$("#menubar").css({visibility:"visible",height:"auto"}).fadeTo(options.animateDelay,1);$("#icon_menu").toggleClass("button button2");a=true;break;default:$("#menubar").fadeTo(options.animateDelay,0,function(){$("#menubar").css({visibility:"hidden",height:"0px"})});$("#icon_menu").toggleClass("button button2");a=false}}else{switch(b){case"y":$("#menubar").css({visibility:"visible",height:"auto"});$("#icon_menu").toggleClass("button button2");a=true;break;default:$("#menubar").css({visibility:"hidden",height:"0px"});$("#icon_menu").toggleClass("button button2");a=false}}};this.switchmenu=function(a,b){d(a,b)};c();b()}var gallyCP=null;$(document).ready(function(){gallyCP=new GallyCP})
Index: /extensions/gally/gally-default/js/gallyjs-tpp.js
===================================================================
--- /extensions/gally/gally-default/js/gallyjs-tpp.js	(revision 12591)
+++ /extensions/gally/gally-default/js/gallyjs-tpp.js	(revision 12592)
@@ -4,5 +4,5 @@
   ------------------------------------------------------------------------------
   file: gally/gallyjs-tpp.js
-  file release: 1.4.0
+  file release: 1.4.4
   ------------------------------------------------------------------------------
   author: grum at piwigo.org
@@ -87,7 +87,7 @@
     if((options.interfaceOnImage=="always" || (options.interfaceOnImage=="noscroll" && !image.isScrollable)) && options.interfaceCanSwitch)
     {
-      $("#theImg").bind("mouseenter", function () { switchInterface('y', true); } )
-                  .bind("mouseleave", function () { switchInterface('n', true); } )
-                  .bind("mousemove", function () { switchInterface('y', true); } );
+      $("#theMainImage").bind("mouseenter", function () { switchInterface('y', true); } )
+                        .bind("mouseleave", function () { switchInterface('n', true); } )
+                        .bind("mousemove", function () { switchInterface('y', true); } );
     }
 
@@ -111,8 +111,8 @@
 
 
-    $("#navThumbPrev").css("top", $("#navThumbPrev").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
-    $("#navThumbNext").css("top", $("#navThumbNext").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
-
-    $("#theImage").css("top", $("#theImage").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
+    $("#navThumbPrev").css("top", $("#navThumbPrev").prop("offsetTop")+$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight")+"px");
+    $("#navThumbNext").css("top", $("#navThumbNext").prop("offsetTop")+$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight")+"px");
+
+    $("#theImage").css("top", $("#theImage").prop("offsetTop")+$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight")+"px");
 
     $("#contentid").attr("rows", options.commentRows);
@@ -178,5 +178,5 @@
       $('#theImgContainer').bind('click', function ()
         {
-          openDisplayHigh($('#theImg').attr('src'));
+          openDisplayHigh($('#theMainImage').attr('src'));
         }
       ).addClass('pointer');
@@ -185,4 +185,7 @@
   },
 
+  /**
+   * mode = "init" or "resize"
+   */
   initializeImageMode = function (mode)
   {
@@ -191,45 +194,18 @@
         cssValues = new Object;
 
-    if(mode=="init")
-    {
-      theHeaderHeight=$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight");
-
-      $("#imageToolBar").css("top", $("#imageToolBar").attr("offsetTop")+theHeaderHeight+$("#imageHeaderBar").attr("offsetHeight")+"px");
-
-      if(options.tabsPosition=="bottom")
-      {
-        copyrightArea = $("#copyright").attr("clientHeight")+1;
-        $("#theTabsContainer").css("bottom", copyrightArea+"px");
-      }
-      else if(options.tabsPosition=="top")
-      {
-        toolBarArea = $("#imageToolBar").attr("offsetTop")+$("#imageToolBar").attr("offsetHeight");
-        $("#theTabsContainer").css("top", toolBarArea+"px");
-      }
-
-      if($("#navThumbPrev").length>0)
-      {
-        $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px");
-      }
-      if($("#navThumbNext").length>0)
-      {
-        $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px");
-      }
-    }
-
-    cssValues.height = $("#theImg").attr("height")+"px";
+    cssValues.height = $("#theMainImage").prop("height")+"px";
 
     // autoscroll
-    if(options.imageAutoScroll && ($("#theImg").attr("scrollWidth")>($("#theImage").attr("clientWidth")-2*options.marginContainer)))
-    {
-      cssValues.width = ($("#theImage").attr("clientWidth")- 2*(options.marginContainer+options.paddingContainer))+"px";
+    if(options.imageAutoScroll && ($("#theMainImage").prop("scrollWidth")>($("#theImage").prop("clientWidth")-2*options.marginContainer)))
+    {
+      cssValues.width = ($("#theImage").prop("clientWidth")- 2*(options.marginContainer+options.paddingContainer))+"px";
 
       $("#theImage").bind("mousemove",
         function(event){
-          if($("#navThumbPrev").length>0) thumbWidth=$("#navThumbPrev").attr("clientWidth");
+          if($("#navThumbPrev").length>0) thumbWidth=$("#navThumbPrev").prop("clientWidth");
           deadArea = Math.max(options.imageScrollMinDeadArea, thumbWidth*1.2);
           mouse=Math.max(Math.min(event.clientX-image.leftPos, this.clientWidth - deadArea), deadArea);
-          $("#theImg")
-            .css("left",Math.round(($("#theImg").attr("scrollWidth")-this.clientWidth) * -(mouse-deadArea)/(this.clientWidth-2*deadArea))+"px")
+          $("#theMainImage")
+            .css("left",Math.round(($("#theMainImage").prop("scrollWidth")-this.clientWidth) * -(mouse-deadArea)/(this.clientWidth-2*deadArea))+"px")
             .trigger('scrolled');
         }
@@ -240,6 +216,6 @@
     {
       $("#theImage").unbind("mousemove");
-      $("#theImg").css("left", "0px");
-      cssValues.width = $("#theImg").attr("scrollWidth")+"px";
+      $("#theMainImage").css("left", "0px");
+      cssValues.width = $("#theMainImage").prop("scrollWidth")+"px";
       image.isScrollable=false;
     }
@@ -249,13 +225,13 @@
     if($("#copyright").css("position")=="fixed")
     {
-      $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px");
+      $("#theImage").css("padding-bottom", $("#copyright").prop("offsetHeight")+"px");
     }
     switch(options.imageCenterMode)
     {
       case "img":
-        imgTop = $("#theImgContainer").attr('offsetHeight');
+        imgTop = $("#theImgContainer").prop('offsetHeight');
         break;
       case "all":
-        imgTop = $("#theImage").attr('offsetHeight');
+        imgTop = $("#theImage").prop('offsetHeight');
         break;
       default:
@@ -263,19 +239,80 @@
         break;
     }
-    imgTop = ($("#copyright").attr("offsetTop") - ($("#imageHeaderBar").attr("offsetTop") + $("#imageHeaderBar").attr("offsetHeight")) - imgTop)/2 + options.imageCenterOffset;
-
-    if(imgTop<options.imageCenterTopMin)
-    {
-      imgTop=options.imageCenterTopMin;
-    }
-    imgTop=imgTop+"px";
-
-    $("#theImage").css("top", imgTop);
-
+    imgTop = ($("#copyright").prop("offsetTop") - ($("#imageHeaderBar").prop("offsetTop") + $("#imageHeaderBar").prop("offsetHeight")) - imgTop)/2 + options.imageCenterOffset;
+
+    switch($("#theImage").css("position"))
+    {
+      case "static":
+          $("#theImage").css("padding-top", imgTop);
+        break;
+      /*
+      case "fixed":
+      case "absolute":
+      case "relative":
+      */
+      default:
+          if(imgTop<options.imageCenterTopMin)
+          {
+            imgTop=options.imageCenterTopMin;
+          }
+          imgTop=imgTop+"px";
+          $("#theImage").css("top", imgTop);
+        break;
+    }
 
     image.leftPos=$('#theImage').offset().left;
 
+
+    if(mode=="init")
+    {
+      theHeaderHeight=$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight");
+
+      $("#imageToolBar").css("top", $("#imageToolBar").prop("offsetTop")+theHeaderHeight+$("#imageHeaderBar").prop("offsetHeight")+"px");
+
+      if($("#navThumbPrev").length>0)
+      {
+        $("#navThumbPrev").css("height", $("#copyright").prop("offsetTop")-$("#navThumbPrev").prop("offsetTop")-options.tabsHidden+"px");
+      }
+      if($("#navThumbNext").length>0)
+      {
+        $("#navThumbNext").css("height", $("#copyright").prop("offsetTop")-$("#navThumbNext").prop("offsetTop")-options.tabsHidden+"px");
+      }
+    }
+
+    switch(options.tabsPosition)
+    {
+      case "top":
+          toolBarArea = $("#imageToolBar").prop("offsetTop")+$("#imageToolBar").prop("offsetHeight");
+          $("#theTabsContainer").css("top", toolBarArea+"px");
+        break;
+      case "bottom":
+          copyrightArea = $("#copyright").prop("clientHeight")+1;
+          $("#theTabsContainer").css("bottom", copyrightArea+"px");
+        break;
+      case "pictureTop":
+        $("#theTabsContainer").css(
+          {
+            top: $("#theMainImage").prop("offsetTop")+"px",
+            left:$("#theMainImage").prop("offsetLeft")+"px",
+            width:$('#theImgContainer').innerWidth()+"px"
+          }
+        );
+        break;
+      case "pictureBottom":
+        pictureArea = $("#theMainImage").prop("offsetTop")+$("#theMainImage").prop("offsetHeight");
+        $("#theTabsContainer").css(
+          {
+            top: pictureArea+"px",
+            left:$("#theMainImage").prop("offsetLeft")+"px",
+            width:$("#theMainImage").prop("offsetWidth")+"px"
+          }
+        );
+        break;
+    }
+
+
+
+
     simulateHighRes();
-
   },
 
@@ -419,6 +456,6 @@
     {
       p = new Object();
-      p.left = (($(window).width()-$("#theImgHighContainer").attr("clientWidth")-options.paddingContainer*2)/2)+"px";
-      p.top = (($(window).height()-$("#theImgHighContainer").attr("clientHeight")-options.paddingContainer*2)/2)+"px";
+      p.left = (($(window).width()-$("#theImgHighContainer").prop("clientWidth")-options.paddingContainer*2)/2)+"px";
+      p.top = (($(window).height()-$("#theImgHighContainer").prop("clientHeight")-options.paddingContainer*2)/2)+"px";
 
 
Index: /extensions/gally/gally-default/js/gallyjs-tpp.min.js
===================================================================
--- /extensions/gally/gally-default/js/gallyjs-tpp.min.js	(revision 12591)
+++ /extensions/gally/gally-default/js/gallyjs-tpp.min.js	(revision 12592)
@@ -1,115 +1,2 @@
-/* file: gally-tpp.js - v1.4.0 | minified on 2011/05/01 with http://jscompress.com/ */
-var gallyPP=null;$(document).ready(function()
-{gallyPP=new GallyPP();});function GallyPP(){var tabs={show:'n',current:-1,selected:-1},interface={visible:false,initialized:0,timerDelay:null},image={isScrollable:false,highWidth:0,highHeight:0,leftPos:0,zoomMode:''},container=null,init=function()
-{var regexp=/[1234567]\./i;if(jQuery.browser.msie&&jQuery.browser.version.match(regexp))
-{options.interfaceAnimated="none";options.imageAutoScroll=false;}
-if(options.imageAutoScroll)
-{$("html").css("overflow-x","hidden");}
-else
-{$("html").css("overflow-x","scroll");}
-if(options.imageCenterTopBorder=="imageHeaderBar")
-{options.imageCenterTopMin+=$("#imageHeaderBar").get(0).offsetTop+$("#imageHeaderBar").get(0).offsetHeight;}
-if(!options.interfaceCanSwitch)
-{options.interfaceHidden=false;}
-image.zoomMode=options.defaultZoomSize;switchInterface('0',true);initializeImageMode("init");if((options.interfaceOnImage=="always"||(options.interfaceOnImage=="noscroll"&&!image.isScrollable))&&options.interfaceCanSwitch)
-{$("#theImg").bind("mouseenter",function(){switchInterface('y',true);}).bind("mouseleave",function(){switchInterface('n',true);}).bind("mousemove",function(){switchInterface('y',true);});}
-if(options.interfaceCanSwitch)
-{$("#imageHeaderBar").bind("mouseenter",function(){switchInterface('y',false);}).bind("mousemove",function(){switchInterface('y',false);});$("#imageToolBar").bind("mouseenter",function(){switchInterface('y',true);}).bind("mouseleave",function(){switchInterface('n',true);}).bind("mousemove",function(){switchInterface('y',true);});$("#navThumbPrev").bind("mouseenter",function(){switchInterface('Y',true);}).bind("mouseleave",function(){switchInterface('n',true);}).bind("mousemove",function(){switchInterface('y',true);});$("#navThumbNext").bind("mouseenter",function(){switchInterface('Y',true);}).bind("mouseleave",function(){switchInterface('n',true);}).bind("mousemove",function(){switchInterface('y',true);});}
-$("#navThumbPrev").css("top",$("#navThumbPrev").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");$("#navThumbNext").css("top",$("#navThumbNext").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");$("#theImage").css("top",$("#theImage").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");$("#contentid").attr("rows",options.commentRows);if(options.animateDelay>0)
-{$("#theTabs").tabs({fx:{opacity:'toggle',duration:options.animateDelay}});}
-else
-{$("#theTabs").tabs();}
-switchTabs('n');if(options.interfaceCanSwitch)
-{$('#theTabsContainer').bind("mouseenter",function(){switchInterface('Y',false);}).bind("mouseleave",function(){switchInterface('n');}).bind("mousemove",function(){switchInterface('y',false);});}
-$("#theTabs").bind('tabsselect',function(event,ui)
-{tabs.selected=ui.index;});$('.tab a').click(function()
-{$(this).get(0).blur();if(tabs.selected==tabs.current)
-{if(tabs.current!=-1)switchTabs('n');tabs.current=-1;tabs.selected=-1;}
-else
-{if(tabs.current==-1)switchTabs('y');tabs.current=tabs.selected;}});$(window).resize(function(){initializeImageMode("resize");});interface.initialized=1;$(document).trigger('gallyInterfaceReady');},simulateHighRes=function()
-{if(image.isScrollable&&options.imageHaveHighRes==false&&options.imageSimulateHighRes)
-{$('#theImgContainer').bind('click',function()
-{openDisplayHigh($('#theImg').attr('src'));}).addClass('pointer');}},initializeImageMode=function(mode)
-{var thumbWidth=0,imgTop=0,cssValues=new Object;if(mode=="init")
-{theHeaderHeight=$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight");$("#imageToolBar").css("top",$("#imageToolBar").attr("offsetTop")+theHeaderHeight+$("#imageHeaderBar").attr("offsetHeight")+"px");if(options.tabsPosition=="bottom")
-{copyrightArea=$("#copyright").attr("clientHeight")+1;$("#theTabsContainer").css("bottom",copyrightArea+"px");}
-else if(options.tabsPosition=="top")
-{toolBarArea=$("#imageToolBar").attr("offsetTop")+$("#imageToolBar").attr("offsetHeight");$("#theTabsContainer").css("top",toolBarArea+"px");}
-if($("#navThumbPrev").length>0)
-{$("#navThumbPrev").css("height",$("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px");}
-if($("#navThumbNext").length>0)
-{$("#navThumbNext").css("height",$("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px");}}
-cssValues.height=$("#theImg").attr("height")+"px";if(options.imageAutoScroll&&($("#theImg").attr("scrollWidth")>($("#theImage").attr("clientWidth")-2*options.marginContainer)))
-{cssValues.width=($("#theImage").attr("clientWidth")-2*(options.marginContainer+options.paddingContainer))+"px";$("#theImage").bind("mousemove",function(event){if($("#navThumbPrev").length>0)thumbWidth=$("#navThumbPrev").attr("clientWidth");deadArea=Math.max(options.imageScrollMinDeadArea,thumbWidth*1.2);mouse=Math.max(Math.min(event.clientX-image.leftPos,this.clientWidth-deadArea),deadArea);$("#theImg").css("left",Math.round(($("#theImg").attr("scrollWidth")-this.clientWidth)*-(mouse-deadArea)/(this.clientWidth-2*deadArea))+"px").trigger('scrolled');});image.isScrollable=true;}
-else
-{$("#theImage").unbind("mousemove");$("#theImg").css("left","0px");cssValues.width=$("#theImg").attr("scrollWidth")+"px";image.isScrollable=false;}
-$("#theImgContainer").css(cssValues);if($("#copyright").css("position")=="fixed")
-{$("#theImage").css("padding-bottom",$("#copyright").attr("offsetHeight")+"px");}
-switch(options.imageCenterMode)
-{case"img":imgTop=$("#theImgContainer").attr('offsetHeight');break;case"all":imgTop=$("#theImage").attr('offsetHeight');break;default:imgTop=-10000;break;}
-imgTop=($("#copyright").attr("offsetTop")-($("#imageHeaderBar").attr("offsetTop")+$("#imageHeaderBar").attr("offsetHeight"))-imgTop)/2+options.imageCenterOffset;if(imgTop<options.imageCenterTopMin)
-{imgTop=options.imageCenterTopMin;}
-imgTop=imgTop+"px";$("#theImage").css("top",imgTop);image.leftPos=$('#theImage').offset().left;simulateHighRes();},switchInterface=function(show,resetTimer)
-{if((interface.initialized==1)&&(options.interfaceHidden))
-{interface.initialized=2;if(show=="Y")return('');}
-if(!options.interfaceHidden&&show=="0"){show="1";}
-if(options.interfaceAnimated=="fade")
-{switch(show)
-{case'0':$(".uiImg").css({opacity:0,visibility:"hidden"});interface.visible=false;break;case'1':if(!interface.visible)$(".uiImg").css({opacity:1,visibility:"visible"});interface.visible=true;if(resetTimer)resetInterfaceTimer();break;case'2':case'Y':case'y':if(!interface.visible)$(".uiImg").css("visibility","visible").stop(true,false).fadeTo(options.animateDelay,1);interface.visible=true;if(resetTimer)resetInterfaceTimer();break;default:$(".uiImg").stop(true,false).fadeTo(options.animateDelay,0,function()
-{this.style.visibility="hidden";interface.visible=false;});clearInterfaceTimer();break;}}
-else
-{switch(show)
-{case'y':case'Y':case'1':case'2':if(!interface.visible)$(".uiImg").css("visibility","visible");interface.visible=true;if(resetTimer)resetInterfaceTimer();break;default:$(".uiImg").css("visibility","hidden");interface.visible=false;clearInterfaceTimer();break;}}},switchTabs=function(show)
-{if(show!='')
-{tabs.show=show;}
-else
-{if(tabs.show!='n')
-{tabs.show='n';}
-else
-{tabs.show='y';}}
-if(options.tabsAnimated)
-{if(tabs.show=='y')
-{$("#theTabsContainer").animate({height:options.tabsVisible+"px"},options.animateDelay).trigger('resize');}
-else
-{$('#theTabs div.tabPanel').addClass("ui-tabs-hide").css("display","");$('#theTabs li').removeClass("ui-tabs-selected");$("#theTabsContainer").animate({height:options.tabsHidden+"px"},options.animateDelay).trigger('resize');}}
-else
-{if(tabs.show=='y')
-{$("#theTabsContainer").css({height:options.tabsVisible+"px"}).trigger('resize');}
-else
-{$('#theTabs div.tabPanel').addClass("ui-tabs-hide").css("display","");$('#theTabs li').removeClass("ui-tabs-selected");$("#theTabsContainer").css({height:options.tabsHidden+"px"}).trigger('resize');}}},clearInterfaceTimer=function()
-{if(interface.timerDelay!=null)
-{window.clearInterval(interface.timerDelay);interface.timerDelay=null;}},resetInterfaceTimer=function()
-{clearInterfaceTimer();if(options.interfaceTimerDelay>0&&options.interfaceCanSwitch)interface.timerDelay=window.setInterval(switchInterface,options.interfaceTimerDelay,"n",false);},openDisplayHigh=function(url)
-{$('#theImageHigh').css({width:$("html").get(0).scrollWidth+"px",height:$("html").get(0).scrollHeight+"px",display:"block"});if($("#theImgHigh").attr('src')=="")
-{p=new Object();p.left=(($(window).width()-$("#theImgHighContainer").attr("clientWidth")-options.paddingContainer*2)/2)+"px";p.top=(($(window).height()-$("#theImgHighContainer").attr("clientHeight")-options.paddingContainer*2)/2)+"px";$('#theImgHighContainer').css({left:p.left,top:p.top,padding:options.paddingContainer+"px"});$("#theImgHigh").load(function()
-{image.highWidth=$("#theImgHigh").width();image.highHeight=$("#theImgHigh").height();p=calcImgHighPositionAndSize(image.zoomMode);$('#theImgHighContainer').css("background-image","none");displayZoomHigh();$("#theImgHigh").css({display:"block"});}).attr('src',url);if(options.highResClickMode=='close')
-{$("#theImgHigh").bind('click',closeDisplayHigh);}
-else
-{$("#theImgHigh").bind('click',switchZoomHigh);}}
-else
-{p=calcImgHighPositionAndSize(image.zoomMode);$('#theImgHighContainer').css({left:p.left+"px",top:p.top+"px",width:p.width+"px",height:p.height+"px"});}},calcImgHighPositionAndSize=function(zoom)
-{var p={left:options.marginContainer,top:options.marginContainer,width:0,height:0},margins=(options.marginContainer+options.paddingContainer)*2;if(zoom=='full')
-{p.width=$("html").get(0).clientWidth-margins;p.height=$("html").get(0).clientHeight-margins;}
-else
-{ratioImg=image.highWidth/image.highHeight;ratioPage=$("html").get(0).clientWidth/$("html").get(0).clientHeight;if((ratioPage>1&&(ratioPage>ratioImg))||(ratioPage<1&&(ratioPage<ratioImg)))
-{p.height=$("html").get(0).clientHeight-margins;p.width=p.height*ratioImg;}
-else
-{p.width=$("html").get(0).clientWidth-margins;p.height=p.width/ratioImg;}
-p.left=($("html").get(0).clientWidth-p.width)/2-options.paddingContainer;p.top=($("html").get(0).clientHeight-p.height)/2-options.paddingContainer;}
-if(p.width>image.highWidth)
-{p.width=image.highWidth;p.left=($("html").get(0).clientWidth-p.width)/2;}
-if(p.height>image.highHeight)
-{p.height=image.highHeight;p.top=($("html").get(0).clientHeight-p.height)/2;}
-return(p);},displayZoomHigh=function()
-{var container=calcImgHighPositionAndSize(image.zoomMode);$('#theImgHighContainer').css({left:container.left+"px",top:container.top+"px",width:container.width+"px",height:container.height+"px"});if(image.zoomMode=="full")
-{$("#theImgHigh").css({width:image.highWidth+"px",height:image.highHeight+"px"});$('#theImgHighContainer').bind("mousemove",function(event)
-{var deadArea=Math.max(options.marginContainer*2,options.imageScrollMinDeadArea)
-mouseX=Math.max(Math.min(event.clientX-container.left,container.width-deadArea),deadArea),mouseY=Math.max(Math.min(event.clientY-container.top,container.height-deadArea),deadArea);$("#theImgHigh").css("left",Math.round((image.highWidth-container.width)*-(mouseX-deadArea)/(container.width-2*deadArea))+"px").css("top",Math.round((image.highHeight-container.height)*-(mouseY-deadArea)/(container.height-2*deadArea))+"px");});}
-else
-{$("#theImgHigh").css({width:container.width+"px",height:container.height+"px",left:"0px",top:"0px"});$('#theImgHighContainer').unbind("mousemove");}},closeDisplayHigh=function()
-{$('#theImageHigh').css('display','none');},switchZoomHigh=function()
-{if(image.zoomMode=='full')
-{image.zoomMode="fit";}
-else
-{image.zoomMode="full";}
-$("#theImgHighZoomButton").toggleClass('full').toggleClass('fit');displayZoomHigh();};this.closeDisplayHigh=function(){closeDisplayHigh();};this.switchZoomHigh=function(){switchZoomHigh();};this.getImageProp=function(){return image;};this.getInterfaceProp=function(){return interface;};this.getTabsProp=function(){return tabs;};this.openDisplayHigh=function(url){openDisplayHigh(url);};init();}
+/* file: gally-tpp.js - v1.4.4 | minified on 2011/11/09 with http://jscompress.com/ */
+function GallyPP(){var a={show:"n",current:-1,selected:-1},b={visible:false,initialized:0,timerDelay:null},c={isScrollable:false,highWidth:0,highHeight:0,leftPos:0,zoomMode:""},d=null,e=function(){var d=/[1234567]\./i;if(jQuery.browser.msie&&jQuery.browser.version.match(d)){options.interfaceAnimated="none";options.imageAutoScroll=false}if(options.imageAutoScroll){$("html").css("overflow-x","hidden")}else{$("html").css("overflow-x","scroll")}if(options.imageCenterTopBorder=="imageHeaderBar"){options.imageCenterTopMin+=$("#imageHeaderBar").get(0).offsetTop+$("#imageHeaderBar").get(0).offsetHeight}if(!options.interfaceCanSwitch){options.interfaceHidden=false}c.zoomMode=options.defaultZoomSize;h("0",true);g("init");if((options.interfaceOnImage=="always"||options.interfaceOnImage=="noscroll"&&!c.isScrollable)&&options.interfaceCanSwitch){$("#theMainImage").bind("mouseenter",function(){h("y",true)}).bind("mouseleave",function(){h("n",true)}).bind("mousemove",function(){h("y",true)})}if(options.interfaceCanSwitch){$("#imageHeaderBar").bind("mouseenter",function(){h("y",false)}).bind("mousemove",function(){h("y",false)});$("#imageToolBar").bind("mouseenter",function(){h("y",true)}).bind("mouseleave",function(){h("n",true)}).bind("mousemove",function(){h("y",true)});$("#navThumbPrev").bind("mouseenter",function(){h("Y",true)}).bind("mouseleave",function(){h("n",true)}).bind("mousemove",function(){h("y",true)});$("#navThumbNext").bind("mouseenter",function(){h("Y",true)}).bind("mouseleave",function(){h("n",true)}).bind("mousemove",function(){h("y",true)})}$("#navThumbPrev").css("top",$("#navThumbPrev").prop("offsetTop")+$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight")+"px");$("#navThumbNext").css("top",$("#navThumbNext").prop("offsetTop")+$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight")+"px");$("#theImage").css("top",$("#theImage").prop("offsetTop")+$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight")+"px");$("#contentid").attr("rows",options.commentRows);if(options.animateDelay>0){$("#theTabs").tabs({fx:{opacity:"toggle",duration:options.animateDelay}})}else{$("#theTabs").tabs()}i("n");if(options.interfaceCanSwitch){$("#theTabsContainer").bind("mouseenter",function(){h("Y",false)}).bind("mouseleave",function(){h("n")}).bind("mousemove",function(){h("y",false)})}$("#theTabs").bind("tabsselect",function(b,c){a.selected=c.index});$(".tab a").click(function(){$(this).get(0).blur();if(a.selected==a.current){if(a.current!=-1)i("n");a.current=-1;a.selected=-1}else{if(a.current==-1)i("y");a.current=a.selected}});$(window).resize(function(){g("resize")});b.initialized=1;$(document).trigger("gallyInterfaceReady")},f=function(){if(c.isScrollable&&options.imageHaveHighRes==false&&options.imageSimulateHighRes){$("#theImgContainer").bind("click",function(){l($("#theMainImage").attr("src"))}).addClass("pointer")}},g=function(a){var b=0,d=0,e=new Object;e.height=$("#theMainImage").prop("height")+"px";if(options.imageAutoScroll&&$("#theMainImage").prop("scrollWidth")>$("#theImage").prop("clientWidth")-2*options.marginContainer){e.width=$("#theImage").prop("clientWidth")-2*(options.marginContainer+options.paddingContainer)+"px";$("#theImage").bind("mousemove",function(a){if($("#navThumbPrev").length>0)b=$("#navThumbPrev").prop("clientWidth");deadArea=Math.max(options.imageScrollMinDeadArea,b*1.2);mouse=Math.max(Math.min(a.clientX-c.leftPos,this.clientWidth-deadArea),deadArea);$("#theMainImage").css("left",Math.round(($("#theMainImage").prop("scrollWidth")-this.clientWidth)*-(mouse-deadArea)/(this.clientWidth-2*deadArea))+"px").trigger("scrolled")});c.isScrollable=true}else{$("#theImage").unbind("mousemove");$("#theMainImage").css("left","0px");e.width=$("#theMainImage").prop("scrollWidth")+"px";c.isScrollable=false}$("#theImgContainer").css(e);if($("#copyright").css("position")=="fixed"){$("#theImage").css("padding-bottom",$("#copyright").prop("offsetHeight")+"px")}switch(options.imageCenterMode){case"img":d=$("#theImgContainer").prop("offsetHeight");break;case"all":d=$("#theImage").prop("offsetHeight");break;default:d=-1e4;break}d=($("#copyright").prop("offsetTop")-($("#imageHeaderBar").prop("offsetTop")+$("#imageHeaderBar").prop("offsetHeight"))-d)/2+options.imageCenterOffset;switch($("#theImage").css("position")){case"static":$("#theImage").css("padding-top",d);break;default:if(d<options.imageCenterTopMin){d=options.imageCenterTopMin}d=d+"px";$("#theImage").css("top",d);break}c.leftPos=$("#theImage").offset().left;if(a=="init"){theHeaderHeight=$("#theHeader").prop("offsetHeight")+$("#theHeaderAlt").prop("offsetHeight");$("#imageToolBar").css("top",$("#imageToolBar").prop("offsetTop")+theHeaderHeight+$("#imageHeaderBar").prop("offsetHeight")+"px");if($("#navThumbPrev").length>0){$("#navThumbPrev").css("height",$("#copyright").prop("offsetTop")-$("#navThumbPrev").prop("offsetTop")-options.tabsHidden+"px")}if($("#navThumbNext").length>0){$("#navThumbNext").css("height",$("#copyright").prop("offsetTop")-$("#navThumbNext").prop("offsetTop")-options.tabsHidden+"px")}}switch(options.tabsPosition){case"top":toolBarArea=$("#imageToolBar").prop("offsetTop")+$("#imageToolBar").prop("offsetHeight");$("#theTabsContainer").css("top",toolBarArea+"px");break;case"bottom":copyrightArea=$("#copyright").prop("clientHeight")+1;$("#theTabsContainer").css("bottom",copyrightArea+"px");break;case"pictureTop":$("#theTabsContainer").css({top:$("#theMainImage").prop("offsetTop")+"px",left:$("#theMainImage").prop("offsetLeft")+"px",width:$("#theImgContainer").innerWidth()+"px"});break;case"pictureBottom":pictureArea=$("#theMainImage").prop("offsetTop")+$("#theMainImage").prop("offsetHeight");$("#theTabsContainer").css({top:pictureArea+"px",left:$("#theMainImage").prop("offsetLeft")+"px",width:$("#theMainImage").prop("offsetWidth")+"px"});break}f()},h=function(a,c){if(b.initialized==1&&options.interfaceHidden){b.initialized=2;if(a=="Y")return""}if(!options.interfaceHidden&&a=="0"){a="1"}if(options.interfaceAnimated=="fade"){switch(a){case"0":$(".uiImg").css({opacity:0,visibility:"hidden"});b.visible=false;break;case"1":if(!b.visible)$(".uiImg").css({opacity:1,visibility:"visible"});b.visible=true;if(c)k();break;case"2":case"Y":case"y":if(!b.visible)$(".uiImg").css("visibility","visible").stop(true,false).fadeTo(options.animateDelay,1);b.visible=true;if(c)k();break;default:$(".uiImg").stop(true,false).fadeTo(options.animateDelay,0,function(){this.style.visibility="hidden";b.visible=false});j();break}}else{switch(a){case"y":case"Y":case"1":case"2":if(!b.visible)$(".uiImg").css("visibility","visible");b.visible=true;if(c)k();break;default:$(".uiImg").css("visibility","hidden");b.visible=false;j();break}}},i=function(b){if(b!=""){a.show=b}else{if(a.show!="n"){a.show="n"}else{a.show="y"}}if(options.tabsAnimated){if(a.show=="y"){$("#theTabsContainer").animate({height:options.tabsVisible+"px"},options.animateDelay).trigger("resize")}else{$("#theTabs div.tabPanel").addClass("ui-tabs-hide").css("display","");$("#theTabs li").removeClass("ui-tabs-selected");$("#theTabsContainer").animate({height:options.tabsHidden+"px"},options.animateDelay).trigger("resize")}}else{if(a.show=="y"){$("#theTabsContainer").css({height:options.tabsVisible+"px"}).trigger("resize")}else{$("#theTabs div.tabPanel").addClass("ui-tabs-hide").css("display","");$("#theTabs li").removeClass("ui-tabs-selected");$("#theTabsContainer").css({height:options.tabsHidden+"px"}).trigger("resize")}}},j=function(){if(b.timerDelay!=null){window.clearInterval(b.timerDelay);b.timerDelay=null}},k=function(){j();if(options.interfaceTimerDelay>0&&options.interfaceCanSwitch)b.timerDelay=window.setInterval(h,options.interfaceTimerDelay,"n",false)},l=function(a){$("#theImageHigh").css({width:$("html").get(0).scrollWidth+"px",height:$("html").get(0).scrollHeight+"px",display:"block"});if($("#theImgHigh").attr("src")==""){p=new Object;p.left=($(window).width()-$("#theImgHighContainer").prop("clientWidth")-options.paddingContainer*2)/2+"px";p.top=($(window).height()-$("#theImgHighContainer").prop("clientHeight")-options.paddingContainer*2)/2+"px";$("#theImgHighContainer").css({left:p.left,top:p.top,padding:options.paddingContainer+"px"});$("#theImgHigh").load(function(){c.highWidth=$("#theImgHigh").width();c.highHeight=$("#theImgHigh").height();p=m(c.zoomMode);$("#theImgHighContainer").css("background-image","none");n();$("#theImgHigh").css({display:"block"})}).attr("src",a);if(options.highResClickMode=="close"){$("#theImgHigh").bind("click",o)}else{$("#theImgHigh").bind("click",q)}}else{p=m(c.zoomMode);$("#theImgHighContainer").css({left:p.left+"px",top:p.top+"px",width:p.width+"px",height:p.height+"px"})}},m=function(a){var b={left:options.marginContainer,top:options.marginContainer,width:0,height:0},d=(options.marginContainer+options.paddingContainer)*2;if(a=="full"){b.width=$("html").get(0).clientWidth-d;b.height=$("html").get(0).clientHeight-d}else{ratioImg=c.highWidth/c.highHeight;ratioPage=$("html").get(0).clientWidth/$("html").get(0).clientHeight;if(ratioPage>1&&ratioPage>ratioImg||ratioPage<1&&ratioPage<ratioImg){b.height=$("html").get(0).clientHeight-d;b.width=b.height*ratioImg}else{b.width=$("html").get(0).clientWidth-d;b.height=b.width/ratioImg}b.left=($("html").get(0).clientWidth-b.width)/2-options.paddingContainer;b.top=($("html").get(0).clientHeight-b.height)/2-options.paddingContainer}if(b.width>c.highWidth){b.width=c.highWidth;b.left=($("html").get(0).clientWidth-b.width)/2}if(b.height>c.highHeight){b.height=c.highHeight;b.top=($("html").get(0).clientHeight-b.height)/2}return b},n=function(){var a=m(c.zoomMode);$("#theImgHighContainer").css({left:a.left+"px",top:a.top+"px",width:a.width+"px",height:a.height+"px"});if(c.zoomMode=="full"){$("#theImgHigh").css({width:c.highWidth+"px",height:c.highHeight+"px"});$("#theImgHighContainer").bind("mousemove",function(b){var d=Math.max(options.marginContainer*2,options.imageScrollMinDeadArea);mouseX=Math.max(Math.min(b.clientX-a.left,a.width-d),d),mouseY=Math.max(Math.min(b.clientY-a.top,a.height-d),d);$("#theImgHigh").css("left",Math.round((c.highWidth-a.width)*-(mouseX-d)/(a.width-2*d))+"px").css("top",Math.round((c.highHeight-a.height)*-(mouseY-d)/(a.height-2*d))+"px")})}else{$("#theImgHigh").css({width:a.width+"px",height:a.height+"px",left:"0px",top:"0px"});$("#theImgHighContainer").unbind("mousemove")}},o=function(){$("#theImageHigh").css("display","none")},q=function(){if(c.zoomMode=="full"){c.zoomMode="fit"}else{c.zoomMode="full"}$("#theImgHighZoomButton").toggleClass("full").toggleClass("fit");n()};this.closeDisplayHigh=function(){o()};this.switchZoomHigh=function(){q()};this.getImageProp=function(){return c};this.getInterfaceProp=function(){return b};this.getTabsProp=function(){return a};this.openDisplayHigh=function(a){l(a)};e()}var gallyPP=null;$(document).ready(function(){gallyPP=new GallyPP})
Index: /extensions/gally/gally-default/release_notes.txt
===================================================================
--- /extensions/gally/gally-default/release_notes.txt	(revision 12591)
+++ /extensions/gally/gally-default/release_notes.txt	(revision 12592)
@@ -144,4 +144,13 @@
   |         |            |   . HD Picture are not displayed
   |         |            |
+  | 1.4.4   | 2011-11-09 | * mantis feature:2499
+  |         |            |   . compatibility with piwigo 2.3
+  |         |            |       -> replace the id #theImg with #theMainImage
+  |         |            |       -> update templates allowing to display menu in
+  |         |            |          all pages
+  |         |            |       -> update js to be compatible with jQuery 1.6
+  |         |            |       -> fix some css bugs
+  |         |            |
+  |         |            |
   |         |            |
   |         |            |
Index: /extensions/gally/gally-default/template/about.tpl
===================================================================
--- /extensions/gally/gally-default/template/about.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/about.tpl	(revision 12592)
@@ -1,5 +1,18 @@
 <!-- **GBL** >ABOUT> -->
+
 <div id="content" class="content">
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li>
@@ -10,4 +23,9 @@
     <h2>{'About'|@translate}</h2>
   </div>
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
+
   <div id="content2">
   {$ABOUT_MESSAGE}
Index: /extensions/gally/gally-default/template/comment_list.tpl
===================================================================
--- /extensions/gally/gally-default/template/comment_list.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/comment_list.tpl	(revision 12592)
@@ -51,5 +51,5 @@
         {if isset($comment.U_DELETE)}
         <li>
-          <img style="cursor:pointer;" src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" alt="[delete]" onclick="document.location='{$comment.U_DELETE}';" title="{'delete this comment'|@translate}"/>
+          <span class="button id_delete" onclick="document.location='{$comment.U_DELETE}';" title="{'delete this comment'|@translate}"></span>
         </li>
         {/if}
@@ -87,6 +87,6 @@
             $this->assign_by_ref('comment', $comment);
           {/php}
-          <img style="cursor:pointer;" src="{$ROOT_URL}{$themeconf.icon_dir}/edit.png" class="button" alt="[edit]"
-               onclick="editInside('{$comment.U_EDIT}#edit_comment}', '{$comment.CONTENT|@escape}', {$comment.IMAGE_ID|@default:$current.id}, '{$comment.KEY}', {$smarty.foreach.comment_loop.index});" title="{'edit this comment'|@translate}"/>
+          <span class="button id_edit" onclick="editInside('{$comment.U_EDIT}#edit_comment}', '{$comment.CONTENT|@escape}', {$comment.IMAGE_ID|@default:$current.id}, '{$comment.KEY}', {$smarty.foreach.comment_loop.index});" title="{'edit this comment'|@translate}"></span>
+
         </li>
         {/if}
@@ -94,5 +94,5 @@
         {if isset($comment.U_VALIDATE)}
         <li>
-          <img style="cursor:pointer;" src="{$ROOT_URL}{$themeconf.icon_dir}/validate_s.png" class="button" alt="[validate]" onclick="document.location='{$comment.U_VALIDATE}';" title="{'validate this comment'|@translate}"/>
+          <span class="button id_validate" onclick="document.location='{$comment.U_VALIDATE}';" title="{'validate this comment'|@translate}"></span>
         </li>
         {/if}
Index: /extensions/gally/gally-default/template/comments.tpl
===================================================================
--- /extensions/gally/gally-default/template/comments.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/comments.tpl	(revision 12592)
@@ -1,6 +1,17 @@
-
 <div id="content" class="content">
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_home" class="button" href="{$U_HOME}" title="{'Home'|@translate}"></a></li>
@@ -8,4 +19,8 @@
     <h2>{'User comments'|@translate}</h2>
   </div>
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
 
 <form class="filter" action="{$F_ACTION}" method="get">
Index: /extensions/gally/gally-default/template/config.js.tpl
===================================================================
--- /extensions/gally/gally-default/template/config.js.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/config.js.tpl	(revision 12592)
@@ -29,5 +29,5 @@
   displayHighResIcon:{if #displayHighResIcon#=='yes'}true{else}false{/if},
   highResClickMode:"{#highResClickMode#}",
-{/if} {if $BODY_ID=='theCategoryPage'}
+{/if} {if $BODY_ID=='theCategoryPage' or isset($MENUBAR)}
   menuAnimated:"{#menuAnimated#}",
   menuWidth:"{#menuWidth#}",
Index: /extensions/gally/gally-default/template/dialogs.tpl
===================================================================
--- /extensions/gally/gally-default/template/dialogs.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/dialogs.tpl	(revision 12592)
@@ -7,5 +7,4 @@
   $(function() {
     $("#divMsg").dialog({
-      bgiframe: true,
       modal: true,
       dialogClass: '{/literal}{if isset($errors) and count($errors)}errors{elseif isset($infos) and count($infos)}infos{/if}{literal}',
Index: /extensions/gally/gally-default/template/header.tpl
===================================================================
--- /extensions/gally/gally-default/template/header.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/header.tpl	(revision 12592)
@@ -80,9 +80,9 @@
   {if #manageTips#=='yes'}
     {combine_script id="gpc.simpleTip" path="themes/gally-default/js/simpleTip.min.js" require="jquery"}
-    {combine_script id="gallyjs-ttm" path="themes/gally-default/js/gallyjs-ttm.min.js" require="jquery"}
+    {combine_script id="gallyjs-ttm" path="themes/gally-default/js/gallyjs-ttm.js" require="jquery"}
   {/if}
 
-  {if $BODY_ID=='theCategoryPage'}
-  {combine_script id="gallyjs-tcp" path="themes/gally-default/js/gallyjs-tcp.min.js" require="jquery"}
+  {if $BODY_ID=='theCategoryPage' or isset($MENUBAR)}
+  {combine_script id="gallyjs-tcp" path="themes/gally-default/js/gallyjs-tcp.js" require="jquery"}
   <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/gally-default/css/thumbnails.css">
   <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/gally-default/css/menubar.css">
Index: /extensions/gally/gally-default/template/identification.tpl
===================================================================
--- /extensions/gally/gally-default/template/identification.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/identification.tpl	(revision 12592)
@@ -3,5 +3,17 @@
 <div id="content" class="content">
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_lost_password" class="button" href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"> </a></li>
@@ -13,4 +25,9 @@
     <h2>{'Identification'|@translate}</h2>
   </div>
+
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
 
 {include file='dialogs.tpl'}
Index: /extensions/gally/gally-default/template/index.tpl
===================================================================
--- /extensions/gally/gally-default/template/index.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/index.tpl	(revision 12592)
@@ -11,5 +11,4 @@
     <div id="menuswitcher">
       <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
-        <!-- <img  src="{$ROOT_URL}{$themeconf.icon_dir}/menu-show.png"  alt="{'display all elements in all sub-categories'|@translate}"> -->
       </a>
     </div>
Index: /extensions/gally/gally-default/template/mainpage_categories.tpl
===================================================================
--- /extensions/gally/gally-default/template/mainpage_categories.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/mainpage_categories.tpl	(revision 12592)
@@ -7,5 +7,5 @@
       <div class="illustration">
 
-          <img {if isset($cat.EXTRA_CLASS)}class="{$cat.EXTRA_CLASS}"{/if} src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '} - {'display this album'|@translate}">
+          <img {if isset($cat.EXTRA_CLASS)}class="{$cat.EXTRA_CLASS}"{/if} src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}">
 
       </div>
Index: /extensions/gally/gally-default/template/menubar_categories.tpl
===================================================================
--- /extensions/gally/gally-default/template/menubar_categories.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/menubar_categories.tpl	(revision 12592)
@@ -1,8 +1,8 @@
 <dt>
   {if isset($U_START_FILTER)}
-  <a id="icon_start_filter" class="button" href="{$U_START_FILTER}" title="{'display only recently posted photos'|@translate}" rel="nofollow"></a>
+  <a id="icon_start_filter" class="button sTipOnTop" href="{$U_START_FILTER}" title="{'display only recently posted photos'|@translate}" rel="nofollow"></a>
   {/if}
   {if isset($U_STOP_FILTER)}
-  <a id="icon_stop_filter" class="button" href="{$U_STOP_FILTER}" title="{'return to the display of all photos'|@translate}"></a>
+  <a id="icon_stop_filter" class="button sTipOnTop" href="{$U_STOP_FILTER}" title="{'return to the display of all photos'|@translate}"></a>
   {/if}
   <a href="{$block->data.U_CATEGORIES}">{'Albums'|@translate}</a>
@@ -21,8 +21,8 @@
         <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if} title="{$cat.TITLE}">{$cat.NAME}</a>
         {if $cat.count_images > 0}
-        <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
+        <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if} sTipOnTop" title="{$cat.TITLE}">[{$cat.count_images}]</span>
         {/if}
         {if !empty($cat.icon_ts)}
-        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
+        <span class="button {if $cat.icon_ts.IS_CHILD_DATE}id_recent_cat_by_child{else}id_recent_cat{/if}"></span>
         {/if}
     {assign var='ref_level' value=$cat.LEVEL}
Index: /extensions/gally/gally-default/template/menubar_identification.tpl
===================================================================
--- /extensions/gally/gally-default/template/menubar_identification.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/menubar_identification.tpl	(revision 12592)
@@ -1,2 +1,3 @@
+{if isset($MENUBAR)}{$MENUBAR}{/if}
 <dt>{'Identification'|@translate}</dt>
 <dd>
Index: /extensions/gally/gally-default/template/menubar_tags.tpl
===================================================================
--- /extensions/gally/gally-default/template/menubar_tags.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/menubar_tags.tpl	(revision 12592)
@@ -9,5 +9,5 @@
         title="{$pwg->l10n_dec('%d photo is also linked to current tags', '%d photos are also linked to current tags', $tag.counter)}"
         rel="nofollow">
-        <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+" />
+        <span class="add_tag"></span>
       </a>
       {/if}
Index: /extensions/gally/gally-default/template/nbm.tpl
===================================================================
--- /extensions/gally/gally-default/template/nbm.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/nbm.tpl	(revision 12592)
@@ -1,6 +1,17 @@
 <!-- **GBL** >NBM> -->
+<div id="content" class="content">
+  <div class="titrePage" id='titrePageID'>
 
-<div id="content" class="content">
-  <div class="titrePage">
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_home" class="button" href="{$U_HOME}" title="{'Home'|@translate}"></a></li>
@@ -9,4 +20,9 @@
   </div>
 
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
+
+
 {include file='dialogs.tpl'}
 
Index: /extensions/gally/gally-default/template/notification.tpl
===================================================================
--- /extensions/gally/gally-default/template/notification.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/notification.tpl	(revision 12592)
@@ -5,7 +5,20 @@
 <link rel="alternate" type="application/rss+xml" title="{'Complete RSS feed (photos, comments)'|@translate}" href="{$U_FEED}">
 {/html_head}
+
 <div id="content" class="content">
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_home" class="button" href="{$U_HOME}" title="{'Home'|@translate}"></a></li>
@@ -13,4 +26,8 @@
     <h2>{'Notification'|@translate}</h2>
   </div>
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
 
   <div id="content2">
Index: /extensions/gally/gally-default/template/password.tpl
===================================================================
--- /extensions/gally/gally-default/template/password.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/password.tpl	(revision 12592)
@@ -1,3 +1,4 @@
 <!-- **GBL** >PASSWORD> -->
+{if isset($MENUBAR)}{$MENUBAR}{/if}
 
 <div id="content" class="content">
@@ -13,27 +14,71 @@
 
 
-<form action="{$F_ACTION}" method="post" class="properties">
-  <fieldset>
-    <legend>{'Retrieve password'|@translate}</legend>
+{if $action != 'none'}
+  <form id="lostPassword" action="{$form_action}?action={$action}{if isset($key)}&amp;key={$key}{/if}" method="post">
 
-    <ul>
-      <li>
-        <div class="property">
-          <label for="mail_address">{'Email address'|@translate}</label>
-        </div>
-        <input class="login" type="text" name="mail_address" id="mail_address" size="35" maxlength="40" >
-      </li>
-      <li>
-        <div class="property">
-          <label for="no_mail_address">{'No email address'|@translate}</label>
-        </div>
-        <input type="checkbox" id="no_mail_address" name="no_mail_address" value="1">
-      </li>
-    </ul>
-  </fieldset>
+    <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
 
-  <p><input class="submit" type="submit" name="submit" value="{'Send new password'|@translate}"></p>
-</form>
+    {if $action == 'lost'}
+      <div class="message">{'Please enter your username or email address.'|@translate} {'You will receive a link to create a new password via email.'|@translate}</div>
 
+      <p>
+        <label>
+          {'Username or email'|@translate}
+          <br>
+          <input type="text" id="username_or_email" name="username_or_email" size="40" maxlength="40"{if isset($username_or_email)} value="{$username_or_email}"{/if}>
+        </label>
+      </p>
+
+      <p class="bottomButtons">
+        <input type="submit" name="submit" value="{'Change my password'|@translate}">
+      </p>
+
+    {elseif $action == 'reset'}
+
+      <div class="message">{'Hello'|@translate} <em>{$username}</em>. {'Enter your new password below.'|@translate}</div>
+
+      <p>
+        <label>
+          {'New password'|@translate}
+          <br>
+          <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
+        </label>
+      </p>
+
+      <p>
+        <label>
+          {'Confirm Password'|@translate}
+          <br>
+          <input type="password" name="passwordConf" id="passwordConf" value="">
+        </label>
+      </p>
+
+      <p class="bottomButtons">
+        <input type="submit" name="submit" value="{'Submit'|@translate}">
+      </p>
+
+    {/if}
+
+  </form>
+{/if}
+
+  <script type="text/javascript">
+  {if $action == 'lost'}
+    {literal}
+      try{
+        document.getElementById('username_or_email').focus();
+      }
+      catch(e){}
+    {/literal}
+    {elseif $action == 'reset'}
+    {literal}
+      try{
+        document.getElementById('use_new_pwd').focus();
+      }
+      catch(e){}
+    {/literal}
+  {/if}
+
+  </script>
 </div> <!-- content -->
 
Index: /extensions/gally/gally-default/template/picture.tpl
===================================================================
--- /extensions/gally/gally-default/template/picture.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/picture.tpl	(revision 12592)
@@ -1,7 +1,16 @@
 <!-- **GBL** >PICTURE> -->
 
+    {if isset($MENUBAR) and #menuAnimated# == "noswitch"}
+      <div class="titrePage" id='titrePageID'>
+        {$MENUBAR}
+      </div>
+    {/if}
+
+
+
+
 {include file='dialogs.tpl'}
 
-<div id="content">
+<div id="content" {if isset($MENUBAR)}class="pictureContent"{/if}>
 
   <div id="theImageHigh" style="display:none;">
@@ -20,4 +29,15 @@
 
   <div id="imageHeaderBar">
+
+    {if isset($MENUBAR) and #menuAnimated# != "noswitch"}
+      <div class="titrePage" id='titrePageID'>
+        <div id="menuswitcher">
+          <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+          </a>
+        </div>
+      </div>
+      {$MENUBAR}
+    {/if}
+
     <div class="browsePath">
       <h2>
@@ -83,7 +103,11 @@
           }{/literal}
           </script>
-          <a id="icon_caddie" class="button" href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"></a>
-          {/if} {*caddie management END*}
+          <a id="icon_caddie" class="button" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"></a>
+          {/if}
+          <script type="text/javascript">
+            $('div.randomButtons a.button').addClass('sTipOnRight');
+          </script>
         </div>
+
         {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
 
@@ -127,5 +151,5 @@
 
     {if isset($COMMENT_IMG)}
-    <p>{$COMMENT_IMG}</p>
+    <p class="imageComment">{$COMMENT_IMG}</p>
     {else}
     <p>&nbsp;</p>
@@ -166,4 +190,5 @@
 
     </ul>
+
     <div id="theTabsBg"></div>
 
@@ -277,14 +302,14 @@
             {/if}
 
-            {if (isset($rate_summary) or isset($rating)) and  $display_info.average_rate}
+            {if (isset($rate_summary) or isset($rating)) and  $display_info.rating_score}
               <tr>
                 {if isset($rate_summary)}
-                  <td class="label">{'Average rate'|@translate}</td>
-                  <td class="value" id="ratingSummary">
+                  <td class="label">{'Rating score'|@translate}</td>
+                  <td class="value">
                   {if $rate_summary.count}
-                    {assign var='rate_text' value='%.2f (rated %d times)'|@translate }
-                    {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
+                    <span id="ratingScore">{$rate_summary.score}</span>
+                    <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
                   {else}
-                    {'no rate'|@translate}
+                    <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
                   {/if}
                   </td>
Index: /extensions/gally/gally-default/template/picture_content.tpl
===================================================================
--- /extensions/gally/gally-default/template/picture_content.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/picture_content.tpl	(revision 12592)
@@ -2,5 +2,5 @@
 
   <div id="theImgContainer" {if isset($high) }onclick="gallyPP.openDisplayHigh('{$high.U_HIGH}');" class="pointer"{/if}>
-    <img id="theImg" src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
+    <img id="theMainImage" src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
       {if isset($COMMENT_IMG)}
         title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
Index: /extensions/gally/gally-default/template/picture_nav_buttons.tpl
===================================================================
--- /extensions/gally/gally-default/template/picture_nav_buttons.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/picture_nav_buttons.tpl	(revision 12592)
@@ -3,13 +3,17 @@
 
   {if isset($last)}
-    <a id="icon_last" class="navButton" href="{$last.U_IMG}" title="{'Last'|@translate} : {$last.TITLE}" rel="last"></a>
+    <a id="icon_last" class="navButton" href="{$last.U_IMG}"
+       title="<span class='navDesc'><span class='navAction'>{'Last'|@translate}</span>{if $DISPLAY_NAV_THUMB}<br><img src='{$last.THUMB_SRC}' class='thumbLink thumbNav' id='linkPrev' alt=''>{/if}<br><span class='navTitle'>{$last.TITLE}</span></span>"
+       rel="last"></a>
   {else}
-    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
+    <a id="icon_last_unactive" class="navButton"></a>
   {/if}
 
   {if isset($next)}
-    <a id="icon_right" class="navButton" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next"></a>
+    <a id="icon_right" class="navButton" href="{$next.U_IMG}"
+       title="<span class='navDesc'><span class='navAction'>{'Next'|@translate}</span>{if $DISPLAY_NAV_THUMB}<br><img src='{$next.THUMB_SRC}' class='thumbLink thumbNav' id='linkPrev' alt=''>{/if}<br><span class='navTitle'>{$next.TITLE}</span></span>"
+       rel="next"></a>
   {else}
-    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
+    <a id="icon_right_unactive" class="navButton"></a>
   {/if}
 
@@ -27,13 +31,17 @@
 
   {if isset($previous)}
-    <a id="icon_left" class="navButton" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev"></a>
+    <a id="icon_left" class="navButton" href="{$previous.U_IMG}"
+       title="<span class='navDesc'><span class='navAction'>{'Previous'|@translate}</span>{if $DISPLAY_NAV_THUMB}<br><img src='{$previous.THUMB_SRC}' class='thumbLink' id='linkPrev' alt=''>{/if}<br><span class='navTitle'>{$previous.TITLE}</span></span>"
+       rel="prev"></a>
   {else}
-    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
+    <a id="icon_left_unactive" class="navButton"></a>
   {/if}
 
   {if isset($first)}
-    <a id="icon_first" class="navButton" href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" rel="first"></a>
+    <a id="icon_first" class="navButton" href="{$first.U_IMG}"
+       title="<span class='navDesc'><span class='navAction'>{'First'|@translate}</span>{if $DISPLAY_NAV_THUMB}<br><img src='{$first.THUMB_SRC}' class='thumbLink thumbNav' id='linkPrev' alt=''>{/if}<br><span class='navTitle'>{$first.TITLE}</span></span>"
+       rel="first"></a>
   {else}
-    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
+    <a id="icon_first_unactive" class="navButton"></a>
   {/if}
 
@@ -51,5 +59,5 @@
       <a id="icon_dec_period" class="navButton" href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}"></a>
     {else}
-      <a class="navButton"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
+      <a id="icon_dec_period_unactive" class="navButton" ></a>
     {/if}
 
@@ -57,5 +65,5 @@
       <a id="icon_inc_period" class="navButton" href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}"></a>
     {else}
-      <a class="navButton"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
+      <a id="icon_inc_period_unactive" class="navButton"></a>
     {/if}
   {/if}
Index: /extensions/gally/gally-default/template/profile.tpl
===================================================================
--- /extensions/gally/gally-default/template/profile.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/profile.tpl	(revision 12592)
@@ -5,5 +5,17 @@
 {include file='dialogs.tpl'}
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_home" class="button" href="{$U_HOME}" title="{'Home'|@translate}"></a></li>
@@ -12,4 +24,9 @@
   </div>
 
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
+
 {$PROFILE_CONTENT}
 </div> <!-- content -->
Index: /extensions/gally/gally-default/template/profile_content.tpl
===================================================================
--- /extensions/gally/gally-default/template/profile_content.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/profile_content.tpl	(revision 12592)
@@ -48,13 +48,7 @@
       <li>
         <div class="property">
-          <label for="nb_image_line">{'Number of photos per row'|@translate}</label>
+          <label for="nb_image_page">{'Number of photos per page'|@translate}</label>
         </div>
-        <input type="text" size="3" maxlength="2" name="nb_image_line" id="nb_image_line" value="{$NB_IMAGE_LINE}">
-      </li>
-      <li>
-        <div class="property">
-          <label for="nb_line_page">{'Number of rows per page'|@translate}</label>
-        </div>
-        <input type="text" size="3" maxlength="2" name="nb_line_page" id="nb_line_page" value="{$NB_ROW_PAGE}" >
+        <input type="text" size="3" maxlength="2" name="nb_image_page" id="nb_image_page" value="{$NB_IMAGE_PAGE}">
       </li>
       <li>
Index: /extensions/gally/gally-default/template/register.tpl
===================================================================
--- /extensions/gally/gally-default/template/register.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/register.tpl	(revision 12592)
@@ -1,3 +1,4 @@
 <!-- **GBL** >REGISTER> -->
+
 
 <div id="registerPage">
@@ -5,5 +6,17 @@
 <div id="content" class="content">
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_home" class="button" href="{$U_HOME}" title="{'Home'|@translate}"></a></li>
@@ -11,4 +24,8 @@
     <h2>{'Registration'|@translate}</h2>
   </div>
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
 
 {include file='dialogs.tpl'}
@@ -41,6 +58,6 @@
           <label for="mail_address">{'Email address'|@translate}</label>
         </div>
-        <input type="text" name="mail_address" id="mail_address" value="{$F_EMAIL}" size=35>
-        ({'useful when password forgotten'|@translate})
+        <input type="text" name="mail_address" id="mail_address" value="{$F_EMAIL}" size=35>{if $main.obligatory_user_mail_address}<span class="mandatorystar">*</span>{else}({'useful when password forgotten'|@translate}){/if}
+
       </li>
     </ul>
Index: /extensions/gally/gally-default/template/search.tpl
===================================================================
--- /extensions/gally/gally-default/template/search.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/search.tpl	(revision 12592)
@@ -1,6 +1,19 @@
 <!-- **GBL** >SEARCH> -->
+
 <div id="content" class="content">
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
     <ul class="categoryActions">
       <li><a id="icon_help" class="button" href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" rel="nofollow"> </a></li>
@@ -9,4 +22,9 @@
     <h2>{'Search'|@translate}</h2>
   </div>
+
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
 
 {include file='dialogs.tpl'}
Index: /extensions/gally/gally-default/template/tags.tpl
===================================================================
--- /extensions/gally/gally-default/template/tags.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/tags.tpl	(revision 12592)
@@ -1,5 +1,18 @@
 <div id="content" class="content">
 
-  <div class="titrePage">
+  <div class="titrePage" id='titrePageID'>
+
+    {if isset($MENUBAR)}
+      {if #menuAnimated# == "noswitch"}
+        {$MENUBAR}
+      {else}
+      <div id="menuswitcher">
+        <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
+        </a>
+      </div>
+      {/if}
+    {/if}
+
+
     <ul class="categoryActions">
 {if $display_mode == 'letters'}
@@ -15,4 +28,9 @@
     <h2>{'Tags'|@translate}</h2>
   </div>
+
+
+  {if #menuAnimated# != "noswitch" and isset($MENUBAR)}
+    {$MENUBAR}
+  {/if}
 
 {if isset($tags)}
@@ -35,5 +53,5 @@
       {foreach from=$letter.tags item=tag}
       <tr class="tagLine">
-        <td><a href="{$tag.URL}">{$tag.name}</a></td>
+        <td><a href="{$tag.URL}"  title="{$tag.name}">{$tag.name}</a></td>
         <td class="nbEntries">{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}</td>
       </tr>
Index: /extensions/gally/gally-default/template/thumbnails.tpl
===================================================================
--- /extensions/gally/gally-default/template/thumbnails.tpl	(revision 12591)
+++ /extensions/gally/gally-default/template/thumbnails.tpl	(revision 12592)
@@ -9,5 +9,9 @@
           <span class="wrap2">
           <a href="{$thumbnail.URL}">
-            <img {if isset($thumbnail.LONGDESC) and $thumbnail.LONGDESC!=""}longdesc="{$thumbnail.LONGDESC}"{/if} class="thumbnail {if isset($thumbnail.EXTRA_CLASS)}{$thumbnail.EXTRA_CLASS}{/if}" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" />
+            <img {if isset($thumbnail.LONGDESC) and $thumbnail.LONGDESC!=""}longdesc="{$thumbnail.LONGDESC}"{/if}
+                  class="thumbnail {if isset($thumbnail.EXTRA_CLASS)}{$thumbnail.EXTRA_CLASS}{/if}"
+                  src="{$thumbnail.TN_SRC}"
+                  alt="{$thumbnail.TN_ALT}"
+                  title="{$thumbnail.TN_TITLE}" />
           </a>
           </span>
@@ -16,26 +20,28 @@
       <tr>
         <td>
-          <span class="thumbLegend">
+          {if $SHOW_THUMBNAIL_CAPTION }
+            <span class="thumbLegend">
 
-          {if !empty($thumbnail.icon_ts)}
-            <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" class="newImage" alt="(!)">
-          {/if}
-          {if !empty($thumbnail.NAME)}{$thumbnail.NAME}{/if}
+            {if !empty($thumbnail.icon_ts)}
+              <span class="newImage button id_recent"></span>
+            {/if}
+            {if !empty($thumbnail.NAME)}{$thumbnail.NAME}{/if}
 
 
-          {if isset($thumbnail.NB_COMMENTS)}
-          <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
-          <br />
-          {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
-          </span>
+            {if isset($thumbnail.NB_COMMENTS)}
+            <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
+            <br />
+            {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
+            </span>
+            {/if}
+
+            {if isset($thumbnail.NB_HITS)}
+            <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
+            <br />
+            {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
+            </span>
+            {/if}
+            </span>
           {/if}
-
-          {if isset($thumbnail.NB_HITS)}
-          <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
-          <br />
-          {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
-          </span>
-          {/if}
-          </span>
         </td>
       </tr>
