jQuery.fn.infSelectDuplo = function(options)
{
	var jqueryObj = this;

	var defaults = {
		selectO :null,
		selectD :null,
		url :null
	};

	var opts = jQuery.extend(defaults, options);

	function _initialize()
	{
		jQuery('#' + opts.selectO).change( function()
		{
			jQuery.getJSON(opts.url, {
				idUf :this.value
			}, function(data)
			{
				clear();

				jQuery.each(data, function(i, item)
				{
					jQuery('#' + opts.selectD).get(0).options[i + 1] = new Option(item[1], item[0]);
				});
			});
		});
	}

	function clear()
	{
		jQuery('#' + opts.selectD).empty();

		jQuery('#' + opts.selectD).get(0).options[0] = new Option('--- Selecione ---', '');
	}

	_initialize();

	return this;
};
