// -------------------------------------------------------------------------
// Fonction Animation bandeau
// -------------------------------------------------------------------------


function doItem1() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 92}, { queue:false, duration:200 });
	} else {
		$('#menu2').not(this).animate({width: 65}, { queue:false, duration:200 });
		$('#menu3').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu4').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu5').not(this).animate({width: 80}, { queue:false, duration:200 });
		$('#menu6').not(this).animate({width: 70}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}

// ------------------------------------------------------------------------
function doItem2() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 92}, { queue:false, duration:200 });
	} else {
		$('#menu1').not(this).animate({width: 92}, { queue:false, duration:200 });
		$('#menu3').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu4').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu5').not(this).animate({width: 80}, { queue:false, duration:200 });
		$('#menu6').not(this).animate({width: 70}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}
// ------------------------------------------------------------------------
function doItem3() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 70}, { queue:false, duration:200 });
	} else {
		$('#menu1').not(this).animate({width: 92}, { queue:false, duration:200 });
		$('#menu2').not(this).animate({width: 65}, { queue:false, duration:200 });
		$('#menu4').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu5').not(this).animate({width: 80}, { queue:false, duration:200 });
		$('#menu6').not(this).animate({width: 70}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}
// ------------------------------------------------------------------------
function doItem4() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 70}, { queue:false, duration:200 });
	} else {
		$('#menu1').not(this).animate({width: 92}, { queue:false, duration:200 });
		$('#menu2').not(this).animate({width: 65}, { queue:false, duration:200 });
		$('#menu3').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu5').not(this).animate({width: 80}, { queue:false, duration:200 });
		$('#menu6').not(this).animate({width: 70}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}
// ------------------------------------------------------------------------
function doItem5() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 80}, { queue:false, duration:200 });
	} else {
		$('#menu1').not(this).animate({width: 92}, { queue:false, duration:200 });
		$('#menu2').not(this).animate({width: 65}, { queue:false, duration:200 });
		$('#menu3').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu4').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu6').not(this).animate({width: 70}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}
// ------------------------------------------------------------------------
function doItem6() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 80}, { queue:false, duration:200 });
	} else {
		$('#menu1').not(this).animate({width: 92}, { queue:false, duration:200 });
		$('#menu2').not(this).animate({width: 65}, { queue:false, duration:200 });
		$('#menu3').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu4').not(this).animate({width: 70}, { queue:false, duration:200 });
		$('#menu5').not(this).animate({width: 70}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}

// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
function undoItem() {
	undoTimerHodler = window.setTimeout(undoTimer, 100);
}
function undoTimer() {
	$('#menu1').animate({width: 92}, { queue:false, duration:200 });
	$('#menu2').animate({width: 65}, { queue:false, duration:200 });
	$('#menu3').animate({width: 70}, { queue:false, duration:200 });
	$('#menu4').animate({width: 70}, { queue:false, duration:200 });
	$('#menu5').animate({width: 80}, { queue:false, duration:200 });
	$('#menu6').animate({width: 70}, { queue:false, duration:200 });

	currentItem = null;
}

// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
function doItem_old() {
	if(undoTimerHodler)
		window.clearTimeout(undoTimerHodler);
	if(currentItem) {
		$(currentItem).animate({width: 92}, { queue:false, duration:200 });
	} else {
		$('#menu div').not(this).animate({width: 92}, { queue:false, duration:200 });
	}
	currentItem = this;
	$(currentItem).animate({width: 134}, { queue:false, duration:200 });
}
function undoItem_old() {
	undoTimerHodler = window.setTimeout(undoTimer, 100);
}
function undoTimer_old() {
	$('#menu div').animate({width: 92}, { queue:false, duration:200 });
	currentItem = null;
}

// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
