function showNotesBlock() {
	if($(this).attr('checked')) {
		$( '#' + $(this).attr('id') + '_notes_block' ).show();
	} else {
		$( '#' + $(this).attr('id') + '_notes_block' ).hide();
	}
}

$(document).ready(function(){
	// Heard about us show/hide other field
	/*
	$('[name="heard_about_us"]').click(function() {
		if( ($(this).val() == 'Other') && $(this).attr('checked')) {
			$('#heard_about_us_other_field').show();
		} else {
			$('#heard_about_us_other_field').hide();
		}
	});
	*/
	//.click();
	
	// Show/hide
	$('#remove_from_lists').click(showNotesBlock);
	$('#change_of_address').click(showNotesBlock);
	$('#bulk_order').click(showNotesBlock);
	
	$('#followup_notes').maxlength({
    'feedback' : '.followup_notes_left',
    'length' : 30,
    'words' : true
  });
  
  // Init checks, see if things are checked and act accordingly
  
  // Check the heard_about_us field to see if it's set to other
  /*
  if( $('#heard_from_other').attr('checked') ) {
		$('#heard_about_us_other_field').show();
	} else {
		$('#heard_about_us_other_field').hide();
	}
	*/
	
	// Check the #remove_from_lists checkbox
	if( $('#remove_from_lists').attr('checked') ) {
		$('#remove_from_lists_notes_block').show();
	} else {
		$('#remove_from_lists_notes_block').hide();
	}
	
	// Check the #change_of_address checkbox
	if( $('#change_of_address').attr('checked') ) {
		$('#change_of_address_notes_block').show();
	} else {
		$('#change_of_address_notes_block').hide();
	}
	
	// Check the #bulk_order checkbox
	if( $('#bulk_order').attr('checked') ) {
		$('#bulk_order_notes_block').show();
	} else {
		$('#bulk_order_notes_block').hide();
	}
});