// Fade de items
$.fn.fadeEachDown = function() {
	var s = this.size();
	return this.each(function(i) {
		var o = 1 - (s == 1 ? 0.5 : 0.85/s*(i+1));
		var e = this.style;
		if (window.ActiveXObject)
			e.filter = "alpha(opacity=" + o*100 + ")";
		e.opacity = o;
		$(this).hover (
			function () { $(this).fadeTo('normal', 1); },
			function () { $(this).fadeTo('normal', o );	}
		);
	});
};

// Renovar Lifestream
var auto_refresh = setInterval(
	function() {
		$('#actividad').load(
			'lifestream.php',
			'',
			function(){ $('#actividad li').fadeEachDown(); }
		);
	}, 30000);


$(function(){
	$('#actividad li').fadeEachDown();
});
