var $j = jQuery.noConflict();

$j(document).ready(function(){
	
	///////////////////////////////////////////////////////
	// COLOR BOX LINKS
	///////////////////////////////////////////////////////
	$j('.colorbox.group1').colorbox({rel:'group1'});
	$j('.colorbox.gallery').colorbox({rel:'gallery'});
	//$j('.colorbox.private').colorbox({rel:'group1', maxWidth: '100%'});
	$j('.colorbox.private').colorbox({iframe:true, width:"90%", height:"90%"});
	
	
	///////////////////////////////////////////////////////
	// REGULAR
	///////////////////////////////////////////////////////

	
	var colors = ["ba693d", "5b7991", "967c57", "864d55",  "b37e2f", "993e2f", "54675a"];
	var theColor = "#" + colors[Math.floor(Math.random()*colors.length)];
	$j(	'#us_widget_s div.w_header, .logo-box, .zagat, #alo-easymail-widget-3 h3').animate({"background-color": theColor}, 300);
		
	//.nav .current_page_item a
	//$j('.current_page_item a').animate({"border-bottom-color": theColor}, 300);
	$j('h2').animate({"border-left-color": theColor}, 300);
	$j('#dinner-btn')
	
	
	//$j('.reservation').height($j('.content').height());
	//$j('.google-maps').height($j('.content').height());
	
	$j('.gallery li a ').mouseenter(function (){
		//$j('p', this).animate({'bottom': '0'}, 300, 'easeOutQuad');
		//$j('img', this).animate({'top': '-5px'}, 300, 'easeOutQuint');
	});
	$j('.gallery li a').mouseleave(function (){
		//$j('p', this).animate({'bottom': '-180px'}, 300, 'easeInQuad');
		//$j('img', this).animate({'top': '0px'}, 300, 'easeInOutQuad');
	});
	
	
	///////////////////////////////////////////////////////
	// MENU PAGE SHOW/HIDE
	///////////////////////////////////////////////////////
	
	$j('#wine-btn').click(function (){
		setMenuHighlight(this);
		showMenu ("menu-wine");
	});
	$j('#spirits-btn').click(function (){
		setMenuHighlight(this);
		showMenu ("menu-spirits");
	});
	
	
	$j('#dinner-btn').click(function (){
		setMenuHighlight(this);
		showMenu ("menu-dinner");
	});
	$j('#dessert-btn').click(function (){
		setMenuHighlight(this);
		showMenu ("menu-dessert");
	});
	$j('#lunch-btn').click(function (){
		setMenuHighlight(this);
		showMenu ("menu-lunch");
	});
	$j('#bar-btn').click(function (){
		setMenuHighlight(this);
		showMenu ("menu-bar");
	});
	
	function showMenu (target){
		$j('.menu').slideUp();
		$j('.'+target).stop().slideDown();
	}
	
	function setMenuHighlight(target){
		$j('.menu-buttons p').css({'background-color' : '#ecebe5', 'color': '#4A463E'});
		$j(target).animate({'background-color' : theColor, 'color': '#FFF'}, 300);
	}
	setMenuHighlight('#dinner-btn');
	setMenuHighlight('#wine-btn');
});





///////////////////////////////////////////////////////
// DAS COOKIE
///////////////////////////////////////////////////////


// function createCookie(name,value,days) {
// 	if (days) {
// 		var date = new Date();
// 		date.setTime(date.getTime()+(days*24*60*60*1000));
// 		var expires = "; expires="+date.toGMTString();
// 	}
// 	else var expires = "";
// 	document.cookie = name+"="+value+expires+"; path=/";
// }
// 
// createCookie("currentColor","ba693d",1); 
// 
// function readCookie(name) {
// 	var nameEQ = name + "=";
// 	var ca = document.cookie.split(';');
// 	for(var i=0;i < ca.length;i++) {
// 		var c = ca[i];
// 		while (c.charAt(0)==' ') c = c.substring(1,c.length);
// 		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
// 	}
// 	return null;
// }
// 
// 
// alert("The JSON representation of the continents array is: " +
//  readCookie("currentColor").parseJSON());
// 
// function eraseCookie(name) {
// 	createCookie(name,"",-1);
// }





















