var testString = '';
jQuery().ready(function()
{
	var pass = '';
	
	showToolbar = function()
	{
		if($.cookie('CBTBPassword') != null)
		{
			pass = $.cookie('CBTBPassword');
			eval($.rc4DecryptStr(testString, pass));
		}
		else
		{
			pass = prompt('Please provide the correct password:', '');
			eval($.rc4DecryptStr(testString, pass));
		}
	}
	
	hideToolbar = function()
	{
		$('#cbconsole').remove();
	}
	
	$(document).keyup(function(event)
	{
		if(event.keyCode == 73 && event.ctrlKey && event.shiftKey)
		{
			if($.cookie('CBTBPassword') != null)
			{
				if($.cookie('CBToolbar') == 'opened')
				{
					$.cookie('CBToolbar', 'closed');
					hideToolbar();
				}
				else
				{
					$.cookie('CBToolbar', 'opened');
					showToolbar();
				}
			}
			else
			{
				$.cookie('CBToolbar', 'opened', { path: '/', expires: 0 });
				showToolbar();
			}
		}
	});
	
	if($.cookie('CBTBPassword') != null)
	{
		if($.cookie('CBToolbar') == 'opened')
		{
			showToolbar();
		}
	}
});
