
$(document).ready(function(){	
	
	selectorVal = $('#membershipTypeSelector').val();
	if(selectorVal == 'joint student' || selectorVal == 'joint regular') {
		$('#secondaryJointMemberDisplay').show();
		$('#noteToJointMembers').show();
		
	}
	if(selectorVal == 'joint student' || selectorVal == 'student') {
		$('#noteToStudents').show();
	}
	
});

/* functions 
---------------------------------------------- */

function processing(){
	$('.button').hide();
	$('.spinner, .spinnerText').show();
}

function controlJointMemberDisplay(){
	selectorVal = $('#membershipTypeSelector').val();
	if(selectorVal == 'joint student' || selectorVal == 'joint regular') {
		$('#secondaryJointMemberDisplay').show();
		$('#noteToJointMembers').show();
	} else {
		$('#secondaryJointMemberDisplay').hide();
		$('#noteToJointMembers').hide();
	}
	if(selectorVal == 'joint student' || selectorVal == 'student') {
		$('#noteToStudents').show();
	} else {
		$('#noteToStudents').hide();
	}
}
function confirmSendVoteReminderEmail(redirectHere) {
		dialogue = confirm('Are you sure you want to send the "Remember to Vote" email to all currently active HBES members?');
		if(dialogue == true){
			window.location.href = redirectHere;
		} else if(dialogue == false){
			alert ("Cancelled. No emails were sent."); 
		}
}
