// JavaScript Document
function show_hotel() {
	//$('div#admissions_datepicker').datepicker("destroy");
	//makeInvisible('bookings_admissions');
	///makeVisible('bookings_hotels');
	//document.getElementById('admission_type').value = 'hotel';
	//initHotelDatepicker();
	// todo: init datepicker for hotel here
	// todo: do we want to reset any selections here ?
}

function show_admission() {
	//$('div#hotel_datepicker').datepicker("destroy");
	//makeInvisible('bookings_hotels');
	//makeVisible('bookings_admissions');
	//document.getElementById('admission_type').value = 'normal';
	initAdmissionsDatepicker();
	$('input#admissions_date_selected')[0].value = '';
	// todo: init datepicker for admissions 
	// todo: do we want to reset any selections here ?
} 


function show_events_calendar() {
	//makeInvisible('bookings_events_listings');
	//makeVisible('bookings_events_calendar');
	//document.getElementById('link_events_listings').className = '';
	//document.getElementById('link_events_calendar').className = 'active';
	// Initialise Calendar 
	//initCalendar();
}

function show_events_listings() {
	//$('#bookings_events_calendar').fullCalendar('destroy');
	//makeInvisible('bookings_events_calendar');
	//makeVisible('bookings_events_listings');	
	//document.getElementById('link_events_listings').className = 'active';
	//document.getElementById('link_events_calendar').className = '';
	//sortEvents();
	//$(".events_link").colorbox(); // Each link that is in the events listings will now popup the appropriate page with information
}


function sortEvents() {
	
	//$("#events").tablesorter({ sortList:[[0,0]] });

	//$("#events tr:even").addClass("one");
	
	//$("#events tr:odd").addClass("two");
	
}

function rm_event(identifier) {
	//alert(identifier);
	$("#"+identifier).remove();
	$("."+identifier).remove();
	$('#submitall2').hide();
	// Takes the event_ticket_id and searches for a hidden input with id equal to this. If one or more are found it will destroy them 
	// Then searches for an li with an id equal to 'event_ticket_txt_' + id. If one or more are found it will destroy them
	// ... this removes the human readable format of the list i.e 2 x adult going to blah blah
	// can we do this with a jquery fade out?
}

function empty_cart() {
	$('.events_cart').empty();	
	$('#submitall2').hide();
	$('#events_cart_hidden_inputs').empty();
}
