
$("#form_meeting").submit(function(evt){
	var sendable = true;
	$("#form_meeting *").each(function(index, el) {
		if ( el.type == 'text' || el.type == 'checkbox' || el.type == 'textarea' || el.type == 'select-one' ) {
			if ($(el).attr('rel') == 'required' && $(el).val() == '') {
				if ($('.error-container').css('display') == 'none');
					$('.error-container').css('display', 'block');
				$('.error').css('display', 'block');
				sendable = false;
				return false;
			}
			if ($(el).attr('rel') == 'required_email') {
				if ( !$(el).val().match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})$/) || $(el).val() == '' ) {
					if ($('.error-container').css('display') == 'none');
						$('.error-container').css('display', 'block');
					$('.error-mail').css('display', 'block');
					sendable = false;
					return false;
				}
			}
			if ($(el).attr('rel') == 'required_privacy') {
				if ( !el.checked ) {
					if ($('.error-container').css('display') == 'none');
						$('.error-container').css('display', 'block');
					$('.error-privacy').css('display', 'block');
					sendable = false;
					return false;
				}
			}
		}
	});
	return sendable;
});