window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#730513');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#41464D');
		}
	});

	//add click event to the "add section" link
	$('add_section').addEvent('click', function(event) {
		event.stop();
		
		// create toggler
		var toggler = new Element('h3', {
			'class': 'toggler',
			'html': 'Common descent'
		});
		
		// create content
		var content = new Element('div', {
			'class': 'element',
			'html': '<p><b>Attorney Linda R. Renard, Renard Law Office, LLC,</b> graduated from Marquette University Law School in May, 1988. Linda graduated from UW-Washington County in May of 1982 with an Associates Degree, and from UW-Madison in May, 1984, with a Bachelor of Arts Degree in Psychology. She worked as an Associate Attorney for Whyte, Hirschboeck, Dudek in Milwaukee, WI after graduation from Marquette Law School where she assisted in re-writing the Wisconsin Marital Property Law Handbook. She then became employed as an Associate Attorney in the Estate Planning, Probate and Elder Law areas of practice with Schloemer Law Firm in West Bend in January of 1989.</p>'
		});
		
		// position for the new section
		var position = 0;
		
		// add the section to our myAccordion using the addSection method
		myAccordion.addSection(toggler, content, position);
	});
});
