/*
 * jQuery Slider Accordion Plugin
 * Copyright (c) 2010 C. Rodriguez
 * Version: 1.0 (02-APR-2010)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.6 or later
 */
function initSlider()
{
	$('ul.menu ul').hide();
	$.each($('ul.menu'), function(){
		$('#' + this.id + '.expandfirst ul:first').show();
		$('#' + this.id + '.expandfirst span.expand:first').hide();
	});
	$('ul.menu li a').click(function(){
		var checkElement = $(this).next();
		var parent = this.parentNode.parentNode.id;
		var expandElement = $(this).children('span.expand')
		if($('#' + parent).hasClass('noaccordion'))
		{
			$(this).next().slideToggle('normal');
			return false;
		}
		if((checkElement.is('ul')) && (checkElement.is(':visible')))
		{
			if($('#' + parent).hasClass('collapsible'))
			{
				$('#' + parent + ' ul:visible').slideUp('normal');
			}
			return false;
		}
		if((checkElement.is('ul')) && (!checkElement.is(':visible')))
		{
			$('#' + parent + ' ul:visible').slideUp('normal');
			$('span.expand').show();
			checkElement.slideDown('normal');
			$(expandElement).hide();
			return false;
		}
	});
}
