// JavaScript Document
$('document').ready(function(){
//------------------------------
	//$('#cont_princ .fond').css('opacity',0.90);
	//$('#offre .fond').css('opacity',0.10);
	//$('#cont_sec .fond').css('opacity',0.80);
	deplie = false;
	encours = false;
	tempo = 300;
	$('#cont_sec').hide();
	$('a[href=#plus]').click(function(e){
		e.preventDefault();
		if(!deplie && !encours){
			encours =true;
			$('#cont_sec').show();
			$('#int').show();
			$('#int').css({"margin-left":407}).animate({marginLeft:0},tempo,function(){
																				   encours = false;});
			deplie = true;
		}else if(!encours){
			encours =true;
			$('#int').animate({marginLeft:407},tempo,function(){
				$('#cont_sec').hide();
				$('.encours').find('.rose').hide();
			$('.encours').find('.blanche').show();
			$('#atouts li').removeClass('encours');
				deplie = false;
				encours = false;
			});
		}
	})
	$('.atouts li').bind('mouseenter',function(){
		if(!$(this).hasClass('encours')){
			$(this).find('.rose').show();
			$(this).find('.blanche').hide();
		}
	}).bind('mouseleave',function(){
		if(!$(this).hasClass('encours')){
			$(this).find('.rose').hide();
			$(this).find('.blanche').show();
		}
	})
	$('.atouts li').click(function(e){
		e.preventDefault();
		$('#cont_sec').show();
		$('#int').show();
		var h = $(this).find('.fleche a').attr('href');
		h = h.substring(1);
		if(!$(this).hasClass('encours')){
			$('.encours').find('.rose').hide();
			$('.encours').find('.blanche').show();
			$('.atouts li').removeClass('encours');
			$(this).addClass('encours');
			if(!deplie && !encours){
				encours = true;
				deplie = true;
				$('#int div[class!=fond]').hide();
				$('#int div.'+h).show();
				$('#int').css({"margin-left":407}).animate({marginLeft:0},tempo,function(){
					encours = false;
				});				
			}else if(!encours){
				encours = true;
				$('#int').animate({marginLeft:407},tempo,function(){
					$('#int div[class!=fond]').hide();
					$('#int div.'+h).show();		  
				   $('#int').css({"margin-left":407}).animate({marginLeft:0},tempo,function(){
						encours = false;
						});				
				});
			}
		}
	})
//------------------------------
})