/**
 * Select Option Object
 *
 * @version		0.1
 *
 * @license		BSD
 * @author		Marco Neumann <webcoder [at] binware [dot] org>
 * @copyright	Copyright (c) 2008, Marco Neumann
 */

var selOption = new Class({
	/**
	 * @param {String} text Text of the 'option' element
	 * @param {String} value Value of the 'option' element
	 * @param {Boolean} selected Optional to specify if selected
	 */
	options: {
		value: 0,
		text: '',
		selected: false
	},
	
	/**
	 * Returns an Element Object for a 'option' element
	 * 
	 */
	initialize: function(options) {
		this.setOptions(options);
		this.el = new Element('option', {
			'value': this.options.value,
			'selected': this.options.selected
		});
		this.el.setText(this.options.text);
		return this.el;
	}
});

selOption.implement(new Options);
