console.log('main-news-block.js');
// динамичног задается высота блока чтобы в IE было нормлаьно
function check_main_events_table_height() {
// console.log('check_main_events_table_height();');
var anonse__list_count = jQuery(".main-events-table__inside__left .three-col-news-with-anonse__list").length
if (jQuery(".main-events-table__inside").length > 0) {
if (anonse__list_count == 0) {
if (jQuery(window).width() >= 841) {
// console.log('inside check_main_events_table_height();');
if (jQuery('.page-content.inside_page').hasClass('pmef_2018_page') == false) {
jQuery(".main-events-table__inside").height(Number(Number(jQuery(".short-last-news").height()) + Number(jQuery(".live-news__wrapper").height()) + Number(20) ) );
}
jQuery(".main-news-big-img__inside__top").height(Number(Number(jQuery(".short-last-news").height()) + Number(jQuery(".live-news__wrapper").height()) + Number(20) ) - Number(jQuery('.main-news-big-img__inside__bottom').height()) );
}
}
} else {
}
}
function check_sizes_img_in_category_page() {
if (jQuery(".main-news-big-img").length == 0) {
console.log('check_sizes_img_in_category_page()');
jQuery('.three-col-news-with-anonse__list__item__inside__img').each(function(index) {
if (jQuery(window).width() > 1000) {
var one_col_img_list_item_img = jQuery(this).find("img").attr("data-src");
one_col_img_list_item_img = one_col_img_list_item_img.split("//iz.cdnvideo.ru");
if (one_col_img_list_item_img.length>=2) one_col_img_list_item_img = 'http://iz.cdnvideo.ru'+one_col_img_list_item_img[1];
var h_block = jQuery(this).height();
jQuery(this).height(h_block);
jQuery(this).css({'background': 'red'});
jQuery(this).css({"background": 'url(' + one_col_img_list_item_img + ') no-repeat', "background-position": "center", "background-size": "cover", });
jQuery(this).find("img").hide();
} else {
jQuery(this).find("img").show().css({"height": "auto"});
jQuery(this).css({"height": "auto"});
}
});
var block_main_news__photo = jQuery('.main-news__photo');
if (jQuery(window).width() > 767) {
var one_col_img_list_item_img = block_main_news__photo.find("img").attr("data-src");
one_col_img_list_item_img = one_col_img_list_item_img.split("//iz.cdnvideo.ru");
if (one_col_img_list_item_img.length>=2) one_col_img_list_item_img = 'http://iz.cdnvideo.ru'+one_col_img_list_item_img[1];
var h_block = block_main_news__photo.height();
block_main_news__photo.height(h_block);
block_main_news__photo.css({'background': 'red'});
block_main_news__photo.css({"background": 'url(' + one_col_img_list_item_img + ') no-repeat', "background-position": "center", "background-size": "cover", });
block_main_news__photo.find("img").hide();
} else {
block_main_news__photo.find("img").show().css({"height": "auto"});
block_main_news__photo.css({"height": "auto"});
}
}
}
jQuery(document).ready(function(){
check_main_events_table_height();
if (jQuery(".main-news-big-img").length > 0) {
if (jQuery(window).width() > 768) {
console.log('jQuery(".main-news-big-img").length > 0');
var first_block = '';
var first_block_details = '';
console.log('each 2');
// jQuery(".main-news-big-img__inside__bottom__inside__details__item").each(function(){
// first_block_details += ''+
// '