var position = 1;

jQuery(document).ready(function() {
	setInterval("nextIcon()",5000);
});
		
//looping method
function nextIcon() {
	//alert("Position: " +position +" Length " +jQuery("#sugoiFlickr ul").children().length);
	jQuery("#sugoiFlickr ul li:nth-child(" +position +")").addClass("invisible");
	
	if(position >=  jQuery("#sugoiFlickr ul").children().length) {
		position = 1;
	}
	else 
		position++;
	
	jQuery("#sugoiFlickr ul li:nth-child(" +position +")").removeClass("invisible");
}
