// JavaScript Document
window.addEvent('domready', function() {
	var scr2 = new ScrollBar('menuItems', 'article', {
		'hScroll': false
		});
	//asigno los efeventos a los botones del menu
	var actual = 'item1';
	$$('.btnServices').each(function(obj) {
		obj.addEvent('click',function() {
			var aux = obj.getProperty("href").split("/");
			if(aux[aux.length-1]!=actual) {
				var myFx = new Fx.Style(actual, 'opacity',{ 
					onComplete: function() {
						$(actual).setStyle('display', 'none');
						$(aux[aux.length-1]).setStyle('display', 'block');
						$(aux[aux.length-1]).setOpacity(0);
						var myFx2 = new Fx.Style(aux[aux.length-1], 'opacity').start(0,1);
						actual = aux[aux.length-1];
						}
				}).start(1,0);
			}
		});
	});

}); 

window.addEvent('load', function() {
	a = $$(".contenidoScroll");
	cant = a.length;
	for(i=0; i<cant; i++) {
			var scr = new ScrollBar('item'+(i+1), 'contenidoScroll'+(i+1), {
		'hScroll': false
		});
		$('item'+(i+1)).style.display = 'none';
	}
	$(cItem).setStyle('display', 'block');
});