Mission.tasks(0).extend ( {

	setup : function ( cb ) {
		Portal.loadPage ( this, 'start', null, function ( ) { cb(); } );
	},
	start : function ( cb ) {
		setStoppableTimeout ( this, function ( ) {
			if ( window.main_chat ) return;
			window.main_chat = new Chat ( "White Smoke Admins" );
			window.chatClient = window.main_chat.getClient();
			loadConversation ( '/scripts/rumourmill/conversations/intro.js', function ( s ) {
				if ( s ) {
					window.main_chat.play ( window.scripts.INTRO, function ( ) {
						cb();
					} );
					var chat = window.main_chat._node;
					var timeout = setTimeout ( function ( ) {
						if ( !$(".chatInputOptions", chat).length ) {
							var $help = $('<div id="intro-help"/>')
								.append (
									$('<span/>')
										.css ( {
											border : "solid 1px #000",
											borderRight : "none",
											display : "block",
											marginRight : "-1px"
										} )
										.append ( 
											$('<span>Click here...</span>')
												.css ( {
													color : "#fff",
													padding : "5px 5px 5px 10px",
													display : "block",
													position : "relative",
													border : "solid 1px #5b5b5b",
													borderRight : "none"
												} )
										)
								)
								.css ( {
									background : "url(/style/rumourmill/help-arrow.png) 100% 50% no-repeat",
									padding : "0 1.5em 0 0",
									position : "absolute",
									bottom : $(".input", chat).outerHeight() / 2,
									right : "100%",
									whiteSpace : "nowrap",
									fontSize : "0.9em"
								} )
								.appendTo ( chat );
							$help
								.css ( {
									marginRight : -20,
									marginBottom : -($help.outerHeight()/2)
								} );
							var bounce = function ( ) {
								$help.animate ( { right : "+=10px" }, {
									duration : 250,
									complete : function ( ) {
										$help.animate ( { right : "-=10px" }, {
											duration : 250,
											complete : bounce
										} );
									}
								} );
							}
							bounce();
							$(".input", chat).one ( "click", function ( ) {
								$help.stop(true).remove();
							} );
						}
					}, 5000 );
					$(".input", chat).one ( "click", function ( ) {
						clearTimeout ( timeout );
					} );
				}
			} );
		}, 500 );
	}
	

} );

