﻿$(function ()
{
    $('.user').hover(
    
        function(){
            $(this).addClass('hover');
        },
        function(){
            $(this).removeClass('hover');
        }
    );
    
    $('h2').flash(
    { 
        src: '/flash/jfr_DIN_Reg.swf',
        wmode: 'transparent',
        flashvars: { 
            css: [
                '* { color: #827D71; font-size: 21px; line-height: 30px; }',
                'a { color: #827D71; text-decoration: none; }',
                'a:hover { color: #A34203; }'
            ].join(' ')
        }
    },
    { update: false },
    function(htmlOptions)
    {
        htmlOptions.flashvars.txt = this.innerHTML.replace('%','%25').toUpperCase();
        this.innerHTML = '<div>'+this.innerHTML+'</div>';
        var $alt = $(this.firstChild);
        htmlOptions.height = $alt.height();
        htmlOptions.width = '100%';
        $alt.addClass('alt');
        $(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));						
    });
    
    $('h3.fr').flash(
    { 
        src: '/flash/jfr_DIN_Light.swf',
        wmode: 'transparent',
        flashvars: { 
            css: [
                '* { color: #F0EBDA; kerning: true; fontSize: 6; letterSpacing: 0 }',
                'a { color: #24211C; textDecoration: none; }',
                'a:hover { color: #A34203; }'
            ].join(' ')
        }
    },
    { update: false },
    function(htmlOptions)
    {
        htmlOptions.flashvars.txt = this.innerHTML.toUpperCase();
        this.innerHTML = '<div>'+this.innerHTML+'</div>';
        var $alt = $(this.firstChild);
        //htmlOptions.height = $alt.height();
        htmlOptions.height = 23;
        htmlOptions.width = '100%';
        $alt.addClass('alt');
        $(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));						
    });
    
    $('.requiresValidation').validate();
});