Window.onload function not working in Firefox

This week I launched my first client-project.
But there’s one bug that’s been bothering me and I can’t find the solution.

When using CustomCode my Finsweet CMS sort doesn’t seem to work (on firefox).
And it seems pretty unstable with chrome (from time to time)


Any idea what might be the problem.

Link to site

Here is my site Read-Only: [LINK][1]