$(document).ready(function() {
	$("#panel-pic img").hide();
	var maxImg = $("#panel-pic img:last").attr("id");
	maxImg = maxImg.split("-")
	var maxNo = parseInt(maxImg[1]);
	var ranNo = Math.floor(Math.random() * maxNo) + 1;
	setTimeout(function(){
		$("#panel-pic").find("#rpic-"+ranNo).fadeIn(2000);
	}, 500);
	//
	/* Fading in and out of pictures
	var iniNo = 1;
	$("#panel-pic img:first").fadeIn(2000);
	setInterval(function() {
		iniNo = iniNo + 1;
		if(iniNo > maxNo){
			iniNo = 1;
		}
		var nextPic = $("#panel-pic").find("#rpic-"+iniNo);
		$("#panel-pic").find("img:visible").fadeOut(800, function(){
			nextPic.fadeIn(2000);
		});
	}, 7000); */
});
