jQuery(document).ready(function(){
	
	$('#mod3-contactform').submit(function(){
	
		var action = $(this).attr('action');
		
		$("#mod3-contact-message").slideUp(750,function() {
		$('#mod3-contact-message').hide();
		
 		$('#submit')
			.after('<img src="images/ajax-loader.gif" class="loader" />')
		
		$.post(action, { 
			name: $('#name').val(),
			company: $('#company').val(),
			email: $('#email').val(),
			phone: $('#phone').val(),
			referral: $('#referral').val(),
			comments: $('#comments').val(),
			verify: $('#verify').val()
		},
			function(data){
				document.getElementById('mod3-contact-message').innerHTML = data;
				$('#mod3-contact-message').slideDown('slow');
				$('#mod3-contactform img.loader').fadeOut('slow',function(){$(this).remove()});
				if(data.match('success') != null) $('#mod3-contactform').slideUp('slow');
				
			}
		);
		
		});
		
		return false; 
	
	});
	
});

jQuery(document).ready(function(){
	
	$('#contact-page-form').submit(function(){
	
		var action = $(this).attr('action');
		
		$("#contact-page-message").slideUp(750,function() {
		$('#contact-page-message').hide();
		
 		$('#submit')
			.after('<img src="images/ajax-loader.gif" class="loader" />')
		
		$.post(action, { 
			name: $('#name').val(),
			company: $('#company').val(),
			email: $('#email').val(),
			phone: $('#phone').val(),
			referral: $('#referral').val(),
			comments: $('#comments').val(),
			verify: $('#verify').val()
		},
			function(data){
				document.getElementById('contact-page-form').innerHTML = data;
				$('#contact-page-message').slideDown('slow');
				$('#contact-page img.loader').fadeOut('slow',function(){$(this).remove()});
				if(data.match('success') != null) $('#contact-page-form').slideUp('slow');
				
			}
		);
		
		});
		
		return false; 
	
	});
	
});
