var oCLOCK = { DATE: '7,14,22,54', INTERVAL: 50, START: 1529581 };

jQuery.noConflict();
jQuery( document ).ready( function () {

  var oMENU = { DISPLACEMENT : 6, SPEED : 200 };

  // initialize external links
  jQuery( 'a.external' ).click( function() {
    window.open( this.href );
    return false;
  } );

  // initialize menu hover
  jQuery( 'dl#dlMenu dt' ).hover(

    function () {
      if (jQuery( this ).attr( 'class' ) != 'current') {
        jQuery( 'span#spanMenu_' + (jQuery( this ).attr( 'id' ).split( '_' ))[1] ).animate( { left: '+=' + oMENU.DISPLACEMENT + 'px' }, oMENU.SPEED, 'swing' );
      }
    },

    function () {
      if (jQuery( this ).attr( 'class' ) != 'current') {
        jQuery( 'span#spanMenu_' + (jQuery( this ).attr( 'id' ).split( '_' ))[1] ).animate( { left: '-=' + oMENU.DISPLACEMENT + 'px' }, oMENU.SPEED, 'swing' );
      }
    }
  );

} );

function displayCounter( sURL ) {

  var oCONSTANT = { BASE:     jQuery( 'base' ).attr( 'href' ) + '/media/swf/',
                    SWF:      'counter',
                    BGCOLOR:  '#000000',
                    WIDTH:    620,
                    HEIGHT:   141 };

  var sParam = '<param name="allowScriptAccess" value="sameDomain" />'
             + '<param name="allowFullScreen" value="false" />'
             + '<param name="bgcolor" value="' + oCONSTANT.BGCOLOR + '" />'
             + '<param name="base" value="'    + oCONSTANT.BASE    + '" />'
             + '<param name="menu" value="false" />'
             + '<param name="quality" value="high" />'
             + '<param name="FlashVars" value="date=' + escape( oCLOCK.DATE ) + '&interval=' + escape( oCLOCK.INTERVAL ) + '&start=' + oCLOCK.START + (sURL != null ? '&url=' + sURL : '') + '" />';

  var sHTML = '<div>'
            +   '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + oCONSTANT.WIDTH + '" height="' + oCONSTANT.HEIGHT + '">'
            +     '<param name="movie" value="' + oCONSTANT.BASE + oCONSTANT.SWF + '.swf?nocache=' + new Date().getTime() + '" />'
            +     sParam
            + '<!--[if !IE]>-->'
            +     '<object type="application/x-shockwave-flash" data="' + oCONSTANT.BASE + oCONSTANT.SWF + '.swf?nocache=' + new Date().getTime() + '" width="' + oCONSTANT.WIDTH + '" height="' + oCONSTANT.HEIGHT + '">'
            +       sParam
            + '<!--<![endif]-->'
            +       '<a href="http://www.adobe.com/go/getflashplayer" class="external"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>'
            + '<!--[if !IE]>-->'
            +     '</object>'
            + '<!--<![endif]-->'
            +   '</object>'
            + '</div>';

  document.write( sHTML );
}

