/*@cc_on/*@if(@_jscript_version<5.7)try{document.execCommand('BackgroundImageCache',0,1)}catch(e){}/*@end@*/

if (window.tableSort) {
  tableSort.init();
}
if (window.zebraLists) {
  zebraLists.init();
}
if (typeof(stepPageWidth) != "undefined") {
  stepPageWidth.init([970]);
}

(function($) {
    if (!window.EPLICA_loggedin) {
    
        // top boxhd over element
        $('body:not(.home) .pagebody .boxhd:first').each(function() {
                var Htext = $(this).text();
                 $(this).addClass('tboxhd').append('<span class="screen">'+ Htext +'</span>');
            });

          //video popper
          var videolinks = $('table.videotable a');
          videolinks
              .each(function(i) {
                  var href = $(this).attr('href'),
                      dim = href.split('.');
                  if (dim[2]) {
                    var dim2 = dim[1].split('x'),
                        asp = dim2[1] / dim2[0],
                        calcHeight = 720 * asp;
                  } else {
                    var calcHeight = 576;
                  }
                  calcHeight += 20;
                  $(this).click(function () {
                        $('#video').remove();
                        
                        if ( $(this).is('[href$=".wmv"]') ) {
                            $('h1').before('' +
                                '<p id="video"><object width="720" height="640" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">' +
                                ' <param name="url" value="' + href + '"><param name="autostart" value="true" />' +
                                ' <embed src="' + href + '" width="720" height="640" AutoStart="true" name="MediaPlayer" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>' +
                                '</object></p>');
                        } else {
                            $('h1').before('' +
                                '<p id="video"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8.0.0.0" width="720" height="'+ calcHeight +'">' +
                                '<param name="movie" value="/media/videos/mediaplayer.swf?file=' + href + '&autostart=true" /><param name="wmode" value="window" /><param name="allowFullScreen" value="true" />' +
                                '<embed src="/media/videos/mediaplayer.swf?file=' + href + '&autostart=true"' +
                                'width="720" height="'+ calcHeight +'" wmode="transparent" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
                                '</object></p>');
                        }
                        return false;
                    });
                })
              .filter(':first').trigger('click');
              
        //zebra tables
        $('table:not(.MsoNormalTable) tbody tr:nth-child(2n)').addClass('alt');
        $('.fontsizer').fontsizer();
        $('#noContentFlashHack').remove();

    }
})(jQuery);



/*
// round images
(function() {
  round = new swfir();
  round.specify('src', 'js/swfir.swf');
  round.specify('border-color', '5AA5DF');
  round.specify('border-radius', '4');
  round.specify('border-width', '2')
  round.swap(".articlelist img");
  round.swap(".article img");
})();
*/