try{

(function($){
	
	$(document).ready(function(){
		$('.background-slider').each(function(){
			var $this = $(this);
			/*var slider = cvb.gallerySlider.register($this, $this, $this, $('.background-slide', $this), true, true);
			setInterval(function(){
				slider.next();
			}, 4500)*/
			var activeIndex = 0;
			var slides = [];
			$('.background-slide', $this).each(function(){
				slides.push( $(this) );
			});
			if(slides.length > 1){
				slides[0].addClass('active');
				setInterval(function(){
					var nextIndex = (activeIndex+1)%slides.length;
					slides[nextIndex].addClass('upcoming');
					slides[activeIndex].animate({opacity:0},
						{
							duration: 1000,
							complete: function(){
								slides[activeIndex].removeClass('active');
								slides[activeIndex].css('opacity', '');
								activeIndex = nextIndex;
								slides[activeIndex].removeClass('upcoming').addClass('active');
							}
						}
					);
				}, 4500);
			}
			
		});
	});
	
})(jQuery);

}catch(ex){
	Console.error(ex);
}