	$(document).ready(function() { 
		$("#navigation ul li span a").hover(
			function () {
				$(this).parent().parent('li').addClass('hover');
			}, 
			function () {
				$(this).parent().parent('li').removeClass('hover');
			}
		);

		$('a[rel="external"]').click(function(){
		  this.target = "_blank";
		});			
		
		$('#promo-fade,#promo-beta-fade').cycle({ 
			delay:  1500, 
			speed:  2000
		}); 	
				
		$('.submitimage').click(function() {
		  $('.submitimage').hide();
		  $('#loading-msg').show();
		});		

	});
	
	function resize(){
		var content_height = $("#content").height();
		var content_alpha_height = $("#content-alpha").height();
		
		if (content_height > content_alpha_height)
		{
			$("#content-alpha .section").height(content_height - 20);
		}	
	}
	
	var date_round = 1;
	
	function search_date(date)
	{
		if (date_round == 2)
		{
			$("#DateEndDate").val(date);
			$("#reservations-form-small form").submit();
		}
		else
		{
			date_round = 2;
			
			$("#DateStartDate").val(date);

		}
	}