/*
*	Demo Video
*	Replace an element with a demo video
*	
*	Requires: Trapeze jQuery distribution
*             swfobject
*
*	Marcos Abreu - April 9th, 2009
*/

$.namespace("trapeze.DemoVideo");

trapeze.DemoVideo = $.Class.extend({
    init : function(place_holder, flv_path, image_path) {
        var flash_vars = {
            file: flv_path,
            image: image_path,
            displayheight: "320",
            shownavigation: "true",
            bufferlength: "2",
            autostart: "false"
        };
        var params = {
            allowfullscreen: "false"
        };
        var attributes = {};

        swfobject.embedSWF(
            (trapeze.media_path + "flash/flvplayer.swf"), 
            place_holder, 
            "300", "300", 
            "7.0.0", 
            (trapeze.media_path + "flash/expressInstall.swf"),
            flash_vars,
            params,
            attributes
        );
    }
});

