Write like this:
function func_name(){
//do stuff here
}
//call this later like this:
$('.accordion a').click(func_name);
//Or call like this:
$('.accordion a').click(function(){
func_name(); //parenthesis required here
});
Also, you may look at another post for stepping up a little more.