/*
 * LightBox Class
 * @author: 
 */
var RollMenu = Class.create({ 
	
	initialize: function() {
		var height = 0;
		$("idMenuSub").select("li").each(function(img) {
			height += img.getHeight();
		});
		if (height > 310) this.roll();
	},
	
	roll: function(pe) {
		if (pe !== undefined) pe.stop();
		var slide = $("idMenuSub").select("li")[0];							
		Effect.SlideUp(slide, { 
			duration: 2.5,
			afterFinish: function () {
				$("idMenuSub").insert({bottom:slide.remove().setStyle({display:"block"})});
				this.roll();
			}.bind(this)
		});	
	}
	
});

$(document).observe("dom:loaded", function() {
	var rollMenu = new RollMenu();
});
