<commit_before>//= require <src/header.js>

CD3.Accordion = Class.create({
	initialize: function(element){
		element = $(element);
		
		this.options = Object.extend({
			triggers:		'.trigger',
			content:		'.content',
			event:			'click',
			duration:		1,
			selected:	'selected'
		}, arguments[1] || {});
		
		this.trigger	= null;
		this.containers	= element.select(this.options.content);
		this.current	= this.containers.find(function(el){ return el.visible(); });
		
		element.select(this.options.triggers).each(function(trigger, key){
			if (trigger.hasClassName(this.options.selected)){
				this.trigger = trigger;
			}
			
			trigger.observe(this.options.event, this.activate.bind(this, key, trigger));
		}.bind(this));
		
		delete(this.options.triggers, this.options.content, this.options.event);
	},
	activate: function(key, trigger, e){<commit_msg>just save th needed options in CD3.Accordion<commit_after>//= require <src/header.js>

CD3.Accordion = Class.create({
	initialize: function(element, options){
		element = $(element);
		options = Object.extend({
			triggers:	'.trigger',
			content:	'.content',
			event:		'click',
			selected:	'selected',
			duration:	1
		}, options || {});
		
		this.trigger	= null;
		this.containers	= element.select(options.content);
		this.current	= this.containers.find(function(el){ return el.visible(); });
		this.options	= {selected: options.selected, duration: options.duration};
		
		element.select(options.triggers).each(function(trigger, key){
			if (trigger.hasClassName(options.selected))
				this.trigger = trigger;
			
			trigger.observe(options.event, this.activate.bind(this, key, trigger));
		}.bind(this));
	},
	activate: function(key, trigger, e){
{'fraction_non_alphanumeric': 0.16510538641686182, 'fraction_numerical': 0.00351288056206089, 'mean_word_length': 4.178787878787879, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3693652', 'n_tokens_mistral': 628, 'n_tokens_neox': 548, 'n_words': 104}