// ==UserScript==
// @name           Netlog Topbar
// @description    Puts the netlog top bar always on the top of your screen
// @copyright      Klaas Cuvelier (klaas@netlog.com, http://www.cuvedev.net))
// @version        0.1
// @match http://*.netlog.com/*
// @match http://*.staging.comcore.be/*
// @include http://*.netlog.com/*
// @include http://*.staging.comcore.be/*
// ==/UserScript==


var version = getNetlogVersion();

function getNetlogVersion()
{
	var version = 0;
	if (document.getElementById('netlogVersion'))
	{
		try
		{
			var v 	= document.getElementById('netlogVersion').value;
			version = v == 'staging' ? 6 : v.match(/([0-9]+)\.?([0-9].)/)[1];
		}
		catch(e) {} 
	}
	return version;
}

if (version == 6)
{
	hw = document.getElementById('headerWrapper');
	wp = document.getElementById('wallpaper');

	if (hw && wp)
	{
		hw.style.position = 'fixed';
		hw.style.zIndex   = 50;
		hw.style.top      = 0;
		hw.style.width    = '100%';
	
 		wp.style.paddingTop = '94px';
	}
}
