 $(function() {
            // create the image rotator
			var obj =  $(".photo");
			for(var i=0; i<obj.length; i++)
			{
			        var temp = $(obj[i]).attr('id');
			        setInterval("rotateImages('#" +temp+"')", 2000); 
			}
	});
 		function rotateImages(photo) {
            var oCurPhoto = $(photo + ' div.current');
            var oNxtPhoto = oCurPhoto.next();
            if (oNxtPhoto.length == 0)
                oNxtPhoto = $(photo + ' div:first');

            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        } 
