/**
 * panel.js
 * 
 */

var myLibriPanel;

/**
 * Libri panel options
 * 
 */
LibriPanelOptions = Object.extend({
	elements: {
		},
	messages: {
		}
	}, window.LibriPanelOptions || {});

/**
 * Libri panel class
 *
 */
var LibriPanel = Class.create();

LibriPanel.prototype = Object.extend(new LibriCommon(), {
	/**
	 * Parameters
	 */
	panels: null,
	
	overlay: null,


	/**
	 * Methods
	 *
	 * Class constructor
	 * 
	 * @return LibriPanel
	 */
	initialize: function() {
		this.panels = LibriPanelOptions.panels;
		this.elements = LibriPanelOptions.elements;
		this.messages = LibriPanelOptions.messages;

		this.overlay = new LibriOverlay();

		
		
	},

	activatePanel: function(panel) {
		if (panel && this.panels && this.panels.indexOf(panel) != -1) {
			this.panels.each(
				function (p) {
					var pObj = $(p);

					if (pObj && p == panel) {
						pObj.show();
					} else if (pObj) {
						pObj.hide();
					}
				});
		}
	}
	
});

/**
 * Create panel object
 *
 * @return void
 */
function createLibriPanel() {
	myLibriPanel = new LibriPanel();
}

