﻿/// <reference path="/_controls5/jquery/jquery-1.2.6-vsdoc.js" />

var __rotationPaused = false;
$(document).ready(function()
{
   $('#rotatingElementsContainer').cycle({ fx: 'fade', timeout: 4000, cleartype: true, prev: '#prev', next: '#next'});

   $('#pause').click(function()
   {
      var curImage = new Image();
      if (__rotationPaused == false)
      {
         curImage.src = "/_controls5/pageRotatingHighlight/rotationResumeButton.png";
      }
      else
      {
         curImage.src = "/_controls5/pageRotatingHighlight/rotationPauseButton.png";
      }

      $(this).attr('src', curImage.src);
      
      __rotationPaused = !__rotationPaused;
      
      $('#rotatingElementsContainer').cycle(__rotationPaused == true ? 'pause' : 'resume');
   });
});
