CON-2309 modify autohide script for GlobalNav so it respect scroll Value

Is this file loaded late enough to make use of AMD and ``require`` instead of immediate function? If so, please use AMD :)