﻿if(typeof locale == "undefined"){
	var locale="/";

} else {
	locale = "/locale/"+locale+"/";	
}

var RotatingTechnology = {
	currentNode: "", 
	init: function(node){
		RotatingTechnology.currentNode = $("rotating_technology").firstDescendant();
		setTimeout("RotatingTechnology.fadeNext()", 2500);
	},
	fadeNext: function(){
		Effect.Fade(RotatingTechnology.currentNode, {afterFinish: function(){
			if(RotatingTechnology.currentNode.next() != null)
				RotatingTechnology.currentNode = RotatingTechnology.currentNode.next();
			else
				RotatingTechnology.currentNode = RotatingTechnology.currentNode.ancestors()[0].firstDescendant();
			Effect.Appear(RotatingTechnology.currentNode, {afterFinish: function(){
				setTimeout("RotatingTechnology.fadeNext()", 2500);
			}})
		}})
	}
}
	
document.observe("dom:loaded", 
    function()
    {
	if($("rotating_technology"))
	RotatingTechnology.init(2500, "rotating_technology");
})
