/**
 * Javascript: Scripts
 * 
 * Rapid Javascript development.
 * 
 * @package WP Framework
 * @subpackage JS
 */

;(function($){
	$(document).ready(function($){
		// code...
	});
})(jQuery);



function test(formdata) {

	var name = $('input#contact-name').val();
	var email = $('input#contact-email').val();
	var telephone = $('input#contact-telephone').val();	
	
	$.post('/mailchimp-placeholder', { contactname: name, email: email, telephone: telephone}, function(data) {
		$('#contact-info').html(data).fadeOut(5000);
		
		$('form').clearForm();
		
	});
	
	
		
	return false;
}

$.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;
  });
};



