
var flag=-1;

$(document).ready(function() {
	timedCount();
});
function timedCount()
{
	if(flag==-1) {
		flag=0;
	}
	else {
	    if(flag == 0) {
			imageRotator1();
			flag=1;
		} 
		else {
    		imageRotator2();
			flag=0;
		}
	}
    setTimeout("timedCount()",3000);
}
function imageRotator1() {
var curImg = $('#imageShow1 li.current1');
var nextImg = curImg.next();

if (nextImg.length == 0) {
nextImg = $('#imageShow1 li:first');
};

curImg.removeClass('current1').addClass('previous1');
nextImg.css({opacity:0}).addClass('current1').animate({opacity:1}, 2000, function() {
curImg.removeClass('previous1');
});


};
function imageRotator2() {
var curImg = $('#imageShow2 li.current2');
var nextImg = curImg.next();

if (nextImg.length == 0) {
nextImg = $('#imageShow2 li:first');
};

curImg.removeClass('current2').addClass('previous2');
nextImg.css({opacity:0}).addClass('current2').animate({opacity:1}, 2000, function() {
curImg.removeClass('previous2');
});


};

