﻿var interval = 5000;
var slidetime = 1000;
//----------------
var curPic = 0;
var id = null;
function moveNext() {
	var active = $("#featured li").get(curPic);
	curPic++;
	if ((curPic + 1) > $("#featured li").length)
		curPic = 0;
	var next = $("#featured li").get(curPic);
	$(next).fadeIn(slidetime);
	$(active).fadeOut(slidetime);
	//$(next).css({ 'opacity': 0 }).show().animate({ 'opacity': 1.0 }, slidetime);
//	$(active).animate({ 'opacity': 0 }, slidetime, function () {
//		$(this).hide();
//	});

}

$(document).ready(function () {
	id = setInterval(moveNext, interval);
});

