
function resize_mdf(max_refer)
{
  var hmax = 0;
  var padding = 14;
  if($(max_refer).height() <= 366)
  {
        var i = 0;
        $('.equal').each(function(){
            i++;
            // La première colonne a un padding de 14px
			if(i == 1)
                hmax = 366 - padding;	
            else
                hmax = 366;
            $(this).height(hmax);					  
        });
  }
  else
  {
        var i = 0;
        $('.equal').each(function(){
            i++;
            if(i == 1)
                hmax = $(max_refer).height() - padding;
            else
                hmax = $(max_refer).height();
            $(this).height(hmax);					  
        });  
  } 
}

function addLastClass(selecteur,classes,opt)
{	
	if(opt == 'onlyLast')
		$('.'+selecteur+':last').addClass(classes);
	if(opt == 'alternate')
	{
		var nb = $('.'+selecteur).size();
		var count = 0;
		$('.'+selecteur).each(function(){
			count++;
			if(count%2 == 0)
				$(this).addClass(classes);
		});	
	}
	
}
