hpVcamAssignmentPage = Class.create(
{
	initialize: function()
	{
		this._user = current.User.getInstance();
		document.observe('dom:loaded', this.__onDomLoad.bindAsEventListener(this));
	},
	__onDomLoad : function ()
	{
		if ($('joinButton'))
		{
			$('acceptButton').observe('click', this.__acceptAndJoin.bindAsEventListener(this));
			$('joinButton').observe('click', this.__acceptAndJoin.bindAsEventListener(this));
		}
		else
		{
			this.__showHpAssets();
		}
		this.__attachQuitLink();
	},
	__acceptAndJoin : function (event)
	{
		current.content.groups.GroupPage.getInstance().__onJoinClick(event);
		if (this._user.isLoggedIn() && current.User.getInstance().isEmailVerified())
		{
			this.__showHpAssets();
		}
		this.__attachQuitLink();
	},
	__showHpAssets : function ()
	{
		$('dlAssetsLoggedin').show();
		$('dlAssetsLoggedout').hide();
	},
	__hideHpAssets : function ()
	{
		$('dlAssetsLoggedin').hide();
		$('dlAssetsLoggedout').show();
	},
	__attachQuitLink : function ()
	{
		if ($('leaveGroupLink'))
		{
			$('leaveGroupLink').observe('click', this.__hideHpAssets.bindAsEventListener(this));
		}
	}
});
hpVcamAssignmentPage.getInstance = function() {
	if (!document.__hp__)
	{
		document.__hp__ = new hpVcamAssignmentPage();
	}
	return document.__hp__;
};
var hp = hpVcamAssignmentPage.getInstance();