$(document).ready(function(){
    $('h1').flash(
        {
            src: '/www/assets/default/js/copperlate.swf',
            flashvars: {
                css: [
                    '* { color: #510E00; text-transform:uppercase; }',
                    'a { color: #510E00; 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.wmode = "transparent";
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));
        }
    );

	$('h2').flash(
        {
            src: '/www/assets/default/js/copperlate.swf',
            flashvars: {
                css: [
                    '* { color: #510E00; text-transform:uppercase; }',
                    'a { color: #510E00; 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.wmode = "transparent";
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));
        }
    );
});

