var
	fadeSpeed = 1000,
	rotateSpeed = 3000,
	rotateThis = '.slider img';

function theRotator() {
	$(rotateThis).hide();
	$(rotateThis+':first').addClass('show').show();
	setInterval('rotate()', rotateSpeed);
};

function rotate() {
	var current = ($(rotateThis+'.show') ? $(rotateThis+'.show') : $(rotateThis+':first'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $(rotateThis+':first') : current.next()) : $(rotateThis+':first'));
	next.fadeOut(fadeSpeed).addClass('show').fadeIn(fadeSpeed);
	current.fadeOut(fadeSpeed).removeClass('show');
};

$(function(){
	theRotator();
});
