//~ First implementation without class
function tabber(){

	//~ console.log('tabber start!!');
	
	//future class parameters
	var content = 'tech_data_body_source';
	var target = 'tech_data_body';
	var toggler = 'tech_data_title';
	
	//hide the source data div
	$(content).setStyle('display', 'none');
	$$('#'+toggler+' ul li span').setStyle('cursor', 'pointer');
	
	//extract data
	data = $(content).getChildren();
	tabs = $(toggler).getChildren();
	tabs = tabs[0].getChildren();
	copy = data[0].clone();
	$(target).grab(copy);
	//~ console.log('Inserito il primo!!');
	
	tabs.each(function(el, index){
		el.addEvent('click', function(event){
			//~ console.log('cliccato '+index);
			current_index=index;
			copy = data[current_index++].clone();
			temp=$(target).getChildren();
			temp[0].destroy();

			//~ console.log('Cancellato:');
			//~ console.log(temp[0]);

			$(target).grab(copy);
			//~ console.log('inserisco:');
			//~ console.log(copy);
		});
	});
	//~ console.log(data)
	//~ console.log(tabs)
	
	
}
