checks if the window has passed the sticky line
function checkIfShouldStick() {
				if (mediaQuery && !matchMedia('(' + mediaQuery + ')').matches) return;
				var scrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
				var shouldStick = scrollTop >= stickyLine;
				// Switch the sticky modes if the element has crossed the sticky line
				if (shouldStick && !isSticking) stickElement();else if (!shouldStick && isSticking) unstickElement();
			}