function Pos(x, y) {
	this.x = x;
	this.y = y;
}

var MainMenu = new Class({
    Extends: Menu,
    initialize: function(Element)
    {
        this.parent(Element);
        
        this.MainMenuItemPositions = new Array(new Pos(15, 10), new Pos(200, 125), new Pos(15, 245));              
    },
    Enable: function() 
    {
        this.parent();
    },
    Disable: function() 
    {
        this.parent();
    },
	Select: function(Item) 
	{
        this.parent(Item);
        
        // make some cool math function for this:
		if (Item == 0){
			this.Items[0].MoveTo(this.MainMenuItemPositions[1]);
			this.Items[1].MoveTo(this.MainMenuItemPositions[2]);
			this.Items[2].MoveTo(this.MainMenuItemPositions[0]);
		}
		else if (Item == 1){
			this.Items[0].MoveTo(this.MainMenuItemPositions[0]);
			this.Items[1].MoveTo(this.MainMenuItemPositions[1]);
			this.Items[2].MoveTo(this.MainMenuItemPositions[2]);
		}
		else if (Item == 2){
			this.Items[0].MoveTo(this.MainMenuItemPositions[2]);
			this.Items[1].MoveTo(this.MainMenuItemPositions[0]);
			this.Items[2].MoveTo(this.MainMenuItemPositions[1]);
		}
  	}    
});

var MainMenuItem = new Class({
    Extends: MenuItem,
    initialize: function(Element)
    {
        this.parent(Element);
        
	    this.fxMenu = new Fx.Morph(this.Target, {duration: 1000, wait: false});
	    this.fxMenu.options.transition = Fx.Transitions['Back']['easeInOut'];
	    this.fxMenu.options.duration = 1000;	    
    },
    
    Activate: function() 
	{
        this.parent();
		this.Target.setStyles({
			'text-decoration': 'none',
			'font-weight': 'bold', 
			'font-size': 'large'
		});        
	},
	
	Deactivate: function() 
	{
        this.parent();
		this.Target.setStyles({
			'text-decoration': 'underline',
			'font-weight': 'normal', 
			'font-size': 'medium'
		});
	},
	
	MoveTo: function(pos) 
	{
		this.fxMenu.start({
			'top': pos.y,
			'left': pos.x
		});
	},

	SetPos: function(pos) 
	{
		this.Target.setStyles({
			'top': pos.y,
			'left': pos.x
		});
	}
});

var SubMenu = new Class({
    Extends: Menu,
    initialize: function(Element)
    {
        this.parent(Element);
    },
    Enable: function() 
    {
        this.parent();
		this.Target.setStyles({'display': 'inline'});
    },
    Disable: function() 
    {
        this.parent();
		this.Target.setStyles({'display': 'none'});
    }
});

var SubMenuItem = new Class({
    Extends: MenuItem,
    initialize: function(Element)
    {
        this.parent(Element);
    },
    Activate: function() 
	{
        this.parent();
		this.Target.setStyles({
			'text-decoration': 'none',
			'font-weight': 'bold'
		});	        
	},
	Deactivate: function() 
	{
        this.parent();
		this.Target.setStyles({
			'text-decoration': 'underline',
			'font-weight': 'normal'
		});
	}
});

var MainContent = new Class({
    Extends: Content,
    initialize: function(Element)
    {
        this.parent(Element);  	
	    this.Slider = new Fx.Slide(this.Target);
	    this.Slider.hide();
	},

	Show: function() 
	{
        this.parent();
        this.Slider.slideIn();
	},	

	Hide: function() 
	{
        this.parent();
	    this.Slider.hide();
   	}
});
