<commit_before>$ ->
	$(document).foundation()
	# Write scripts here

	if $('#home-bottom')

		turtleCompensate = 0  # Tim, offset +/- goes here
		turtle = $('#home-bottom')
		turtleTop = turtle.offset().top
		turtleHeight = turtle.height()
		turtleScrolling = turtleTop # + turtleHeight - turtleCompensate

		animateTurtle = ()->
			console.log $(window).scrollTop()
			if $(window).scrollTop() > turtleScrolling
				turtle.addClass("animate")
			else
				turtle.removeClass("animate")

		$(window).scroll animateTurtle<commit_msg>fixed animation scrolling trigger and refactored code for readability<commit_after>$ ->
	$(document).foundation()
	# Write scripts here

	if $('#home-bottom')

		win = $(window)
		el  = $('#home-bottom')

		animateTurtle = ()->

			winPos = win.scrollTop() + win.height()
			elPos = el.offset().top + el.height()
			console.log elPos
			if winPos > elPos
				el.addClass("animate")
			else
				el.removeClass("animate")

		$(window).scroll animateTurtle
{'fraction_non_alphanumeric': 0.1524390243902439, 'fraction_numerical': 0.0010162601626016261, 'mean_word_length': 3.8048780487804876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6401683', 'n_tokens_mistral': 385, 'n_tokens_neox': 301, 'n_words': 69}