jQuery Cycle - set slide based on current hash upon refresh

jQuery Cycle - set slide based on current hash upon refresh

Hello, I am using the cycle plugin for an overall navigation.
I am happy that it's adding hashes although opon refresh it
defaults to the 1st slide.  Can we set the index slide to the
current hash?

Can the current slide based on the hash be viewed based
on URL as well? Will this idea fix both those problems?


thanks!
  1.   function setSlide(index) {
  2.     $('#slider').cycle(index);
  3.   }