SiteFeatures = Class.create( {
	initialize: function() 
	{
 		$$("a.ombudsman").each(
			function ( link ){link.observe( "click" , this.openMap.bind(this) );}
		 , this );
		
		$("fechar_txt").observe( "click" , this.closeMap.bind(this) );
	},

	mostrar_fundo:function() {
		if (!this.fundo)
		{
			$$("body").first().insert( '<div id="fundo_escuro"></div>' );
			this.fundo = $("fundo_escuro");
		}
		this.fundo.setStyle({"display":"block"})
	},

	fechar_fundo: function() {
		this.fundo.setStyle({"display":"none"})
	},

	openMap:function() {
			this.mostrar_fundo()
			$('popup_ombudsman').setStyle( {"display":"block"} );
		},
	closeMap: function() {
			$('popup_ombudsman').setStyle( {"display":"none"} );
			this.fechar_fundo();
		}
});
var site;
document.observe("dom:loaded",  function () {
	site = new SiteFeatures()
});

