// JavaScript Document
//
 $(document).ready(function(){
   $('div.role_filter').click(function() { 
		//toggle the accordian on any open items
		//TODO:it stupidly assumes there is only one!
		toggle = 	$('dl.view-items dt');
		if(toggle.length){
			toggle.index($('[@class*=selected]')[0]);
			$('dl').activate(toggle);
			if(this.id){
				test = 'dt.'+this.id;
				toHide = $('dt.filter');
				toShow = $('dt.filter').filter(test);
				toHide.hide();
			}else{
				toShow = $('dt.filter')
			}
			toShow.show(); 
		}
		});
 });
