// JavaScript Document

/*	Load Events for specified Month
/*----------------------------------------------------------*/
function viewMonth(m,y){
	$("#loader").fadeIn();
	$("#events").fadeOut("fast");
	$("#events").load("/includes/ajax/ajax_events.php", {month:m, year:y}, function(){
		$("#events").fadeIn("slow");
		$("#loader").fadeOut();
	});
}


/*	Show/Hide Drop-Down Menu
/*----------------------------------------------------------*/
function toggleMenu(){
	$("#categories ul").toggle();
}


/*	Update Menu Selection
/*----------------------------------------------------------*/
function updateMenu(value){
	if(value != ""){
		$("#categories li a.choice").html(value);
	}else{
		$("#categories li a.choice").html("All Events");
	}
	toggleMenu();
	$("#loader").fadeIn();
	$("#events").fadeOut("fast");
	$("#events").load("/includes/ajax/ajax_events.php", {ctg:value}, function(){
		$("#events").fadeIn("slow");
		$("#loader").fadeOut();
	});
}


/*	RSVP Form Submit
/*----------------------------------------------------------*/
function doRSVP(){
	$('#form_response').fadeOut('fast');
	var options = {target:'#TB_ajaxContent', success:function(){
		$('#form_response').fadeIn();
		$('#TB_ajaxContent').scrollTo(0);
	}};
	$("#rsvpForm").ajaxForm();
	$("#rsvpForm").ajaxSubmit(options);
}
