var i = 0;
function cycle() {
	var first = true;
	$('#brands li.tier_'+i).fadeOut(function() {
		if (first) {
			$('#brands li.tier_'+i).hide();
			i++;
			if (i == 3) {
				i = 0;
			}
			$('#brands li.tier_'+i).fadeIn();
		}
		first = false;
	});
}
setInterval("cycle()", 4000);

$(function() {
	$('#brands li:not(.tier_0)').hide();
	var h = $('#brands').height();
	$('#brands').css('height', h+'px'); //fix the height
	//now start the loop
	var tiers = Math.ceil($('#brands li').length / 24); //remember the <li>/</li>	
});
