var blendSpeed = 2000;
	var easingStyle = 'easein';
	var moveNext = 'b';
	var on = '1.0';
	var off = '0.0';
	var firstA = true;
	var firstB = true;
	var firstC = true;
	var marqueeSpeed = 50000; // in milliseconds
	
	// setTimeout
	function init()
	{
		var t = setTimeout( 'init()' , 4500);
		
		if (moveNext == 'b')
		{
			// move and animate b, then perform call back on a to move to correct position
			$('#b').animate({opacity: on, left: 0 }, blendSpeed, easingStyle);
			$('#a').animate({opacity: off}, blendSpeed, easingStyle);
			moveNext = 'c'
			if (firstC)
			{
				firstC = !firstC;
				$('#c').css('left',-30);			
			}
			else
			{
				firstC = !firstC;
				$('#c').css('left',30);	
			}
			return;
		}
		else if (moveNext == 'c')
		{
			// move and animate b, then perform call back on a to move to correct position
	
			$('#c').animate({opacity: on, left: 0 }, blendSpeed, easingStyle);
			$('#b').animate({opacity: off}, blendSpeed, easingStyle);
			moveNext = 'a';
			if (firstA)
			{
				firstA = !firstA;
				$('#a').css('left',30);			
			}
			else
			{
				firstA = !firstA;
				$('#a').css('left',-30);	
			}
			return;
		}
		else (moveNext == 'a')
		{
			// move and animate b, then perform call back on a to move to correct position
			$('#a').animate({opacity: on, left: 0}, blendSpeed, easingStyle);
			$('#c').animate({opacity: off}, blendSpeed, easingStyle);
			moveNext = 'b';
			if (firstB)
			{
				firstB = !firstB;
				$('#b').css('left',-30);			
			}
			else
			{
				firstB = !firstB;
				$('#b').css('left',30);	
			}
			return;
		}
	}
	
	function scrollTheMarquee()
	{
		$('#scrolling-marquee').css('top',45);
		$('#scrolling-marquee').animate({top: -800}, marqueeSpeed, 'linear', function()
			{
				$('#scrolling-marquee').css('top', 45);
				scrollTheMarquee(); 
			});
	}
	
	
	$().ready(function()
	{
		$('#b').css('opacity','0');	// fix IE
		$('#c').css('opacity','0');	// fix IE
		$('#d').css('opacity','0');	// fix IE
		var wait = setTimeout('init()', 4500);
		$('#scrolling-marquee').load('../../cases.html');
		scrollTheMarquee();	
	});