/*******************************************************************************
 * Javascript functions needed to display the login module on the homepage
 * @Author perryc
 * 
 * Dependencies:
 * --jQuery (1.3.2)
 * --cfc.common.auth
 *******************************************************************************/
//Create Namespace
cfc.namespace("components.common.hplogin");

/*
 * Object to contain methods needed for page
 */
cfc.components.common.hplogin = (function() {
	
	/***********************************
	 * PRIVATE METHODS
	 ***********************************/
	var priv = {
			
	};
	
	/***********************************
	 * PUBLIC API
	 ***********************************/
	var pub = {
		
		/*
		 * Checks the authentication status and displays the appropriate section
		 */
		displayModule : function() {
			cfc.common.auth().displayIfAnonymous('#c-hpLoginUnauthView');
			cfc.common.auth().displayIfLoggedIn('#c-hpLoginAuthView');
			return false;
		}
	};
	
	return pub;
	
});

/*
 * load up things that must start on page load 
 */
$(function() {
	cfc.components.common.hplogin().displayModule();
});
