v1.2, adds fail function option and updated ajax call to use new jquery methods (always, done, fail etc)