var PortfolioNavButton = new Class({
	initialize: function(e) 
	{
		this.e = e;
		
		var p = e.rel.split('_');
		
		this.group = p[0];
		this.page = p[1];
		//this.group = p[2];
		//this.page = e.rel;
			
		this.setEvents(e);
	},
	
	setGlobals: function()
	{
		
	},
	
	doRequest: function()
	{
		activeButton = this;
		//section = 'portfolio';//!!!
		//if(this.page!=page)
		//{
			page = this.page;
			group = this.group;
			refreshContent(new Array('section','banner','center'));
		//}
	},
	
	afterRequest: function(t)
	{
	},
	
	updateAfterRequest: function()
	{
	},
	
	setEvents: function(e)
	{
		this.e.addEvents
		({
			'mouseover': this.doMouseover.bind(this),
			'mouseout': this.doMouseout.bind(this),
			'click': this.doClick.bind(this)
		});
		
		e.onclick = function()
		{
			return false;
		};	
		
		e.onmouseover = function()
		{
			return false;
		};
		
		e.onmouseout = function()
		{
			return false;
		};
	},
	
	doClick: function()
	{
		this.doRequest();
		this.e.blur();
	},
	
	doMouseover: function()
	{
	},
	
	doMouseout: function()
	{
	}
	
});
	
function initPortfolioNavButton(where)
{
		$$('#'+where+' .portfolioNavButton').each(function(e){new PortfolioNavButton(e);});
}

