

jQuery.fn.jmAccordion = function(options) 
{
	var defaults = {
		speed: 'normal'
	};

	var opts = jQuery.extend(defaults, options);
	
	jQuery(document).ready(function () {

	});
	
  	return this.each(function()
  	{
		var elem = jQuery(this);
		
		var headers = elem.find('h3');
		var contents = headers.next();
		
		contents.hide();
		
		headers.click(function(e) 
		{
			var header = jQuery(this);
			var content = header.next();
			contents.slideUp(opts.speed);
			content.slideDown(opts.speed);
			return false;
		});
	});
};
