//Utilidades para la pantalla
//Permite agregarle animaciones a los elementos de la pantalla

var noticias = $('news').getElementsByTagName('div');
for( i=0;i<noticias.length;i++){
	new Effect.News(noticias[i]);
}

var title = $('news').getElementsByTagName('h1');
for(n=0;n<title.length;n++){
	title[n].ondblclick=function(){
		var noticias = $('news').getElementsByTagName('div');
		for( i=0;i<noticias.length;i++){
			if( noticias[i].style.visibility=='hidden'){
				noticias[i].style.visibility='visible';
				noticias[i].style.display='block';
				debug('cargando '+noticias[i].id,0);
				new Effect.SizeAndPosition(noticias[i],null, 100, null, noticias[i].lastHeight, 100, 10, {complete:function(){} } );
				new Effect.FadeTo(noticias[i], 1, 10, 10, {complete: function(){}});
			}
		}
		return false;
	};
}

new Content.Popup($('news'));
new Content.Popup($('content'));
new Content.Page($('buttons'),$('content'));

new Content.AnimatedContent($('content'));

$('content').oncomplete=new Array();
$('content').oncomplete[0]=function(){
	new Content.AnimatedContent($('content'));
	new Content.Popup($('content'));
};

ajaxEngine.sendRequest( 'link0' );




