From http://manos.malihu.gr/tuts/custom-scrollbar-plugin/callbacks_example.html