var myAccordion;
window.addEvent('domready',function(){
	if($('displaybox'))
	{
		var nS5 = new noobSlide({
			mode: 'vertical',
			box: $('displaybox'),
			size: 260,
			items: $$('#displaybox h2')//,
			/*addButtons: { previous: $('viewprev'),	next: $('viewnext')	}*/
		});
		nS5.addHandleButtons($$('p.buttons span'));
	}
	if($$('.btoggle').length)
	{
		activeid = 0 ;
		if($("activcid")) {
			activeid = $("activcid").get('text');
		}
		//create our Accordion instance
		myAccordion = new Accordion($('pjnav'),'.htoggle', '.btoggle', {
			opacity: false,
			display: activeid,
			onActive: function(toggler, element){ toggler.set('styles',{'background':'none','color':'#9F2063'});	},
			onBackground: function(toggler, element){ toggler.set('class','htoggle'); toggler.erase('style');	}
		});
		/*if($("activcid")) {
			$$('.htoggle').addEvent('mouseenter', function() { this.fireEvent('click'); });
		} else {
			$$('.htoggle').addEvent('mouseenter', function() { this.set('class','htogglehover'); });
			$$('.htoggle').addEvent('mouseleave', function() { this.set('class','htoggle'); });
		}*/
	}
});
