/**
 * @class postJSON
 * Send an xhr request to the server and retrieve the value in a JSON format
 *
 * @param String sUrl : The url where to recover the values
 * @param Object oData : An array of data to send to the server
 * @param Object oCallBack : A function to send the result, the second parameter will be the success of the request
 */
;(function($) {$.postJSON = function (sUrl, oData, oCallBack, oCallbackParameters) {
	if (typeof (oData) === 'function') {
		oCallBack = oData;
		oData = {};
	}

	$.ajax({'url': sUrl, 'type': 'post', 'processData': true, 'data': oData, 'dataType': 'json', 'timeout': 30000,
		success: function (oData) {oCallBack (oData, true, oCallbackParameters);},
		error: function (oData) {oCallBack (oData, false, oCallbackParameters)}});
}})(jQuery);