function announcement () {
var announceDecreasing = false;
var announceIncreasing = false;
var announceCurrent = 0; 
var announceStepper = 0; 
var announceMax = 168;
var announceMin = 47;
var announceQueued = false;

var announceCurrent = AnnounceGetObject($('#divAnnounceFirst'));

setInterval(function() {
  if (announceStepper <= 0) return;
  announceStepper -= 13; 		
  if (announceStepper < 0) announceStepper = 0; 
  
  announceDecreasing.video.style.height = Math.round( announceStepper * (announceMax - announceMin) / 100 ) + announceMin + 'px';
  announceIncreasing.video.style.height = Math.round( (100 - announceStepper) * (announceMax - announceMin) / 100 ) + announceMin + 'px';
  
  if (announceStepper <= 0) {			
    announceCurrent = announceIncreasing;			
    
    if (announceQueued) {
      AnnounceTransgressToObject(announceQueued);
      announceQueued = false;
    }
  }

}, 30); 

$('#divAnnounces DIV.announcetab').hover(function(e) {
  if (announceStepper) {
    announceQueued = this;
    return; 
  }
  
  AnnounceTransgressToObject(this);
}, function() {});


function AnnounceTransgressToObject(obj) {
  announceIncreasing = AnnounceGetObject($(obj)); 
      
  if (announceIncreasing.video == announceCurrent.video) return;
  
  announceDecreasing = announceCurrent;
  announceDecreasing.tab.show();
  announceIncreasing.tab.hide();
  announceStepper = 100;
}

function AnnounceGetObject(jqAnnounce) {
  var t = {};
  var $papa = jqAnnounce.parents('DIV.video');
  t.video = $papa[0];
  t.tab = jqAnnounce;
  
  return t;
}

}
