function changeImage() {
	$('.image-thumbs > .slide:first').slideUp('slow', function() {
		var slide = $(this).clone(true);
		$(this).remove();
		$('.image-thumbs').append(slide.show());
		setFeatured();
		setTimeout('changeImage()', 3000);
	})
}

function setFeatured() {
	$('.image-thumbs > .slide > .caption').each(function() {
		var caption = $(this).html();
		$('#featured > .slide > .caption').html(caption);
	});
	$('.image-thumbs > .slide > img').each(function() {
		$('#featured > .slide > img').attr('src', $(this).attr('src').replace('-thumb', ''));
	});
}

$(document).ready(function() {
	setTimeout('changeImage()', 3000);
	$('.image-thumbs img').click(function() {
		$('#featured > img').attr('src', $(this).attr('src').replace('-thumb', ''));
	});
});
