$(document).ready(function() {

  var activeInputValue = '';
  $('body').find('input[type="text"], textarea').each(function(){
    $(this).focus(function(){
      activeInputValue = $(this).val();
      $(this).val('');
    });
    $(this).blur(function(){
      if($(this).val() == '')$(this).val(activeInputValue);
      activeInputValue = '';
    });
  });
  
  
  jQuery('#DennenloheAnswer_participants').change(function() {
    var currentValue = parseInt(jQuery(this).val(), 10);
    
    for (var i = 2; i <= 10; i++) {
      var currentParticipant = jQuery('.participant_' + i);
      
      if (currentValue >= i) {
        currentParticipant.show();
        currentParticipant.css({
          top: 0,
          left: 0,
          position: 'static'
        });
        
      } else {
        currentParticipant.hide();
      }
    }
  });
  jQuery('#DennenloheAnswer_participants').change();
  


});
