﻿$(function() {
    $("#videoClipMini").remove();
    $("#videoClip .videoList a").click(function() {
        filename = $(this).attr('filename');
        //        $f('flowPlayer').play({
        //            url: '../../video/' + filename,
        //            autoBuffering: true
        //        });
        ShowVideoClip(filename);
        
    });
});
var urlBase = '../../video/';
function ShowVideoClip(fileName) {
    $f("div.flowPlayer", "../../Flash/flowPlayer/flowplayer.swf", {
        clip: {
            url: urlBase + fileName,
            autoPlay: true,
            autoBuffering: true,
            bufferLength: 5,
            onBeforeFinish: function() {
                if (this.getStatus().bufferStart == 0) {
                    this.pause();
                    this.seek(0);
                    return false;
                }
            }

        },
        plugins: {
            controls: {
                url: '../../Flash/flowPlayer/flowplayer.controls.swf'
            }
        }


    });
}
