var AjaxPost = {
	call: function(method, data, success, error){
		$.post('/ajax/?method=post.' + method, data, success);	//, error
	},
	
	add: function(data, success, error){
		data = $.extend({
			body: '',
			draft: 0,
			postTo: '',
			timezone_offset: new Date().getTimezoneOffset(),
			repeat_interval: 0,
			repeat_times: 0
		}, data);
		
		this.call('add', data, success, error);
	},
	
	shrink: function(text, success, error) {
		this.call('shrink', { text: text }, success, error);
	}
};
