jQuery(document).ready(function(){
								
$.fn.clearForm = function() {
  return this.each(function() {
 var type = this.type, tag = this.tagName.toLowerCase();
 if (tag == 'form')
   return $(':input',this).clearForm();
 if (type == 'text' || type == 'password' || tag == 'textarea')
   this.value = '';
 else if (type == 'checkbox' || type == 'radio')
   this.checked = false;
 else if (tag == 'select')
   this.selectedIndex = -1;
  });
};

$('#submit').click(function(){
	
		var action = 'form.php';//$(this).attr('action');
		
		$('#submit')
			.before('<img src="/published/SC/html/scripts/js/img/ajax-loader.gif" class="loader" />')
			.attr('disabled','disabled');
		
		$.post(action, { 
			name: $('#name').val(),
			phone: $('#phone').val(),
			email: $('#email').val(),
			//org: $('#org').val(),
			//adress: $('#adress').val(),
			//web: $('#web').val(),
			//message: $('#message').val()
		},
			function(data){
				$('#contactform #submit').attr('disabled','');
				$('.response').remove();
				$('#contactform').before('<span class="response">'+data+'</span>');
				$('.response').slideDown();
				$('#contactform img.loader').fadeOut(500,function(){$(this).remove()});
				if(data=='Send !') $('#contactform').slideUp();
			}
		);
		$('#contactform').clearForm();
		
		return false;
	
	});
	
});


