showTopTimer = null;
hideTopTimer = null;
checkTopTimer = null;

var showTop = 0;
var hideTop = 1;

function showTopNav() {

	if(checkTopTimer) {
		clearTimeout(checkTopTimer);
		checkTopTimer = null;
		return;
	} 
	
	if (showTop == 0) {
		showTop = 1;
		/*new Effect.SlideUp(document.getElementById('topNavLogo'));
	
		showTopTimer = setTimeout(function(){
			new Effect.SlideDown(document.getElementById('topNavBtns'));
			showTopTimer = null;
			
			hideTopTimer = setTimeout(function(){*/
				hideTop = 0;/*
				hideTopTimer = null;
			}, 1000);
			
		}, 800);*/
		document.getElementById('topNavLogo').style.display="none";
		document.getElementById('topNavBtns').style.display="block";
	}

}

function hideTopNav() {

	if (hideTop == 0) {
		//checkTopTimer = setTimeout(function(){
			hideTop = 1;/*
			new Effect.BlindUp(document.getElementById('topNavBtns'));
			
			hideTimer = setTimeout(function(){
				new Effect.BlindDown(document.getElementById('topNavLogo'));
				hideTopTimer = null;
			
				showTopTimer = setTimeout(function(){*/
					showTop = 0;/*
					showTopTimer = null;
				}, 800);
			
			}, 500);*/
			document.getElementById('topNavLogo').style.display="block";
			document.getElementById('topNavBtns').style.display="none";
		//}, 500);
	}
}

showBotTimer = null;
hideBotTimer = null;
checkBotTimer = null;

var showBot = 0;
var hideBot = 1;

function showBotNav() {

	if(checkBotTimer) {
		clearTimeout(checkBotTimer);
		checkBotTimer = null;
		return;
	} 
	
	if (showBot == 0) {
		showBot = 1;/*
		new Effect.SlideUp(document.getElementById('botNavLogo'));
	
		showBotTimer = setTimeout(function(){
			new Effect.SlideDown(document.getElementById('botNavBtns'));
			showBotTimer = null;
			
			hideBotTimer = setTimeout(function(){*/
				hideBot = 0;/*
				hideBotTimer = null;
			}, 500);
			
		}, 800);*/
		document.getElementById('botNavLogo').style.display="none";
		document.getElementById('botNavBtns').style.display="block";
	}

}

function hideBotNav() {

	if (hideBot == 0) {
		//checkBotTimer = setTimeout(function(){
			hideBot = 1;/*
			new Effect.BlindUp(document.getElementById('botNavBtns'));
			
			hideTimer = setTimeout(function(){
				new Effect.BlindDown(document.getElementById('botNavLogo'));
				hideBotTimer = null;
			
				showBotTimer = setTimeout(function(){*/
					showBot = 0;/*
					showBotTimer = null;
				}, 800);
			
			}, 500);*/
			document.getElementById('botNavLogo').style.display="block";
		document.getElementById('botNavBtns').style.display="none";
		//}, 500);
	}
}

var curCocktail = 2;
var totalCocktails = 20;
var nextEnd = (totalCocktails-3) * (-211);
var prevEnd = 0;
var cocktailTimer = null;
var cocktailPos = 0;
var distance = 0;
var duration = 0;
var wait = 0;

function previousCocktail() {
	if ((curCocktail > 2) && (cocktailTimer == null)) {
		if (curCocktail - 2 > 2) {
			distance = 633;
			curCocktail = curCocktail-3;
			duration = 2.25;
			wait = 2400;
		} else {
			distance = 211*(curCocktail-2);
			duration = .75 * (curCocktail-2);
			wait = 800 * (curCocktail-2);
			curCocktail = curCocktail - (curCocktail-2);
		}
		new Effect.Move(document.getElementById('cocktailList'), { x: distance, y: 0, mode: 'relative', duration: duration });
		cocktailTimer = setTimeout(function(){
			cocktailTimer = null;
		}, wait);
	}
}

var scrollWidth;

function nextCocktail() {
	if ((curCocktail < totalCocktails) && (cocktailTimer == null)) {
		if (totalCocktails - curCocktail > 2) {
			distance = -633;
			curCocktail = curCocktail+3;
			duration = 2.25;
			wait = 2400;
		} else {
			distance = -211*(totalCocktails-curCocktail);
			duration = .75 * (totalCocktails-curCocktail);
			wait = 800 * (totalCocktails-curCocktail);
			curCocktail = curCocktail + (totalCocktails-curCocktail);
		}
	
		new Effect.Move(document.getElementById('cocktailList'), { x: distance, y: 0, mode: 'relative', duration: duration });
		cocktailTimer = setTimeout(function(){
			cocktailTimer = null;
		}, wait);
	}
}