How to check if a function is already defined ?
if ([function] != undefined) { [do stuff] }
You can also use jQuery's isFunction() to check it.