/**
 * Sliding Menu 1.1.0, last modified: 29.10.2008
 * 
 * @author STONE Software Solutonjs GmbH, Aycko Maerzke
 */
$.fn.slidingMenu = function(options) {
	options = $.extend({
		speedClose: 200,
		speedOpen: 500,
		classCurrent: 'current'
	}, options);
	
	var navigationElement = this;
	
	$(navigationElement).find('ul').hide();
	
	$(navigationElement).find('a.' + options.classCurrent).next('ul').show();
	
	$(navigationElement).children('li').children('a').click(function() {
		var element = this;
		
		if ($(element).next('ul').is(':hidden')) {
			$(navigationElement).find('ul:visible').toggle('blind', { direction: "vertical" }, options.speedClose);
		};
		
		$(element).next('ul').toggle('blind', { direction: "vertical" }, options.speedOpen);
	});
}
