var event_REC_ID = '';
var course_REC_ID = '';
var adv_REC_ID = '';
var contract_level = '0';
var cntWatch = '0';
var redirect = '';
var register = '';
//Inizialisiert den Help popover
$('.form-help').on('click', function(e){e.preventDefault();e.stopPropagation();});
$('.form-help').popover({container: 'body', html: true, 'trigger': 'hover'});
$('#tabOne_moreStudents').click(function() {
var container = $(this).parent();
var p2 = container.prev();
var p1 = p2.prev().prop('outerHTML').replace(/\s+/g, ' ');
p2 = p2.prop('outerHTML').replace(/\s+/g, ' ');
var i = p1.match(/student\[(\d+)\]/)[1];
i++;
p1 = p1.replace(/student\[\d+\]/g, 'student['+i+']').replace(/value=".*?"/, 'value=""');
p2 = p2.replace(/student\[\d+\]/g, 'student['+i+']').replace(/value=".*?"/, 'value=""');
$(p1).insertBefore( container );
$(p2).insertBefore( container );
});