
//Colle le bottom en bas si la fenêtre est petite
function ajusterFooter(){

	var hauteurW = $(window).height();
	var hauteurD = $(document).height();
	var ie78 = false;

	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
  		var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 		if (ieversion <= 8){
 			ie78 = true;
		}
	}


	if (ie78 == true) {

		if (ieversion == 7) {
			if (hauteurW == (hauteurD - 4) || hauteurW == hauteurD) {
				$("footer").css({
					'bottom': 0,
					'left': 0,
					'position': 'absolute'
				});
				$("#wrapper").css({
					'height': hauteurW + 4
				});
			} else {
				$("footer").css({
					'bottom': 'auto',
					'position': 'static'
				});
				$("#wrapper").css({
					'height': 'auto'
				});
			}
		} else {
			//IE 8
			if (hauteurW == (hauteurD - 4) || hauteurW == hauteurD) {
				$("footer").css({
					'bottom': 0,
					'position': 'absolute'
				});
				$("#wrapper").css({
					'height': hauteurW
				});
			} else {
				$("footer").css({
					'bottom': 'auto',
					'position': 'static'
				});
				$("#wrapper").css({
					'height': 'auto'
				});
			}
		}

	} else {
		// Tous ceux qui ne sont pas IE
		if (hauteurW == hauteurD) {
			$("footer").css({
				'bottom': 0,
				'position': 'absolute'
			});
			$("#wrapper").css({
				'height': hauteurW
			});
		} else {
			$("footer").css({
				'bottom': 'auto',
				'position': 'static'
			});	
			$("#wrapper").css({
				'height': 'auto'
			});
		}
	}
}



//Và à une section avec un #id passé en paramètre -80px pour pas que ça se trouve sous le menu du haut
function gotoSection(section){
	$.scrollTo(section, {offset:-80}, {duration:3000}, {easing:'elasout'});
}





















////Colle le bottom en bas si la fenêtre est petite
//function ajusterFooter() {

//	var ie78 = false;

//	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
//		var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number
//		if (ieversion <= 8) {
//			ie78 = true;
//		}
//	}

//	if (ie78 == true) {
//		/*var elem = $(window);
//		var doc = document.getElementsByTagName('*');
//		
//		alert(doc.stylesheet.height);*/
//		//$('#window-info').text( 'window width: ' + elem.width() + ', height: ' + elem.height() );	
//	} else {

//		var hauteurW = $(window).height();
//		var hauteurD = $(document).height();
//		if (hauteurW == hauteurD) {
//			$("footer").css({
//				'bottom': 0,
//				'position': 'absolute'
//			});
//			$("#wrapper").css({
//				'height': hauteurW
//			});
//		} else {
//			$("footer").css({
//				'bottom': 'auto',
//				'position': 'static'
//			});
//			$("#wrapper").css({
//				'height': 'auto'
//			});
//		}
//	}
//}


////Rapetisse le menu en montant
////function ajusterMenu(){
////	
////	if ($(window).scrollTop() < 60) {
////		//alert($(window).scrollTop() );
////		$("header").css({ 								'top': 0-$(window).scrollTop() 		});
////		$("header #header_slogan").css({ 				'margin-top': 0 		});
////		$("header #header_content nav ul ul").css({ 	'top': 75 				});
////		$("header #header_content img.grand").css({ 	'display': 'inline'		});
////		$("header #header_content img.petit").css({ 	'display': 'none'		});
////	} else if ($(window).scrollTop() >= 60) {
////		$("header").css({ 								'top': -60		 		});
////		$("header #header_slogan").css({ 				'margin-top': 10 		});
////		$("header #header_content nav ul ul").css({ 	'top': 90 				});
////		$("header #header_content img.grand").css({ 	'display': 'none'		});
////		$("header #header_content img.petit").css({ 	'display': 'inline'		});
////	} else {
////		$("header").css({								'top': 0 				});
////		$("header #header_slogan").css({ 				'margin-top': 0 		});
////		$("header #header_content nav ul ul").css({ 	'top': 75 				});
////		$("header #header_content img.grand").css({ 	'display': 'inline'		});
////		$("header #header_content img.petit").css({ 	'display': 'none'		});
////	}
////}



////Và à une section avec un #id passé en paramètre -80px pour pas que ça se trouve sous le menu du haut
//function gotoSection(section) {
//	$.scrollTo(section, { offset: -80 }, { duration: 3000 }, { easing: 'elasout' });
//}

