var container = {
	current: null,
	
	init: function(){
		$$('.content').each(function(el){
			el.hide();
		});
		
		$$('.title').each(function(el){
			Element.observe(el, 'click', function(e){
				e.stop(e);
				
				if(!this.open){
					Effect.SlideDown(this.next(), {duration: 1});
					this.open = true;				
					Effect.ScrollTo.delay(1, this);
				}else{
					Effect.SlideUp(this.next());
					this.open = false;
				}
				
			});
		});
	}
}

document.observe('dom:loaded', function(){	
	$$('.carousel').each(function(el){
		new UI.Carousel(el);
	});
	
	container.init();
});