document.write("<style>.hideOnLoad { visibility:hidden; }</style>");

$(document).ready(
	function(){
		var defaultLeftPhoto = $("#leftPhotoArea").html();
		$("#leftPhotoArea").attr("linkid",topLeftPhoto).html("").linksList({maxLinks:1,linkImage:1,setTitleToImage:1,callback:function(numlinks){checkForPhotos(numlinks,"leftPhotoArea",defaultLeftPhoto);}});

		var defaultRightPhoto = $("#rightPhotoArea").html();
		$("#rightPhotoArea").attr("pid",topRightPhoto).html("").getPhotoAlbums({maxAlbums:1,maxItems:1,hardPhotoWidth:486,callback2:function(numAlbum){checkForPhotos(numAlbum,"rightPhotoArea",defaultRightPhoto);}});

		var defaultMainPhoto = $("#mainPhotoArea").html();
		$("#mainPhotoArea")
			.attr("pid",mainPhoto)
			.html("")
			.getPhotoAlbums({
				maxAlbums:1,
				maxItems:15,
				hardPhotoWidth:486,
				callback2:function(numAlbum){
					checkForPhotos(numAlbum,"mainPhotoArea",defaultMainPhoto);
					$("#mainPhotoArea ul").cycle();
				}
			});
		
		var defaultPsuedoL1 = $("#selfManagedPsuedoL1").html();
		$("#selfManagedPsuedoL1")
			.attr("linkid",PsuedoL1LinkID)
			.html("")
			.linksList({
				maxLinks:1,
				linkImage:1,
				setTitleToImage:0,
				callback:function(numlinks){
					if(numlinks==0){
						$("#selfManagedPsuedoL1").html(defaultPsuedoL1);
						$("#nav_125330b").css("visibility","visible");
					}
				}
			});
	}
);

function checkForPhotos(numAlbum,container,defaultStuff){
	if(numAlbum==0){ $("#"+container).html(defaultStuff); }
	$("#"+container).css("visibility","visible");
}