$(document).ready(function() {
	//PNG FIX FOR IE6
	$(document).pngFix();

	//TITLE REPLACEMENT
	function isfrGetHeight(str,height) {
		str = str.toLowerCase();
		var arrTemp = str.split('<br');
		var intTemp = height * arrTemp.length;

		return intTemp;
	}

	$('h1').flash({
		src: 'helium-demibold.swf', //--NOT LIKE CSS, MATCHES PAGE LOCATION
		wmode: 'transparent', 
		flashvars: {
			css: [
			'* { color: #333333; }',
			'a { color: #0099CC; 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 = isfrGetHeight(this.innerHTML,60);
		htmlOptions.width = $alt.width();
		$alt.addClass('alt');
		$(this)
			.addClass('headline')
			.prepend($.fn.flash.transform(htmlOptions));
	});
	$('h2').flash({
		src: 'avenir-light.swf', //--NOT LIKE CSS, MATCHES PAGE LOCATION
		wmode: 'transparent', 
		flashvars: {
			css: [
			'* { color: #333333; }',
			'a { color: #0099CC; 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 = isfrGetHeight(this.innerHTML,25);
		htmlOptions.width = $alt.width();
		$alt.addClass('alt');
		$(this)
			.addClass('headline')
			.prepend($.fn.flash.transform(htmlOptions));
	});
	$('h1,h2,h3,h4,h5,h6').css({ "visibility":"visible" });
});