var currentRow = 1;
var timeout;

$(function() {
  $('a.lightbox').lightBox(); // Select all links with lightbox class
});

function switchPhotos() {
	$('#photos_' + currentRow).fadeOut(2000, function() {
		currentRow = (currentRow < 3) ? currentRow + 1 : 1;
		$('#photos_' + currentRow).fadeIn(2000, function() {
			timeout = setTimeout(switchPhotos,10000);
		});
	});
}

$(document).ready(function() {
	timeout = setTimeout(switchPhotos,10000);
});