var slider=function(){
	return{
		init:function(sliderId, currentPanel){
			$('#' + sliderId + ' > div.header').click(function() { slider.process(this); });
			if (currentPanel > 0) {
				$('#' + sliderId + ' > div.content').eq( parseInt(currentPanel) - 1 ).css({'display':'block'});
			}
		},
		process:function(headerClicked){
			var parentId   = $(headerClicked).parent().attr("id");
			var clickedId  = $(headerClicked).attr("id").replace('header-', '');
			
			$('#'+parentId+' > div.content[@name!=content-'+clickedId+']').each(function() { $(this).slideUp('normal'); } );
			$('#content-' + clickedId).slideToggle('normal');
		}
	};
}();