$(function() {
  var containerWidth = '162px';
  $('#navLinks')
    .css({width:'auto',
	'text-align':'left',
	'text-decoration':'none',
	'margin-top':'2px',
	'float':'left'})
	
    .append(" <a href='#'><span id='prev'></span></a>"
    + "  <a id='pause-play' href='#'>&nbsp;</a>"
    + "  <a href='#'><span id='next'></span></a> "    
  );
// <div> container holding all the news stories
  var $newsStories = $('#newsStories');
/* dynamically style:
 * [1] container itself
 * [2] each paragraph in the summary 
 */
  $newsStories.css({
    width:containerWidth,height:'60px',
    margin:'9px 26px'	
  }).find('div div').css({padding:'8px'});
// call the plugin and set the options  
  $newsStories.cycle({
    timeout: 2000, 
	cleartype: 0, 
	speed: 1000,
    prev:'#prev',
	next:'#next',
    after:function(currSlideElement, nextSlideElement, options, forwardFlag){
      $('#newsInfo').html('<strong>'
        + 'Article ' + (options.currSlide + 1) + ' of ' + options.slideCount 
        + '</strong>'
      );
    }
  });

  $('img.newsPic').css({float:'left',padding:'0 4px', margin:'8px'});
  $('a.msgAlert').click(function(){
    alert('Hyperlink disabled for this example; News Article does not exist.');
    return false;
  });
});

