$(document).ready(function() {
	$("#booking-enquiry").height($(window).height());
	$("#booking-form").hide();
	$(".nav-button").hover(
		function() {
			$(this).css("background-position", "0 -45px");
		}, function() {
			$(this).css("background-position", "0 0px");
	});

	
	$(".sub-nav-button").hover(
		function() {
			$(this).css("background-position", "0 -28px");
		}, function() {
			$(this).css("background-position", "0 0px");
	});
	
	$(".read-more-button").each(function(i) {
		$(this).toggle(function() {
			$(".read-more").eq(i).slideDown(500);
			$(".read-more-button").eq(i).text("...read less");
		},function() {
			$(".read-more").eq(i).slideUp(500);
			$(".read-more-button").eq(i).text("Read more...");
		});
	});
		
	
	$("#map-img").hover(
		function() {
			$(this).attr("src", "images/map_large_col.gif");
		}, function() {
			$(this).attr("src", "images/map_large_bw.gif");
		}
	);
	
	var saved_height = $(".two-col-readmore").height();
	
	$(".two-col-readmore-button").toggle(function() {
			var h = $(".column").height();
			$(".two-col-readmore").animate({height: h}, 500);
			$(".two-col-readmore-button").text("...read less");
		}, function() {
			
			$(".two-col-readmore").animate({height: saved_height}, 500);
			$(".two-col-readmore-button").text("Read more...");
		}
		
	);
	
	/*$("#free-dessert-button").toggle(function() {
		$("#free-dessert").slideDown(500);
		$(this).text("Hide form...");
	}, function() {
		$("#free-dessert").slideUp(500);
		$(this).text("Click here...");
	});*/
	
	
	$("#booking-enquiry-button").toggle(function() {
		$("#booking-enquiry").animate({width: "220px"}, 1000);
		$("#booking-form").fadeIn(1000);
		
	}, function() {
		$("#booking-form").fadeOut(500);
		$("#booking-enquiry").animate({width: "30px"}, 1000);
	});
	
	$("#nav-book, .book-button").click(function() {
		$(this).stop();
		$("#booking-enquiry-button").click();
	});
	
	
	$("#enquiry-form-button").toggle(function() {
		$("#enquiry-form").slideDown(500);
		$(this).text("Hide form...");
	}, function() {
		$("#enquiry-form").slideUp(500);
		$(this).text("Show form...");
	});
	
	$('.show-booking-form').toggle(function() {
		$("#booking-enquiry").animate({width: "220px"}, 1000);
		$("#booking-form").fadeIn(1000);
		
	}, function() {
		$("#booking-form").fadeOut(500);
		$("#booking-enquiry").animate({width: "30px"}, 1000);
	});
	
});

