SiteFeatures = Class.create( {
	initialize: function() 
	{
		this.body = $("container");		
		this.body.setStyle({fontSize:(this.currentSize + 'px')});
		$("increaseFont").observe( "click" , this.increaseFont.bind( this ) );
		$("decreaseFont").observe( "click" , this.decreaseFont.bind( this ) );
	
		$$("a.ver_boletim").each(
			function ( link ){link.observe( "click" , this.openMap.bind(this) );}
		 , this );
		 
		$("fecharboletim2").observe( "click" , this.closeMap.bind(this) );
		 
	},
	currentSize:12,
	increaseFont:function()
	{
		this.currentSize ++;
		this.body.setStyle({fontSize:(this.currentSize + 'px')});
	},
	decreaseFont:function()
	{
		this.currentSize --;
		this.body.setStyle({fontSize:(this.currentSize + 'px')});
	},
		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
			$('view_boletim').setStyle( {"display":"block"} );
		},
	closeMap: function() {
			$('view_boletim').setStyle( {"display":"none"} );
			this.fechar_fundo();
		}
});
var site;
document.observe("dom:loaded",  function () {
	site = new SiteFeatures()
});


