var timerHandler=null;
var timerHandler2=null;
var timerHandler3=null;
var flag=0;
var flag2=0;
var excl=0;
function moveNext(nx, tg){
excl=1;		
tg = "#banners"+tg;
$(tg).find("li").each(function(i) {
							   
	 if ($(this).attr("class") == "shows" )
	 {

	 	$(this).animate({ height: 'hide', opacity: 'hide' }, 'slow');
		$(this).removeClass("shows").addClass("hides");
		
		var nxc = $(this).next();
		var nxf = $(tg+" li:first");
		if (nx == "prev")
		{
			nxc = $(this).prev();
			nxf = $(tg+" li:last");
			
		}
		if (nxc.length != 0)
		{
			nxc.animate({ height: 'show', opacity: 'show' }, 'slow');
			nxc.removeClass("hides").addClass("shows");

		}
		else
		{
			nxf.animate({ height: 'show', opacity: 'show' }, 'slow');
			nxf.removeClass("hides").addClass("shows");
		}
		excl=0;
		return false;
		
	 }
	 
		
   });
   	
}
function moveAlways()
{
	if (timerHandler==null && flag==0)
		moveAuto1();
	if (timerHandler2==null && flag2==0)
		moveAuto2();
	timerHandler3=setTimeout('moveAlways()', 10000);	
	
}
function moveAuto()
{
	moveAuto1();
	moveAuto2();
}
function moveAuto1()
{
	if (excl==0)
	{
	moveNext("next", "1390");
		timerHandler = setTimeout('moveAuto1()', 5000);
	}
}
function moveAuto2()
{
	if (excl==0)
	{
	moveNext("next", "1391");
		timerHandler2 = setTimeout('moveAuto2()', 5000);
	}
}

