/*************************
mybb.ru,
Всплываюшая таблица с вкладками, в топике, с инфой о персонаже
v.01, 1.12.2014 23:00;
Author: Deff
Удалила лишнее Лира
*************************/
if($('#pun-viewtopic').length)$(function(){
var imgAlink = $('script[img-data]').attr('img-data');
$('
').hide().appendTo('#pun-main');
window.fink9 = function (that) {
var alt = that.alt; //alert(alt);
var tid = alt.split('=')[1];
var tbs = $('#pun-main .my-tabs[tid="'+tid+'"]');
offset = $(that).offset();
if(tbs.length){
$('#pre-wrap').show();
tbs.css({'top':offset.top+'px'}).show();return;
}
var cnt_tab = [];
var tabs = '',tab,title;
$.ajax({
url: alt,
cache: true,
async: false,
success: function(html){
tabs=$('')
.css({'width':$('.post-content:visible:first').innerWidth()+'px'});
$(html).find('#pun-viewtopic .post-content').each(function(i){
var a = $(this),b = a.children('p:first'),
title = b.children('span.highlight-text,span.highlight-text+br').remove().text();
if(title=='')return false;
if($.trim(b.html())=='')b.remove();
tabs.append(''+title+'');
a.find('p.lastedit,.post-sig').remove();
tab = '\n'+$.trim(a.html())+'
\n';
cnt_tab.push(tab);
});
$('#pre-wrap').show();
tabs.append(cnt_tab.join('')).css({'top':offset.top+'px'});
tabs.children('.tab-a:first').before('');
}
});
tabs.hide().appendTo('#pun-main').show();
try {if(typeof FORUM.myTabsAddFunc=="function") FORUM.myTabsAddFunc(tabs);} catch(e) {} //http://15.05.2015 Добавить свою функцию обработки контента .my-tabs[tid];
}
$('.post-author li a[href^="#tid="] ').each(function(){
var a = this.href.split('#tid=')[1];
b = $(this).parents('.post-author > ul');
var c1 = b.find('.pa-title');
var c2 = b.find('.pa-avatar');
b=c1; if(c2.length)b=c2;
var img=imgAlink, newIcon = $(this).attr('data-icon'); if(newIcon)img=newIcon;//Добавка Icon для каждого юзера;
$(this).parents('.post').addClass('tableAdd');
$('').insertAfter(b);
});
$('.post img.a-info[data-title]').tipsy({title:'data-title',gravity:'s a-info'});
//Добавлено 22.01.2015
$('#pun-viewtopic .post-author .a-info').click(function(){
var tbl = $('.my-tabs:visible'), top=tbl.offset().top-30,maxHeight = $(window).height()-100;
$('style#tab_a').remove();
$('')
.appendTo('head:first');
var isLastPost = $(this).parents('.post.endpost').length;
var tblMarginTop = +tbl.css('margin-top').replace('px','');
if(isLastPost)tbl.css({'position':'fixed','top':(30-tblMarginTop)+'px'});
$('html,body').animate({scrollTop:top},{ 'duration': 400, 'easing':'linear' });
$('html,body').css({'overflow-y':'hidden'});$('body').css({'padding-right':'18px'});
}); //http://End
$('#pre-wrap').click(function(){
var a = $('.my-tabs[tid]:visible').stop().fadeOut("slow",function() {a.css({'position':''});
$('#pre-wrap').hide()
});
$('html,body').css({'overflow-y':'','padding-right':''}); //<= строка Добавлена 22.01.2015
});
$('.my-tabs>span').live('click',function(){
var a = $(this).parent('.my-tabs');
var arr = a.children('span');
var index = arr.index(this);
arr.removeClass('selected');
$(this).addClass('selected');
a.children('.tab-a').hide();
a.children('.tab-a').eq(index).show();
});
});
/*
FILE ARCHIVED ON 11:31:02 Oct 28, 2016 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 11:35:52 Apr 30, 2017.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/