$(document).ready(function(){
	
	if (photos && photos.length) {
		for (var i = 0; i < photos.length; i ++) {
			
		}
	}
	
	
	$('.prev').click(function(){
		if (current_photo > 0) {
			load_photo(-- current_photo);
		}
		
		return false;
	});
	
	$('.next').click(function(){
		if (current_photo < photos.length - 1) {
			load_photo(++ current_photo);
		}
		
		return false;
	});
	
	
	function load_photo(i) {
		$('#active_photo').attr('src', photos[i].src);
	}
});