Fixed the support for percentage values in positionFromTop, now from window.