// JavaScript Document
var manifesto= {
	
	inicialize: function(options){
		
		this.options = Object.extend({
			container: document.body,
			opacity: 0.7,
			url: ''
		}, options || {});
		
		this.manifestos = [];
		$A($$('.manifesto_point')).each(function(el) {
			
			el.onclick = this.click.pass(el, this);			
			this.manifestos.push(el);
			
		}, this);
		
				
		this.ajaxRequest = Class.empty;

	},
	
	
	click: function (element) {
				
		//$('cont_point').empty();
		
		this.new_manifesto = 'cont_' + element.id;
		
		$A($$('.manifesto_point')).each(function(el) {
			
			if ( el.hasClass('current') ) { el.removeClass('current'); }
			if ( el.id == element.id ) { el.addClass('current'); }			
			
		}, this);
		
		this.changeManifesto();
		
	},
	
	changeManifesto: function() {
		
		var manifesto_scroll = new Fx.Scroll("cont_point",{					 
			wait: false,
			duration: 600, 
			transition: Fx.Transitions.Cubic.easeInOut
		});
		
		manifesto_scroll.toElement($(this.new_manifesto));
		
		//var clone = $(this.new_manifesto).clone().injectInside('cont_point');
		
		//clone.removeClass('point_value');
		
		return false;
		
	}
	
}
