<commit_before>$('.navLink').click(function(){
  console.log(this.text);
  if (pageOn === 'HOME') {
    $('.landingPageSection').hide();
    $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
    $('#mainSection').removeClass('homePageBackground');
    $('#mainSection').addClass('otherBackground');
    clearInterval(changeImageTiming);
    pageOn = this.text;
  }
  else {
    $('#'+pageOn).hide();
    pageOn = this.text;
  }
  $("#"+this.text).show();
  $("#"+this.text).css('display', 'flex');
  $('#pageNav').hide();
  $('#pageNavHeader').css('display', 'flex');
  if (pageOn === 'PORTFOLIO') {
    $('#scrollingArticles').empty();
    articles.forEach(function(each) {
      var template = $('#articleTemplate').html();
      var compileTemplate = Handlebars.compile(template);
      var html = compileTemplate(each);
      $('#scrollingArticles').append(html);
      var galleryTop = new Swiper('#'+each.id+' .gallery-top', {
        effect: 'cube',
        grabCursor: true,
        cube: {
            shadow: true,
            slideShadows: true,
            shadowOffset: 20,
            shadowScale: 0.94
        },
          nextButton: '#'+each.id+' .swiper-button-next',
          prevButton: '#'+each.id+' .swiper-button-prev',
          spaceBetween: 0,
          keyboardControl: true
      });
    });
    var swiper = new Swiper('#PORTFOLIO', {
        pagination: '.swiper-pagination',
        direction: 'vertical',
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 0,
        keyboardControl: true,
        mousewheelControl: true
    });
  }
});

$('#pageTitle').click(function(event) {
  window.open("index.html","_self");
});


$('#submitForm').on('click', function(event) {
  event.preventDefault();
  $('#submitForm').unbind("click");
  $('#submitForm').css('opacity', '.3');
  var form = $('#servicesForm').serializeArray();
  var object = {
    firstName: form[0].value,
    lastName: form[1].value,
    businessName: form[2].value,
    number: form[3].value,
    currentWebsite: form[4].value,
    email: form[5].value,
    message: form[6].value
  };
  console.log(object);
  if ((object.firstName.length >= 2) && (object.lastName.length >= 2) && (object.number.length >= 10) &&  (object.message.length >= 2) && (document.getElementById('email').checkValidity())) {
    $.post('/contactFormSend', {info: object}, function(data) {
    }).done(function(data) {
      if (data.flag === true) {
        $('#form').empty();
        $('#form').append("<h1 class='formData'>"+ data.message +"</h1>");
      }
      else {
        $('#formTitle').html(data.message);
        $('#submitForm').bind("click");
        $('#submitForm').css('opacity', '1');

      }
    });
  }
  else {
    alert('Please fill out form completely.');
  }
});

$('.lpScrollingImage').on('click', function(event) {
  event.preventDefault();
  var imageClick = $(this).attr('title');
  console.log(imageClick);
  $('.landingPageSection').hide();
  $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
  $('#mainSection').removeClass('homePageBackground');
  $('#mainSection').addClass('otherBackground');
  clearInterval(changeImageTiming);
  pageOn = 'PORTFOLIO';
  $("#PORTFOLIO").show();
  $("#PORTFOLIO").css('display', 'flex');
  $('#pageNav').hide();
  $('#pageNavHeader').css('display', 'flex');
  $('#scrollingArticles').empty();
  articles.forEach(function(each) {
    var template = $('#articleTemplate').html();
    var compileTemplate = Handlebars.compile(template);
    var html = compileTemplate(each);
    $('#scrollingArticles').append(html);
    var galleryTop = new Swiper('#'+each.id+' .gallery-top', {
      effect: 'cube',
      grabCursor: true,
      cube: {
          shadow: true,
          slideShadows: true,
          shadowOffset: 20,
          shadowScale: 0.94
      },
      autoplay: 5000,
        nextButton: '#'+each.id+' .swiper-button-next',
        prevButton: '#'+each.id+' .swiper-button-prev',
        spaceBetween: 0,
        keyboardControl: true
    });
  });
  var swiper = new Swiper('#PORTFOLIO', {
      pagination: '.swiper-pagination',
      direction: 'vertical',
      slidesPerView: 1,
      paginationClickable: true,
      spaceBetween: 0,
      keyboardControl: true,
      mousewheelControl: true
  });
  var eachCounter = -1;
  var pickedAtricle = 0;
  articles.forEach(function(each) {
    eachCounter ++;
    if (each.id === imageClick) {
      pickedAtricle = eachCounter;
      swiper.slideTo(pickedAtricle);
    }
  });
});<commit_msg>create indexOf<commit_after>$('.navLink').click(function(){
  console.log(this.text);
  if (pageOn === 'HOME') {
    $('.landingPageSection').hide();
    $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
    $('#mainSection').removeClass('homePageBackground');
    $('#mainSection').addClass('otherBackground');
    clearInterval(changeImageTiming);
    pageOn = this.text;
  }
  else {
    $('#'+pageOn).hide();
    pageOn = this.text;
  }
  $("#"+this.text).show();
  $("#"+this.text).css('display', 'flex');
  $('#pageNav').hide();
  $('#pageNavHeader').css('display', 'flex');
  if (pageOn === 'PORTFOLIO') {
    $('#scrollingArticles').empty();
    articles.forEach(function(each) {
      var template = $('#articleTemplate').html();
      var compileTemplate = Handlebars.compile(template);
      var html = compileTemplate(each);
      $('#scrollingArticles').append(html);
      var galleryTop = new Swiper('#'+each.id+' .gallery-top', {
        effect: 'cube',
        grabCursor: true,
        cube: {
            shadow: true,
            slideShadows: true,
            shadowOffset: 20,
            shadowScale: 0.94
        },
          nextButton: '#'+each.id+' .swiper-button-next',
          prevButton: '#'+each.id+' .swiper-button-prev',
          spaceBetween: 0,
          keyboardControl: true
      });
    });
    var swiper = new Swiper('#PORTFOLIO', {
        pagination: '.swiper-pagination',
        direction: 'vertical',
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 0,
        keyboardControl: true,
        mousewheelControl: true
    });
  }
});

$('#pageTitle').click(function(event) {
  window.open("index.html","_self");
});


$('#submitForm').on('click', function(event) {
  event.preventDefault();
  $('#submitForm').unbind("click");
  $('#submitForm').css('opacity', '.3');
  var form = $('#servicesForm').serializeArray();
  var object = {
    firstName: form[0].value,
    lastName: form[1].value,
    businessName: form[2].value,
    number: form[3].value,
    currentWebsite: form[4].value,
    email: form[5].value,
    message: form[6].value
  };
  console.log(object);
  if ((object.firstName.length >= 2) && (object.lastName.length >= 2) && (object.number.length >= 10) &&  (object.message.length >= 2) && (document.getElementById('email').checkValidity())) {
    $.post('/contactFormSend', {info: object}, function(data) {
    }).done(function(data) {
      if (data.flag === true) {
        $('#form').empty();
        $('#form').append("<h1 class='formData'>"+ data.message +"</h1>");
      }
      else {
        $('#formTitle').html(data.message);
        $('#submitForm').bind("click");
        $('#submitForm').css('opacity', '1');

      }
    });
  }
  else {
    alert('Please fill out form completely.');
  }
});

$('.lpScrollingImage').on('click', function(event) {
  event.preventDefault();
  var imageClick = $(this).attr('title');
  console.log(imageClick);
  $('.landingPageSection').hide();
  $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
  $('#mainSection').removeClass('homePageBackground');
  $('#mainSection').addClass('otherBackground');
  clearInterval(changeImageTiming);
  pageOn = 'PORTFOLIO';
  $("#PORTFOLIO").show();
  $("#PORTFOLIO").css('display', 'flex');
  $('#pageNav').hide();
  $('#pageNavHeader').css('display', 'flex');
  $('#scrollingArticles').empty();
  articles.forEach(function(each) {
    var template = $('#articleTemplate').html();
    var compileTemplate = Handlebars.compile(template);
    var html = compileTemplate(each);
    $('#scrollingArticles').append(html);
    var galleryTop = new Swiper('#'+each.id+' .gallery-top', {
      effect: 'cube',
      grabCursor: true,
      cube: {
          shadow: true,
          slideShadows: true,
          shadowOffset: 20,
          shadowScale: 0.94
      },
      autoplay: 5000,
      nextButton: '#'+each.id+' .swiper-button-next',
      prevButton: '#'+each.id+' .swiper-button-prev',
      spaceBetween: 0,
      keyboardControl: true
    });
  });
  var swiper = new Swiper('#PORTFOLIO', {
      pagination: '.swiper-pagination',
      direction: 'vertical',
      slidesPerView: 1,
      paginationClickable: true,
      spaceBetween: 0,
      keyboardControl: true,
      mousewheelControl: true
  });
  var eachCounter = -1;
  var pickedAtricle = 0;
  articles.forEach(function(each) {
    eachCounter ++;
    if (each.id === imageClick) {
      pickedAtricle = eachCounter;
      swiper.slideTo(pickedAtricle);
    }
  });
});

if((window.location.href.indexOf('index.html') > -1) || (window.location.href.indexOf('Index.html') > -1)){
  history.pushState('','','');
}
if((window.location.href.indexOf('about') > -1) || (window.location.href.indexOf('About') > -1)){
  $('.landingPageSection').hide();
  $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
  $('#mainSection').removeClass('homePageBackground');
  $('#mainSection').addClass('otherBackground');
  clearInterval(changeImageTiming);
  pageOn = 'ABOUT';
}
if((window.location.href.indexOf('portfolio') > -1) || (window.location.href.indexOf('Portfolio') > -1)){
  $('.landingPageSection').hide();
  $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
  $('#mainSection').removeClass('homePageBackground');
  $('#mainSection').addClass('otherBackground');
  clearInterval(changeImageTiming);
  pageOn = 'PORTFOLIO';
}
if((window.location.href.indexOf('services') > -1) || (window.location.href.indexOf('Services') > -1)){
  $('.landingPageSection').hide();
  $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
  $('#mainSection').removeClass('homePageBackground');
  $('#mainSection').addClass('otherBackground');
  clearInterval(changeImageTiming);
  pageOn = 'SERVICES';
}
if((window.location.href.indexOf('contact') > -1) || (window.location.href.indexOf('Contact') > -1)){
  $('.landingPageSection').hide();
  $('#mainSection').css('background-image', 'url("./images/servicesBackground.jpg")');
  $('#mainSection').removeClass('homePageBackground');
  $('#mainSection').addClass('otherBackground');
  clearInterval(changeImageTiming);
  pageOn = 'CONTACT';
}
{'fraction_non_alphanumeric': 0.20797354400146978, 'fraction_numerical': 0.007900055116663605, 'mean_word_length': 3.519302615193026, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, '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': '4166899', 'n_tokens_mistral': 3359, 'n_tokens_neox': 3397, 'n_words': 536}