$(function() {
	$("div.content-full").jScrollPane({
		'scrollbarWidth' : 6
		});
});
$(document).ready(function() {
	$("div.content-full").jScrollPane({
		'scrollbarWidth' : 6
		});
	// tooltips
	$("a.footbar-trigger").tooltip({
		offset: [-50,0]
	});
});

$(document).ready(function(){
	$("a.footbar-nav").bind("click",function(e){
		e.preventDefault();
		if($(this).hasClass("footbar-nav-show")) {
			$("div#footbar").animate({left:'-980px'},function(){
				$("a.footbar-nav")
					.removeClass("footbar-nav-show")
					.addClass("footbar-nav-hide");
				$("div.content-scroll").css("height","600px");
				$("div.jScrollPaneContainer").css("height","600px");
				$("div.content-full").jScrollPane({
					'scrollbarWidth':6
				});
			});
		} else {
			$("div.content-scroll").css("height","408px");
			$("div.jScrollPaneContainer").css("height","408px");
			$("div.content-full").jScrollPane({
				'scrollbarWidth':6
			});
			$("div#footbar").animate({left:0},function(){
				$("a.footbar-nav")
					.removeClass("footbar-nav-hide")
					.addClass("footbar-nav-show");			
			});
		}
	});
	$("div.vignette-text h2 a").bind("click",function(){
		$("div.content-full").jScrollPane({
			'scrollbarWidth':6
		});
	});
});

$(document).ready(function() {
	$("a.recommander").click(function(e){
		e.preventDefault();
		$("div#recommander-overlay").overlay().load();
	});
	$("div#recommander-overlay").overlay({
			api:true
			,speed:1200
			,expose : {
				color: '#000',
				opacity:'0.7',
				closeSpeed:900,
				closeOnClick:false
			}
			,closeOnClick: false
		});
	// Gérer les overlays
});
