function hash_History(){
var hash_location = window.location.hash;
var find_regex = /tab([\d]+)/i;
var matches = hash_location.match( find_regex );
if (matches && matches.length > 1) {
//берём только id записи
var hh_number = matches[1];
//console.log(matches);
openTab(hh_number);
}
}
//фнункция показать Новость справа и подсветить открытый таб новости слева по её id
function openTab(num){
// num = id записи
$('.special_full').removeClass('open');
$('#tab' + num).addClass('open');
$('.special_short').removeClass('open');
$('.tab' + num).addClass('open');
}
// при открытии страницы открываем первые элементы
$('.special_full:first').addClass('open');
$('.special_short:first').addClass('open');
$('.special_short').click(function(e) {
e.preventDefault();
//получаем id поста из тэга
var this_tab_id = $(this).attr('data-tab-id');
//убираем все классы open потом присваиваем open только тем которым надо
$('.special_full').removeClass('open');
$('#' + this_tab_id ).addClass('open');
$('.special_short').removeClass('open');
$(this).addClass('open');
});
hash_History();