(function($) { $.fn.ajaxPost = function(callback, options) { var default_options = { data_type: 'html', before_send: function() {}, error_handler: function() {} }; options = $.extend(default_options, options) return this.each(function(){ if(this.tagName.toLowerCase() != 'form') return; var f = $(this); var submit = f.find('button[@type="submit"], input[@type="submit"]') f.submit(function(e) { e.pr