/*
	Sign up page
*/

$(document).ready(function() {
	$("#submitVolunteerDetails").click(function() {
        var who=$('#who').val();
		var address=$('#address').val();
		var phone=$('#phone').val();
		var mobilePhone=$('#mobilePhone').val();
		var email=$('#email').val();
		
		var anytime=$('#anytime').attr('checked');
		var friday=$('#friday').attr('checked');
		var saturday=$('#saturday').attr('checked');
		var sunday=$('#sunday').attr('checked');
		
		var morning=$('#morning').attr('checked');
		var afternoon=$('#afternoon').attr('checked');
		var evening=$('#evening').attr('checked');
		
		 //SEND DATA
		$.ajax({
			type: 'post',
			url: '../common/sendVolunteerInformation.php',
			data: ({who:who, address:address, phone:phone, mobilePhone:mobilePhone, email:email, morning:morning,afternoon:afternoon,evening:evening,anytime:anytime,friday:friday,saturday:saturday,sunday:sunday}),
			success: function(msg)
			{
				//alert(msg);
				//Output if successful
				$('#volunteerForm').html('<p>Your information has been sent to the Slice of Shoreview. Thanks!</p>');
			}
		});
        return false;
    });
	

});
