Changed the way the JS checks for a project's position in the viewport