var newY
var lastY = 0;

$(this).scrollspy({
		min: 0,
		max: 12000,
		onTick: function(){

			//Determine scrolling drection thanks to d4rklit3
			newY = $(window).scrollTop();
			var direction = newY - lastY;
			lastY = newY;
			console.log(direction)

			//Get current position & speed of div
			var speed = $("#parallax").data('scroll');
			var currentPosition = $('#parallax').position().top;
			var newPosition;

			//Set a distance threshold
			var currentDistance;
			var maxDistance = 1000;
			
			if(direction > 0){
				newPosition = currentPosition - speed;
				$("#parallax").css("top", newPosition + "px");
			}
			if(direction < 0){
				newPosition = currentPosition + speed;
				$("#parallax").css("top", newPosition + "px");
			}
		}
	});