// JavaScript реализация
/*
$(document).ready(function()  // сработает при загрузке странички
{
  
  var topElem = document.getElementById("topContentFon");
  var centerElem = document.getElementById("contentsFon");
  var bottomElem = document.getElementById("bottomContentFon");
  
  // определяем есть скроллирование или нет
  var resultContentsFon = centerElem.scrollHeight - centerElem.clientHeight; 
  
  alert(resultContentsFon);
  
  if (resultContentsFon > 0)
  {
	alert("!");
	topElem.style.background = "url(test1.evosite.ru/assets/templates/arctiline/images/topContentFon.png) no-repeat right top";
	centerElem.style.background = "url(test1.evosite.ru/assets/templates/arctiline/images/centerContentFon.gif) repeat-y right top";
	bottomElem.style.background = "url(test1.evosite.ru/assets/templates/arctiline/images/bottomContentFon.png) no-repeat right bottom";
  }

});
*/

// jQuery реализация
$(document).ready(function()  // сработает при загрузке странички
{
  // определяем есть скроллирование или нет
  var resultContentsFon = $("#contentsFon")[0].scrollHeight - $("#contentsFon")[0].clientHeight; 
  
  //alert(resultContentsFon+" "+$("body").attr("id")+" "+$("body").is("#home"));
  
  if ($("body").is("#home") && resultContentsFon > 0)
  {
	$("#topContentFon").css('background', 'url(assets/templates/arctiline/images/topContentFon.png) no-repeat right top');
	$("#contentsFon").css('background', 'url(assets/templates/arctiline/images/centerContentFon.gif) repeat-y right top');
	$("#bottomContentFon").css('background', 'url(assets/templates/arctiline/images/bottomContentFon.png) no-repeat right bottom');
  }
});

