// trudev base namespace to avoid framework conflicts
var trudev = {};

// trudev application framework
trudev.Application = {
	components:[]
};

trudev.Application.addComponent = function( obj )
{
	var comps = trudev.Application.components;
	comps[ comps.length ] = obj;
};

trudev.Application.init = function()
{
	var comps = trudev.Application.components,
		index = comps.length;
	
	while ( index-- )
	{
		if ( typeof( comps[ index ].init ) === 'function' )
			comps[ index ].init();
	}
};

document.observe( 'dom:loaded', trudev.Application.init );
