Slider cookies

Slider cookies

Hello,
I'm using a slider, but i can't set cookies for it. I used  my_getcookie/ my_setcookie but there was no effect. See the slider source at this  [link].
I want to set cookies to save the <li> slide that i changed last time.

  1. jQuery(document).ready(function () {
  2.   $('#checkbox').change(function(){
  3.     setInterval(function () {
  4.         moveRight();
  5.     }, 3000);
  6.   });
  7.   
  8. var slideCount = $('#slider ul li').length;
  9. var slideWidth = $('#slider ul li').width();
  10. var slideHeight = $('#slider ul li').height();
  11. var sliderUlWidth = slideCount * slideWidth;
  12. $('#slider').css({ width: slideWidth, height: slideHeight });
  13. $('#slider ul').css({ width: sliderUlWidth, marginLeft: - slideWidth });
  14.     $('#slider ul li:last-child').prependTo('#slider ul');

  15.     function moveLeft() {
  16.         $('#slider ul').animate({
  17.             left: + slideWidth
  18.         }, 200, function () {
  19.             $('#slider ul li:last-child').prependTo('#slider ul');
  20.             $('#slider ul').css('left', '');
  21.         });
  22.     };

  23.     function moveRight() {
  24.         $('#slider ul').animate({
  25.             left: - slideWidth
  26.         }, 200, function () {
  27.             $('#slider ul li:first-child').appendTo('#slider ul');
  28.             $('#slider ul').css('left', '');
  29.         });
  30.     };

  31.     $('a.control_prev').click(function () {
  32.         moveLeft();
  33.     });

  34.     $('a.control_next').click(function () {
  35.         moveRight();
  36.     });
  37. });