$(document).ready(function() {
	getLastfm();
	$('a[rel^=lightbox]').lightBox();
	//$('a[@rel*=lightbox]').lightBox();
	//$('.divPortrait a').lightBox();
});

function getLastfm() {
	$('#lastfm').load('/lastfm.php');
	return true;
}

function projGetDescr(strId) {
	var strElement = 'descr' + strId;
	var strURL = '/ajax.php?tbl=projekte&fld=beschreibung&id=' + strId;
	
	new Ajax.Updater(
		{success: strElement},
		strURL,
		{asynchronous: true}
	);
}

function showNavBar(intId) {
	arrNavMap = Array();
	arrNavMap[2] = 3;
	arrNavMap[3] = 2;
	
	objElementVis = document.getElementById('navbar' + intId);
	objElementHid = document.getElementById('navbar' + arrNavMap[intId]);
	
	if(objElementVis.style.visibility == 'visible') {
		//document.location.href = '/index.php?id=' + intId;
	}
	
	objElementHid.style.visibility = 'hidden';
	objElementVis.style.visibility = 'visible';
	
	// Now the buttons
	strButtonBaseSrc = '/img/nav_button_';
	
	objButtonVis = document.getElementById('navbutton' + intId);
	objButtonHid = document.getElementById('navbutton' + arrNavMap[intId]);
	
	AlphaOpacity.set(objButtonVis, 100);
	AlphaOpacity.set(objButtonHid, 50);
	//objButtonVis.style.opacity = 1.0;
	//objButtonHid.style.opacity = 0.3;
	
	//objButtonVis.src = strButtonBaseSrc + intId + '_h.gif';
	//objButtonHid.src = strButtonBaseSrc + arrNavMap[intId] + '.gif';
}
