window.addEvent('domready', function(event) {
	$$('a.WmdcLink').addEvent('click');
    
	    // Create a show/hide slider for DIO
	    var list = $$('div[id=pageRaterSubDiv]');
    	//list elements to be clicked on
    	var headings = $$('a[id=pageRaterHeader]');
	    //array to store all of the collapsibles
    	var collapsibles = new Array();	    
    	
	if(list!=null&&list.length>0)
	{
		headings.each( function(heading, i) {
			//for each element create a slide effect
        	    	var collapsible = new Fx.Slide(list[i], {
        	    		duration: 200,
        	    		transition: Fx.Transitions.linear
			});
	
        		//and store it in the array
        		collapsibles[i] = collapsible;
		
        		//add event listener
        		heading.onclick = function(){
				    collapsible.toggle();
        		    return false;
        		}
		
        		//collapse all of the list items
        		collapsible.hide();
   		}); 
	}
});
