    $(document).ready(function () {
		$("form").attr({
			 autocomplete: "off",
		});
/*	newsletter	*/
		jQuery.ajaxNewsSubscribe = function(){
			$('#newsform').fadeOut(1);
			$('#newbigbox span').fadeOut(1);
			
			$('#loadC').fadeIn(1);
			
			$.ajax({
				url: '/ajaxit.php',
				data: 'action=newsletter_subscribe&news_name=' + $('#news_name').val() + '&news_email=' + $('#news_email').val(),
				dataType: 'json',
				type: 'post',
				success: function(j){
					setTimeout(function(){
						$('#loadC').fadeOut(1);
						$('#newbigbox').html(j.msg);
					},2000);
					$('#newbigbox').animate( {height:"85px"}, 1200, "easeOutQuart");
				},
				error: function(j){
					$('#loadC').fadeOut(1);
					$('#newbigbox').html('<p>error</p>');
				}
			});
			
			
			return false;
			
		};
		
		$('#newssub').replaceWith('<a href="#" id="newssubrep" title="subscribe"><img src="/subscribe_smb.jpg" alt="" /></a>');
		$('#newsres').replaceWith('<a href="#" id="newsresrep" title="reset"><img src="/cancel_smb.jpg" alt="" /></a>');

		$('#subscribe').click(function(){
			$('#newbigbox').animate( {height:"180px"}, 500, "easeOutQuart", function(){
				$('#subscribe').fadeOut(400, function(){
					$('#newsformcont').fadeIn(600);
				});
			});
			return false;
		});

		$('#newssubrep').click(function(){
			$('#newsform').submit();
			var newsformheight = $('#newsform').height();
			$('#newbigbox').animate({height: newsformheight+50}, 200);

			return false;
		});

		$('#newsresrep').click(function(){

			var validator = $("#newsform").validate();
			validator.resetForm();
			$('#news_email').val('');
			$('#news_name').val('');
		
			$('#newsformcont').fadeOut(600, function(){
				$('#newbigbox').animate( {height:"104px"}, 500, "easeInQuart", function(){
					$('#subscribe').fadeIn(600);
				});
			});
			
			return false;
		});

		var validatora = $('#newsform').validate({

			rules: {
				news_name: {
						required: true,
						maxlength: 128
				},
				news_email: {
						required: true,
						maxlength: 128,
						email: true
				}
			},

			messages: {
				news_name: {
						required: "Name required",
						maxlength: "Up to 128 chars maximum"
				},
				news_email: {
						required: "E-mail required",
						maxlength: "Up to 128 chars maximum"
				}
			},
			errorElement: "label",
			invalidHandler: function() {
			
			},
			
			submitHandler: function(form){
				
				$.ajaxNewsSubscribe();

			}
			
		});
		
/*	booking	*/
		jQuery.ajaxNewBooking = function(){
			$('#bookform').fadeOut(1);
			$('#bookbigbox span').fadeOut(1);

			$('#loadD').fadeIn(1);
			
			$.ajax({
				url: '/ajaxit.php',
				data: 'action=new_booking&book_name=' + $('#book_name').val() + '&book_email=' + $('#book_email').val() + '&book_phone=' + $('#book_phone').val(),
				dataType: 'json',
				type: 'post',
				success: function(j){
					setTimeout(function(){
						$('#loadD').fadeOut(1);
						$('#bookbigbox').html(j.msg);
					},2000);
					$('#bookbigbox').animate( {height:"85px"}, 1200, "easeOutQuart");
				},
				error: function(j){
					$('#loadD').fadeOut(1);
					$('#bookbigbox').html('<p>error</p>');
				}
			});
			
			
			return false;
			
		};
		
		$('#booksub').replaceWith('<a href="#" id="booksubrep" title="book now"><img src="/booknow_smb.jpg" alt="" /></a>');
		$('#bookres').replaceWith('<a href="#" id="bookresrep" title="reset"><img src="/cancel_smb.jpg" alt="" /></a>');

		$('#booknow').click(function(){
			$('#bookbigbox').animate( {height:"260px"}, 500, "easeOutQuart", function(){
				$('#booknow').fadeOut(400, function(){
					$('#bookformcont').fadeIn(600);
				});
			});
			return false;
		});

		$('#booksubrep').click(function(){
			$('#bookform').submit();
			var bookformheight = $('#bookform').height();
			$('#bookbigbox').animate({height: bookformheight+80}, 200);

			return false;
		});

		$('#bookresrep').click(function(){

			var validatorb = $("#bookform").validate();
			validatorb.resetForm();
			$('#book_email').val('');
			$('#book_name').val('');
			$('#book_phone').val('');
		
			$('#bookformcont').fadeOut(600, function(){
				$('#bookbigbox').animate( {height:"113px"}, 500, "easeInQuart", function(){
					$('#booknow').fadeIn(600);
				});
			});
			
			return false;
		});

		var validatorc = $('#bookform').validate({

			rules: {
				book_name: {
						required: true,
						maxlength: 128
				},
				book_email: {
						required: true,
						maxlength: 128,
						email: true
				},
				book_phone: {
						required: true,
						maxlength: 30,
						number: true
				}
			},

			messages: {
				book_name: {
						required: "Name required",
						maxlength: "Up to 128 chars maximum"
				},
				book_email: {
						required: "E-mail required",
						maxlength: "Up to 128 chars maximum"
				},
				book_phone: {
						required: "Phone number required",
						maxlength: "Up to 30 chars maximum"
				}
			},
			errorElement: "label",
			invalidHandler: function() {
			
			},
			
			submitHandler: function(form){
				
				$.ajaxNewBooking();

			}
			
		});
		
		
		
	});
