function banners(){
	
	if(this.count || this.count == 0){
		this.count++;
	} else {
		this.count = 0;
	}
	
	var all = $("#indexBanners .curBanner").size();
	var sel = $("#indexBanners .selected")[0];
	
	if(this.count == all){
		this.count = 0;
	}
	
	var next = $("#indexBanners .curBanner")[this.count];
	
	$(sel).removeClass('selected');
	$(next).addClass('selected');
	
	$(sel).fadeOut(function(){
		$(next).fadeIn();
	});
	
}

$(window).load(function(){
	if($("#indexBanners img").size() > 1){
		$("#indexBanners").at_intervals(banners, { delay: 5000, name: "banners" });
	}
	
})
