(function($){
	$.fn.serializeObject = function()
	{
	    var o = {};
	    var a = this.serializeArray();
	    $.each(a, function() {
	        if (o.hasOwnProperty(this.name)) {
	        	var sType = Object.prototype.toString.call( o[this.name] );
	            if (  sType !== '[object Array]') {
	                o[this.name] = [o[this.name]];
	            }
	            o[this.name].push(this.value || '');
	        } else {
	            o[this.name] = this.value || '';
	        }
	    });
	    return o;
	};
})(jQuery);