// mootools  1.2.1 - Accordion / Scroll  - RCS - 05.27.10

window.addEvent('domready', function() {
	//here's your scroll setup
	//new SmoothScroll({ duration: 200 },window); 
	
	//here's your standard acccordion setup
    var accordion = new Accordion($$('.toggler'),$$('.slide'),
    {
        show: -1,
        opacity: 0,
        alwaysHide: true,
		onActive: function(toggler) { toggler.morph({'color':'#8C8C8C'}); },
        onBackground: function(toggler) { toggler.morph({'color':'#4C4C4C'}); }
    });
    
    //here's the code for the custom togglers
    
    //first for the $$(".customtoggler") elements
    $$('.customtoggler').addEvent('click',function(e)
    {
        //stop default action
        e.stop();
        
        //use display() to display a certain slide
        accordion.display(this.get('rel'));
    });
});