Update foundation.topbar.js

on scroll, fixed class was never removed.
changed comparison from distance

All credits to iamjonatha see issue #2564
Merge pull request #2641 from MekZii/master

Update foundation.topbar.js