

var accordeon = {
	
	init: function() {

		var $content = $(".content");
		var $bar = $(".bar");
		
		if (!$content.length || !$bar.length) return;
		
		$content.hide();
		$bar.click( function() {
			$bar.removeClass("current");
			$content.not(":hidden").slideUp('slow');
			var current = $(this);
			current.next()
				.not(":visible")
				.slideDown('slow',function() {
					current.addClass("current");
				});
		});
	}
};

$(document).ready(accordeon.init);

