$(document).ready(function() {	
	var delayTime = 8000;
	var slideTime = 4000;
	var background = 0;
	var count = 1;
	
	var Q = new Array();
	var UL = new Array();
	Q[1] = 'Budget:<br />A mathematical confirmation of your suspicions<br />-- AA Latimer';
	UL[1] = '<li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Business Health Checks</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Budgeting &amp; Forecasting</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Refinancing Loans</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Market Valuations</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Profitability Analysis</a></li>';
	Q[2] = 'Put not your trust in money, but your money in trust.<br />-- Oliver Wendell Homes';
	UL[2] = '<li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Growth Strategies</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Restructuring</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Buying a Business</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Selling a Business</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Company Superannuation</a></li>';
	Q[3] = 'Intaxication: Euphoria at getting a refund from the ATO which lasts until you realise it was your money to start with!<br />-- Steve Vining';
	UL[3] = '<li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Tax Planning &amp; Forecasting</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// End of Year Requirements</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Running Your Day-to-Day Business</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Staff Incentives &amp; Benefits</a></li><li class="tk-ff-enzo-web"><a href="/content/services/index.html">// Risk Management</a></li>';
	
	function heroImage(start) {
		if (start == 1)
		{
			applyBackground();
		}
		else
		{
			$('<div id="new" style="background-image: url(/images/banners/hero-'+count+'.jpg)"></div>').appendTo($("#hero"));
			$("#hero #new").animate({width: "936"}, slideTime)
			$("#hero #new").show(applyBackground);
		}
		count++;
		if (count>3)
		{
			count=1;
		}
	}
	
	function applyBackground() {
		background = $("#hero #new").css("backgroundImage");
		$("#hero").css("backgroundImage", background);
		$("#hero #new").remove();
		$("#hero").delay(delayTime).show(heroText);
	}
	
	function heroText() {
		$("#hero p").toggle().html(Q[count]).fadeIn(1000);
		$("#hero ul").html(UL[count]);
		$("#hero ul li").fadeIn(1000)
		$("#hero").show(heroImage);
	}
	
	heroImage(1);
});