faforty,
А самому попробовать научиться ?
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.clr{background:#FFD700;border:SaddleBrown 2px dashed;height:12px;margin:4px;}
.inner-matrix{background:#0F0;border:SaddleBrown 2px dashed;margin:4px;}
.video-box{background:#FFA500;border:SaddleBrown 2px dashed;margin:4px;}
</style>
<script type="text/javascript">
window.onload = function () {
for (var b = document.getElementsByTagName("*"), a = 0, e = 0; a < b.length; a++) {
var c = b[a];
if (c.className == "video-box") {
e++;
if (e % 6 == 1) {
var d = document.createElement("DIV");
d.className = "inner-matrix";
b[a].parentNode.insertBefore(d, c)
}
d.appendChild(c);
if (e % 6 == 0) c = document.createElement("DIV"), c.className = "clr", d.appendChild(c)
}
}
};
</script>
</head>
<body>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
<div class="video-box">бла-бла</div>
</body>
</html>