$(function() {

	$('#tvflash_slideshow').cycle({
        fx:        'cover',
		easing: 'BounceEaseOut',
		delay:  -2000,
        timeout: 6000,
		speed: 1000,
		next:   '#carrossel_left',
		prev:   '#carrossel_right'
    });

	$('.gifdofoninho').click(function() {
		$('#top20lista .gifdofoninho').show('fast');
		$(this).hide();
		var id = '#top_'+$(this).attr("id")+' img.ativoimg';
		$('#top_'+$(this).attr("id")).addClass("ativo");
		$('#top20lista li img.ativoimg').hide('slow');
		$('#top20lista li span.player_audio').hide();
		$('#player_'+$(this).attr("id")).show();
		$(id).show('fast');
	});

}); // close document.ready

jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};

