
function toRight(target){
var receivedContent = $('#tempDiv').html();
	var oldDiv = $('#'+ target );
	var newDiv = $('<div class="en-avant" />');
	var container = $(oldDiv).parent();
	newDiv.html(receivedContent);
	$(container).css('marginLeft', '-650px');
	oldDiv.before(newDiv);	
	$('#' + target + 'NavBar').eq(0).html(newDiv.find('.nav-bar').eq(0).html()); 
	container.animate({marginLeft: "0px" }, 500, 'linear',  function() {oldDiv.remove(); newDiv.attr('id', oldDiv.attr('id'));});
 }
 
function toLeft(target){
	var receivedContent = $('#tempDiv').html();
	var oldDiv = $('#'+ target );
	var newDiv = $('<div class="en-avant" />');
	var container = $(oldDiv).parent();
	newDiv.html(receivedContent);
	oldDiv.after(newDiv);	
	$('#' + target + 'NavBar').eq(0).html(newDiv.find('.nav-bar').eq(0).html());
	container.animate({marginLeft: "-650px" }, 500, 'linear',  function() {oldDiv.remove();	$(container).css('marginLeft', '0'); newDiv.attr('id', oldDiv.attr('id'));});
 }