  $bw = $('#bannerwrap');
if($bw.length){
  $prev = $('a.prev', $bw);
  $next = $('a.next', $bw);
  $pauseplay = $('a.pauseplay', $bw);

  /* this is the constructor for the cycle rotator. See http://jquery.malsup.com/cycle/options.html for options */
  $('div#bannerwrap div.banner').cycle({
   fx:'fade',                              /* can be 'fade' or 'slide' or many others. */
   speed:1000,                             /* how fast the transition happens */
   timeout:6000,                           /* delay between slides */
   pager: 'div#bannerwrap div.pagenation',  /* sets up paging if div is present */
   prev:  $prev, 
   next:  $next
  });
  if($pauseplay.length){
   $pauseplay.click(bannerPausePlay);
  }
}

function bannerPausePlay(){
 $t = $(this);
 var action = ($t.hasClass('paused'))? 'play':'pause' ;
 $('div#bannerwrap div.banner').cycle(action)
 $t.toggleClass('paused')
}
