/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2009 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 212 2009-09-03 05:33:44Z emartin24 $
 *
 */

$(document).ready(function () {

			$('#progress').hide(0);
		$('#return').hide(0);
		
	$('#register').click(function (e) {
		e.preventDefault();
		$("#basic-modal-content").html($loader);
		$('#basic-modal-content').modal();
		$('#basic-modal-content').load($siteurl+'/myarea');

		
	});
	
	
	$("#book").submit(function(){
			
			var act=document.getElementById("book").act.value;
			
			
			// 'this' refers to the current submitted form
			var str = $(this).serialize();
			$("#contact").hide(0);
			$("#progress").show(0);
			//$("#basic-modal-content").('<div style="margin: 80px 110px; width: auto"><img src="'+aj+'"  /></div>');
		   $.ajax({
		   type: "POST",
		   url: act,
		   data: str,
		   success: function(msg){

			$("#contact").ajaxComplete(function(event, request, settings){

			$("#progress").hide(0);
			$("#return").css({opacity: 0});
			$("#return").show(0);
			
			$("#return").html(msg);
			$("#return").animate({opacity: 1},1500);
			//$("#basic-modal-content").show(0);

			});

			}

					 });

			return false;

			});
	
	
	

			
			
});

function set_val(num)
{
	document.getElementById("book").fid.value=num;
}


	
