Index: /extensions/greydragon/admin/admin.inc.php
===================================================================
--- /extensions/greydragon/admin/admin.inc.php	(revision 30483)
+++ /extensions/greydragon/admin/admin.inc.php	(revision 30484)
@@ -2,4 +2,6 @@
 
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('GDTHEME_VERSION', '1.0.14');
 
 require_once( PHPWG_THEMES_PATH . 'greydragon/include/greydragon.class.php');
@@ -8,5 +10,5 @@
 load_language('theme.lang', PHPWG_THEMES_PATH.'greydragon/');
 
-$themeCore = greyDragonCore::Instance('1.0.13');
+$themeCore = greyDragonCore::Instance(GDTHEME_VERSION);
 $themeroot = './themes/' . basename(dirname(dirname(__FILE__))) . '/';
 
Index: /extensions/greydragon/admin/admin.tpl
===================================================================
--- /extensions/greydragon/admin/admin.tpl	(revision 30483)
+++ /extensions/greydragon/admin/admin.tpl	(revision 30484)
@@ -1,5 +1,7 @@
 {combine_css path="themes/default/js/ui/theme/jquery.ui.button.css"}
+{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
 {combine_css path="themes/greydragon/admin/css/styles.css"}
-{combine_script id='greydragon.admin' load='footer' require='jquery,jquery.ui.button' path='themes/greydragon/admin/js/admin.js' }
+{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js' }
+{combine_script id='greydragon.admin' load='footer' require='jquery,jquery.ui.button,jquery.colorbox' path='themes/greydragon/admin/js/admin.js' }
 {if $options.p_debug == "on"}
 {debug}
@@ -9,5 +11,6 @@
   <h2>{'GreyDragon Theme'|@translate} - {$options.version}</h2>
   <div class="left-links">
-    <ul><li><a href="http://blog.dragonsoft.us/piwigo/" target="_blank">{'Home'|@translate}</a>&nbsp;|&nbsp;</li>
+    <ul><li><a href="http://blog.dragonsoft.us/piwigo/" target="_blank">{'Blog'|@translate}</a>&nbsp;|&nbsp;</li>
+      <li><a class="ajax cboxElement" href="themes/greydragon/changelog.php?version={$options.version}" >{'Changelog'|@translate}</a>&nbsp;|&nbsp;</li>
       <li><a href="http://piwigo.org/forum/viewtopic.php?pid=154192" target="_blank">{'Support'|@translate}</a>&nbsp;|&nbsp;</li>
       <li><a title="Follow me on Twitter" href="http://twitter.com/greydragon_th" target="_blank">{'Follow'|@translate}</a>&nbsp;|&nbsp;</li>
@@ -115,5 +118,5 @@
       <li><label><span class="graphicalCheckbox {if $options.p_hideabout=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_hideabout" id="p_hideabout" type="checkbox" value="on" {if $options.p_hideabout=="on"}checked="checked"{/if}>{'Hide About Link'|@translate}</label></li>
       <li><label><span class="graphicalCheckbox {if $options.p_adminemail=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_adminemail" id="p_adminemail" type="checkbox" value="on" {if $options.p_adminemail=="on"}checked="checked"{/if}>{'Include Contact Webmaster Email in the Footer for Members'|@translate}</label></li>
-      <li><label><span class="graphicalCheckbox {if $options.p_nocounter=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_nocounter" id="p_nocounter" type="checkbox" value="on" {if $options.p_nocounter=="on"}checked="checked"{/if}>{'Remove photo counter in breadcrumbs'|@translate}</label></li>
+      <li><label><span class="graphicalCheckbox {if $options.p_nocounter=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_nocounter" id="p_nocounter" type="checkbox" value="on" {if $options.p_nocounter=="on"}checked="checked"{/if}>{'Remove photo counter in breadcrumbs and categories menu'|@translate}</label></li>
     </ul>
   </fieldset>
@@ -121,4 +124,16 @@
     <legend>{'Advanced Options - Photo Page'|@translate}</legend>
     <ul>
+      <li>
+        <select id="p_pict_tab_mode" name="p_pict_tab_mode">
+          <option {if $options.p_pict_tab_mode=="txt-tab-open"}selected="selected"{/if} value="txt-tab-open">{'Text Tabs Expanded'|@translate}</option>
+          <option {if $options.p_pict_tab_mode=="txt-tab-close"}selected="selected"{/if} value="txt-tab-close">{'Text Tabs Collapsed'|@translate}</option>
+          <option {if $options.p_pict_tab_mode=="ico-tab-open"}selected="selected"{/if} value="ico-tab-open">{'Icon Tabs Expanded'|@translate}</option>
+          <option {if $options.p_pict_tab_mode=="ico-tab-close"}selected="selected"{/if} value="ico-tab-close">{'Icon Tabs Collapsed'|@translate}</option>
+          <option {if $options.p_pict_tab_mode=="txt-with-overlay"}selected="selected"{/if} value="txt-with-overlay">{'Text With Overlay'|@translate}</option>
+          <option {if $options.p_pict_tab_mode=="ico-with-overlay"}selected="selected"{/if} value="ico-with-overlay">{'Icon With Overlay'|@translate}</option>
+          <option {if $options.p_pict_tab_mode=="hide"}selected="selected"{/if} value="hide">{'Hide'|@translate}</option>
+        </select>
+        <label for="p_pict_tab_mode">{'Metadata Display Mode'|@translate}</label>
+      </li>
       <li>
         <select id="p_pict_tab_default" name="p_pict_tab_default">
@@ -128,7 +143,6 @@
           <option {if $options.p_pict_tab_default=="tags"}selected="selected"{/if} value="tags">{'Tags'|@translate}</option>
           <option {if $options.p_pict_tab_default=="comments"}selected="selected"{/if} value="comments">{'Comments'|@translate}</option>
-          <option {if $options.p_pict_tab_default=="hide"}selected="selected"{/if} value="hide">{'Hide'|@translate}</option>
-        </select>
-        <label for="p_pict_tab_default">{'Default tab to be displayed'|@translate}</label>
+        </select>
+        <label for="p_pict_tab_default">{'Default Tab to be displayed in Tabbed Mode'|@translate}</label>
       </li>
       <li><label><span class="graphicalCheckbox {if $options.p_pict_tab_anim=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_pict_tab_anim" id="p_pict_tab_anim" type="checkbox" value="on" {if $options.p_pict_tab_anim=="on"}checked="checked"{/if}>{'Animate Tabs'|@translate}</label></li>
Index: /extensions/greydragon/admin/css/styles.css
===================================================================
--- /extensions/greydragon/admin/css/styles.css	(revision 30483)
+++ /extensions/greydragon/admin/css/styles.css	(revision 30484)
@@ -94,2 +94,9 @@
 #helpContent li { margin-top: 2px; margin-bottom: 2px; }
 #helpContent ul ul { margin-top: 0; list-style: square outside; padding-left: 3em; }
+
+#cboxContent { background-color: #FFF; }
+#cboxLoadedContent { margin-bottom: 1em; margin-top: 1em; background-color: #FFF; }
+.changelog { text-align: left; padding: 0 1em; }
+.changelog ul { padding-left: 1em; }
+.changelog li { list-style-type: none; }
+.changelog h3 { padding: 4px 0.6em; color: #000; }
Index: /extensions/greydragon/admin/js/admin.js
===================================================================
--- /extensions/greydragon/admin/js/admin.js	(revision 30483)
+++ /extensions/greydragon/admin/js/admin.js	(revision 30484)
@@ -7,3 +7,4 @@
     $(this).addClass('menu-focused');
   });
+  $(".ajax").colorbox({ scrolling: true, maxWidth: '90%', maxHeight: '90%' });
 });
Index: /extensions/greydragon/admin/upgrade.inc.php
===================================================================
--- /extensions/greydragon/admin/upgrade.inc.php	(revision 30483)
+++ /extensions/greydragon/admin/upgrade.inc.php	(revision 30484)
@@ -9,11 +9,8 @@
 if (!isset($conf['greydragon'])):
   // Only need to ensure that there is a record in DB. Theme supports self initialization
-  $query = "INSERT INTO " . CONFIG_TABLE . " (param, value, comment) VALUES ('greydragon' , '" . pwg_db_real_escape_string(serialize(array())) . "' , 'GreyDragon Theme Options');";
-  pwg_query($query);
-  load_conf_from_db();
+  $conf['greydragon'] = array();
+  conf_update_param('greydragon', $conf['greydragon'], true);
 else:
   // Nothing to upgrade
-  // conf_update_param('greydragon', pwg_db_real_escape_string(serialize($config)));
-  // load_conf_from_db();
 endif;
 ?>
Index: /extensions/greydragon/changelog.php
===================================================================
--- /extensions/greydragon/changelog.php	(revision 30484)
+++ /extensions/greydragon/changelog.php	(revision 30484)
@@ -0,0 +1,29 @@
+<?php
+
+$lines = file('changelog.txt');
+$show = FALSE;
+$first = TRUE;
+
+echo '<div class="changelog">';
+
+foreach ($lines as $line_num => $line):
+  if (trim($line)):
+    if ($show):
+      if (substr( $line, 0, 7 ) === "version"):
+        if ($first):
+          $first = FALSE;
+        else:
+          echo "</ul>";
+        endif;
+        echo "<h3>" . htmlspecialchars(str_replace("version ", "", $line)) . "</h3>\n<ul>";
+      else:
+        echo "<li>" . htmlspecialchars($line) . "</li>\n";
+      endif;
+    elseif (trim($line) == "=== Changelog ==="):
+      $show = TRUE;
+    endif;
+  endif;
+endforeach;
+echo "</ul></div>";
+
+?>
Index: /extensions/greydragon/changelog.txt
===================================================================
--- /extensions/greydragon/changelog.txt	(revision 30483)
+++ /extensions/greydragon/changelog.txt	(revision 30484)
@@ -18,15 +18,25 @@
 
 === Changelog ===
+version 1.0.14
++ Hiding of photo counters extended to category menu
++ Infos, Warnings and Errors message area moved into popup overlay. For Infos and Warnings message would be removed after 8 seconds. "Errors" is closed on click.
++ ADMIN: Photo Metadata display mode can be switched between tabs with text/icon expanded or collapsed, text/icon with overlay, or hidden
++ ADMIN: Added ChangeLog link in toolbar
+- ContactForm plugin: Fixed form styles to make page better aligned
+- ADMIN: Fixed issue when under some conditions config info could become corrupted
+- Deprecated events to populate page header - code moved into header template
+- Fixed missing div in photo page
+- Page layout HTML 5 validation of photo page
+                                                                  
 version 1.0.13
 + New colorpack - GreyDragon
-+ ADMIN: Added support for horizontal menu - "Static Menu - Header Bottom". When used with Additional Pages Plugin, pages except Root Page would be embedded 
-  into menu bar instead of drop down menu.
++ ADMIN: Added support for horizontal menu - "Static Menu - Header Bottom". When used with Additional Pages Plugin, pages except Root Page would be embeded into menu bar instead of drop down menu.
 + ADMIN: Added option "Display navigation arrows" for Root page
 + ADMIN: Added option "Display navigation controls" for Root page
-+ Added support for thumb shadow space - custom CSS is required (please refer to help section in admin area). Latest gdThumb is recommended.
++ Added support for thumb shadow space - custom CSS is required (please refer to help section in admin area). Latest gdThumb is recomended.
 + CSS: cleanup
-- Removed hardcoded height for root page slideshow to accommodate navigation controls
+- Removed hardcoded height for root page slideshow to accomodate navigation controls
 - Fixed issues with Categories List overlapping when Static menu is enabled
-- In Photo page, hide overflow photo when huge size is used
+- In Phote page, hide overflow photo when huge size is used
 
 version 1.0.12
Index: /extensions/greydragon/css/colorpack/blackhawk/styles.css
===================================================================
--- /extensions/greydragon/css/colorpack/blackhawk/styles.css	(revision 30483)
+++ /extensions/greydragon/css/colorpack/blackhawk/styles.css	(revision 30484)
@@ -64,2 +64,3 @@
 .image-metadata-tabs { background: #222; }
 
+#cboxLoadedContent { background: #222 !important; }
Index: /extensions/greydragon/css/colorpack/greydragon/styles.css
===================================================================
--- /extensions/greydragon/css/colorpack/greydragon/styles.css	(revision 30483)
+++ /extensions/greydragon/css/colorpack/greydragon/styles.css	(revision 30484)
@@ -64,2 +64,3 @@
 .image-metadata-tabs { background: #222; }
 
+#cboxLoadedContent { background: #222 !important; }
Index: /extensions/greydragon/css/colorpack/slateblue/styles.css
===================================================================
--- /extensions/greydragon/css/colorpack/slateblue/styles.css	(revision 30483)
+++ /extensions/greydragon/css/colorpack/slateblue/styles.css	(revision 30484)
@@ -63,2 +63,3 @@
 .image-metadata-tabs { background: #1a1e27; }
 
+#cboxLoadedContent { background: #1a1e27 !important; }
Index: /extensions/greydragon/css/colorpack/whitehawk/styles.css
===================================================================
--- /extensions/greydragon/css/colorpack/whitehawk/styles.css	(revision 30483)
+++ /extensions/greydragon/css/colorpack/whitehawk/styles.css	(revision 30484)
@@ -66,7 +66,8 @@
 
 ul.image-metadata { border-bottom: 1px solid #bbb; }
-ul.image-metadata li { abackground: #EEEEEE; }
+ul.image-metadata li { }
 ul.image-metadata li:hover { color: #666; background: #ccc; } 
 ul.image-metadata li.active{ color: #666; background: #eee; border: solid 0 #bbb; border-width: 1px 1px 0 1px; }
 .image-metadata-tabs { background: #eee; border: solid 0 #bbb; border-width: 0 1px 0 1px; }
 
+#cboxLoadedContent { background: #eee !important; }
Index: /extensions/greydragon/css/styles.css
===================================================================
--- /extensions/greydragon/css/styles.css	(revision 30483)
+++ /extensions/greydragon/css/styles.css	(revision 30484)
@@ -106,4 +106,7 @@
 #menubar dl dt { padding-left: 12px; }
 #menubar ul { list-style-type: disc; margin-top: 0; }
+#menubar #menuTagCloud { font-size: 92%; text-align: left; }
+#menubar #mbCategories li { margin-right: 0.3em; }
+.no-b-counter #menubar #mbCategories .menuInfoCatByChild, .no-b-counter #menubar #mbCategories .menuInfoCat, .no-b-counter #menubar #mbCategories .totalImages { display: none; }
 
 /* Menu Styles */
@@ -219,8 +222,26 @@
 #imageInfos .nextThumbHover:hover   { background: transparent url(../icon/img_next.png) no-repeat center center;}
 
-#imageInfos dl.imageInfoTable   { display: block; padding: 0 15px; margin: 12px auto;}
-#imageInfos .imageInfo        { display: block; line-height: 16px;}
-#imageInfos .imageInfo dt       { display: block; font-weight: bold; text-align: left; padding: 0;}
-#imageInfos .imageInfo dd     { display: block; text-align: left; margin: 0 0 5px 20px;}
+ul.image-metadata { margin: 0.5em 0 0; padding: 0; float: left; list-style: none; height: 30px; width: 100%; }
+ul.image-metadata li { float: left; margin: 0; cursor: pointer; padding: 0px 20px; height: 30px; line-height: 30px; font-weight: bold; overflow: hidden; position: relative; }
+
+#image-metadata-ico { text-align: center; margin-bottom: 1em; }
+ul.image-metadata-ico    { display: inline-block; margin: 0 auto; padding: 0; list-style: none; height: 30px; }
+ul.image-metadata-ico li { float: left; margin: 0; cursor: pointer; padding: 0px 20px; height: 30px; line-height: 30px; font-weight: bold; overflow: hidden; position: relative; }
+
+.image-metadata-tabs { clear: both; float: left; width: 100%; }
+.image-metadata-tab  { padding: 20px; display: none; }
+.image-metadata-tab .imageInfo dt { text-align: left; padding-right: 2em; }
+.image-metadata-tab ul { margin: 0 0 1em 0; padding: 0; list-style-type: none; }
+.image-metadata-tab blockquote { padding: 0; margin: 0; border-left: none; font-size: 1em; }
+.image-metadata-tab #commentAdd, #pictureCommentList { padding: 0; width: 50%; }
+.image-metadata-tab .commentElement { border-radius: 0; margin: 5px 0 0 0; }
+.image-metadata .glyphicon-chevron-up, .image-metadata .glyphicon-chevron-down { float: right; padding-right: 10px; font-size: 0.8em; }
+
+#cboxLoadedContent .image-metadata-tab { display: block; }
+
+dl.imageInfoTable   { display: block; padding: 0 15px; margin: 0;}
+dl.imageInfoTable.dl-horizontal dt { text-align: left; }
+dl.imageInfoTable ul { margin-bottom: 0; }
+
 #imageInfos h3            { margin: 20px 0 10px;}
 
@@ -267,8 +288,8 @@
 .static-menu .calendarTitle, .static-menu .calendarBar { margin-left: 196px; }
 
-.infos, .errors, .warnings { border-width: 0; border-left: 10px solid transparent; margin: 0; margin-top: 1em; padding: 10px; }
-.infos ul, .errors ul, .warnings ul { list-style: none; magin: 0; padding: 0; }
+.infos, .errors, .warnings { position: fixed; z-index: 10; right: 1em; top: 3em; border-width: 0; border-left: 0.8em solid transparent; margin: 0; padding: 1em; white-space: nowrap; }
+.infos ul, .errors ul, .warnings ul { list-style: none; margin: 0; padding: 0; overflow: hidden; }
 .infos  { border-left-color: #0F0; }
-.errors { border-left-color: #F00; }
+.errors { border-left-color: #F00; cursor: pointer; }
 .warnings { border-left-color: #FFD800; }
 
@@ -288,16 +309,4 @@
 #ato_header > ul ul { top: 26px; }
 
-ul.image-metadata { margin: 0.5em 0 0; padding: 0; float: left; list-style: none; height: 30px; width: 100%; }
-ul.image-metadata li { float: left; margin: 0; cursor: pointer; padding: 0px 20px; height: 30px; line-height: 30px; font-weight: bold; overflow: hidden; position: relative; }
-ul.image-metadata li:hover { } 
-ul.image-metadata li.active{ }
-.image-metadata-tabs { clear: both; float: left; width: 100%; }
-.image-metadata-tab  { padding: 20px; display: none; }
-.image-metadata-tab .imageInfoTable { margin-left: 2em; }
-.image-metadata-tab .imageInfo dt { text-align: left; padding-right: 2em; }
-.image-metadata-tab ul { margin: 0 0 1em 0; padding: 0; list-style-type: none; }
-.image-metadata-tab blockquote { padding: 0; margin: 0; border-left: none; font-size: 1em; }
-.image-metadata-tab #commentAdd, #pictureCommentList { padding: 0; width: 50%; }
-.image-metadata-tab .commentElement { border-radius: 0; margin: 5px 0 0 0; }
-
-#menubar #menuTagCloud { font-size: 92%; text-align: left; }
+.contact table td:first-child { padding-right: 1.5em; }
+.contact input[name="send_mail"] { margin-right: 1.5em; }
Index: /extensions/greydragon/include/greydragon.class.php
===================================================================
--- /extensions/greydragon/include/greydragon.class.php	(revision 30483)
+++ /extensions/greydragon/include/greydragon.class.php	(revision 30484)
@@ -50,4 +50,5 @@
 
       // Advanced Options - Photo Page 
+      "p_pict_tab_mode"    => array("value" => "txt-tab-open", "quotes" => QUOTES_NONE),
       "p_pict_tab_default" => array("value" => "desc",   "quotes" => QUOTES_NONE),
       "p_pict_tab_anim"    => array("value" => "off",    "quotes" => QUOTES_NONE),
@@ -293,21 +294,4 @@
   }
 
-  public function getHead($content) {
-
-    if ($favicon_name = $this->getOption('p_favicon_path')):
-      $search = '#<link rel="shortcut icon".*?favicon.ico">#';
-      $replacement = '<link rel="shortcut icon" type="image/x-icon" href="' . PHPWG_ROOT_PATH . $favicon_name . '">';
-      $content = preg_replace($search, $replacement, $content);
-    endif;
-
-    if ($this->getOption('p_nogenerator') == "on"):
-      $search = '#<meta name="generator" .*see piwigo.org">#';
-      $replacement = '';
-      $content = preg_replace($search, $replacement, $content);
-    endif;
-
-    return $content;
-  }
-
 }
 
Index: /extensions/greydragon/js/theme.photo.js
===================================================================
--- /extensions/greydragon/js/theme.photo.js	(revision 30483)
+++ /extensions/greydragon/js/theme.photo.js	(revision 30484)
@@ -30,4 +30,13 @@
 
   function switchTab(tab) {
+    if ($(tab).is("#image-metadata-toggle")) {
+      $(".image-metadata-tabs").slideToggle("fast");      
+      if ($("#image-metadata-toggle").is(".glyphicon-chevron-down")) {
+        $("#image-metadata-toggle").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
+      }else{
+        $("#image-metadata-toggle").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down");
+      }
+      return;
+    }
     $("ul.image-metadata li").removeClass("active");
     $(tab).addClass("active");
@@ -41,10 +50,19 @@
     }
     normalizeComments(activeTab);
+    $("#image-metadata-toggle").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
+    $(".image-metadata-tabs").show("fast");
   }
 
   jQuery(function(){
-    setCurrentTab();
-
-    $("ul.image-metadata li").click(function() { switchTab(this); });
+    if ($('#image-metadata-ico').length) {
+      $("#image-metadata-ico .meta-desc").colorbox({ inline:true, href:"div#tab-desc", className:"image-metadata-overlay", speed:200, opacity:0.3 });
+      $("#image-metadata-ico .meta-info").colorbox({ inline:true, href:"div#tab-meta", className:"image-metadata-overlay", speed:200, opacity:0.3 });
+      $("#image-metadata-ico .meta-exif").colorbox({ inline:true, href:"div#tab-exif", className:"image-metadata-overlay", speed:200, opacity:0.3 });
+      $("#image-metadata-ico .meta-tags").colorbox({ inline:true, href:"div#tab-tags", className:"image-metadata-overlay", speed:200, opacity:0.3 });
+      $("#image-metadata-ico .meta-comment").colorbox({ inline:true, href:"div#tab-comment", className:"image-metadata-overlay", speed:200, opacity:0.3, width: "1200px" });
+    }else{
+      setCurrentTab();
+      $("ul.image-metadata li").click(function() { switchTab(this); });
+    }
   });
 }());
Index: /extensions/greydragon/template/header.tpl
===================================================================
--- /extensions/greydragon/template/header.tpl	(revision 30483)
+++ /extensions/greydragon/template/header.tpl	(revision 30484)
@@ -3,6 +3,9 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+{if $greydragon.p_nogenerator !== "on"}
 <meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
-{if isset($meta_ref) } 
+{/if}
+{if isset($meta_ref)}
 {if isset($INFO_AUTHOR)}
 <meta name="author" content="{$INFO_AUTHOR|@strip_tags:false|@replace:'"':' '}">
@@ -18,6 +21,9 @@
 {/if}
 <title>{if $PAGE_TITLE!=l10n('Home') && $PAGE_TITLE!=$GALLERY_TITLE}{$PAGE_TITLE} | {/if}{$GALLERY_TITLE}</title>
+{if $greydragon.p_favicon_path}
+<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$greydragon.p_favicon_path}">
+{else}
 <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
-
+{/if}
 <link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
 <link rel="search" title="{'Search'|@translate}" href="{$ROOT_URL}search.php" >
@@ -27,12 +33,9 @@
 {if isset($last.U_IMG)    }<link rel="last" title="{'Last'|@translate}" href="{$last.U_IMG}" >{/if}
 {if isset($U_UP)          }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if}
-
 {assign var=root value="themes/greydragon/css"}
 {assign var=colorpack value=$root|cat:"/colorpack/"|cat:$greydragon.p_colorpack|cat:"/styles.css"}
-
 {combine_css path="themes/greydragon/css/bootstrap.min.css" order=-100}
 {combine_css path="themes/greydragon/css/styles.css" order=100}
 {combine_css path="$colorpack" order=101}
-
 {if count($greydragon.p_customcss) > 0 || $greydragon.p_lowertext == "on"}
   {combine_css path="themes/greydragon/css/custom.css" order=101}
@@ -40,5 +43,4 @@
 {combine_script id='greydragon.bootstrap' load='footer' require='jquery' path='themes/greydragon/js/bootstrap.min.js' order=98}
 {combine_script id='greydragon.cookie' load='footer' require='jquery' path='themes/greydragon/js/jquery.cockie.js' order=99}
-
 {if $SCRIPT_NAME|strstr:"picture.php"} 
 {assign var=includeMenu value="off" scope=root nocache}
@@ -56,9 +58,10 @@
 {assign var=includeMenu value="on" scope=root nocache}
 {/if}
-
 {footer_script}
+  jQuery("div.infos").delay(8000).animate({ 'width': 'hide' }, 500, function(){ jQuery(this).hide(); });
+  jQuery("div.warnings").delay(8000).animate({ 'width': 'hide' }, 500, function(){ jQuery(this).hide(); });
+  jQuery("div.errors").click(function() { jQuery(this).animate({ 'width': 'hide' }, 500, function(){ jQuery(this).hide(); }); });
 {if $includeMenu=="on"} 
   {combine_script id='greydragon.scripts' load='footer' require='jquery' path='themes/greydragon/js/theme.menu.js' order=100}
-
   {if isset({$greydragon.p_main_menu})}
     var p_main_menu = "{$greydragon.p_main_menu}";
@@ -69,12 +72,9 @@
   var p_hideabout = "{$greydragon.p_hideabout}";
 {/if}
-
   var p_pict_descr = "{$greydragon.p_pict_descr}";
   var p_pict_comment = "{$greydragon.p_pict_comment}";
   var p_pict_tab_anim = "{$greydragon.p_pict_tab_anim}";
-
   jQuery("#ato_header .parent:eq(0) ul").append('<li><a class="icon-brush" href="{$greydragon.U_SITE_ADMIN}theme&theme=greydragon">{'Theme Config'|translate}</a></li>');
 {/footer_script}
-
 {get_combined_css}
 {foreach from=$themes item=theme}
@@ -102,5 +102,5 @@
 {/if}
 </head>
-<body id="{$BODY_ID}" class="{if $includeMenu=="on"}{$greydragon.p_main_menu}-menu{else}hide-menu{/if}{if $PAGE_BANNER}{else} no-header{/if}">
+<body id="{$BODY_ID}" class="{if $includeMenu=="on"}{$greydragon.p_main_menu}-menu{else}hide-menu{/if}{if $PAGE_BANNER}{else} no-header{/if}{if $greydragon.p_nocounter == "on"} no-b-counter{/if}">
 <div id="the_page">
 {if not empty($header_msgs)}
Index: /extensions/greydragon/template/menubar.tpl
===================================================================
--- /extensions/greydragon/template/menubar.tpl	(revision 30483)
+++ /extensions/greydragon/template/menubar.tpl	(revision 30484)
@@ -4,5 +4,5 @@
   <dl id="{$id}">
     {if not empty($block->template)}
-    {include file=$block->template|@get_extent:$id }
+      {include file=$block->template|@get_extent:$id }
     {else}
     {$block->raw_content}
Index: /extensions/greydragon/template/picture.tpl
===================================================================
--- /extensions/greydragon/template/picture.tpl	(revision 30483)
+++ /extensions/greydragon/template/picture.tpl	(revision 30484)
@@ -1,8 +1,12 @@
 {combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
-{combine_script id='picture-js' load='async' require='jquery' path='themes/greydragon/js/theme.photo.js'}
+{combine_script id='picture-js' load='async' require='jquery,core.switchbox' path='themes/greydragon/js/theme.photo.js'}
+{assign var=overlay_mode value="off"}
+{if $greydragon.p_pict_tab_mode == "txt-with-overlay" || $greydragon.p_pict_tab_mode == "ico-with-overlay"}{$overlay_mode="on"}{/if}
+{assign var=ico_mode value="off"}
+{if $greydragon.p_pict_tab_mode == "ico-tab-open" || $greydragon.p_pict_tab_mode == "ico-tab-close" || $greydragon.p_pict_tab_mode == "ico-with-overlay"}{$ico_mode="on"}{/if}
 
 {if isset($MENUBAR)}{$MENUBAR}{/if}
+
 <div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}>
-
 {if isset($errors) or not empty($infos)}
 {include file='infos_errors.tpl'}
@@ -91,16 +95,9 @@
 {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*}
 {footer_script}
-{literal}function addToCadie(aElement, rootUrl, id)
-{
-if (aElement.disabled) return;
-aElement.disabled=true;
-var y = new PwgWS(rootUrl);
-y.callService(
-  "pwg.caddie.add", {image_id: id} ,
-  {
-    onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
-    onSuccess: function(result) { aElement.disabled = false; }
-  }
-  );
+{literal}function addToCadie(aElement, rootUrl, id) {
+  if (aElement.disabled) return;
+  aElement.disabled=true;
+  var y = new PwgWS(rootUrl);
+  y.callService("pwg.caddie.add", {image_id: id}, { onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, onSuccess: function(result) { aElement.disabled = false; }});
 }{/literal}
 {/footer_script}
@@ -149,19 +146,34 @@
 </div>
 {/if} *}
-</div>
+{if $greydragon.p_pict_tab_mode !== "hide" && $overlay_mode == "on"}
+<div id="image-metadata-ico">
+  <ul class="image-metadata-ico"> 
+    {if isset($COMMENT_IMG)}<li class="meta-desc{if $ico_mode=="on"} glyphicon glyphicon-eye-open{/if}{if $def_tab == 'desc'} active{/if}">{if $ico_mode=="off"}{'Description'|@translate}{/if}</li>{/if}
+    <li class="meta-info {if $ico_mode=="on"} glyphicon glyphicon-info-sign{/if}{if $def_tab == 'info'} active{/if}">{if $ico_mode=="off"}{'Info'|@translate}{/if}</li>
+    {if isset($metadata)}<li class="meta-exif{if $ico_mode=="on"} glyphicon glyphicon-camera{/if}{if $def_tab == 'exif'} active{/if}">{if $ico_mode=="off"}{'Exif'|@translate}{/if}</li>{/if}
+    <li class="meta-tags{if $ico_mode=="on"} glyphicon glyphicon-tags{/if}{if $def_tab == 'tags'} active{/if}" >{if $ico_mode=="off"}{'Tags'|@translate}{/if}</li>
+    {if isset($COMMENT_COUNT)}<li class="meta-comment{if $ico_mode=="on"} glyphicon glyphicon-comment{/if}{if $def_tab == 'comments'} active{/if}">{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if}
+  </ul>
+</div>
+{/if}
+
+</div>
+
 {assign var=def_tab value="{$greydragon.p_pict_tab_default}"}
 {if !isset($metadata) && $def_tab == 'exif'}{$def_tab="desc"}{/if}
 {if !isset($COMMENT_COUNT) && $def_tab == 'comments'}{$def_tab="desc"}{/if}
 {if !isset($COMMENT_IMG) && $def_tab == 'desc'}{$def_tab="info"}{/if}
-{if $def_tab !== "hide"}
+{if $greydragon.p_pict_tab_mode !== "hide" && $overlay_mode == "off"}
 <ul class="image-metadata"> 
-  {if isset($COMMENT_IMG)}<li {if $def_tab == 'desc'}class="active"{/if} rel="tab-desc">{'Description'|@translate}</li>{/if}
-  <li {if $def_tab == 'info'}class="active"{/if} rel="tab-meta">{'Info'|@translate}</li>
-  {if isset($metadata)}<li {if $def_tab == 'exif'}class="active"{/if} rel="tab-exif">{'Exif'|@translate}</li>{/if}
-  <li {if $def_tab == 'tags'}class="active"{/if} rel="tab-tags">{'Tags'|@translate}</li>
-  {if isset($COMMENT_COUNT)}<li {if $def_tab == 'comments'}class="active"{/if} rel="tab-comment">{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}</li>{/if}
+  {if isset($COMMENT_IMG)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-eye-open{/if}{if $def_tab == 'desc'} active{/if}" rel="tab-desc">{if $ico_mode=="off"}{'Description'|@translate}{/if}</li>{/if}
+  <li class="{if $ico_mode=="on"}glyphicon glyphicon-info-sign{/if}{if $def_tab == 'info'} active{/if}" rel="tab-meta">{if $ico_mode=="off"}{'Info'|@translate}{/if}</li>
+  {if isset($metadata)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-camera{/if}{if $def_tab == 'exif'} active{/if}" rel="tab-exif">{if $ico_mode=="off"}{'Exif'|@translate}{/if}</li>{/if}
+  <li class="{if $ico_mode=="on"}glyphicon glyphicon-tags{/if}{if $def_tab == 'tags'} active{/if}" rel="tab-tags">{if $ico_mode=="off"}{'Tags'|@translate}{/if}</li>
+  {if isset($COMMENT_COUNT)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-comment{/if}{if $def_tab == 'comments'} active{/if}" rel="tab-comment">{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if}
+  <li id="image-metadata-toggle" class="glyphicon {if $greydragon.p_pict_tab_mode == "txt-tab-close" || $greydragon.p_pict_tab_mode == "ico-tab-close"}glyphicon-chevron-down{else}glyphicon-chevron-up{/if}" ></li>
 </ul>
-
-<div class="image-metadata-tabs"> 
+{/if}
+{if $greydragon.p_pict_tab_mode !== "hide"}
+<div class="image-metadata-tabs{if $overlay_mode=="on"} overlay{/if}" {if $greydragon.p_pict_tab_mode == "txt-tab-close" || $greydragon.p_pict_tab_mode == "ico-tab-close" || $overlay_mode=="on"}style="display: none;"{/if}> 
   {if isset($COMMENT_IMG)}
   <div id="tab-desc" class="image-metadata-tab"> 
@@ -171,90 +183,69 @@
 
   <div id="tab-meta" class="image-metadata-tab"> 
-    <dl id="standard" class="imageInfoTable">
+    <dl id="standard" class="imageInfoTable dl-horizontal">
     {strip}
       {if $display_info.author and isset($INFO_AUTHOR)}
-      <div id="Author" class="imageInfo">
-        <dt>{'Author'|@translate}</dt>
-        <dd>{$INFO_AUTHOR}</dd>
-      </div>
+      <dt id="Author" class="imageInfo">{'Author'|@translate}</dt>
+      <dd>{$INFO_AUTHOR}</dd>
       {/if}
       {if $display_info.created_on and isset($INFO_CREATION_DATE)}
-      <div id="datecreate" class="imageInfo">
-        <dt>{'Created on'|@translate}</dt>
-        <dd>{$INFO_CREATION_DATE}</dd>
-      </div>
+      <dt id="datecreate">{'Created on'|@translate}</dt>
+      <dd>{$INFO_CREATION_DATE}</dd>
       {/if}
       {if $display_info.posted_on}
-      <div id="datepost" class="imageInfo">
-        <dt>{'Posted on'|@translate}</dt>
-        <dd>{$INFO_POSTED_DATE}</dd>
-      </div>
+      <dt id="datepost">{'Posted on'|@translate}</dt>
+      <dd>{$INFO_POSTED_DATE}</dd>
       {/if}
       {if $display_info.dimensions and isset($INFO_DIMENSIONS)}
-      <div id="Dimensions" class="imageInfo">
-        <dt>{'Dimensions'|@translate}</dt>
-        <dd>{$INFO_DIMENSIONS}</dd>
-      </div>
+      <dt id="Dimensions">{'Dimensions'|@translate}</dt>
+      <dd>{$INFO_DIMENSIONS}</dd>
       {/if}
       {if $display_info.file}
-      <div id="File" class="imageInfo">
-        <dt>{'File'|@translate}</dt>
-        <dd>{$INFO_FILE}</dd>
-      </div>
+      <dt id="File">{'File'|@translate}</dt>
+      <dd>{$INFO_FILE}</dd>
       {/if}
       {if $display_info.filesize and isset($INFO_FILESIZE)}
-      <div id="Filesize" class="imageInfo">
-        <dt>{'Filesize'|@translate}</dt>
-        <dd>{$INFO_FILESIZE}</dd>
-      </div>
+      <dt id="Filesize">{'Filesize'|@translate}</dt>
+      <dd>{$INFO_FILESIZE}</dd>
       {/if}
       {if $display_info.categories and isset($related_categories)}
-      <div id="Categories" class="imageInfo">
-        <dt>{'Albums'|@translate}</dt>
-        <dd>
-          <ul>
-            {foreach from=$related_categories item=cat}
-            <li>{$cat}</li>
-            {/foreach}
-          </ul>
-        </dd>
-      </div>
+      <dt id="Categories">{'Albums'|@translate}</dt>
+      <dd>
+        <ul>
+          {foreach from=$related_categories item=cat}
+          <li>{$cat}</li>
+          {/foreach}
+        </ul>
+      </dd>
       {/if}
       {if $display_info.visits}
-      <div id="Visits" class="imageInfo">
-        <dt>{'Visits'|@translate}</dt>
-        <dd>{$INFO_VISITS}</dd>
-      </div>
-      {/if}
-
+      <dt id="Visits">{'Visits'|@translate}</dt>
+      <dd>{$INFO_VISITS}</dd>
+      {/if}
       {if $display_info.rating_score and isset($rate_summary)}
-      <div id="Average" class="imageInfo">
-        <dt>{'Rating score'|@translate}</dt>
-        <dd>
-          {if $rate_summary.count}
-          <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span>
-          {else}
-          <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
-          {/if}
-        </dd>
-      </div>
+      <dt id="Average">{'Rating score'|@translate}</dt>
+      <dd>
+        {if $rate_summary.count}
+        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span>
+        {else}
+        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
+        {/if}
+      </dd>
       {/if}
 
       {if isset($rating)}
-      <div id="rating" class="imageInfo">
-        <dt>
-          <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
-        </dt>
-        <dd>
-          <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
-          <div>
-            {foreach from=$rating.marks item=mark name=rate_loop}
-              {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
-              <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
-              {else}
-              <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
-              {/if}
-            {/foreach}
-            {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
+      <dt id="rating" >
+        <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
+      </dt>
+      <dd>
+        <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
+          {foreach from=$rating.marks item=mark name=rate_loop}
+            {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
+            <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
+            {else}
+            <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
+            {/if}
+          {/foreach}
+          {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
             {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
             {footer_script}
@@ -276,18 +267,13 @@
               {rdelim}{rdelim} );
             {/footer_script}
-            {/strip}
-          </div>
-          </form>
-        </dd>
-      </div>
+          {/strip}
+        </form>
+      </dd>
       {/if}
 
       {if $display_info.privacy_level and isset($available_permission_levels)}
-      <div id="Privacy" class="imageInfo">
-        <dt>{'Who can see this photo?'|@translate}</dt>
-        <dd>
-          <div>
-            <a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a>
-          </div>
+      <dt id="Privacy">{'Who can see this photo?'|@translate}</dt>
+      <dd>
+        <a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a>
 {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
 {footer_script require='jquery'}{strip}
@@ -308,26 +294,23 @@
   (SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox");
 {/strip}{/footer_script}
-          <div id="privacyLevelBox" class="switchBox" style="display:none">
-            {foreach from=$available_permission_levels item=label key=level}
+        <div id="privacyLevelBox" class="switchBox" style="display:none">
+          {foreach from=$available_permission_levels item=label key=level}
             <span class="switchCheck"{if $level != $current.level} style="visibility:hidden"{/if}>&#x2714; </span>
             <a id="switchLevel{$level}" href="javascript:setPrivacyLevel({$current.id},{$level})">{$label}</a><br>
-            {/foreach}
-          </div>
-        </dd>
-      </div>
-      {/if}
-      {/strip}
+          {/foreach}
+        </div>
+      </dd>
+      {/if}
+    {/strip}
     </dl>
-  </div> 
+  </div>
 
   {if isset($metadata)}
   <div id="tab-exif" class="image-metadata-tab"> 
-    <dl id="Metadata" class="imageInfoTable">
+    <dl id="metadata" class="imageInfoTable dl-horizontal">
     {foreach from=$metadata item=meta}
       {foreach from=$meta.lines item=value key=label}
-      <div class="imageInfo">
         <dt>{$label}</dt>
         <dd>{$value}</dd>
-      </div>
       {/foreach}
     {/foreach}
@@ -338,9 +321,9 @@
   <div id="tab-tags" class="image-metadata-tab"> 
     {if $display_info.tags and isset($related_tags)}
-    <div>
-      <dd>
+    <dd>
       {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}
-      </dd>
-    </div>
+    </dd>
+    {else}
+    ...
     {/if}
   </div>
@@ -390,3 +373,4 @@
 </div>
 {/if}
+</div>
 {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Index: /extensions/greydragon/themeconf.inc.php
===================================================================
--- /extensions/greydragon/themeconf.inc.php	(revision 30483)
+++ /extensions/greydragon/themeconf.inc.php	(revision 30484)
@@ -2,5 +2,5 @@
 /*
 Theme Name: GreyDragon
-Version: 1.0.13
+Version: 1.0.14
 Description: Dark, slate, white background, grayscale.
 Theme URI: http://piwigo.org/ext/extension_view.php?eid=775
@@ -11,5 +11,5 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-define('GDTHEME_VERSION', '1.0.13');
+define('GDTHEME_VERSION', '1.0.14');
 
 require_once( PHPWG_THEMES_PATH . 'greydragon/include/greydragon.class.php');
@@ -25,5 +25,4 @@
 
 add_event_handler('init', 'greydragon_init');
-add_event_handler('loc_begin_page_header', 'greydragon_set_header', 55);
 
 pwg_set_session_var('show_metadata', 1);
@@ -46,21 +45,5 @@
 // Render custom header content
 function greydragon_render_header() {
-
   return greyDragonCore::Instance()->getHeader();
-}
-
-// Add custom favicon or custom meta if provided
-function greydragon_set_header() {
-  global $template;
-
-  $themeCore = greyDragonCore::Instance();
-  if (($themeCore->hasOption("p_favicon_path")) || ($themeCore->getOption("p_nogenerator"))):
-    $template->set_prefilter('header', "greydragon_head");
-  endif;
-}
-
-// Render head content
-function greydragon_head($content, &$smarty) {
-  return greyDragonCore::Instance()->getHead($content);
 }
 
