CoolLTCI = window.CoolLTCI || {};

CoolLTCI.Form = function() {
	function _init_form() {
		$('#ltciquote_marital_status').change(function() {
			var selected = $('#ltciquote_marital_status option:selected:first')
			if (selected[0].value == 'married') {
				$('#ltciquote_spouse_birthday_wrapper').show();
				$('#ltciquote_spouse_birthday').addClass('required');
			} else {
				$('#ltciquote_spouse_birthday_wrapper').hide();
				$('#ltciquote_spouse_birthday').removeClass('required');
			}
		});
	}
	
	return {
		init: function() {
			_init_form();
		}
	};
}();

$(document).ready(function() {
	CoolLTCI.Form.init();
});