/*var DropDownSelectionOption = Class.create({
	initialize: function(optionElement, emulatedElement, optionContainer, selectBox) {
		this.optionElement = optionElement;
		this.emulatedElement = emulatedElement;
		this.optionContainer = optionContainer;
		this.selectBox = selectBox;
	},
	

	changeOptionOnClick: function(event) {
		this.optionContainer.hide();
		this.selectBox.update( this.optionElement.innerHTML );

		window.location = this.optionElement.value;

		
	}
});

var DropDownSelectionBox = Class.create({
	initialize: function(optionContainer, selectBox) {

		this.optionContainer = optionContainer;
		this.selectBox = selectBox;
		this.containerIsHidden = true;
		this.optionContainer.hide();
	},
	

	changeOnClick: function(event) {
		
		if(this.containerIsHidden) {
			this.optionContainer.show();
			this.containerIsHidden = false;
		}
		else {
			this.optionContainer.hide();
			this.containerIsHidden = true;
		}	
	}
});


var DropDownSelection = Class.create({

	initialize: function() {
		var selects = $('dropdowns').select('select');
	
		for(var i = 0; i < selects.length; i++) {
			selects[i].addClassName('selection');
			
			var box = new Element('div', { 'class' : 'selection-box'});
			selects[i].up().appendChild(box);
			var dim = selects[i].getDimensions();
			var width = dim['width'] - 10;
			box.setStyle({
				width: width+'px'
			});
		
			var options = new Element('div', { 'class' : 'selection-options'});
			options.setStyle({
				width: (width+6)+'px'
			});

			var org_options = selects[i].select('option');
			for(var u = 0; u < org_options.length; u++) {
				var option = new Element('div', { 'class' : 'selection-option'});
				var object = new DropDownSelectionOption(org_options[u], option, options, box);
				option.update(org_options[u].innerHTML);
				options.appendChild(option);
				option.observe('click', object.changeOptionOnClick.bind(object));
				if(org_options[u].selected)
				{
					box.update(org_options[u].innerHTML);
				}
			}
			selects[i].up().appendChild(options);
			
			var dropDownSelection = new DropDownSelectionBox(options, box);
			box.observe('click', dropDownSelection.changeOnClick.bind(dropDownSelection));
			
		
		}
	}
});


Event.observe(window, 'load', function() {
	new DropDownSelection();
	
});



*/
