if ( !MYPOST_ERROR_CALLBACK )
{
	var MYPOST_ERROR_CALLBACK = function ( XMLHttpRequest, textStatus, errorThrown )
	{
		alert( "Ocorreu um erro!" );
	};
}

$.myPost = function(paramUrl, paramData, callback, onError)
{
	$.ajax({
		timeout: 60000,
		dataType: 'json',
		contentType: 'application/x-www-form-urlencoded; charset=UTF-8',  
		type: paramData ? 'POST' : 'GET',
		url: paramUrl,
		cache: false,
		data: paramData || {},
		success: callback,
		error: onError ? onError : MYPOST_ERROR_CALLBACK
	});
};
