var colinRotate = function(container, nextIndex) {
	//console.log("Starting Next Index: " + nextIndex);
	var lis = $(container);
	var childrenLen = lis.length;
	//console.log("Length of children: " + childrenLen);
	var prev = nextIndex - 1;
	//console.log("Starting prev: " + prev);

	if (nextIndex >= childrenLen) {
		nextIndex = 0;
	}
	if (nextIndex == 0) {
		prev = childrenLen - 1;
	}

	setTimeout(function() {
		//console.log("Prev: " + prev + " Next Index: " + nextIndex);
		$(lis[prev]).fadeOut('slow', function() {
			if(jQuery.browser.msie) this.style.removeAttribute('filter');
		});
		$(lis[nextIndex]).fadeIn('slow', function() {
			if(jQuery.browser.msie) this.style.removeAttribute('filter');
                });
		nextIndex++;
		//alert("Next Index" + nextIndex);
		colinRotate(container, nextIndex);
	}, 18000);
}
$(document).ready(function() {
	$('div#rotator ul li').hide();
	$('div#rotator ul li:first').show();
	colinRotate('div#rotator ul li', 1);
});
