$(document).ready(function(){
	if( $(".toc").length > 0 ){
		var i = 0;
		$("h2").each(function(){
			$(".toc").append("<a href='#h" + i + "'>" + $(this).html() + "</a><br />");
			$(this).html("<div id='h" + i + "'>" + $(this).html() + "</id>");
			i++;
		});
	}
});
