/* Pour la gallerie d'image */
var maxwidth=450;
var maxheight=275;

/*
 * imageid - The id or class of a image   
 */
function imageIsLanscape(imageid){
	var result = false;
    if(jQuery(imageid).length != 0){
		var widthimage = jQuery(imageid).width();
		var heightimage = jQuery(imageid).height();
		if(widthimage > heightimage){
			result = true;
		} else {
			result = false;
		}
	}
    return result;

}
function optimisedWidth(currentWidth, currentHeight){
	var newwidth = currentWidth;
	if(currentHeight>maxheight){
		newheight = maxheight;
		newwidth = Math.round(currentWidth*newheight/currentHeight);
	}
	return newwidth;
}
function getMaxHeight(){
	return maxheight;
}
