refactored the javascript code a little. Working on getting the code to work on my mobile device. Seems to only work on tablet.