var History = Class.create();

History.prototype = {
	initialize: function(){
		this.loaded = false;
	},
	
	load: function(){
		this.loaded = true;
	
		new Ajax.Updater('history', '/history/show/', {onComplete: function(){ this.loaded = true; new Effect.toggle('history', 'blind'); }});
	},
	
	show: function(){
		if($('history').style.display == ''){
			$('history_button').className = '';
		} else {
			$('history_button').className = 'history_active';
		}
	
		if(!this.loaded){
			this.load();
		} else {
			new Effect.toggle('history', 'blind');
		}
	}
}
