(function(a){var b={errorMessage:"An error has occurred. Please try again.",errorFunction:false,successMessage:false,successFunction:false,completeFunction:false,messagebox:false,messageboxId:"message",messageboxOptions:{},ajaxOptions:{}};a.atjax=function(e,d){if(d==undefined){d={}}var f=a.extend({},b,d);if(f.messagebox===false){f.messagebox=a("#"+f.messageboxId).messagebox(f.messageboxOptions)}var c={error:function(i,g,h){if(f.errorMessage){f.messagebox.messagebox("show",f.errorMessage)}if(f.errorFunction){f.errorFunction(i,g)}},success:function(i,h,j){var g=(typeof i.message!="undefined");if(i.success){if(!g&&f.successMessage){f.messagebox.messagebox("show",f.successMessage,true)}if(f.successFunction){f.successFunction(i)}}else{if(!g&&f.errorMessage){f.messagebox.messagebox("show",f.errorMessage)}if(f.errorFunction){f.errorFunction(j,h)}}if(g){f.messagebox.messagebox("show",i.message,i.success)}},complete:function(h,g){if(f.completeFunction){f.completeFunction(h,g)}},type:"GET",dataType:"json",url:e};a.extend(c,f.ajaxOptions);a.ajax(c)}})(jQuery);