$(function(){
	$ul = $('#homepageSlider');
	$.loadXML('', onXMLComp, pageId);
	
	function onXMLComp($xml)
	{
		if(!($xml instanceof jQuery)) $xml = $($xml);
		
		$xml.find('TemporaryTable').each(function(i){
			var title = $(this).find('Title').text();
			var img = $(this).find('LargeFileName').text();
			
			var $image = $('<img />').attr({
				src: img,
				width:815,
				height:560,
				alt:title
				
				});
			var $li = $('<li />');
			
			$li.append($image);
			
			if(i==0) $li.addClass('active');
			
			$ul.append($li);		
			
			});
		
		$ul.simpleFadeSlideshow({
			width:815,
			height:560,
			buildArrows			: false,			// If true, builds the forwards and backwards buttons
			buildNavigation		: false, 		// If true, builds a list of anchor links to link to each panel
			forwardText         : "&raquo;", 	// Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
			backText            : "&laquo;", 	// Link text used to move the slider back (hidden by CSS, replace with arrow image)
			delay               : 6250,      	// How long between slideshow transitions in AutoPlay mode (in milliseconds)
			animationTime       : 1300,       	// How long the slideshow transition takes (in milliseconds)
			ease				: "", 		// Anything other than "linear" or "swing" requires the easing plugin
			autoPlay            : true,     	// This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
			pauseOnHover        : false,      	// If true & the slideshow is active, the slideshow will pause on hover
			startPanel          : 1        	// This sets the initial panel
	
		});		
		
		
	}
	
	
	
	
})
