<commit_before>// Some Custom JS for the site

$(window).load(function() {
  // declaring various variables
  var wh = $(window).height();
  var ww = $(window).width();
  var th = $('.teaser').height();
  var lh = $('.layer').height();

  //using the variables to initially position things
  $('html,body,.layers').height(wh*2);
  $('#main,#secondary').height(wh);
  $('.layers .layer').height(wh/3);
  $('.layers .layer').width(ww/4);
  $('#secondary .teaser').css('margin-top',(wh/2)-(th/2));
});
//vertically center images in their section
$(window).load(function(){
	//declaring variables
	var lh = $('.layer').height();
	var ih = $('.layer img').height();
	var ww = $(window).width();
	//only applying script under 767px body width
	if (ww <= 767){
	//using the variables to position images in their section
		if (lh>ih){
			$('.layer img').css('margin-top', (lh/2)-(ih/2));
		}
	}
});
// try to keep things correct even if there is a resizing...
$(window).resize(function() {
  // declaring various variables
  var wh = $(window).height();
  var ww = $(window).width();
  var th = $('.teaser').height();

  //using the variables to initially position things
  $('html,body').height(wh*2);
  $('#main,#secondary,.layers').height(wh);
  $('.layers .layer').height(wh/3);
  $('.layers .layer').width(ww/4);
  $('#secondary .teaser').css('margin-top',(wh/2)-(th/2));
});

// Scrolling grid magic
$(window).scroll(function(){
  // declaring various variables
  var s  = $(window).scrollTop();
  var wh = $(window).height();
  var ww = $(window).width();
  var dh = $(document).height();
  if (ww >= 430){
  //reposition Cs on scrolling so that they end up centered
  //correctly position based on heights
  $('.layer').css('top',s);
  $('.layer.r-one').css('top',s+(s/3));
  $('.layer.r-three').css('top',s*2/3);

  //correctly position based on widths
  var wr = (ww/wh);
  var marginfix = (ww/8);
  var howfar = (s/wh);

  $('.layer.c-one').css('left',((s*wr)/2)-(marginfix*howfar));
  $('.layer.c-two').css('left',((s*wr)/4)-(marginfix*howfar));
  $('.layer.c-three').css('right',((s*wr)/4)-(marginfix*howfar));
  $('.layer.c-four').css('right',((s*wr)/2)-(marginfix*howfar));
  }

});
//scale up on window under 767px
/*$(window).scroll(function(){
	var s  = $(window).scrollTop();
	var wh = $(window).height();
	var lh = $('.layer').height();
	var lw = $('.layer').width();
	
	$('.layer').css();
});*/
//Media Query Load functions
$(window).load(function(){
  var wh = $(window).height();
  var ww = $(window).width();
  var th = $('.teaser').height();
  var lh = $('.layer').height();
  var lw = $('.layer').width();
  var s  = $(window).scrollTop();
  var wr = (ww/wh);
  var marginfix = (ww/8);
  var howfar = (s/wh);

  //if under 430px
  if (ww <= 430){
 	 //using the variables to stack layers on load
 	  $('.layers .layer').css('margin-left',(ww/2)-(lw/2));
 	  $('.layers .layer').css('margin-top',(-lh));
	  $('.first').css('margin-top',(0));
	  $('#main').height(lh);
	  $('.layers').width(ww);
	  $('html,body,.layers').height(wh+lh);
	  $('#secondary .teaser').css('margin-top',(0));
  }
  
});
//Media Query Scroll functions
$(window).scroll(function(){
	var s  = $(window).scrollTop();
	var ww = $(window).width();
	var wh = $(window).height();
	var howfar = (s/wh)*10;
	var lh = $('.layer').height();
	var lw = $('.layer').width();
	//if under 767px
	if (ww <= 767 && ww >= 430){
	//setting new margin-top for secondary
		$('#secondary').css('margin-top', (wh-lh));
		//if scroll top is greater then window height
		if (s >= wh){
			//new styles for layers
			$('.layer.c-one').css('left',(ww/2)-(lw/2));
			$('.layer.c-two').css('left',(ww/2)-(lw+(lw/2)));
			$('.layer.c-three').css('right',(ww/2)-(lw+(lw/2)));
			$('.layer.c-four').css('right',(ww/2)-(lw/2));
			$('.layer.r-one').css('top',s+lh);
			$('.layer.r-three').css('top',s-lh);
		}
	}
});

// scroll to content when you click on the logo. - retrieved from http://www.sycha.com/jquery-smooth-scrolling-internal-anchor-links
$(".scroll").click(function(event){    
  event.preventDefault();<commit_msg>changed media query 430 px to 480 pixels.<commit_after>// Some Custom JS for the site

$(window).load(function() {
  // declaring various variables
  var wh = $(window).height();
  var ww = $(window).width();
  var th = $('.teaser').height();
  var lh = $('.layer').height();

  //using the variables to initially position things
  $('html,body,.layers').height(wh*2);
  $('#main,#secondary').height(wh);
  $('.layers .layer').height(wh/3);
  $('.layers .layer').width(ww/4);
  $('#secondary .teaser').css('margin-top',(wh/2)-(th/2));
});
//vertically center images in their section
$(window).load(function(){
	//declaring variables
	var lh = $('.layer').height();
	var ih = $('.layer img').height();
	var ww = $(window).width();
	//only applying script under 767px body width
	if (ww <= 767){
	//using the variables to position images in their section
		if (lh>ih){
			$('.layer img').css('margin-top', (lh/2)-(ih/2));
		}
	}
});
// try to keep things correct even if there is a resizing...
$(window).resize(function() {
  // declaring various variables
  var wh = $(window).height();
  var ww = $(window).width();
  var th = $('.teaser').height();

  //using the variables to initially position things
  $('html,body').height(wh*2);
  $('#main,#secondary,.layers').height(wh);
  $('.layers .layer').height(wh/3);
  $('.layers .layer').width(ww/4);
  $('#secondary .teaser').css('margin-top',(wh/2)-(th/2));
});

// Scrolling grid magic
$(window).scroll(function(){
  // declaring various variables
  var s  = $(window).scrollTop();
  var wh = $(window).height();
  var ww = $(window).width();
  var dh = $(document).height();
  //if over 480px
  if (ww >= 480){
  //reposition Cs on scrolling so that they end up centered
  //correctly position based on heights
  $('.layer').css('top',s);
  $('.layer.r-one').css('top',s+(s/3));
  $('.layer.r-three').css('top',s*2/3);

  //correctly position based on widths
  var wr = (ww/wh);
  var marginfix = (ww/8);
  var howfar = (s/wh);

  $('.layer.c-one').css('left',((s*wr)/2)-(marginfix*howfar));
  $('.layer.c-two').css('left',((s*wr)/4)-(marginfix*howfar));
  $('.layer.c-three').css('right',((s*wr)/4)-(marginfix*howfar));
  $('.layer.c-four').css('right',((s*wr)/2)-(marginfix*howfar));
  }

});
//scale up on window under 767px
/*$(window).scroll(function(){
	var s  = $(window).scrollTop();
	var wh = $(window).height();
	var lh = $('.layer').height();
	var lw = $('.layer').width();
	
	$('.layer').css();
});*/
//Media Query Load functions
$(window).load(function(){
  var wh = $(window).height();
  var ww = $(window).width();
  var th = $('.teaser').height();
  var lh = $('.layer').height();
  var lw = $('.layer').width();
  var s  = $(window).scrollTop();
  var wr = (ww/wh);
  var marginfix = (ww/8);
  var howfar = (s/wh);

  //if under 480px
  if (ww <= 480){
 	 //using the variables to stack layers on load
 	  $('.layers .layer').css('margin-left',(ww/2)-(lw/2));
 	  $('.layers .layer').css('margin-top',(-lh));
	  $('.first').css('margin-top',(0));
	  $('#main').height(lh);
	  $('.layers').width(ww);
	  $('html,body,.layers').height(wh+lh);
	  $('#secondary .teaser').css('margin-top',(0));
  }
  
});
//Media Query Scroll functions
$(window).scroll(function(){
	var s  = $(window).scrollTop();
	var ww = $(window).width();
	var wh = $(window).height();
	var howfar = (s/wh)*10;
	var lh = $('.layer').height();
	var lw = $('.layer').width();
	//if under 767px and over 480px
	if (ww <= 767 && ww >= 480){
	//setting new margin-top for secondary
		$('#secondary').css('margin-top', (wh-lh));
		//if scroll top is greater then window height
		if (s >= wh){
			//new styles for layers
			$('.layer.c-one').css('left',(ww/2)-(lw/2));
			$('.layer.c-two').css('left',(ww/2)-(lw+(lw/2)));
			$('.layer.c-three').css('right',(ww/2)-(lw+(lw/2)));
			$('.layer.c-four').css('right',(ww/2)-(lw/2));
			$('.layer.r-one').css('top',s+lh);
			$('.layer.r-three').css('top',s-lh);
		}
	}
});

// scroll to content when you click on the logo. - retrieved from http://www.sycha.com/jquery-smooth-scrolling-internal-anchor-links
$(".scroll").click(function(event){    
  event.preventDefault();
{'fraction_non_alphanumeric': 0.2627231871735698, 'fraction_numerical': 0.016518887404348353, 'mean_word_length': 3.665155807365439, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5680834', 'n_tokens_mistral': 3103, 'n_tokens_neox': 2935, 'n_words': 666}