contentData = [
	 {
		"image": "/images_new/rotator-class.jpg",
		"url": "/undergrad",
		"html": "Advanced undergraduate class on electromagnetic theory."
	},
	
	 {
		"image": "/images_new/rotator3.jpg",
		"url": "http://gaogroup.case.edu",
		"html": "The active element of this field effect transistor is a nanowire that is only 50 nanometers in diameter."
	},
	
	 {
		"image": "/images_new/rotator-lux.jpg",
		"url": "http://xenophile.phys.case.edu/LUX@Case/",
		"html": "Will the LUX experiment detect the missing matter in the universe?"
	},
	
	 {
		"image": "/images_new/rotator4.jpg",
		"url": "http://blog.case.edu/case-news/2006/11/30/pollock",
		"html": "Can a Pollock painting be authenticated by fractal analysis?",
	},
	
	 {
			"image": "/images_new/rotator2.jpg",
			"url": "http://ising.phys.cwru.edu/",
			"html": "Nanoparticle inclusions in fuel cell membranes for enhanced peformance."
	},
	
	 {
		"image": "/images_new/rotator1.jpg",
		"url": "http://cmb.phys.cwru.edu/ruhl_lab/",
		"html": "Detecting the cosmic microwave background radiation at the South Pole."
	}
];


var contentCount = 0;
for (var i in contentData) contentCount++;

var rotator = {
	"currentContent": 0,
	"rotateContent": function(image, html, url) {
	
		// Fade out content
		setTimeout("Effect.Fade('featureMainImage');", 3000);
		setTimeout("Effect.Fade('featureTextArea');", 3000);
		setTimeout("Effect.Fade('featureReadMore');", 3000);
		
		// Change Image
		setTimeout("$('featureMainImageImg').src = '"+image+"';", 4000);
		
		// Change Text
		setTimeout("$('featureTextArea').innerHTML = '"+html+"'", 4000);
		
		// Change Links
		setTimeout("$('mainFeatureImageLink').href = '"+url+"'", 4000);
		setTimeout("$('featureFindOutMoreLink').href = '"+url+"'", 4000);
		
		
		// Fade in content
		setTimeout("Effect.Appear('featureMainImage');", 4100);
		setTimeout("Effect.Appear('featureTextArea');", 4100);
		setTimeout("Effect.Appear('featureReadMore');", 4100);
		
	},
	"rotation": function() {
		this.rotateContent(contentData[this.currentContent].image, contentData[this.currentContent].html, contentData[this.currentContent].url);
		if (++this.currentContent == contentCount) { this.currentContent = 0; }
	}
}

rotator.rotation();
rotartorInterval = setInterval("rotator.rotation()", 7000);

