// JavaScript Document
$(document).ready(function(){
		if($("#news_hp div.items dl").size()>1){
			$("#news_hp div.scrollable").scrollable({vertical:true, loop:false, size:1});
		}
		ws_news_hp.init();
	});

	ws_news_hp = {
		run: true,
		cicla: function (){
					if (! (ws_news_hp.run==false)){
						self.status=ws_news_hp.current_index;
						if (ws_news_hp.current_index>=2){
							$("#news_hp div.scrollable div.items").fadeOut();
							$("#news_hp div.scrollable").scrollable().begin();
							$("#news_hp div.scrollable div.items").fadeIn();
							ws_news_hp.current_index=0;
						}else{
							$("#news_hp div.scrollable").scrollable().next(); 
							ws_news_hp.current_index++;
						}
						ws_news_hp.run = window.setTimeout(ws_news_hp.cicla,ws_news_hp.tempo);
					}
				},
		init:	function(){
					ws_news_hp.run = window.setTimeout(ws_news_hp.cicla,ws_news_hp.tempo);
				},
		current_index: 0,
		incremento: 1, 
		tempo: 8000
		}
