better "infinite" page simulation

...and lots of bugfixes:

- correct url in category view
- prevent page jump on reloading
- added the option to hide head elements  and panel when not on page 1
- cleaned up the code