Make related classes work without JS

The CSS that gives the related box the correct top position should work without JS.

The new code covers the following scenarios:

1. without JS, site is live
2. without JS, site is beta
3. with JS, site is live without cookie set
4. with JS, site is live with cookie set
5. with JS, site is beta without cookie set
6. with JS, site is beta with cookie set