jQuery(function($) {
	
		$('.bg-img').each(function() {
    var path = $(this).children('img').attr('src');
    $(this).css('background-image', 'url("' + path + '")').css('background-position', 'initial');
    });
	
	$(window).on('load', function () {
$(".lentanews").css({'height':($(".lentanewsimage").height()-20+'px')});
});

	$(window).on('load', function () {
$(".lentanews").css({'height':($(".generalblock-news").height()-0+'px')});
});
	$(window).on('load', function () {
$(".blockforsticky").css({'height':($(".lentanewsimage").height()-20+'px')});
});

	$(window).on('load', function () {
$(".adsblock").css({'height':($(".block1x5-n1").height()+'px')});
});

	
	/*$(".lentanews").css({'height':($(".lentanewsimage").height()-20+'px')});*/

	//Photo Seller
/*	$(function(){
  var speed = 200; // Скорость анимации
  var text = 'text'; // Текст, который бедт выводится при наведении курсора на картинку
  $('article') // В этом блоке находятся изображения, к которым будем применять свойства
    .find('img') // Выбираем все картинки
      .wrap('<div class="outofimg"></div>') // Помещаем их в блок .outofimg
      .parent() // Выбираем блок .outofimg
      .append('<div class="alertonimg">'+'<a href="http://vitvesti.by/kontent/foto-na-pamiat.html">Купить фотографию</a>'+'</div>') // Внутрь вставляем блок с текстом
      .hover(function(){ // При наведении курсора на блок .outofimg, запускается функция
	  $(this).find('.alertonimg').animate({opacity:'show'},speed); // Плавное появление блока с текстом
        },function(){ // Когда убираем курсор с блока .outofimg, запускается функция
          $(this).find('.alertonimg').animate({opacity:'hide'},speed); // Плавное исчезновение блока с текстом
        })
    .end();});
	
	$(document).ready(function(){
	$('article').find('.alertonimg').animate({opacity:'hide'})
		*/
});