 
(function($){
	
	$.ajaxLite = function(url, onResult, options){

		if (!options){
			options = {};
		}

		options.dataType = 'json';
		options.url = url;
		options.success = function(data){
			if (data == undefined || data.js == undefined){
				result = null;
			} else {
				result = data.js;
			}

			if (data == undefined || data.text == undefined){
				error = "Нет входных данных";
			} else {
				error = data.text;
			}
			return onResult(result, error);
		};

		options.error = function(obj, errorText){
			return onResult({}, errorText);
		}
		return $.ajax(options);
	}
})(jQuery);
