(function($) { // hide the namespace
	$.fn.verifica = function(settings) {
		opts = $.extend({}, $.fn.appuntamenti.defaults, settings);
		
		$(this).submit(function(){
			var errori=0;
			$(this).find(':input').not(':image,:submit').each(function(){
				if($(this).hasClass('richiesto')){
					if($(this).is(':text')){
						if(typeof $(this).attr('value')=='undefined' || $(this).attr('value')==''){
							alert('Devi inserire un valore di '+$(this).attr('name'));
							
							$(this).focus();
							
							errori=1;
							return false;
						}
					}else if($(this).is('textarea')){
					}
				}
			});

			if (errori>0)		
				return false;
		});
	}
	
	$.fn.verifica.defaults = {};
})(jQuery);