function clipboardOperations(url) {
	this.ajaxPending = false;
	this.url = url;
	this.falseMsg = 'blad';
	this.result = false;
	
	this.getContent = function(itaka_offers_array) {
		params = 'filler=null';
		for(var i in itaka_offers_array)
		{
			itaka_offer = itaka_offers_array[i];
			params += '&offers[' + i + '][from]='+itaka_offer.from+
					 '&offers[' + i + '][room]='+itaka_offer.room+
					 '&offers[' + i + '][food]='+itaka_offer.food+
					 '&offers[' + i + '][event_begin]='+itaka_offer.event_begin+
					 '&offers[' + i + '][event_duration]='+itaka_offer.event_duration+
					 '&offers[' + i + '][hotel_id]='+itaka_offer.hotel_id;
		}
		
		if(params.length)
			result = this.ajaxRequest(params, 'getClipboardContents');
		else
			result = false;
		
		if(result)
			return result;
		else
			return false;
	};
	
	this.ajaxRequest = function(params, action_name) {
		var ajax_response = '';
		$.ajax({
			type: 'POST',
			url: this.url+'?work='+action_name,
			data: params,
			dataType: 'json',
			timeout:100000,
			async: true,
			beforeSend: function(){ null; },
			success: function(result){
				ajax_response = result;
				$.fillClipboard(ajax_response);
			}

	 	});
	 	this.ajaxPending = false; 
	 	return ajax_response;  
	};
}