/**
 * Content.js
 *
 * This is an abstract class inherited by an implementation specific to each page.
 * It's the only thing that can be dynamically attached and removed from a Page.
 * Automatically registers itself with the Page as a Content object.
 * Always attaches to #Content
 *
 * _Parameters_
 *   Name: The name to register with the Page.
 */

BLIP.Class.create("BLIP.Unit.Content", BLIP.Unit,
	function(config) {
		var thisContext = this;
		BLIP.Unit.call(this, { domRoot : $("#Content") });

		this.name = config.name;


	},
	{
		selector : "#Content",

		registerWithPage : function() {
			BLIP.Page.registerContent(this);
		},

		setAsCurrentContent : function() {
			BLIP.Page.setCurrentContent(this.name);
		},

		getState : function() {
			throw new ReferenceError("Static function called without implementation");
		},

		setState : function() {
			throw new ReferenceError("Static function called without implementation");
		},

		getStateURI : function() {
			throw new ReferenceError("Static function called without implementation");
		}
	}
);

