function checkForm() {
	// clear validation messages
	$('#validation_message').html('<p>In order to complete your order, the following problems must be corrected:</p>');
	
	// validation
	var errors = new Array();
	
	if ( ! $("input[@name=full_season_vegetables_shares]").val()
		&& ! $("input[@name=main_season_vegetables_shares]").val()
		&& ! $("input[@name=fruit_plus_shares]").val()
		&& ! $("input[@name=flower_shares]").val()
		&& ! $("input[@name=egg_shares]").val() ) { errors.push('Please select the type of shares you wish to order'); }

	console.log('delivery_type: ' + $("input[@name=delivery_type]:checked").val());
	if ( ! $("input[@name=delivery_type]:checked").val()
		&& ! $("input[@name=pickup_location]:checked").val()
		&& ! $("input[@name=full_season_distribution_location]:checked").val() ) { errors.push('Please select either a delivery option or pickup / distribution location(s)'); }

	if ( ! $("input[@name=payment_type]:checked").val() ) { errors.push('Please select a payment option'); }

	if ( ! $("input[@name=customer_name]").val() ) { errors.push('Please enter your name'); }
	if ( ! $("input[@name=customer_email]").val() ) { errors.push('Please enter your email address'); }
	if ( ! $("input[@name=customer_phone]").val() ) { errors.push('Please enter your phone number'); }
	if ( ! $("input[@name=customer_street]").val() ) { errors.push('Please enter your street address'); }
	if ( ! $("input[@name=customer_city]").val() ) { errors.push('Please enter your city'); }
	if ( ! $("input[@name=customer_state]").val() ) { errors.push('Please enter your state'); }
	if ( ! $("input[@name=customer_zip]").val() ) { errors.push('Please enter your zip code'); }

	if ( errors.length > 0 ) {
		// write out errors
		$('#validation_message').append('<p><ul>');
		for (var error in errors) {
			$('#validation_message').append('<li>'+errors[error]+'</li>');
		}
		$('#validation_message').append('</ul></p>');

		// and show them
		$('#validation_message').show(0);
		$('html,body').animate({scrollTop: 0}, 1000);
		return false;
	} else {
		// submit form
		document.csa_form.submit();
		return true;
	}
}

$(document).ready( function() {
	// hide validation message
	$('#validation_message').hide(0);
});