

function reservationSubmit() {
	var f_ppl = '4';
	f_ppl = $('#f_size').val();
	var f_date = '08/12/2010';
	f_date = $('#f_date').val();
	var f_time = '6:30 PM';
	f_time = $('#f_time').val();
	window.open('http://www.opentable.com/opentables.aspx?p='+f_ppl+'&m=80&r=48523&t=rest&d='+f_date+' '+f_time);
	return false;
}

jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};


$(window).load(function() {
	
	$('#slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:700,
		pauseTime:3700,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8 //Universal caption opacity
	});
	
	if ('#slideshow'){
		$('#slideshow').serialScroll({
			items:'li',
			prev:'a.prev',
			next:'a.next',
			offset:0,
			start:0,
			duration:2000,
			force:true,
			stop:true,
			lock:false,
			cycle:true,
			easing:'easeOutQuart',
			jump: false,
			interval: 4700
		});
	}
	
	if ($('#carousel1')) {
		$(function(){
			$('#carousel1').infiniteCarousel();
		});
	}
	
	$('.banquet-room').click(function () {
		if ($(this).hasClass('active')) {
			//nothing happens
		} else {
			$('.banquet-room-img.active').fadeOut(1000).removeClass('active');
			$('.banquet-room.active').removeClass('active');
			$(this).addClass('active');
			
			if ($(this).hasClass('banquet-room-a'))
				$('.banquet-room-img-a').fadeIn(1000).addClass('active');
			if ($(this).hasClass('banquet-room-b'))
				$('.banquet-room-img-b').fadeIn(1000).addClass('active');
			if ($(this).hasClass('banquet-room-c'))
				$('.banquet-room-img-c').fadeIn(1000).addClass('active');
			if ($(this).hasClass('banquet-room-d'))
				$('.banquet-room-img-d').fadeIn(1000).addClass('active');
		}
		return false;
	});
	
	

	

	
	
	$('.privatepart').click(function () {
		obj = $(this);
		if (obj.hasClass('active')) {
			//nothing happens
		} else {
		
			$('.privatepart.active').removeClass('active');
				
			$('.privatepart-img').fadeOut(1000, function () { 
				$('.privatepart-img').html('<img src="'+obj.attr('href')+'" alt="" />');
				$('.privatepart-img').fadeIn(1000);
			});
			
			obj.addClass('active');
			
			
			
		}
		return false;
	});
	
	$('#f_date').datepicker();

	/*
	
	$('.slideshow-item').animate({
		opacity: 0.8
	}, 1600);

$(".slideshow-item")
    .live('mouseenter',function(){
		$(this).stop(true,true).animate({
			opacity: 1
		}, 600);                             
    })
    .live('mouseleave',function(){
		$(this).stop(true,true).animate({
			opacity: 0.8
		}, 600);
    });
	*/
	
	$("a.fancy").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	
	$('.calnk a').click( function() {
		return false;
	});
	
});
