function init(){
	BGKarusel.init();
}

$(window).load(function(){
	init();	 
});

var BGKarusel = {
	index: 0,
	root: null,
	sec: 3,
	init: function()
	{
		this.root = $('#karusel div.images');
		setTimeout(function(){BGKarusel.sonraki()}, this.sec*1000);
	},
	sonraki: function()
	{
		var root = this.root;
		var last = root.children().last();
		last.fadeOut('slow', 
			function(){
				root.prepend(last.show());
			});
		setTimeout(function(){BGKarusel.sonraki()}, this.sec*1000);
	}
}
