/*************************************************************************************************\
|* @author Unknown                                                                               *|
|* @version 1.0                                                                                  *|
\*************************************************************************************************/

/*************************************************************************************************\
|* @module FlashMessage                                                                          *|
|*                                                                                               *|
|* @description Contains the handling of how to fade out the #flash-message in which situation.  *|
|*                                                                                               *|
|* @version 1.0                                                                                  *|
\*************************************************************************************************/
if (!CLUBNICK.Modules) {
	CLUBNICK.Modules = {};
}

CLUBNICK.Modules.FlashMessage = (new function () {

	/*********************************************************************************************\
	|* @method init                                                                              *|
	|*                                                                                           *|
	|* @description Hides #flash-message, if available.                                          *|
	\*********************************************************************************************/
	this.init = function () {
	    var $flash = $('flash');

		if (!$flash) {
			return;
		}

		if ($$('body.wiw_quizgame').empty()) {
			new Effect.Fade($flash , { delay: 3 });
	    } else {
			$flash.hide();
		}
	};
});