
jQuery(function() {
		// show a simple loading indicator
		var loader = jQuery('<div id="loader"><img src="/img/ajax-loader.gif" width="16" height="16" alt="ajax Loader"> Loading</div>')
			.css({position: "absolute", top: "10em", left: "10em"})
			.appendTo("#col3")
			.hide();
		jQuery().ajaxStart(function() {
			loader.show();
		}).ajaxStop(function() {
			loader.hide();
		}).ajaxError(function(a, b, e) {
			throw e;
		});
		
		jQuery("#customForm").validate({
			
			
			rules: {
			fullname: "required",
			address1: "required",
			hhpropnumber: "required",
			email: {
				required: true,
				email: true
			}

},
		messages: {
			fullname: "*Required",
			hhpropnumber: "*Required",
			address1: "*Required",
			email: "*Valid email required"
		},
		
		
		submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
					target: "#col3"
				});
			}
			
		});
		
	
	});


/*
$(document).ready(function(){
// validate signup form on keyup and submit

var loader = jQuery('<div id="loader"><img src="images/loading.gif" alt="loading..." /></div>')
			.css({position: "relative", top: "1em", left: "25em"})
			.appendTo("body")
			.hide();
		jQuery().ajaxStart(function() {
			loader.show();
		}).ajaxStop(function() {
			loader.hide();
		}).ajaxError(function(a, b, e) {
			throw e;
		});




	$("#customForm").validate({
							  
			submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
					target: "#result"
				});
			},

		rules: {
			fullname: "required",
			title: "required",
			company: "required",
			email: {
				required: true,
				email: true
			}

},
		messages: {
			fullname: "*Required",
			title: "*Required",
			company: "*Required",
			email: "*Valid email required"
		}
	});
});*/