//FANCYBOX
$(document).ready(function() {
						   
//CYCLE -- Following code makes javacript run in a pre tag in the body
	/*$(function() {
		// run the code in the markup!
		$('pre').each(function() {
			eval($(this).text());
		});
	});*/
	
	$('#mainImage').cycle();
	
	$('a.big').lightBox();

	
//FORM for Contact 

	$('#contact').submit(function(){
	
		 var action = $(this).attr('action');
	
			 $.post(action, {
					 name: $('#name').val(),
					 email: $('#email').val(),
					 phone: $('#phone').val(),
					 guests: $('#guests').val(),
					 date: $('#date').val(),
					 time: $('#time').val(),
					 comments: $('#comments').val()
				},
					
				 function(data){
				 //$('#cForm').fadeIn(1000);
				 //$('.response').fadeOut(500,function(){$(this).remove()});
				 var newdatas = data.split("|||||");
				 if(newdatas.length <= 1) {
					newdatas[1] = data;
					}
				 $('.response').remove()
				 $('#contact').before('<div class="response" align="center">'+newdatas[1]+'</div>');
				 $('.response').slideDown()
					 if(newdatas[0]=='true') {
						 $('#contact').slideUp();
					 }
	
				 }
		 );
	
	 return false;
	
	 });
 });