<commit_before>(function($) {
  var $profileImg = $('.profile-img'),
      $info = $('.info'),
      $moreInfo = $('.more-info'),
      $socialIcon = $('.social-icon'),
      $close = $('.close'),
      $bio = $('.bio'),
      bioOpen = false;

  $bio.hide();

  // Dont show the social icons until 1.5 seconds after the DOM has loaded
  setInterval(function() {
    $socialIcon.each(function (i) {
      // store the item around for use in the 'timeout' function
      var $item = $(this); 
      // execute this function sometime later:
      setTimeout(function() { 
        $item.addClass('slideInLeft visible');
      }, 500 * i);
      // each element should animate half a second after the last one.
    });
  }, 1500);

  // Flip the profile image on hover
  $profileImg.hover(function() {
    $this = $(this);
    if($this.hasClass('bounceInUp')) {
      $this.removeClass('bounceInUp');
    }
    if($this.hasClass('bounceInDown')) {
      $this.removeClass('bounceInDown');  
    }
    $this.toggleClass('flip');
  });

  $moreInfo.on('click', function() {    
    // Handle profile image styles
    if($profileImg.hasClass('bounceInDown')) {
      $profileImg.removeClass('bounceInDown'); 
    }
    if ($profileImg.hasClass('bounceInUp')) {
      $profileImg.removeClass('bounceInUp');
    }
    if ($profileImg.hasClass('flip')) {
      $profileImg.removeClass('flip');
    }
    $profileImg.addClass('bounceOutUp');

    // Clean up the info element
    if ($info.hasClass('bounceInUp')) {
      $info.removeClass('bounceInUp');
    }
    // Animate out .info div
    $info.addClass('bounceOutDown');

    setTimeout(function() {
    
      // Clean up the .bio element
      $bio.removeClass('flipOutX');
    
      // Unhide the modal
      $bio.show(); 
      
      $bio.addClass('flipInX visible');
      bioOpen = true;
    }, 250);
  });

  $(document).on('click', function(e) {
    if (bioOpen && (e.target != $bio) && (e.target != $close)) {
      closeModal();
    }
  })

  $close.on('click', function() {
    closeModal();
  });

  function closeModal() {
    if($bio.hasClass('flipInX')) {
      $bio.removeClass('flipInX'); 
    }

    // Remove the .bio element from the view
    $bio.addClass('flipOutX');

    setTimeout(function() {
      // Clean up elements
      $profileImg.removeClass('bounceOutUp');
      $info.removeClass('bounceOutDown');

      // Bring back the starting elements
      $profileImg.addClass('bounceInDown');
      $info.addClass('bounceInUp');


      $bio.removeClass('visible');
      $bio.hide();
    }, 500);

    return false;
  }
})(jQuery);<commit_msg>Provided proper show/hide flag for close action<commit_after>(function($) {
  var $profileImg = $('.profile-img'),
      $info = $('.info'),
      $moreInfo = $('.more-info'),
      $socialIcon = $('.social-icon'),
      $close = $('.close'),
      $bio = $('.bio'),
      bioOpen = false;

  $bio.hide();

  // Dont show the social icons until 1.5 seconds after the DOM has loaded
  setInterval(function() {
    $socialIcon.each(function (i) {
      // store the item around for use in the 'timeout' function
      var $item = $(this); 
      // execute this function sometime later:
      setTimeout(function() { 
        $item.addClass('slideInLeft visible');
      }, 500 * i);
      // each element should animate half a second after the last one.
    });
  }, 1500);

  // Flip the profile image on hover
  $profileImg.hover(function() {
    $this = $(this);
    if($this.hasClass('bounceInUp')) {
      $this.removeClass('bounceInUp');
    }
    if($this.hasClass('bounceInDown')) {
      $this.removeClass('bounceInDown');  
    }
    $this.toggleClass('flip');
  });

  $moreInfo.on('click', function() {    
    // Handle profile image styles
    if($profileImg.hasClass('bounceInDown')) {
      $profileImg.removeClass('bounceInDown'); 
    }
    if ($profileImg.hasClass('bounceInUp')) {
      $profileImg.removeClass('bounceInUp');
    }
    if ($profileImg.hasClass('flip')) {
      $profileImg.removeClass('flip');
    }
    $profileImg.addClass('bounceOutUp');

    // Clean up the info element
    if ($info.hasClass('bounceInUp')) {
      $info.removeClass('bounceInUp');
    }
    // Animate out .info div
    $info.addClass('bounceOutDown');

    setTimeout(function() {
    
      // Clean up the .bio element
      $bio.removeClass('flipOutX');
    
      // Unhide the modal
      $bio.show(); 

      $bio.addClass('flipInX visible');
      bioOpen = true;
    }, 250);
  });

  $(document).on('click', function(e) {
    if (bioOpen && (e.target != $bio) && (e.target != $close)) {
      closeModal();
    }
  })

  $close.on('click', function() {
    closeModal();
  });

  function closeModal() {
    if($bio.hasClass('flipInX')) {
      $bio.removeClass('flipInX'); 
    }

    // Remove the .bio element from the view
    $bio.addClass('flipOutX');

    setTimeout(function() {
      // Clean up elements
      $profileImg.removeClass('bounceOutUp');
      $info.removeClass('bounceOutDown');

      // Bring back the starting elements
      $profileImg.addClass('bounceInDown');
      $info.addClass('bounceInUp');


      $bio.removeClass('visible');
      $bio.hide();
    }, 500);

    bioOpen = false;

    return false;
  }
})(jQuery);
{'fraction_non_alphanumeric': 0.17341149773071105, 'fraction_numerical': 0.0056732223903177, 'mean_word_length': 2.607776261937244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5151763', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1636, 'n_words': 345}