<script>
function klik(id, kolorowy) {
zjedz(id, kolorowy);
document.getElementById('wstaw').src = kolorowy;
};
function najedz(id, szary) {
document.getElementById(id).src = szary;
};
function zjedz(id, kolorowy) {
document.getElementById(id).src = kolorowy;
};
</script>
psy.html
<div id="gorny">
<h1>Wybierz zdjęcie</h1>
<img id="1" src="pies1.jpg" alt="pies1" onclick="klik('1', 'pies1.jpg')" onmouseover="najedz('1', 'pies1-szary.jpg')" onmouseout="zjedz('1', 'pies1.jpg')">
<img id="2" src="pies2.jpg" alt="pies2" onclick="klik('2', 'pies2.jpg')" onmouseover="najedz('2', 'pies2-szary.jpg')" onmouseout="zjedz('2', 'pies2.jpg')">
<img id="3" src="pies2.jpg" alt="pies3" onclick="klik('3', 'pies3.jpg')" onmouseover="najedz('3', 'pies3-szary.jpg')"onmouseout="zjedz('3', 'pies3.jpg')">
</div>
koty.html
<div id="gorny">
<h1>Wybierz zdjęcie</h1>
<img id="1" src="kot1.jpg" alt="kot1" onclick="klik('1', 'kot1.jpg')" onmouseover="najedz('1', 'kot1-szary.jpg')" onmouseout="zjedz('1', 'kot1.jpg')">
</div>
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}