this never gets called $(".navigation").click(function() {
You can debug this using firebug by adding a watch. Just suggesting this in case you didn't know.
Change this to the correct selector and it will work. Something like $(".thumbnail").click(function() {
Also it might be better to just use a carousel script.
http://www.tripwiremagazine.com/2012/12/jquery-carousel.html
this one is pretty good http://www.agilecarousel.com/flavor_2.htm