function InitMenu()
{
  var oNodes = jQuery('#top ul li a strong');
  
  for(i = 0, j = oNodes.length; i < j; i++)
  {
    var o = jQuery(oNodes[i]);
    var a = o.parent('a:first');
    
    a.append('<span>' + o.html() + '</span>').addClass('processed');
    
    if(a.hasClass('hover'))
      a.prepend('<em></em>');
  }
  
  if(true)
    jQuery('#top ul li:last-child').addClass('last-child');
}

function InitLogo()
{
  jQuery('#logo').flash
  (
    { src: sBasePath + 'www/logo-animated.swf', width: 1000, height: 274, wmode: 'transparent', color: '#fff' },
    { version: 8 }
  );
  
}

function InitHead()
{
  var aNode = jQuery('#content h1');
  
  for(i = 0, j = aNode.length; i < j; i++)
  {
    var oNode = jQuery(aNode[i]);
    
    if(oNode.children('a:first').html() !== null)
       oNode = oNode.children('a');
    
    var sNode = oNode.html();
    
    oNode.html('').addClass('processed').flash
    (
      { src: sBasePath + 'www/header.swf', width: 350, height: 28, wmode: 'transparent', color: '#fff' },
      { version: 7 },
      function(htmlOptions)
      {
        $this = jQuery(this);
        htmlOptions.flashvars.sText = sNode;
        $this.html(jQuery.fn.flash.transform(htmlOptions));
      }
    );
  }
}

function Init()
{
  InitMenu();
  InitHead();
  InitLogo();
}

$(document).ready(function() { Init(); });
