$(document).ready(function(){
	$('.replace-white').flash(
		{ 
			src: 'http://www.chrinvestor.com/bell_gothic_std_black.swf', 
			flashvars: { 
				css: [
					'* {color:#ffffff}',
					'a {color:#ffffff; text-decoration:none}',
					'a:hover {text-decoration:underline}'
				].join(' ')
			}
		},
		
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<div>'+this.innerHTML+'</div>';
			var $alt = $(this.firstChild);
      htmlOptions.height = $alt.height();
      htmlOptions.width = $alt.width();
      $alt.addClass('alt');
      $(this)
      	.addClass('flash-replaced')
        .prepend($.fn.flash.transform(htmlOptions));						
		}
	);
	$('.replace-orange').flash(
		{ 
			src: 'http://www.chrinvestor.com/bell_gothic_std_black.swf', 
			flashvars: { 
				css: [
					'* {color:#ff6400}',
					'a {color:#ff6400; text-decoration:none}',
					'a:hover {text-decoration:underline}'
				].join(' ')
			}
		},
		
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<div>'+this.innerHTML+'</div>';
			var $alt = $(this.firstChild);
      htmlOptions.height = $alt.height();
      htmlOptions.width = $alt.width();
      $alt.addClass('alt');
      $(this)
      	.addClass('flash-replaced')
        .prepend($.fn.flash.transform(htmlOptions));						
		}
	);
	$('.replace-black').flash(
		{ 
			src: 'http://www.chrinvestor.com/bell_gothic_std_black.swf', 
			flashvars: { 
				css: [
					'* {color:#000}',
					'a {color:#000; text-decoration:none}',
					'a:hover {text-decoration:underline}'
				].join(' ')
			}
		},
		
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<div>'+this.innerHTML+'</div>';
			var $alt = $(this.firstChild);
      htmlOptions.height = $alt.height();
      htmlOptions.width = $alt.width();
      $alt.addClass('alt');
      $(this)
      	.addClass('flash-replaced')
        .prepend($.fn.flash.transform(htmlOptions));						
		}
	);

// External Links
if($("#links ul")) {
    var ls = $('#links ul a');
    for(var i=0; i<ls.length; i++) {
        var l = ls[i];
        if(l.getAttribute("href")) {
            l.target = '_blank';
            var t = l.title + ' (Este link abre uma nova janela)'; // <-- Insere este texto no final do Title do link
            l.title = t;
        }
    }
}


});
