$(function() {
		$("#rotator div:not(.current)").hide();
        setInterval("rotateImages()", 4000);
		
    });
			
    function rotateImages() {
        var oCurPhoto = $("#rotator div.current");
        var oNxtPhoto = oCurPhoto.next();
        if (oNxtPhoto.length == 0)
            oNxtPhoto = $("#rotator div:first");
		
        oCurPhoto.fadeOut(300, function(){
			oNxtPhoto.fadeIn(500, function(){
				oCurPhoto.removeClass("current");
				oNxtPhoto.addClass("current");
			});
		});
    }