		function rotateThumbs(index){
			$(".projectThumb").hide();
			$(".projectThumb:eq(" + index + ")").fadeIn("slow");
			$(".projectThumb:eq(" + index + ")").animate({opacity: "1.0"}, 3000, function(){
				if(index >= 4) {
					index = 0;
				} else {
					index++;	
				}
				rotateThumbs(index);
			});			
		}


		function thumbnailRotator_js_init(){
			//navigationURL must be defined in the CustomScript element		
			$.ajax({
				type: "GET",
				url: navigationURL,
				dataType: "xml",
				success: function(xml) {			
								
					//Add World Class project thumbs
					var projects = $(xml).find("Navigation[Name='Projects']");
		
					$(projects).find('Page').each(function(){
						$("#projectThumbContainer").append("<div class='projectThumb' id='" + $(this).attr("ID") + "'><img border='0' alt='" + $(this).attr("Header") + "' src='Images/" + $(this).attr("Image") + "'/></div>");
					 });
					 $("#thumbnailRotatorPanel").show();
					 rotateThumbs(0);				
				},
				error: function (XMLHttpRequest, textStatus, errorThrown) {
					$("#projectsPanel").append("<p>An error occurred retrieving the XML</p>");
				}
		
			});
		}