var ct_url = '/empresas/dyn.php';
$(document).ready(function(){
	// Detalhes do registro
	$(".e_fantasia").dblclick(function(){
			location.href=$("a", this)[0];
	});

	// Zebra
	$("tr:nth-child(odd)").addClass("odd");

	$(".e_email").click(function()
	{
		$.post(ct_url, {task: 'LoadFormContato', email: $("a",this)[0].href});
		return false;
	})
	
})

var ver_anuncio = 0;
function VerAnuncio(selector)
{
	//$("#" + selector + " .anuncio").toggle('slow');
	if(ver_anuncio == 0)
	{
		$("#dv_anuncio_conteudo").html($("#" + selector + " .anuncio").html());
		$("#div_anuncio").show('slow');
		ver_anuncio = 1;
	}
	else
	{
		$("#div_anuncio").hide('slow');
		ver_anuncio = 0;	
	}
}
JSFX_FloatDiv("div_anuncio", FindPos($("#dv_frm_procura")[0],'x'),0).flt();
JSFX_FloatDiv("div_mapa", FindPos($("#dv_frm_procura")[0],'x'),0).flt();

function VerMapa(endereco,lt,lg)
{
	r =  Rand();
	$("#if_mapa")[0].src="/mapa/ver_mapa.php?r="+r+"&lt="+lt+"&lg="+lg+"&endereco=" + escape(endereco);
	$("#if_mapa")[0].onload = $('#div_mapa').show('slow');
}


