function animfooter(num) {
	if(num == 1) {
		num1 = 2;
		num2 = 1;
	}
	else {
		num1 = 1;
		num2 = 2;
	}
	setTimeout(function() {
		$('#horaires'+num1).fadeIn(700);
		$('#horaires'+num2).fadeOut(700);
		animfooter(num1);
	}, 7200);
}

function animhoraires(numb) {
	if(numb == 1) {
		numb1 = 2;
		numb2 = 1;
	}
	else {
		numb1 = 1;
		numb2 = 2;
	}
	setTimeout(function() {
		$('#horairespage'+numb1).slideDown('slow')
		$('#horairespage'+numb2).fadeOut('slow');
		animhoraires(numb1);
	}, 5400);
}


$(document).ready(function() {
	$('#horaires2').hide();
	$('#horairespage2').hide();
	animfooter(2);
	animhoraires(2);

	$('.kwicks').kwicks({
		min : 32,
		spacing : 0,
		duration: 1100,
		easing: 'easeOutQuart'
		//sticky: true,
		//defaultKwick: 2
	});
	
	$("#flink2").fancybox({
		'width'				: '75%',
		'height'			: '75%',
		'autoScale'			: false,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'type'				: 'iframe',
		'scrolling'			: 'no'
	});
	
	$(".fancy").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade'
	});
	
	$("input[type=text]").click( function() {
		$(this).attr('value', '');
	});
	$("input[type=password]").click( function() {
		$(this).attr('value', '');
	});
	$("textarea").click( function() {
		$(this).text('');
	});
	
	$("#mailbutton, #mailbutton2").click(function(){
		$("#maillink").trigger('click');
	});


});
