$(document).ready(function() {
	
	//-----> STEP 1
	

	
	//-----> STEP 2
	
	$('input[name="omd_phone"]:checked').parent().addClass('omd_checkbox_checked');
	$('.omd_checkbox').click(function() {
		$('.omd_checkbox_checked').removeClass('omd_checkbox_checked');
		$(this).addClass('omd_checkbox_checked');
		$(this).find('input').attr('checked',true);
	});
	
	//-----> STEP 3
	
	if ($('#omd_field_about').val()!='other') {
		$('#omd_field_about_other').hide();
	}
	
	$('#omd_field_about').change(function() {
		if ($(this).val()=='other') {
			$('#omd_field_about_other').show();
		}
		else {
			$('#omd_field_about_other').hide();
		}
	});
	
	if ($('input[name="omd_field_partner"]:checked').val()=='none') {
		$('#omd_field_member_number_container').hide();
	}
	
	$('input[name="omd_field_partner"]').click(function() {
		var val = $(this).val();
		if (val == "none") {
			$('#omd_field_member_number_container').hide();
		}
		else {
			$('#omd_field_member_number_container').show();
		}
	});
	
	$('.omd_box_content').hide();
	
	$('.omd_open_close').click(function() {
		if ($(this).hasClass('omd_close')) {
			$(this).next().show();
			$(this).removeClass('omd_close').addClass('omd_open');
		}
		else {
			$(this).next().hide();
			$(this).removeClass('omd_open').addClass('omd_close');
		}
	});
	
})