toggle_sets = {};

MultiToggle = Class.create();
MultiToggle.prototype = {
	
	initialize: function(targets, cur_target) {
		
		this.targets = {};
		this.cur_target = null;
		this.last_target = null;
		if (targets.length) {
			for(var i=0; i<targets.length; ++i) {
				var id = targets[i];
				this.targets[id] = id;
				if (console) console.log('ADDING '+id+': '+this.targets[id]);
			}
			
			this.cur_target = cur_target;
		}
		
		
	},
	
	toggle: function(target) {
		
		if ($(target)) {

			var effect = new Effect.BlindUp(this.cur_target,
											 {duration: 0.5});
		
			var new_target = target;
			if (target != this.cur_target) {
				var effect2 = new Effect.BlindDown(target,
													{duration: 0.5});
			} else {
				var effect2 = new Effect.BlindDown(this.last_target,
													{duration: 0.5});
				new_target = this.last_target;
				
			}
			
			this.last_target = this.cur_target;
			this.cur_target = new_target;
		}
		
		
		
	}
	
};