<div id="content">
<div class = "jersey_skin">
<div class="jersey">
<div id="skin_cell"></div>
</div>
</div>
<div class="skin_border">
<div class="skin skin_1"></div>
<div class="skin skin_2"></div>
<div class="skin skin_3"></div>
<div class="skin skin_4"></div>
<div class="skin skin_5"></div>
<div class="skin skin_6"></div>
</div>
</div>
function init(){
var blockSkin = document.getElementById("skin_cell");
var skin = document.getElementsByClassName("skin");
skin[0].addEventListener("click", function(){
blockSkin.style.background = 'url("images/avatar.png")';
blockSkin.style.backgroundSize = '100% 100%';
});
skin[1].addEventListener("click", function(){
blockSkin.style.background = 'url("images/face.jpg")';
blockSkin.style.backgroundSize = '100% 100%';
});
skin[2].addEventListener("click", function(){
blockSkin.style.background = 'url("images/kaban.png")';
blockSkin.style.backgroundSize = '100% 100%';
});
skin[3].addEventListener("click", function(){
blockSkin.style.background = 'url("images/piratskaja_stantsija.jpg")';
blockSkin.style.backgroundSize = '100% 100%';
});
skin[4].addEventListener("click", function(){
blockSkin.style.background = 'url("images/stalker.jpg")';
blockSkin.style.backgroundSize = '100% 100%';
});
skin[5].addEventListener("click", function(){
blockSkin.style.background = 'url("images/warface.png")';
blockSkin.style.backgroundSize = '100% 100%';
});
}