iDeal.onLoad = function() {
	var flashDogs = ['fletcher', 'cisco', 'edgar', 'mavis', 'misty', 'peggySue', 'rocky', 'samantha', 'stewart'];
	
	if(['/index2.html', '/fletcher.html', '/fletcher-faq.html'].include(location.pathname))
	{
		var flashDogIndex = 0;
	}
	else
	{
		var flashDogIndex = Math.floor(Math.random()*10);
	}
	
	if ($('flashDog'))
	{
		UFO.create({ 
			movie:"/template_assets/swf/"+flashDogs[flashDogIndex]+".swf", 
			width:"217", 
			height:"476", 
			majorversion:"8", 
			build:"0", 
			xi:"true", 
			wmode:"transparent" }, 
		"flashDog");
	}
	else if (location.pathname == '/fundog-cast.html')
	{
		UFO.create({ 
			movie:"/template_assets/swf/doghello.swf", 
			name: "castMovie",
			id: "castMovie",
			width:"641", 
			height:"523", 
			majorversion:"9", 
			build:"0", 
			xi:"true", 
			wmode:"transparent",
			allowscriptaccess: "always"}, 
		"castCase");
	}
	new iDeal.Menu( 'Navigation', '.Menu', 
		{cssClass: 'MenuBox',
		enterTween: 'BlindDown',
		exitTween: 'Puff',
		fadeIn: .2,
		fadeOut: .2,
		timeOut: 2,
		offsetX: -5 
	});
	
	if ($('Accordian'))
	{
		new iDeal.Accordian({
			target: 'Accordian',
			fadeIn: 0.1,
			fadeOut: 0.1
		});
	}
};

function fetchCastInfo( castMember )
{
	return $(castMember).innerHTML;	
}
