$(document).ready(function(){
	$('h1').css('letter-spacing','-2.5px');
	var path = window.location.host;
	var base_url = '/';
	if (path=='62.153.76.9') base_url ='/ej/';
	$('h1').flash(
        { 
            src: base_url+'flash/jfr.swf', 
			wmode: 'transparent',
            flashvars: { 
                css: [
                    '* { color: #2B9F47; }',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 8 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = '<b>'+this.innerHTML.replace(/\+/,'%2B')+'</b>';
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height()+Math.ceil(4*($alt.height()/28));
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        },
		{ update: false }
    ); 
	$('h2').flash(
        { 
            src: base_url+'flash/jfr.swf', 
			wmode: 'transparent',
            flashvars: { 
                css: [
                    '* { color: #758180; }',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 8 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = '<b>'+this.innerHTML.replace(/\+/,'%2B')+'</b>';
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height()+4*(Math.ceil($alt.height()/15));
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        },
		{ update: false }
    );
	$('h3').flash(
        { 
            src: base_url+'flash/jfr.swf', 
			wmode: 'transparent',
            flashvars: { 
                css: [
                    '* { color: #2B9F47; }',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 8 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = '<b>'+this.innerHTML.replace(/\+/,'%2B')+'</b>';
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height()+4*(Math.ceil($alt.height()/15));
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        },
		{ update: false }
    );
	$('h1').css('color','#24A23D'); 
	$('h2').css('color','#758180');
});
