Made the JS more functional to make future updates easier ;)
It now decides whether to open in a new tab or not
Merge remote-tracking branch 'origin/dev' into gh-pages