$(document).ready(function () {
	createTicker();
});

function createTicker(){
	//set the quotes array
	tickerItems = new Array(
	'"<span style="font-style:italic;">The application process was quick and easy to understand and within a few days we had the money in our account. </span>"<br/><br/><b>-  Karen Northrop</b><br /> <span class="smallTxt">Northrop Butchers, Cambridge</span>',
	'"<span style="font-style:italic;">The process was painless and flexible and as we pay Business Cash Advance back when we get paid - it takes away the worry of having to meet a fixed monthly payment.</span>"<br/><br/><b>- Linda Johnson</b> <br /><span class="smallTxt">Pinstriping Graphics Magazine,<br /> Wigstone Leicester</span>',
	'"<span style="font-style:italic;">A cash advance is a simple, hassle free way of obtaining extra funds for businesses such as ours. We have used the service three times now and would recommend it to others.</span>"<br/><br/><b>- John Wood</b><br /><span class="smallTxt">Clarity\'s for Hair, Manchester</span>',
	'"<span style="font-style:italic;">I was very glad to discover this service. It was like a crack of sunlight in the gloom of the financial world. Somebody has a little bit of faith in us. They said yes we will.</span>"<br/><br/><b>- Peter Jackson</b><br /><span class="smallTxt">Ellesmere Hotel, Eastbourne</span>',
	'"<span style="font-style:italic;">The finance was easy to set up and the money was in the account almost before we had chance to look.</span>"<br/><br/><b>- Neil Townsend</b><br /><span class="smallTxt">Stanton Drew Garage, Weston Super Mare.</span>',
		'"<span style="font-style:italic;">I\'m really very happy with the product and the way it works. It\'s quick, efficient and no hassle. I\'ve used the service three times now and may well do so again. I\'m a very satisfied customer.</span>"<br/><br/><b>- Heinz Klose</b><br /><span class="smallTxt">Woodman pub, Sevenoaks</span>'

	);
	i = 0;
	tickerIt();
}

function tickerIt(){
	if( i == tickerItems.length ){
		i = 0;
	}
	//change without effect
	//$('#ticker').html(tickerItems[i]);

	//change with effect
	$('#ticker').fadeOut("slow", function(){
		$(this).html(tickerItems[i]).fadeIn("slow");
		i++;
	});

	//repeat - change 5000 - time interval
	setTimeout("tickerIt()", 9000);
}

