// sIFR jqueryified thingy
jQuery.fn.sIFR = function(sifr_src,sifr_color,sifr_align) {
  if(!sifr_align) { sifr_align = 'left'; }
  return this.flash(
		{ 
			src: sifr_src, 
			flashvars: { 
				css: [
					'* { color: '+ sifr_color +'; text-align: '+ sifr_align +'; }',
					'a { color: '+ sifr_color +'; text-decoration: none; }',
					'b { color: #666666; }',
					'a:hover { text-decoration: underline; }'
				].join(' ')
			},
			wmode: 'transparent'
		},
		{ version: 7 },
		function(htmlOptions) {
			$(document.body).addClass('sIFR-hasFlash');

			//htmlOptions.flashvars.txt = this.innerHTML;
			htmlOptions.flashvars.txt = $(this).text();
			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));
		}
	);
};