Wrap text
Report abuse
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$("object").each(function() {
if ($(this).find("param[value^='http://www.youtube.com']").length > 0) {
var parent = $(this).parent();
var youtubeCode = parent.html();
var params = "";
if (youtubeCode.toLowerCase().indexOf("<param") == -1) {
$("param", this).each(function() {
params += $(this).get(0).outerHTML;
});
}
var oldOpts = /rel=0/g;
var newOpts = "rel=0&color1=0xFFFFFF&color2=0xFFFFFF";
youtubeCode = youtubeCode.replace(oldOpts, newOpts);
if (params != "") {
params = params.replace(oldOpts, newOpts);
youtubeCode = youtubeCode.replace(/<embed/i, params + "<embed");
}
parent.html(youtubeCode);
}
});
});
</script>