function swapPic(index) {
	$("#frontPic").fadeOut(350, function() {
		$(this).attr("src", imgArr[index].src).fadeIn(600);
	});
	$("#caption").fadeOut(200, function() {
		$(this).html(imgCap[index]).fadeIn(300);
	});
}

function prevPic() {
	counter = counter-1;
	if(counter == -1)
		counter = 5;
	
	$("#frontPic").fadeOut(350, function() {
		$(this).attr("src", imgArr[counter].src).fadeIn(600);
	});
	$("#caption").fadeOut(200, function() {
		$(this).html(imgCap[counter]).fadeIn(300);
	});
}

function nextPic() {
	counter = counter+1;
	if(counter == 6)
		counter = 0;
	
	$("#frontPic").fadeOut(350, function() {
		$(this).attr("src", imgArr[counter].src).fadeIn(600);
	});
	$("#caption").fadeOut(200, function() {
		$(this).html(imgCap[counter]).fadeIn(300);
	});
}

