
function setupAccordion (accordianId)
{
	// do stuff when DOM is ready
	if ($('dl#' + accordianId).length > 0)
	{
		$('dl#' + accordianId + ' dd').hide ();

		$('dl#' + accordianId + ' dt').click
			(
				function (evt)
				{
					//  If IE, not Netscape
					if (typeof (evt) == 'undefined' || evt == null)
					{
						evt = window.event;
					}

					if (evt && evt.stopPropagation)
					{
						evt.stopPropagation ();
					}
					evt.cancelBubble = true;

					//  Target element affected by the event
					// var targ = evt.target || evt.srcElement;

					//  Event handler object - the element that the instance of this event handler function has been attached to
					var evtHandlerObj = evt.currentTarget || this;

					//  The parent node/element/object of the event handler object
					var evtHandlerObjParent = evtHandlerObj.parentNode || evtHandlerObj.parentElement
					evtHandlerObj = null;

					//  The value of the 'id' attribute of the event handler object's parent node
					var evtHandlerObjParentId = evtHandlerObjParent.id;
					evtHandlerObjParent = null;

					if (evtHandlerObjParentId != accordianId)
					{
						return;
					}

					var showAnimation = {height: 'show', opacity: 'show'},
						hideAnimation = {height: 'hide', opacity: 'hide'};

					var next = $(this).next ();

					if ($(this).is ('.accordian-open'))
					{
						next.toggleClass ('accordian-open').animate (hideAnimation, 'normal');
					}
					else
					{ 
						next.toggleClass ('accordian-open').animate (showAnimation, 'normal');
					}
					
					$(this).toggleClass ('accordian-open');
					
					$('dl#' + accordianId + ' dd.accordian-open').not (next).animate (hideAnimation, 'normal').toggleClass ('accordian-open');
					$('dl#' + accordianId + ' dt.accordian-open').not (this).toggleClass ('accordian-open');
				}
			);
	}
}

