$(document).ready(function() {
	// Show the extra family question if the 'yes' radio button (for the family question) was clicked
	$('li.family input').click(function() {
		($(this).val() == 'Yes') ? $('li.familyExtra').removeClass('hideMe').addClass('showMe') : $('li.familyExtra').removeClass('showMe').addClass('hideMe');
	});
	// Show the extra dui question if the 'yes' radio button (for the dui question) was clicked
	$('li.dui input').click(function() {
		($(this).val() == 'Yes') ? $('li.duiExtra').removeClass('hideMe').addClass('showMe') : $('li.duiExtra').removeClass('showMe').addClass('hideMe');
	});
	// Show the full name field if "Who is this policy for?" was answered with anything other than "Myself"
	$('.policyFor select').change(function() {
		($(this).val() != 'Self') ? $('li.fullName').removeClass('hideMe').addClass('showMe') : $('li.fullName').removeClass('showMe').addClass('hideMe');
		// Also add a top margin to the list of longer questions if the full name field is showing
		($(this).val() != 'Self') ? $('ol.questions').addClass('margintop') : $('ol.questions').removeClass('margintop');
		// Also show the "Applicant" labels next to the First Name and Last Name labels
		($(this).val() != 'Self') ? $('li.firstName span').removeClass('hideMe').addClass('showMeInline') : $('li.firstName span').removeClass('showMeInline').addClass('hideMe');
		($(this).val() != 'Self') ? $('li.lastName span').removeClass('hideMe').addClass('showMeInline') : $('li.lastName span').removeClass('showMeInline').addClass('hideMe');
	});
});