
$(document).ready(function(){
  
  $('#nav .sub').each(function(){
    offset = ($(this).closest('li').width() / 2) - 14;
    offset -= parseInt($(this).css('left'));
    offset = parseInt(offset);
    $(this).css('background-position', offset + 'px 0px' );
  })
  
  $('#nav .main').hoverIntent({
    timeout: 500,
    sensitivity: 50,
    over: (function(event){
      $('#nav .hover').removeClass('hover');
      $(this).addClass('hover');
    }),
    out: (function(event){ $(this).removeClass('hover'); })
  })
  
  $('.rotation').cycle();
  
  $('#news-flashes').cycle({});
  
  setTimeout((function(){
    $('#flash_message').hide(1000);
  }), 5000)
  
})



