jQuery(document).ready(function(){
	
	jQuery('form.webcookbook').submit(function() {
		var element = $(this);
		var Id = element.attr("id");
		jQuery(Id+' li.buttons button').fadeOut('normal', function() {});
		var formInput = $(this).serialize();
		jQuery.post($(this).attr('action'),formInput, function(data){
			jQuery('form#'+Id).slideUp("fast", function() {
				$(this).before('<p class="thanks">The recipe has been added to your Cookbook.</p>');
			});
		});
		
		return false;
	});
	
});

