
$(document).ready(function(){
						   
	$("#table_booking").hide();
	$("#hotel_form").hide();
	
	
	$("#ftype").change(funcName);

		function funcName() {
			foo = $("#ftype").val();
			if(foo == 'hotel enquiry'){
				$("#hotel_form").show();
				$("#table_booking").hide();
			} 
		
			if(foo == 'table enquiry'){
				$("#table_booking").show();
				$("#hotel_form").hide();
			}
		}

						   
	
						   
		  var fullheight=$('#text').height();
		  /*if(typeof(fp)!="undefined"){
			$('#text').animate({
				height: 0
			},500, 'linear',function(){ 
				$('#showhide').show(); 
				$('#text .col').hide();
			});
			
			$("#showhide").html("show text");
		  } else {
			$('#text').css({
				height: 0
			});
			$('#text .col').hide();			
			$("#showhide").html("show text");
		
		}*/
		   
		var images = $('#images img');
		if(images.length>0){
			var c=0; var l=images.length-1;
			images.hide().eq(c).show();
			$('#images').everyTime(5000, function(){
				if(c==l) c=0; else c++; 
				images.fadeOut().eq(c).fadeIn();
			});
		}
		
		/*if($('.menudownloads').length>0) {
			$('.menudownloads').corner("5px");
		}
		
		if($('.formbox').length>0) {
			$('.formbox').corner("5px");
		}*/
		
		//popup map hide
		$('div map area.close').click(function(){
		$(this).parent().parent().fadeOut();
		return false;
		});
		
		//hide/show text
		$('#showhide').click(function(){
		$(this).hide();
		current = $(this).html();

		if (current == "show text") {
			$('#showhide').css('background-position', 'left bottom');
			$('#text').animate({
				height: fullheight		
			},500, 'linear',function(){ 
				$('#showhide').show(); 
				$('#text .col').show();
			});
			
			$(this).html("hide text");

			
		} else {
			$('#showhide').css('background-position', 'left top');
			$('#text').animate({
				height: 0
			},500, 'linear',function(){ 
				$('#showhide').show(); 
				$('#text .col').hide();
			});
			
			$(this).html("show text");

		}
		return false;
	});
		
		//baf
		if($('#bafC').length){
			$('#bafC').baf({
				desc: "Submit your email above to receive our latest news and be entered <br/>into our mailing list."
			});
		}

		//tipsy
		$('a,img,h1,h2,h3,input,span,websir').each(function(){
			if($(this).attr('title').length>0){
				$(this).tipsy();
			}
		});		
	
	$(window).bind("load", function(){	
	});
	
	

	

	
});
