var Menu = Class.create({

	id: "",
	lock: false,
	themes: Array(),
	current: null,

	initialize: function(s, c){
		this.id = s;
		this.themes = $$(c);
	},

	slideIn: function(){
		if(this.lock == false){
			this.lock=true;
			new Effect.SlideDown(this.id, {duration: 0.3, scaleFrom: 0, scaleTo: 100, scaleX: true, scaleY: true, queue: {position: 'end', scope: 'menuscope'},
			 beforeStart: function(){this.lock = true;}.bind(this),
			 afterFinish: function(){this.lock = false;}.bind(this)});
		}
	},

	slideOut: function(){
		if(this.lock == false){
			this.lock=true;
			new Effect.SlideUp(this.id, {duration: 0.3, scaleFrom: 100, scaleTo: 0, scaleX: true, queue: {position: 'end', scope: 'menuscope'},
			beforeStart: function(){this.lock = true;}.bind(this),
			afterFinish: function(){this.lock = false;}.bind(this)});
		}
	},

	showTheme: function(id){
		if(this.current){
			new Effect.BlindUp(this.current.id, {queue: {position: 'end', scope: 'theme_scope'}});
		}
		this.current = $(id);
		new Effect.BlindDown(this.current.id, {queue: {position: 'end', scope: 'theme_scope'}});
	}
});
