MooScroller = new Class({
	initialize: function() {
		this.main = $('scrollerMain');
		this.content = $('scrollerContent');
		this.content.setStyle('left',  '0px');
		this.pages = $$('#scrollerContent div.scrollerData');
		this.content.setStyle('width', (this.pages.length* 550)+'px');
		for(var i =0; i<this.pages.length; i++) {
			this.pages[i].pos = this.pages[i].getPosition(this.main).x;
		}
		this.interval = null;
	},

	show: function(oHref) {
		var pageId = oHref.href.split('#')[1];
		var page = $('scrollerData_'+pageId);
		this.scrollTo = page.pos;
		var n = new Fx.Morph(this.content, {duration: 500} );
		n.start( {'left' : [ parseInt(this.content.getStyle('left')), -1*this.scrollTo ]} );
		return false;
	}
});
