﻿jQuery(function() {
    $('div.divYoutubevideo').each(function(index) {
        var youtubeid = jQuery(this).attr("rel");
        var id = $(this).attr("id");
        $(this).tubeplayer({
            width: 571, // the width of the player
            height: 296, // the height of the player
            allowFullScreen: "true", // true by default, allow user to go full screen
            initialVideo: youtubeid, // the video that is loaded into the player
            playerID: youtubeid, // the ID of the embedded youtube player
            preferredQuality: "default", // preferred quality: default, small, medium, large, hd720
            onPlay: function(id) { }, // after the play method is called
            onPause: function() { }, // after the pause method is called
            onStop: function() { }, // after the player is stopped
            onSeek: function(time) { }, // after the video has been seeked to a defined point
            onMute: function() { }, // after the player is muted
            onUnMute: function() { }, // after the player is unmuted
            onPlayerPlaying: function() {
                // Add class to mark that the player has been started
                jQuery("#" + id).addClass('playerStarted');
            }
        });
    });

    flowplayer("a.myPlayer", { src: mStrRoot + "Javascript/plugins/flowplayer/flowplayer-3.1.5.swf", wmode: 'transparent' }, {
        // don't start automcatically
        clip: {
            scaling: 'scale'
        },
        plugins: {
            controls: {
            //autoHide: 'always',
            //hideDelay: 1000
        }
    }
});


});