
    /* fill tab menu */
	$(function() {
   	    var newCode = "";
		$('div#unten-nav ul.nav').empty();
    	$("#unten-links-content div.tab-content").each(
    		function( intIndex ) {
    		    var id=$(this).attr('id');
    		    /* take first H! as anchor title */
    		    var h1= $(this).find('h1:first').html();
    		    h1 = h1.replace('<br>',' - ');
    		    /* take first H5 as tab title */
    		    var h5= $(this).find('h5:first').text();
    		    /* remove H5 from content. It's only for the tab */
    		    $(this).find('h5:first').remove();
	    	    newCode = newCode+'<li><a href="#'+id+'" title="'+h1+'">'+h5+'</a></li>';
	    	    $(this).addClass('tab-content-inact');
	     	}
		);
		$('div#unten-nav ul.nav').append(newCode);
	});
	
	/* switch tab menu */
	$(function () {
      $('div#unten-nav ul.nav li a').click(function () {
		$('div#unten-links-content2 div.tab-content').hide();
		$('div#unten-links-content2 div.tab-content').filter(this.hash).show();
        $('div#unten-nav ul.nav li').removeClass('act');
        $(this).parent().addClass('act');
        $(this).parent().corner();
        
        return false;
    }).filter(':first').click();
});

