var SinonimosOrgConnector = ObjClass.extend({
	callbackFunction: null,
	init: function(conf)
	{
		this.callbackFunction = conf.callbackFunction;
	},
	getQuery: function(name)
	{
			return 'use "http://www.dominioslibres.com.ar/sinonimosorg.xml?11" as sinonimos;' + 
				'select * from sinonimos where palabra="' + name + '"';
	 },
	doRequest:function(palabra)
	{
		console.log("starting ajax");
		var $this = this;
		$.ajax({
			url:"http://query.yahooapis.com/v1/public/yql",
			dataType: "jsonp",
			data:{q: $this.getQuery(palabra), format: "json"},
			type: "get",
			success: function(data)
			{
				console.log(data.query.results.result);
				$this.callbackFunction(data.query.results.result);
			},
			timeout: Settings.ajaxTimeout,
			error: function()
			{
				$this.callbackFunction({"error":1});
			}
		});
	}
});
