function galleri(){
		var i = 0;
		var arr = $('flash').childElements();
		
		new PeriodicalExecuter(function() {
			if ((i+1) == arr.size()){
				i = 0;
				Effect.Appear(arr[0], { duration: 1.0 });
				window.setTimeout(function() { arr.invoke('show'); } , 1000);
			}else{
				Effect.Fade(arr[i], { duration: 1.0 });
				i += 1;
			};
		},5);
	}	
	
document.observe("dom:loaded",function(){
		galleri()
});
/*
var ticker = Class.create({
	initialize: function(element){
		var element = $(element);
		var arr = element.childElements();
		var i = 1;
		ticker.news = this.news;
		
		ticker.news(element.firstDescendant());
		
		new PeriodicalExecuter(function() {
			if (i == arr.size()) i = 0
			ticker.news(arr[i])
			i += 1;
		},7);
	},
	news: function(element){
		new Effect.Move(element, { x: 0, y: 2,duration:2, mode: 'absolute' });
		
		window.setTimeout(function() {
			new Effect.Move(element, { x: -680, y: 2,duration:2, mode: 'absolute' });
			window.setTimeout(function() {
				element.setStyle({left:'680px'})
			}, 2500);
		}, 7000);
	}
});

document.observe("dom:loaded",function(){
	new ticker('ticker');
});*/
