extending JavaScript.JQuery.ajax to support multiple result types