/*window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#41464D');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#528CE0');
		}
	});

	//add click event to the "add section" link
	$('add_section').addEvent('click', function(event) {
		event.stop();
		
		// create toggler
		var toggler = new Element('h3', {
			'class': 'toggler',
			'html': 'Common descent'
		});
		
		// create content
		var content = new Element('div', {
			'class': 'element',
			'html': '<p></p>'
		});
		
		// position for the new section
		var position = 0;
		
		// add the section to our myAccordion using the addSection method
		myAccordion.addSection(toggler, content, position);
	});
});*/

function create_row(title,date,description,id_evnet) {
	
		var myAccordion = new Accordion($('accordion'),'div.toggler' , 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#D2E0E6');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#528CE0');
		}
		});
		
		
		// create toggler
		toggler_name = 'toggler_row' + id_evnet;
		var toggler = new Element('div', {
			'class': 'toggler',
			'html': '',
			'id': toggler_name,
			'title': 'Has Click aqui para mas informacion.'
		});
		
		toggler_title = new Element('div', {'class': 'title','html': title});
		toggler.grab(toggler_title);
		toggler_date = new Element('div', {'class': 'date','html': date});
		toggler.grab(toggler_date);
		
		// create content
		var content = new Element('div', {
			'class': 'element',
			'html': '<p>' + description + '</p>'
		});
		
		
		// add the section to our myAccordion using the addSection method
		myAccordion.addSection(toggler, content);
		myAccordion.display(-1);
		

};