window.addEvents({
	'load': function(){
		/*  Create SlideItMoo instance  */	
		sMoo = new SlideItMoo({
			overallContainer: 'SlideItMoo_info_outer',
			elementScrolled: 'SlideItMoo_info_inner',
			thumbsContainer: 'SlideItMoo_info_items',		
			itemsSelector: '.info_item',
			itemsVisible:1,				
			itemWidth:140,
			showControls:1,
			autoSlide: 5000,
			transition: Fx.Transitions.Back.easeIn,
			duration: 800,
			direction:1,
			onChange: function( index ){
				
				/* calculate the previous slide index and the next */
				var prev = index-1 < 0 ? sMoo.elements.length-1 : index-1;
				var next = index+1 >= sMoo.elements.length ? 0 : index+1;
				/* titles are stored in h1 inside each .info_item. Grab the text and put it in our prev/next containers */
				/*
				$('prev_title').set({'html': 'Previous: '+sMoo.elements[prev].getElement('h1').get('text')}).morph({'opacity':[0,1]});
				$('next_title').set({'html':'Next: '+sMoo.elements[next].getElement('h1').get('text')}).morph({'opacity':[0,1]});
				*/			
			}
		})
		
	}
	
});
