var Banner = new Class({
	initialize: function(div, options){
		this.div = div;
		this.duration = 10000;
		this.timer = 0;
		this.banners = null;
		this.current = null;
		try{
			this.setElements();
		}catch(e){}		
	},
	setElements: function(){
		var self = this;
		self.banners = $(self.div).getElements('a');
		self.current = self.banners[0];
		self.current.removeClass('dn');
	},
	change: function(){
		var self = this;
		if(self.banners.length > 1){
			//najdi naslednjega
			var next = self.current.getNext('a');
			if(!next) next = $(self.div).getFirst('a');
			self.current = next;
			self.banners.addClass('dn');
			self.current.removeClass('dn');
		}
	}
});
