var en_cours = 0;
$(document).ready(function(){
			$('img.maximage').maxImage({
				isBackground: true, 
			  	verticalAlign: 'top',
				overflow: 'auto',
				// verticalOffset: 91,
				// horizontalOffset: 520,
				resizeMsg: {show: true, location: 'after', message: 'Note: The original size is [h]h [w]w'}
			});
			
			$('img.bgmaximage').maxImage({
		  	isBackground: true,
		  	verticalAlign: 'top',
				overflow: 'auto'
		 	});
		
			$('img.widthmaximage').maxImage({
				verticalOffset: 91,
				horizontalOffset: 520,
				maxFollows: 'width'
			});
			
			$('img.maxAtOrigImageSize').maxImage({
				verticalOffset: 91,
				horizontalOffset: 520,
				maxAtOrigImageSize: true
			});
			
			$('img.slidemaximage').maxImage({
				isBackground: true,
				slideShow: true,
				position: 'absolute',
				verticalAlign: 'bottom',
				slideShowTitle: false,
				maxFollows: 'height',
				resizeMsg: {show: false},
				overflow: 'auto'
			});
			
			
			
			
			$('#openFooter').click(function() {
				if(en_cours == 0){
				en_cours = 1;
				if($('#openFooter').css('bottom') != '111px'){
					$('#openFooter').animate({
						bottom: '+=111'
					}, 100, function() {
						$('#closeFooter').animate({
							bottom: '+=111'
						}, 100, function() {
							$('#footer1').animate({
								bottom: '+=111'
							}, 100, function() {
								$('#footer2').animate({
									bottom: '+=111'
								}, 100, function() {
									en_cours = 0;
								});
							});
						});
					});
				}else{
					en_cours = 0;
				}
				}
			});
			
			$('#closeFooter').click(function() {
				if(en_cours == 0){
				en_cours = 1;
				if($('#closeFooter').css('bottom') == '111px'){
					$('#footer2').animate({
						bottom: '-=111'
					}, 100, function() {
						$('#footer1').animate({
							bottom: '-=111'
						}, 100, function() {
							$('#openFooter').animate({
								bottom: '-=111'
							}, 100, function() {
								$('#closeFooter').animate({
									bottom: '-=111'
								}, 100, function() {
									en_cours = 0;
								});
							});
						});
					});
				}else{
					en_cours = 0;
				}
				}
			});
		});
