// JavaScript Document
	try {
	    $(function() {

	        $("#fotogaleria img[rel]").overlay({ effect: 'apple' });

	        if (vFGCodP != 0) {
	            $('#fotogaleria img[rel = "#imagem' + vFGCodP + '"]').click();
	        }
	    });
	} catch(e) { }
	
	function ampliaFoto(pFoto,pLargura,pAltura) {
		if (pFoto != '') {
			var URL = "fotogaleria_amplia.asp?foto=" + pFoto;
			pLargura = (pLargura==undefined ? 0 : pLargura);
			pAltura = (pAltura==undefined ? 0 : pAltura);			
			var W = (pLargura == 0 ? 400 : (pLargura + 30));
			var H = (pAltura == 0 ? 400 : (pAltura + 80));
			var Wpopupsize = (W/2);
			var Hpopupsize = (H/2);
			var CenterPopUpX = (screen.width / 2) - (Wpopupsize);
			var CenterPopUpY = (screen.height / 2) - (Hpopupsize);
			var pos = "left=" + CenterPopUpX + ",top=" + CenterPopUpY;
			var vJanela = window.open(URL, "vdFGAmplia", "width=" + W + ",height=" + H + ",scrollbars=no," + pos);
			vJanela.focus();
		}
	}

