/*
 * custom.js (etudesphotographiques - septembre 2008)
 * requiert jQuery >= 1.2.6
 */

$(document).ready(function() {
	
	var h = 0;
	var navHeight = $('#nav').outerHeight(true);
	
	// Layout 3 colonnes
	if (true === $('#mainContent').is('div')) {
	
		$('#mainContent > div:last-child').css('margin-bottom', 0);
	
		if (navHeight > $('#mainContent').outerHeight(true)) {
			$('#mainContent').height(navHeight);
		}
		
		// ajout d'un bloc vide pour remplir la seconde colonne
		$('<div></div>')
			.addClass('emptyBlock')
			.height($('#mainContent').outerHeight(true) - $('#secondaryContent').outerHeight(true) -2)
			.appendTo('#secondaryContent');
		
	}
	
	// Layout 2 colonnes
	if (navHeight > $('#content').outerHeight(true)) {
		$('#content').height(navHeight);
	}
	
});
