Index: extensions/Slim/template/header.tpl
===================================================================
--- extensions/Slim/template/header.tpl	(revision 28392)
+++ extensions/Slim/template/header.tpl	(revision 28556)
@@ -57,5 +57,4 @@
 
 
-{combine_script id='jcarousel' load='header' require='jquery' path='themes/Slim/js/jquery.jcarousel.js'}
 
 </head>
Index: extensions/Slim/template/index.tpl
===================================================================
--- extensions/Slim/template/index.tpl	(revision 28392)
+++ extensions/Slim/template/index.tpl	(revision 28556)
@@ -3,5 +3,4 @@
 {/if}
 
-{combine_script id='mousewheel' load='header' require='jquery' path='themes/Slim/js/mousewhell.js'}
 
 <div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
@@ -9,9 +8,9 @@
 {if ($Slim.style_slim)==1}
 	{if !empty($THUMBNAILS)}
-	<div id="home">
-	<a href="{$U_HOME}"><img src="themes/Slim/images/home.png" height="32px" width="32px"></a>
-	</div>
-	<div class="titrePage">
 	<div id="infoBlock">
+	<div class="titrePage slim">
+		<a href="{$U_HOME}">
+		<div id="home"></div>
+		</a>
 	{if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
 	<h2>
@@ -19,5 +18,6 @@
 	</h2>
 	{/if}
-
+	</div>
+	</div>
 {else}
 
@@ -165,45 +165,5 @@
 {if !empty($THUMBNAILS)}
 		{$THUMBNAILS}
-{footer_script}{literal}
-        $('.jcarousel')
-            .jcarousel({
-                 wrap: 'circular',
-            })		
-			.jcarouselAutoscroll({
-			autostart: false
-			});	
-			
-        $('.jcarousel-control-prev')
-            .on('jcarouselcontrol:active', function() {
-                $(this).removeClass('inactive');
-            })
-            .on('jcarouselcontrol:inactive', function() {
-                $(this).addClass('inactive');
-            })
-            .jcarouselControl({
-                target: '-=1'
-            });
 
-        $('.jcarousel-control-next')
-            .on('jcarouselcontrol:active', function() {
-                $(this).removeClass('inactive');
-            })
-            .on('jcarouselcontrol:inactive', function() {
-                $(this).addClass('inactive');
-            })
-            .jcarouselControl({
-                target: '+=1'
-            });
-			
-    $('.jcarousel').mousewheel(function(event, delta) {
-        if (delta > 0)
-            {$('.jcarousel').jcarousel('scroll', '-=1')}
-        else if (delta < 0)
-            {$('.jcarousel').jcarousel('scroll', '+=1')}
-        });
-
-//};	
-		
-{/literal}{/footer_script}
 
 {/if}
@@ -212,53 +172,5 @@
 	{if !empty($CATEGORIES)}
 		{$CATEGORIES}
-		{footer_script}{literal}
-        $('.jcarousel')
-            .jcarousel({
-                 wrap: 'circular'
-            })		
-			.jcarouselAutoscroll({
-			interval: 3000,
-			target: '+=1',
-			autostart: true
-			});	
-			
-        $('.jcarousel-control-prev')
-            .on('jcarouselcontrol:active', function() {
-                $(this).removeClass('inactive');
-            })
-            .on('jcarouselcontrol:inactive', function() {
-                $(this).addClass('inactive');
-            })
-            .jcarouselControl({
-                target: '-=1'
-            });
 
-        $('.jcarousel-control-next')
-            .on('jcarouselcontrol:active', function() {
-                $(this).removeClass('inactive');
-            })
-            .on('jcarouselcontrol:inactive', function() {
-                $(this).addClass('inactive');
-            })
-            .jcarouselControl({
-                target: '+=1'
-            });
-		
-		$('.jcarousel')
-			.on('mouseenter', function(){
-				$(this).jcarouselAutoscroll('stop')
-			})
-			.on('mouseleave', function(){
-				$(this).jcarouselAutoscroll('start')
-			});
-		
-		$('.jcarousel').mousewheel(function(event, delta) {
-        if (delta > 0)
-            {$('.jcarousel').jcarousel('scroll', '-=1')}
-        else if (delta < 0)
-            {$('.jcarousel').jcarousel('scroll', '+=1')}
-        });
-
-{/literal}{/footer_script}
 
 	{/if}
Index: extensions/Slim/template/mainpage_categories.tpl
===================================================================
--- extensions/Slim/template/mainpage_categories.tpl	(revision 28392)
+++ extensions/Slim/template/mainpage_categories.tpl	(revision 28556)
@@ -1,28 +1,48 @@
-{define_derivative name='carousel' width='300' height='300' min_width='300'}
-<div id="carousel">
-<div id="wrap">
-	<div class="jcarousel">
-		<ul>
+{define_derivative name='carousel' width='300' height='350' min_width='350'}
+
+{footer_script}{literal}
+$(document).ready(function () {
+	var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
+		start;
+	
+	if (isTouch==true){
+	start="";
+	}else{
+	start="onStart";
+	};
+	
+	$("div.carousel").smoothDivScroll({
+		autoScrollingMode: start,
+		touchScrolling: true,
+		autoScrollingStep: 5,
+		mousewheelScrolling: "allDirections",
+		manualContinuousScrolling: true,
+		
+	});	
+			
+	$("div.carousel").bind("mouseover", function() {
+		$(this).smoothDivScroll("stopAutoScrolling");
+	}).bind("mouseout", function() {
+		$(this).smoothDivScroll("startAutoScrolling");
+	});	
+});
+{/literal}{/footer_script}
+
+<div class="carousel">
 			{foreach from=$category_thumbnails item=cat}
-				<li>
 						<div class="illustration">
 							<a href="{$cat.URL}">
 								<img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/>
-							</a>
-						</div>
+							
 						<div class="CatMPdescription">
 							<h3>
-								<a href="{$cat.URL}">{$cat.NAME}</a>
+								{$cat.NAME}
 							</h3>
 							<div>
 								{$cat.CAPTION_NB_IMAGES}
+						</div>
 							</div>	
+						</a>
 						</div>
-				</li>
 			{/foreach}
-		</ul>
-	</div>
 </div>
-	<a href="#" class="jcarousel-control-prev">&lsaquo;</a>
-    <a href="#" class="jcarousel-control-next">&rsaquo;</a>
-</div>
Index: extensions/Slim/template/menubar.tpl
===================================================================
--- extensions/Slim/template/menubar.tpl	(revision 28392)
+++ extensions/Slim/template/menubar.tpl	(revision 28556)
@@ -1,2 +1,3 @@
+{if !empty($blocks) }
 <div id=menubar>	
 <span id="menu_start">
@@ -33,5 +34,5 @@
 			</div>
 		</div>
+{/if}
 
 
-
Index: extensions/Slim/template/thumbnails.tpl
===================================================================
--- extensions/Slim/template/thumbnails.tpl	(revision 28392)
+++ extensions/Slim/template/thumbnails.tpl	(revision 28556)
@@ -1,3 +1,3 @@
-{define_derivative name='carousel' width='300' height='300' min_width='300'}
+{define_derivative name='carousel' width='300' height='350' min_width='350'}
 {php}
     global $page, $template;
@@ -6,33 +6,73 @@
 {/php}
 
+{footer_script}{literal}
+$(document).ready(function () {
+	var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
+		start;
+	
+	if (isTouch==true){
+	start="";
+	}else{
+	start="onStart";
+	};
+	
+	$("div.carousel").smoothDivScroll({
+		autoScrollingMode: start,
+		touchScrolling: true,
+		autoScrollingStep:5,
+		mousewheelScrolling: "allDirections",
+		manualContinuousScrolling: true,
+	});	
+			
+	$("div.carousel").bind("mouseover", function() {
+		$(this).smoothDivScroll("stopAutoScrolling");
+	}).bind("mouseout", function() {
+		$(this).smoothDivScroll("startAutoScrolling");
+	});	
+	
+	
+	$('.fancybox').fancybox({
+		helpers : {
+    		title : {
+    			type : 'over'
+    		},
+		},	
+		afterLoad: function() {
+		$("div.carousel").smoothDivScroll("stopAutoScrolling");
+		},
+		afterClose: function() {
+		$("div.carousel").smoothDivScroll("startAutoScrolling");
+		}
+	});
+});
+{/literal}{/footer_script}
 
-<div id="carousel">
-	<div id="wrap">
-		<div class="jcarousel">
-			<ul>
+		
+			
+
+
+	<div class="carousel">
 			{if !empty($category_thumbnails)}
-				{foreach from=$category_thumbnails item=cat}
-				<li>
-					<div class="illustration">
-						<a href="{$cat.URL}">
-							<img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/>
+			{foreach from=$category_thumbnails item=cat}
+						<div class="illustration">
+							<a href="{$cat.URL}">
+								<img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/>
+							
+						<div class="CatMPdescription">
+							<h3>
+								{$cat.NAME}
+							</h3>
+							<div>
+								{$cat.CAPTION_NB_IMAGES}
+						</div>
+							</div>	
 						</a>
-					</div>
-					<div class="CatMPdescription">
-						<h3>
-							<a href="{$cat.URL}">{$cat.NAME}</a>
-						</h3>
-						<div>
-							{$cat.CAPTION_NB_IMAGES}
-						</div>	
-					</div>
-				</li>
-				{/foreach}
+						</div>
+			{/foreach}
 			{/if}
 				{foreach from=$thumbnails item=thumbnail}
 				{assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)}
-				<li>
 					<div class="illustration">
-						<a href="{if ($Slim.style_slim)!=3}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
+						<a href="{if ($Slim.style_slim)!=3}{$thumbnail.path}" class="fancybox" data-fancybox-group="gallery"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
 						<img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()-22}"/>
 						{if $SHOW_THUMBNAIL_CAPTION }
@@ -62,10 +102,5 @@
 						</a>	
 					</div>	
-				</li>
 				{/foreach}
-			</ul>
-		</div>
 	</div>
-	<a href="#" class="jcarousel-control-prev">&lsaquo;</a>
-    <a href="#" class="jcarousel-control-next">&rsaquo;</a>
-</div>
+
