/**
 * 
 * @return
 */
function reactif(){
	action=1
}
action = 1;
precedent = false;
/**
 * 
 * @param t
 * @param event
 * @return
 */
function tourne(t,event){
	if(action==1){
		taille = $(t).offsetWidth;
		new Effect.Morph($(t), {
	  		style: 'width:50px', 
	  		duration: 0.05, 
	  		afterFinish: function(effect){ retourne(effect.element,taille)}
		});
	}else {
		action=1;
	}
}
/**
 * 
 * @param element
 * @param taille
 * @return
 */
function retourne(element,taille){
	var child = $(element).down();
	if($(element).hasClassName('recto')){
		if(child.hasClassName('bloghead') || child.hasClassName('bigbloghead') ) {
			child.style.display = 'none';
		}
		$(element).removeClassName('recto');
		$(element).addClassName('verso');
	} else {
		if(child.hasClassName('bloghead') || child.hasClassName('bigbloghead')) {
			child.style.display = 'block';
		}
		$(element).removeClassName('verso');
		$(element).addClassName('recto');
	}
	new Effect.Morph($(element), {
  		style: 'width:'+taille+"px", 
  		duration: 0.05,
  		afterFinish: function(effect){ //if(precedent){referme(effect.element)}else{precedent=element} 
  		}
	});
}
/**
 * 
 * @param element
 * @return
 */
function referme(element){
	if($('multiple').checked==true){
		if(($(precedent).up().id!=$(element).up().id) && $(element).hasClassName('verso')){
			if($(precedent).hasClassName('verso')){
				tourne($(precedent));
			}
			if($(element).hasClassName('verso')){
				precedent = element;
			}
		}
	}
}