Index: extensions/PwgCarbon/PwgCarbon.php
===================================================================
--- extensions/PwgCarbon/PwgCarbon.php	(revision 23848)
+++ extensions/PwgCarbon/PwgCarbon.php	(revision 25996)
@@ -3,6 +3,6 @@
 
 global $conf, $template;
-  $params = array_merge(unserialize($conf['PwgCarbon']));
-  
+	$params = array_merge(unserialize($conf['PwgCarbon']));
+	$template->assign('PwgCarbon', $params);
 
   
@@ -110,9 +110,3 @@
 		');
 		};
-		
-
-
-
-
-		
 ?>
Index: extensions/PwgCarbon/admin/admin.tpl
===================================================================
--- extensions/PwgCarbon/admin/admin.tpl	(revision 23848)
+++ extensions/PwgCarbon/admin/admin.tpl	(revision 25996)
@@ -1,26 +1,6 @@
 ﻿{html_head}
 	<link rel="stylesheet" type="text/css" href="themes/PwgCarbon/admin/theme.css">
-	<script src="themes/PwgCarbon/admin/js/jquery.screwdefaultbuttonsV2.min.js" type="text/javascript"></script>
 	<script src="themes/PwgCarbon/js/lytebox.js" type="text/javascript"></script>
 
-	<script type="text/javascript">
-	{literal}
-		$(function(){
-		
-			$('input:radio').screwDefaultButtons({
-				image: 'url("themes/PwgCarbon/admin/images/radioSmall_Blue.png")',
-				width: 35,
-				height: 35
-			});
-			
-			$('input:checkbox').screwDefaultButtons({
-				image: 'url("themes/PwgCarbon/admin/images/checkboxSmall_Blue.jpg")',
-				width: 35,
-				height: 35
-			});
-		
-		});
-	{/literal}
-	</script>
 	
 {/html_head}	
Index: extensions/PwgCarbon/local_head.tpl
===================================================================
--- extensions/PwgCarbon/local_head.tpl	(revision 23848)
+++ extensions/PwgCarbon/local_head.tpl	(revision 25996)
@@ -1,21 +1,6 @@
-{php}
-	global $PwgCarbon;
-	$this->assign( 'PwgCarbon', $PwgCarbon );
-{/php}
-
-
-
-
-<!--[if lt IE 7]>
-	<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css">
-<![endif]-->
-<!--[if IE 7]>
-	<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie7.css">
-<![endif]-->
-<link rel="stylesheet" type="text/css" media="print" href="{$ROOT_URL}themes/default/print.css">
-
-
-
-
+{combine_script id='reflection' load='header' require='jquery' path='themes/PwgCarbon_dft/js/reflection.js'}
+{combine_script id='menu' load='header' require='jquery' path='themes/PwgCarbon_dft/js/menu.js'}
+{combine_script id='hoverIntent' load='header' require='jquery' path='themes/PwgCarbon_dft/js/jquery.hoverIntent.minified.js'}
+{combine_script id='columnizer' load='footer' require='jquery' path='themes/PwgCarbon_dft/js/jquery.columnizer.js'}
 
 {if ($PwgCarbon.lytebox)==1}{combine_script id='lytebox' load='header' require='jquery' path='themes/PwgCarbon/js/lytebox.js'}{/if}
Index: extensions/PwgCarbon/template/mainpage_categories.tpl
===================================================================
--- extensions/PwgCarbon/template/mainpage_categories.tpl	(revision 23848)
+++ extensions/PwgCarbon/template/mainpage_categories.tpl	(revision 25996)
@@ -1,8 +1,4 @@
 {define_derivative name='derivative_params' type='2small'}
 
-{php}
-	global $PwgCarbon;
-	$this->assign( 'PwgCarbon', $PwgCarbon );
-{/php}
 {html_style}
 
Index: extensions/PwgCarbon/template/menubar_identification.tpl
===================================================================
--- extensions/PwgCarbon/template/menubar_identification.tpl	(revision 23848)
+++ extensions/PwgCarbon/template/menubar_identification.tpl	(revision 25996)
@@ -1,10 +1,3 @@
-{php}
-	global $PwgCarbon;
-	$this->assign( 'PwgCarbon', $PwgCarbon );
-{/php}
-
-
 {if isset($U_LOGIN)}
-<li class="liSub">
 
 	{if ($PwgCarbon.menuident)==1}
@@ -65,12 +58,10 @@
 			</form>
 		</div>
-</li>
 	
 	{else}
 	
-<li class="liSub">
 
 <span class="dd_wrapper">{'Identification'|@translate}</span>
-					<div style="opacity: 0; display: none; " class="sub">
+					<div class="sub">
 
 	{if isset($USERNAME)}
@@ -99,5 +90,4 @@
 	{/if}
 	</ul>
-</li>
+
 	{/if}
-
Index: extensions/PwgCarbon/template/thumbnails.tpl
===================================================================
--- extensions/PwgCarbon/template/thumbnails.tpl	(revision 23848)
+++ extensions/PwgCarbon/template/thumbnails.tpl	(revision 25996)
@@ -1,8 +1,2 @@
-{php}
-	global $PwgCarbon;
-	$this->assign( 'PwgCarbon', $PwgCarbon );
-{/php}
-
-
 {if !empty($thumbnails)}{strip}
 {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
@@ -49,5 +43,9 @@
 			</a>
 			{if $SHOW_THUMBNAIL_CAPTION }
+			{if ($PwgCarbon.lytebox)==1}
+				<a href="{$thumbnail.path}" class="lytebox" data-lyte-options="borderSize:100 slide:true group:name showNavigation:true navType:1 slideInterval:10000 pauseOnPrevClick:true pauseOnNextClick:true" title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
+					{else}
 			<a href="{$thumbnail.URL}">
+			{/if}
 
 			<div class=description>
Index: extensions/PwgCarbon/themeconf.inc.php
===================================================================
--- extensions/PwgCarbon/themeconf.inc.php	(revision 23848)
+++ extensions/PwgCarbon/themeconf.inc.php	(revision 25996)
@@ -2,5 +2,5 @@
 /*
 Theme Name: PwgCarbon
-Version: auto
+Version: 1.3
 Description: theme PwgCarbon pour Piwigo.
 Theme URI: http://piwigo.org/ext/extension_view.php?eid=640
@@ -9,5 +9,5 @@
 */
 
-	global $conf, $user, $PwgCarbon;
+	global $conf, $user, $PwgCarbon, $template;
 			
 				
@@ -22,21 +22,8 @@
 	);
 
-	
-	
-$PwgCarbon = array_merge( unserialize( $conf['PwgCarbon'] ), (array)$PwgCarbon );
-
-
-
-add_event_handler('loc_end_page_header', 'load_PwgCarbon' );
-
-
+add_event_handler('init', 'load_PwgCarbon' );
 function load_PwgCarbon()
 {
-global $user, $page; 
-if($user['theme']=='PwgCarbon')
-  
-		{ 
 	include('PwgCarbon.php');
-		}
 	}
 
