
$(function(){
	$("#reservation_dialog").jqm({
		modal: false, 
		overlay: 60,
		//toTop:true, 
		trigger: 'a#Super,a#Sightsee,a#SnorkelAM,a#SnorkelPM,a#Dinner',
		 onShow: function(h,t) {
				/* callback executed when a trigger click. Show notice */
					//var tour = $(h.t).attr('class').split(' ').slice(1,2);
					var tour = $(h.t).attr('id');
					
					if(tour=='Super'){
						$('#header').attr('class','blue').html(SuperName);
						//var overlay = 'holoOverlay';
						$('#Tour').val(1);
						showTourDetails(1);
					}
					else if(tour=='Sightsee'){
						$('#header').attr('class','blue').html(SightseeName);
						//var overlay = 'holoOverlay';
						$('#Tour').val(2);
						showTourDetails(2);
					}
					else if(tour=='SnorkelAM'){
						$('#header').attr('class','green').html(SnorkelAMName);
						//var overlay = 'leliaOverlay';
						$('#Tour').val(3);
						showTourDetails(3);
					}
					else if(tour=='SnorkelPM'){
						$('#header').attr('class','green').html(SnorkelPMName);
						//var overlay = 'leliaOverlay';
						$('#Tour').val(4);
						showTourDetails(4);
					}
					else if(tour=='Dinner'){
						$('#header').attr('class','green').html(DinnerName);
						//var overlay = 'leliaOverlay';
						$('#Tour').val(6);
						showTourDetails(6);
					}
					
					h.w.fadeIn("slow",function() {
						if(h.o){
						//$(h.o).attr('class',overlay)
						h.o.show();
						}
					});
				},
		onHide: function(h) {
				/* callback executed on window hide. Hide notice, overlay. */
				h.w.fadeOut("slow",function() { if(h.o) h.o.remove(); });
				} 
	});
	$('.jqmClose').blur();
});
