
var topslider;
var topslideinstance;

var topslide = new Class({    
	initialize: function(id)
	{        
		this.id = id;   	 		      
		

	this.faderout = new Fx.Style("topslider", "margin-top", { duration:300, transition: Fx.Transitions.Sine.easeInOut,onComplete: (function(){this.fade2();}).bind(this)});

	this.faderin = new Fx.Style("topslider", "margin-top", {duration:500, transition: Fx.Transitions.Sine.easeInOut});

	},
	doit: function() // slide
	{
		
		this.faderout.start(0,-160);
	
	},
	fade2: function()
	{
	   this.id = this.id+1;
	   if (this.id == 3)
		this.id = 0;

	$("topslider").setHTML(slidetop[this.id]);

	 this.faderin.start(-160,0);
	}
});


// start slide
window.onDomReady(function(){

topslideinstance = new topslide(0);
topslider = (function() {topslideinstance.doit();}).periodical(6153);

});

