function Navi(element) {
	var self = this;
	this.root = element;

	this.root.find('li').hover (function() {
		$(this).children('a').andSelf().addClass('over').children('ul').show();
	}, function() {
		$(this).children('a').andSelf().removeClass('over').children('ul').hide();
	});
	
	
	this.set_size = function(holder) {
		var kids = holder.children().children('ul').show();
		for(var i = 0; i < kids.length; i++) {
			self.set_size(kids.eq(i).data('level', i));
		}
		holder.css({
			width: (holder.parent().outerWidth(true) < holder.width()) ? (holder.width()) : (holder.parent().outerWidth(true))
		});
		holder.hide();
	}

	this.set_size(this.root);
	this.root.addClass('helped').css('width', 'auto').show();
	
	this.root.find('ul').andSelf().each(function() {$(this).children(':last').addClass('last').children('a').addClass('last');});
	this.root.find('ul').andSelf().each(function() {$(this).children(':first').addClass('first').children('a').addClass('first');});
}