MostPopular.app = function()
{
	function createTooltip(id, message)
	{
		return new Ext.ToolTip({
			target: id,
			showDelay: 0,
			width: 230,
			mouseOffset: [-250, -14],
			html: message
		});
	}
	
	return {
		init: function()
		{
			Ext.QuickTips.init();

			MostPopular.MostPopularGrid.init();
			MostPopular.EssentialGrid.init();

			createTooltip('most_popular_tooltip', 'These were the most popular terms on InvestorWords.com last month. Change in ranking from previous month, when applicable, is displayed in the second column.');
			createTooltip('essential_tooltip', 'Here\'s a list of other investing terms every one should know');
		}
	};
}();

Ext.onReady(MostPopular.app.init, MostPopular.app);
