(function($)
{
    $.fn.mostforumVideoFlow = function(options)
    {   
        $(this).each(function() {
            var videourl = $(this).attr('rel');
            var imgurl = videourl.substr(0,videourl.lastIndexOf('.')) + ".jpg";
            var vwidth = '535px';
            var vheight = '313px';
             
            $(this).css({width: vwidth, height: vheight});
            $(this).flowplayer("/static/swf/flowplayer.swf", {
                key: '#$4c37317495463ebebb9',
                plugins: {
                    controls: {
                        buttonColor: '#5F747C',
                        timeBorder: '1px solid rgba(0, 0, 0, 0.3)',
                        backgroundColor: '#222222',
                        durationColor: '#ffffff',
                        sliderGradient: 'none',
                        timeColor: '#01DAFF',
                        sliderColor: '#000000',
                        progressColor: '#112233',
                        volumeSliderColor: '#000000',
                        volumeSliderGradient: 'none',
                        bufferColor: '#445566',
                        tooltipTextColor: '#ffffff',
                        bufferGradient: 'none',
                        autoHide: 'never',
                        buttonOverColor: '#728B94',
                        borderRadius: '0px',
                        progressGradient: 'medium',
                        tooltipColor: '#5F747C',
                        timeBgColor: '#555555',
                        backgroundGradient: 'low',
                        height: 20,
                        stop: true,
                        url: 'flowplayer.controls-air.swf',
                        opacity: 1.0
                    }
                },
                clip: {
                    url: videourl,
                    autoPlay: true
                }
            });
        });
    };  
})(jQuery);

