1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
jQuery(document).ready( function()
{
alert ('ready');
jQuery("embed").each( function()
{
// get the source
var f = this.src;
// the name of the video
var fn = f.substr( f.lastIndexOf("/") + 1 );
alert ('is embed '+fn);
// if it's an flv, put the player in
if( f.substr(f.length-3) == "flv" || f.substr(f.length-3) == "FLV" )
{
alert ('is flv '+$(this));
jQuery(this).replaceWith('<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="mon_url/player_flv_maxi.swf" width="480" height="320" allowfullscreen="true" flashvars="flv=' + f + '&title=' + fn + '&showvolume=1&showfullscreen=1&margin=1&loadingcolor=97d49b&buttonovercolor= 5fa664&sliderovercolor= 5fa664"></embed>');
}
});
} ); |