$(document).ready(function() {
    // FlashVideo
    if ($('#video-player').length > 0) {

        var playAuto = 'true';

        if (window.location.search.indexOf('play=true') > 0) {
            playAuto = 'true';
        }

        $('#video-player').flashembed({
            width: 434,
            height: 244,
            player: 'flash/videoplayer.swf',
            bgColor: '#000000',
            params: {
                wmode: "transparent",
                bgcolor: '#000000',
                allowFullScreen: true,
                scale: 'noscale',
                salign: 'tc'       
            },
            flashvars: {
            videoSource: $('div.video a.src').attr('rel'),
            stageWidth: 434,
            stageHeight: 244,
            interfaceMode: 'Toggle',
            autoPlay: playAuto
            },
            flashVersion: '9.0.124',
            expressInstaller: 'flash/expressInstall.swf',
            onFlashInit: function() { }
        });
    }

});
