// Created by Andreas Lagerkvist http://exscale.se
jQuery.fn.AutoTabs = function(start, settings, callback)
{
	return this.each(function()
	{
		var t = jQuery(this);
		var list = '<ul>';
		var counter = 0;
		t.find('> div').each(function()
		{
			var t2 = jQuery(this);
				t2.attr({'id':'multipage'+counter});
			var title = t2.find('> h1:first-child, > h2:first-child, > h3:first-child, > h4:first-child, > h5:first-child, > h6:first-child').text();
			list += '<li><a href="#multipage' +counter +'">' +(counter+1)+'. '+title +'</a></li>';
			counter++;
		});
		list += '</ul>';
		t.find('> div').eq(0).before(list);
		t.tabs(start, settings, callback);
	});
}