// JavaScript Document

function resizeIt(){
 // firefox is ok
  var height = document.documentElement.scrollHeight;

  // now IE 7 + Opera with "min window"
  if(document.documentElement.clientHeight > height ) {
    height  = document.documentElement.clientHeight;
  }
  // last for safari
  if(document.body.scrollHeight > height) {
    height = document.body.scrollHeight;
  }
		  $('#bg-left').css({'height':(height+125)+'px'});
          $('#bg-right').css({'height':(height+125) +'px'});
          $('.image-feu').css({'height':(height+125) +'px'});
		 // $('#footer').css({'position':'absolute','top':height-25 +'px'});
		 positionfooter = $('.contenu').position().top+$('.contenu').height() + 125;
		
	 	$('#footer').css({'position':'absolute','top':positionfooter+'px'});
}

$(function(){
		   
		 
	resizeIt();

	$(window).resize(function(){

		resizeIt();
		/* console.log($('#footer').position().top);
		 if( $('#footer').position().top < 833){
			 positiontop=150;
			 $('#footer').css({'top':positiontop +'px'});
		 }else{
			 positiontop=1;
			 $('#footer').css({'top':positiontop +'px'});
		}*/

	});
  });

