put scrollToTrack function on scope, to make it globally available