  var pSize=45;
  var pfSize=pSize+8;
  var NewPSize=pSize*2;
  var otkat=Math.round((NewPSize-pfSize)/2.4);
  //  var NvRyadu=10;
  var NvRyadu=Math.round((screen.width-(195*2)-55)/pfSize);
  var ADur=150;
  var clientWidth=11;
  
  var myInterval=window.setInterval(metimIMG, 15000);
  
function metimIMG()
{
  var cdsDiv = document.getElementById("monetlist");
  var cdImages = cdsDiv.getElementsByTagName("img");
  var j = 0;
  var z = 0;
	j=0;
	z=0;
  if(clientWidth!=$(window).width())
	{	clientWidth=$(window).width();
		NvRyadu=Math.round((clientWidth-(195*2)-40)/pfSize);
	}
  for (var i=0; i<cdImages.length; i++) {
	
	cdImages[i].onmouseover = makeBiger;
    cdImages[i].onmouseout = resetIt;
	cdImages[i].style.left = pfSize*j+"px";
	cdImages[i].style.width = pSize+"px";
	cdImages[i].style.height = pSize+"px";
	cdImages[i].style.top += pfSize*z+"px";
	cdImages[i].style.position = "absolute";
	cdImages[i].style.zIndex = "1";
	
	j++;if(j==NvRyadu) {j=0;z++;}
	}
}

function makeBiger()
{
	$(this).animate(
		{
			width:NewPSize+'px',
			height:NewPSize+'px',
			opacity: 1,
			margin: '-'+otkat+'px -'+otkat+'px 0 -'+otkat+'px'
		}, ADur
	);
	
	this.style.zIndex = "2";	
	
	//$(this).animate({margin: '-'+otkat+'px -'+otkat+'px 0 -'+otkat+'px'},ADur*2,function(){})
}

function resetIt()
{
	$(this).animate(
		{
			width:pSize+'px',
			height:pSize+'px',
			margin: '0 0 0 0',
			opacity: '0.6'
		}, 3
	)
	this.style.zIndex = "0";	
}
