Nice work. I've struggled with this just few days ago but wanted to have much simpler solution. I've came up with custom query which eliminates edit in function. You will just place bit of code to Query editor and you are good to go :)
With the new method of getting the thumbnail images to show up using the div, how do you use the Javascript to get the images to show up in the main image box?
You can change Div into Nestable Slider element then set the query there. The javascript code to sync both slider is same, you can check it on link on comment (added js there). :D