You're looking for JQuery 'one-shot' event handlers.
http://api.jquery.com/one/
function first() {
$('#a').animate();
};
function next() {
$('#b').animate();
};
$('#button').one('click', function() {
first();
$('#button').click(next);
};
This runs the first function the first time the click event is fired, and then re-binds the click event to the next function for all subsequent clicks.
EDIT: Alternately, if you have two and want them to alternate, you can use Vishal's suggestion of toggle: http://api.jquery.com/toggle-event/
EDIT 2:
Another alternative is to keep a counter in the event handler, like so:
function fireA() { /*...*/ }
function fireB() { /*...*/ }
function fireC() { /*...*/ }
$('#button').click(function() {
var events = [fireA, fireB, fireC];
//declare counter
if(!this.counter) { this.counter = 0; }
events[this.counter]();
this.counter = (this.counter + 1) % 3;
});