Mission.tasks(1).extend ( {

	setup : function ( cb ) {
		Portal.loadPage ( this, 'dailyhate/', function ( ) {
			loadScript ( '/scripts/chat/chatclient.js', function ( s ) {
				if ( !window.main_chat ) {
					window.main_chat = new Chat ( "White Smoke Admins" );
					window.chatClient = window.main_chat.getClient();
					window.chatClient.hideDrawer(true);
					loadConversation ( '/scripts/dailyhate/conversations/intro.js', function ( s ) {
						if ( s ) {
							window.main_chat.load ( window.scripts.INTRO, function ( ) {
								//DailyHate.unlockFiltering();
								cb();
							} );
						}
					} );
				} else {
					//DailyHate.unlockFiltering();
					cb();
				}
			} );
		} );
	},
	start : function ( cb ) {
		loadConversation ( '/scripts/dailyhate/conversations/filtering.js', function ( s ) {
			if ( s ) {
				window.filter_chat = new Chat ( "Melissa, Cal", window.chatClient );
				//window.filter_chat.focus();
				window.filter_chat.play ( window.scripts.FILTERING, function ( ) {
					//window.main_chat.focus();
					window.main_chat.play ( window.scripts.FILTERED, function ( ) {
						cb();
					} );
				} );
			}
		} );
	}

} );

