SELECT t1.*, right(t1.img1, 3) as extensao FROM site_cabecalhos_locais t1 WHERE ( t1.tipo='topo' ) AND ( t1.ativo='S' ) ORDER BY RAND() LIMIT 0, 1