<commit_before>/**
 * @depend /third-party/jquery.js
 * @depend /third-party/underscore.js
 * @depend /third-party/backbone.js
 * @depend /components/facebook.js
 * @depend /components/share.js
 */





function gotCommonImages(images){
  $('.image-container-bottom').append('<div class="bottom-image" style="background-image:url(' +  images[0].src_big + ');"></div>');  
  setInterval(function(){imageRotatorBottom(images);}, 3000);
  
  $('body').addClass('red');
  $('audio')[0].play();
}

function imageRotatorBottom(images){
  if($('.image-container-bottom div').length === 5){
    $('.image-container-bottom div:first').animate({
        marginLeft: '-=1440px'
        }, 500,'swing', function() {
      
          $( this ).remove();
          $('.image-container-bottom div:first').css('margin-left','720px');
          $('.image-container-bottom').append('<div class="bottom-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  }else {
  
    $('.image-container-bottom div:first').animate({
        marginLeft: '-=720px'
        }, 500,'swing', function() {
          $( this ).css('margin-left', '0px');
          $('.image-container-bottom').append('<div class="bottom-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  }
  

}

function getRobinImages(images){
  $('.image-container-top').append('<div class="top-image" style="background-image:url(' +  images[0].src_big + ');"></div>');      
  setInterval(function(){imageRotatorTop(images);}, 3000);
}

function imageRotatorTop(images){
  if($('.image-container-top div').length === 5){
    $('.image-container-top div:last').animate({
        marginRight: '-=1440px'
        }, 500,'swing', function() {
      
          $( this ).remove();
          $('.image-container-top div:last').css('margin-right','720px');
          $('.image-container-top').prepend('<div class="top-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  } else {
  
    $('.image-container-top div:last').animate({
        marginRight: '-=720px'
        }, 500,'swing', function() {
          $( this ).css('margin-right', '0px');
          $('.image-container-top').prepend('<div class="top-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  }
  

}

function handleFacebookThingy(response){
    if (response.status === 'connected') {
      //$('.love-container').slideUp();
      FB.api({
          method: 'fql.query',
          query: 'SELECT pid, src_big FROM photo WHERE pid IN(SELECT pid FROM photo_tag WHERE subject=me()) AND pid IN(SELECT pid FROM photo_tag WHERE subject=737958530)'
      }, function(data) {
          gotCommonImages(data);
      });

        FB.api({
          method: 'fql.query',
          query: 'SELECT pid, src_big FROM photo WHERE pid IN(SELECT pid FROM photo_tag WHERE subject=737958530)'
      }, function(data) {
          getRobinImages(data);
      });

    } else if (response.status === 'not_authorized') {
    // the user is logged in to Facebook, 
    // but has not authenticated your app
  } else {
    // the user isn't logged in to Facebook.
  }
}

window.fbAsyncInit = function() {
  FB.init({<commit_msg>last fix 2 M + P 4 life<commit_after>/**
 * @depend /third-party/jquery.js
 * @depend /third-party/underscore.js
 * @depend /third-party/backbone.js
 * @depend /components/facebook.js
 * @depend /components/share.js
 */





function gotCommonImages(images){
  $('.image-container-bottom').append('<div class="bottom-image" style="background-image:url(' +  images[0].src_big + ');"></div>');  
  setInterval(function(){imageRotatorBottom(images);}, 3000);
}

function imageRotatorBottom(images){
  if($('.image-container-bottom div').length === 5){
    $('.image-container-bottom div:first').animate({
        marginLeft: '-=1440px'
        }, 500,'swing', function() {
      
          $( this ).remove();
          $('.image-container-bottom div:first').css('margin-left','720px');
          $('.image-container-bottom').append('<div class="bottom-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  }else {
  
    $('.image-container-bottom div:first').animate({
        marginLeft: '-=720px'
        }, 500,'swing', function() {
          $( this ).css('margin-left', '0px');
          $('.image-container-bottom').append('<div class="bottom-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  }
  

}

function getRobinImages(images){
  $('.image-container-top').append('<div class="top-image" style="background-image:url(' +  images[0].src_big + ');"></div>');      
  setInterval(function(){imageRotatorTop(images);}, 3000);
}

function imageRotatorTop(images){
  if($('.image-container-top div').length === 5){
    $('.image-container-top div:last').animate({
        marginRight: '-=1440px'
        }, 500,'swing', function() {
      
          $( this ).remove();
          $('.image-container-top div:last').css('margin-right','720px');
          $('.image-container-top').prepend('<div class="top-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  } else {
  
    $('.image-container-top div:last').animate({
        marginRight: '-=720px'
        }, 500,'swing', function() {
          $( this ).css('margin-right', '0px');
          $('.image-container-top').prepend('<div class="top-image" style="background-image:url(' +  images[_.random(0, images.length-1)].src_big + ');"></div>');
      });
  }
  

}

function handleFacebookThingy(response){
    if (response.status === 'connected') {  
      
      $('body').addClass('red');
      $('audio')[0].play();

      FB.api({
          method: 'fql.query',
          query: 'SELECT pid, src_big FROM photo WHERE pid IN(SELECT pid FROM photo_tag WHERE subject=me()) AND pid IN(SELECT pid FROM photo_tag WHERE subject=737958530)'
      }, function(data) {
          gotCommonImages(data);
      });

        FB.api({
          method: 'fql.query',
          query: 'SELECT pid, src_big FROM photo WHERE pid IN(SELECT pid FROM photo_tag WHERE subject=737958530)'
      }, function(data) {
          getRobinImages(data);
      });

    } else if (response.status === 'not_authorized') {
    // the user is logged in to Facebook, 
    // but has not authenticated your app
  } else {
    // the user isn't logged in to Facebook.
  }
}

window.fbAsyncInit = function() {
  FB.init({
{'fraction_non_alphanumeric': 0.20530496028772666, 'fraction_numerical': 0.02217893001648434, 'mean_word_length': 3.057142857142857, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1326368', 'n_tokens_mistral': 2200, 'n_tokens_neox': 2064, 'n_words': 374}