// hauteur 100% pour le bloc contenu
function fullHeightFix(){
	// get dom elements
	e_top = $('#top');
	e_content = $('#content');

	// r�init propri�t� par d�faut
	e_content.css('height', 'auto');
	
	// r�cup des hauteurs des �l�ments
	var document_height = $(document).height();
	var top_height = e_top.height();
	var content_newheight = document_height-top_height;
	
	// modification hauteur de l'�l�ment
	e_content.css('height', content_newheight+'px');
	
	// fix de la position du content bloc (ex. page avec panels.)
	var top_position = e_top.offset();
	var content_position = $('#content').offset();
	$('#content').css('top', (top_position.top+top_height-content_position.top)+'px');
}
fullHeightFix();

$(document).ready(function(){
	// on rappel le fix fullHeight pour le d�grad� pour les �l�ments collapsibles
	$('.collapsible a').bind('click', function(){
		window.setTimeout(fullHeightFix, 300);
	});
	
	// repositionnement du body
	var position = $('#top').offset();
	$('#top').css('margin-top', -position.top+'px');

	// on gère les marges une fois le document chargé
	fullHeightFix();
	
});


