function MineConstruction() {
	this.mine = new Object();
	/* tibanna.mine.active - Contains the id (filepath) that holds the active tab. */	
	this.mine.active = "splash";
	/* tibanna.mine.contents - Stores modified text by id (filepath) */
	this.mine.contents = new Array();
	/* tibanna.mine.paths - Contains ids (filepaths) for all open tabs. */
	this.mine.paths = new Array();	
	/* tibanna.mine.positions - Keeps track of where the cursor is when switching tabs. */
	this.mine.positions = new Array();
	/* tibanna.cloudcity - Representation of the Bespin editor component. */	
	this.cloudcity = null;
	
	/*
	 * Function initialize() - Construct our Tibanna object and call basic initialization.
	 */
	this.initialize = function() {
		$("#browser-list").load(jsurl+"editor/files", function() { 
			if(typeof(initialpath) != 'undefined') {
				tibanna.actions.openFile(initialpath);
			}
		});
		$("#toolbox .internals").load(jsurl+"toolbox/index", function() { });	

	    tibanna.cloudcity.set("syntaxengine");
		tibanna.cloudcity.set("tabarrow","off");
		tibanna.cloudcity.set("autoindent","on");
		tibanna.cloudcity.set("language","auto");
		tibanna.cloudcity.set("theme","tibanna");
		
		tibanna.ui.initialize();		
		tibanna.keyboard.initialize();
		
		$("#loadscreen").remove();
		if(typeof(servermessage) != 'undefined') {
			tibanna.ui.createBubble("Error", servermessage);
		}
	};
}

var tibanna = new MineConstruction(); 