TBHack = window.TBHack || {}
TBHack.sKeyCode = [13, 32];
TBHack.Init = function() 
{
	$('a.new_window').each(function() 
	{
		this.title += '(Questo collegamento verrą aperto su una nuova finestra)';
		$(this).click(function(e) 
		{
			TBHack.Open(this.href);
			return e.preventDefault();
		});
	
		$(this).keypress(function(e) 
		{
			if (e.keyCode==13 || e.keyCode==32) 
			{
				TBHack.Open(this.href);
				return e.preventDefault();
			}
		});
	});
}

TBHack.Open = function(url) {
	window.open(url, 'TBH' + Math.round(10e10 * Math.random() + 0));
}

$().ready(function() {
	TBHack.Init();
});



