$(document).ready(function () { var $books = $('#books').cycle({ timeout: 2000, speed: 200, pause: true }); if ($.cookie('cyclePaused')) { $books.cycle('pause'); } var $controls = $('
').insertAfter($books); $('').click(function (event) { event.preventDefault(); $books.cycle('pause'); }).appendTo($controls); $('').click(function (event) { event.preventDefault(); $('ul:paused').cycle('resume'); }).appendTo($controls); });