songcentral.quicktip=Class.create
(
	{
		config:
		{
			text:	''
		},
		window:		false,
		initialize: function(config)
		{
			if (Cookies.get('songCentral_showTooltips')!=1)
			{
				if (Object.isString(config))
				{
					this.config.text=config;
				}
				else
				{
					Object.clone(this.config);
					Object.extend(this.config,config);
				}
				this.window=new Ext.Window
				(
					{
						title:		'Song Central Tip!',
						width:		350,
						autoHeight:	true,
						modal:		true,
						resizable:	true,
						items:
						{
							xtype:		'form',
							bodyStyle:	'padding:5px 8px;',
							items:
							[
								{
									border:		false,
									style:		'line-height:15px;',
									html:		this.config.text
								}
							]
						},
						bbar:
						[
							{
								xtype:		'checkbox',
								id:			'tip_showTips',
								hideLabel:	true,
								boxLabel:	'Don&rsquo;t show anymore tips.',
								listeners:
								{
									check: function()
									{
										Cookies.set('songCentral_showTooltips',this.checked?1:0);
										return;
									}
								}
							},
							'->',
							{
								xtype:		'button',
								text:		'Close',
								handler:	function()
								{
									this.window.close();
									return;
								}.bind(this)
							}
						]
					}
				);
				this.window.show();
			}
			return;
		}
	}
);