/**
 * Coaching North West - CoachWeb
 * 
 * Presents the JavaScript framework for the CoachWeb application
 * 
 * @author Ollie Maitland
 * @copyright Byng Systems LLP
 */
var CoachingApp = ByngApp.extend({
	
	/**
	 * Holds meta data on this application
	 * 
	 */
	meta	: {
		'name'	    : 'Coaching NW',
		'version'   : '0.1.0',
		'author'    : 'ollie@byng-systems.com',
		'copyright' : 'Byng Systems LLP',
		'date'  	: '2007-04-07'
	},
	
	icons : {
		'loader' : '/html/admin/images/indicators/loading.gif'
	},
	
 	/**
 	 * Gateway base
 	 * 
 	 * @type String
 	 */
 	gatewayBase : "/ajax/cnw/applicants/",
 	
 	/**
 	 * Holds the URL for the loading icon
 	 * 
 	 * @type String
 	 */
 	loadingIcon : '/html/images/nav/loading.gif',

	/**
	 * Set the loader in use
	 * 
	 * @param String loader
	 */
	setLoader : function ( loader )
	{
		this.loader = loader;
		return this;
	},

	/**
	 * Toggle the menu display
	 * 
	 * @param String category
	 */
	display : function (category) 
	{
		var whichcategory = $(category);
		if (whichcategory.className=="show") {
			whichcategory.className="hide";
		} else {
			whichcategory.className="show";
		}
	}
		
});

// implement ByngApp methods on CoachingApp
CoachingApp.implement (ByngApp);

// Set the CoachingApp
Byng.setApp( new CoachingApp );

// Set the input handler
Byng.setInput( new ByngInput );

// load the Byng User Interface object
Byng.setUi ( new ByngUI( UI_FLAG_AJAX ) );

var ByngUI = Byng.ui;