create a module for detecting viewport + decouple slider.js from thumbslider.js