$(document).ready(function() {
	$('#spr_application_type_participant').click(function(){
		$('#spr_ementor').hide();
		$('#spr_participant').show();
		$('#spr_application_status input').attr("name","participant");
	});
	
	$('#spr_application_type_ementor').click(function(){
		$('#spr_participant').hide();
		$('#spr_ementor').show();
		$('#spr_application_status input').attr("name","ementor");
	});

	// check if there's an anchor in the URL matching #ementor
	// if so, we'll want to display that choice automatically
	var url = document.location.toString();
	if (url.match('#ementor')) {
		$('#spr_application_type_ementor').click();
	} else {
		// default: participant
		$('#spr_application_type_participant').click();
	}
});
