	jQuery().ready(function(){
		// simple Accordion
		jQuery('#list1').Accordion();
	        	
		// highly customized Accordion
		function simpleLog(message) {
			jQuery('<div>' + message + '</div>').appendTo('#log');
		}
		jQuery('#list2').Accordion({
			event: "mouseover",
			active: 'dt.selected',
			selectedClass: "active"
		}).change(function(event, newHeader, oldHeader, newContent, oldContent) {
			simpleLog(oldHeader.text() + ' hidden');
			simpleLog(newHeader.text() + ' shown');
		});
		
		// first simple Accordion with special markup
		jQuery('#list3').Accordion({
			showSpeed: 1000,
			hideSpeed: 150,
			header: 'div.title',
			active: false,
			alwaysOpen: false,
			animated: false
		});
		
		// second simple Accordion with special markup
		jQuery('#navigation').Accordion({
			active: false,
			header: '.head',
			alwaysOpen: false,
			navigation: true
		});
		
		// bind to change event of select to control first and seconds accordion
		// similar to tabs plugin triggerTab(), without an extra method
		jQuery('#switch select').change(function() {
			jQuery('#list1, #list2, #list3, #navigation').activate( this.selectedIndex-1 );
		});
		jQuery('#close').click(function() {
			jQuery('#list1, #list2, #list3, #navigation').activate(-1);
		});
		jQuery('#switch2').change(function() {
			jQuery('#list1, #list2, #list3, #navigation').activate(this.value);
		});
	});

