Need Help with navigation buttons for a gallery.

Need Help with navigation buttons for a gallery.

Hello to all,

I am a javasrcript rookie (not much experience). The thing is I am trying to create a navigation bar for the full-page-slideshow gallery I found here ( http://www.javascriptkit.com/script/script2/fpslideshow/index.shtml). It uses jquery so I am not completely helpless...

For starters I am trying to create abutton that pauses the cycle of the images array
For every image the script creates a thumbnail. If you click on a thumbnail. The cycle stops and the image is change according to the thumbnail. 

  1.       var thumbsarr=['<ul class="fpthumbs" style="z-index:1001">']
  2. for (var i=0; i<images.length; i++){
  3. imagesarr[i]=new Image()
  4. imagesarr[i].src=(options.imagesobj.baseurl)?                                                      options.imagesobj.baseurl+images[i][1] : images[i]
  5. imagesarr[i]._index=i
  6. thumbsarr.push('<li></li>')
  7. }
  8. thumbsarr.push('</ul>')
  9. jQuery(function($){
  10. var slideshow=fullpageslideshow
  11. var layers=$('<div style="position:absolute;left:0;top:0; width:100%; height:100%;overflow:hidden;background:black;" />').clone().andSelf().appendTo(document.body)
  12. var thumbs=$(thumbsarr.join('')).appendTo(document.body)
  13. thumbs=thumbs.find('li')
  14. thumbs.each(function(i){
  15. var $thumb=$(this)
  16. this._index=i
  17. $thumb.css({left: 60*i+20})
  18. $thumb.click(function(){
  19. clearTimeout(slideshow.setting.rotatetimer)
  20. slideshow.changeimage(this._index)
  21. })
  22. })
  23. slideshow.layers=layers
  24. slideshow.thumbs=thumbs
  25. slideshow.templayer=$('<div style="position:absolute;left:-5000px;top:-5000px;visibility:hidden" />').appendTo(document.body)
  26. slideshow.signalcomplete()
  27. $(window).resize(function(){
  28. if (imagesarr[slideshow.curimage].complete==true)
  29. var cssattr=slideshow.scaleimage(imagesarr[slideshow.curimage])
  30. slideshow.layers.eq(slideshow.layerorder.fg).find('img').css(cssattr)
  31. })
  32. })
I know that in order to stop the image rotation I need to make a function like this...

  1. stop(){
  2.       clearTimeout(slideshow.setting.rotatetimer);
  3. }
but I don't know where exactly to include it and firebug says that stop() is undefined.

Any help would be appreciated. Thank you