/*
	@author:	Krzysztof Prugar
	@desc:		Javascript for restaurant_home.php
*/

$(document).ready(function($) 
{
	// This refers to the checkout button on the cart sidebar
	//$("#checkoutid_new").click( function()
	$("#checkoutid_new").live('click', function()
	{
		var height = ($(window).height());
		var width = ($(window).width());
		$( "#Layer" ).dialog(
		{
			title: "Checkout Options",
			resizable: false,
			position: 'center',
			show: 'fade',
			hide: 'fade',
			height: 'auto',
			width: ( width - 600 ),
			modal: true,
			buttons: 
			{
				'Go Back': function() 
				{
				
					$(this).dialog('close');
				}
			}
		});
	});
	$("#checkoutid_new_top").live('click', function()
	{
		var height = ($(window).height());
		var width = ($(window).width());
		$( "#Layer" ).dialog(
		{
			title: "Checkout Options",
			resizable: false,
			position: 'center',
			show: 'fade',
			hide: 'fade',
			height: 'auto',
			width: ( width - 600 ),
			modal: true,
			buttons: 
			{
				'Go Back': function() 
				{
				
					$(this).dialog('close');
				}
			}
		});
	});
	// This refers to the checkout button on the viewcart page
	$("#checkout_button").live('click', function()
	{
		
		var height = ($(window).height());
		var width = ($(window).width());
		$( "#Layer" ).dialog(
		{
			title: "Checkout Options",
			resizable: false,
			position: 'center',
			show: 'fade',
			hide: 'fade',
			height: 'auto',
			width: ( width - 600 ),
			modal: true,
			buttons: 
			{
				'Go Back': function() 
				{
				
					$(this).dialog('close');
				}
			}
		});
	});
});
