//
// addLoadEvent()
// Adds event to window.onload without overwriting currently assigned onload functions.
// Function found at Simon Willison's weblog - http://simon.incutio.com/
//
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}

function initSlideboxes() 
{
	fxslidebar = new fx.Height('slidebar', {duration: 300});
	fxslidebar.hide();
	$('slidebar').innerHTML = $('hidebar').innerHTML;
	$('hidebar').innerHTML = '';
	fxcreditbar = new fx.Height('credits', {duration: 300});
	fxcreditbar.hide();
	fxsidebaracc = new fx.Accordion(document.getElementsByClassName('acctoggle'), document.getElementsByClassName('acccontent'));
	fxsidebaracc.showThisHideOpen($('sbAboutPost'));
};

addLoadEvent(initSlideboxes);
addLoadEvent(initLightbox);	

