Bicou,
var mas2 = document.getElementsByClassName("container"),
j, i, ext;
for (j = 0; j < mas2.length; j++) {
var mas = mas2[j].getElementsByTagName("img");
for (i = 0; i < mas.length; i++) {
ext = mas[i].src.split(".").pop();
if (ext == "gif") mas[i].src = "http://forumavatars.ru/img/avatars/0014/21/71/4-1403302678.png"
}
};