/**
 *
 * Paul Streise
 * http://www.omc.ch/
 *
 * Created on 06.01.2009
 * @copyright 2009
 *
 **/


var ToggleOneWay = new Class({
	
	Implements : [Options],
	
	options: {
		hideElement : '#oneyway',
		showElement : '#returnFlight',
		toggleElements : [
		                  '#returnDate_label',
		                  '#returnDate_input',
		                  '#returnDeviation_label',
		                  '#returnDeviation_input']
	},
	
	initialize: function(options)
	{
		this.setOptions(options);

		$(this.options.hideElement).bind('click',function(event){
			$(this.options.toggleElements.join(', ')).fadeOut();
		}.bind(this));
		
		$(this.options.showElement).bind('click',function(event){
			$(this.options.toggleElements.join(', ')).fadeIn();
		}.bind(this));		
	}
	
});
