$(document).ready(function() {
    setInterval(function() {
		slider();
	},4000);
});

function slider() {
	var first_id	= 'bf2';
	var last_id		= 'bfp4f';

	$('div.image-slider').find('div.active').fadeOut('slow', function() {
	$(this).hide().removeClass('active');
		if($(this).attr('id') == last_id) {
			$(this).removeClass('active');
			$('div.image-slider > div#'+first_id).addClass('active').fadeIn('slow');
		} else {
			$(this).removeClass('active').next().addClass('active').fadeIn('slow');
		}
	});
}
