window.addComment=function(e){var t,n,i,r=e.document,o="comment-reply-link",d="reply-title",l="cancel-comment-reply-link",a="commentform",s="wp-temp-form-div",u="comment_parent",c="comment_post_ID",m=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver,f="querySelector"in r&&"addEventListener"in e,v=!!r.documentElement.dataset;function y(){p(),function(){if(!m)return;var e={childList:!0,subtree:!0};new m(E).observe(r.body,e)}()}function p(e){if(f&&(t=g(l),n=g(a),t)){t.addEventListener("touchstart",h),t.addEventListener("click",h);var i=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return n.removeEventListener("keydown",i),e.preventDefault(),n.submit.click(),!1};n&&n.addEventListener("keydown",i);for(var d,s=function(e){var t,n=o;e&&e.childNodes||(e=r);t=r.getElementsByClassName?e.getElementsByClassName(n):e.querySelectorAll("."+n);return t}(e),u=0,c=s.length;u<c;u++)(d=s[u]).addEventListener("touchstart",C),d.addEventListener("click",C)}}function h(e){var t=g(s);if(t&&i){g(u).value="0";var n=t.textContent;t.parentNode.replaceChild(i,t),this.style.display="none";var r=g(d),o=r&&r.firstChild,a=o&&o.nextSibling;o&&o.nodeType===Node.TEXT_NODE&&n&&(a&&"A"===a.nodeName&&a.id!==l&&(a.style.display=""),o.textContent=n),e.preventDefault()}}function C(t){var n=g(d),i=n&&n.firstChild.textContent,r=this,o=b(r,"belowelement"),l=b(r,"commentid"),a=b(r,"respondelement"),s=b(r,"postid"),u=b(r,"replyto")||i;o&&l&&a&&s&&!1===e.addComment.moveForm(o,l,a,s,u)&&t.preventDefault()}function E(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void p()}function b(e,t){return v?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return r.getElementById(e)}return f&&"loading"!==r.readyState?y():f&&e.addEventListener("DOMContentLoaded",y,!1),{init:p,moveForm:function(o,a,m,f,v){var y=g(o);i=g(m);var p,h,C,E=g(u),b=g(c),N=g(d),k=N&&N.firstChild,x=k&&k.nextSibling;if(y&&i&&E){void 0===v&&(v=k&&k.textContent),function(e){var t=s,n=g(t),i=g(d),o=i?i.firstChild.textContent:"";if(n)return;(n=r.createElement("div")).id=t,n.style.display="none",n.textContent=o,e.parentNode.insertBefore(n,e)}(i),f&&b&&(b.value=f),E.value=a,t.style.display="",y.parentNode.insertBefore(i,y.nextSibling),k&&k.nodeType===Node.TEXT_NODE&&(x&&"A"===x.nodeName&&x.id!==l&&(x.style.display="none"),k.textContent=v),t.onclick=function(){return!1};try{for(var L=0;L<n.elements.length;L++)if(p=n.elements[L],h=!1,"getComputedStyle"in e?C=e.getComputedStyle(p):r.documentElement.currentStyle&&(C=p.currentStyle),(p.offsetWidth<=0&&p.offsetHeight<=0||"hidden"===C.visibility)&&(h=!0),"hidden"!==p.type&&!p.disabled&&!h){p.focus();break}}catch(S){}return!1}}}}(window);
jQuery(function($){
var $btn=$('#scroll-to-top');
if(!$btn.length) return;
$(window).on('scroll', function(){
$btn.toggleClass('visible', $(this).scrollTop() > 500);
});
$(document).on('click', '#scroll-to-top', function(e){
e.preventDefault();
$('html, body').stop(true).animate({ scrollTop: 0 }, 500);
});
});
(function(p,b,y){function q(){var a=b('button[id^\x3d"genesis-mobile-"]').attr("id");if("undefined"!==typeof a){"none"===l(a)&&(b(".menu-toggle, .genesis-responsive-menu .sub-menu-toggle").removeClass("activated").attr("aria-expanded",!1).attr("aria-pressed",!1),b(".genesis-responsive-menu, .genesis-responsive-menu .sub-menu").attr("style",""));var c=b(".genesis-responsive-menu .js-superfish"),d="destroy";"function"===typeof c.superfish&&("none"===l(a)&&(d={delay:100,animation:{opacity:"show",height:"show"},
dropShadows:!1,speed:"fast"}),c.superfish(d));r(a);t(a)}}function u(){var a=b(this),c=a.next("nav");a.attr("id","genesis-mobile-"+b(c).attr("class").match(/nav-\w*\b/))}function t(a){if(null!=f){var c=f[0],d=b(f).filter(function(a){if(0<a)return a});"none"!==l(a)?(b.each(d,function(a,d){b(d).find(".menu \x3e li").addClass("moved-item-"+d.replace(".","")).appendTo(c+" ul.genesis-nav-menu")}),b(k(d)).hide()):(b(k(d)).show(),b.each(d,function(a,d){b(".moved-item-"+d.replace(".","")).appendTo(d+" ul.genesis-nav-menu").removeClass("moved-item-"+
d.replace(".",""))}))}}function v(){var a=b(this);m(a,"aria-pressed");m(a,"aria-expanded");a.toggleClass("activated");a.next("nav").slideToggle("fast")}function w(){var a=b(this),c=a.closest(".menu-item").siblings();m(a,"aria-pressed");m(a,"aria-expanded");a.toggleClass("activated");a.next(".sub-menu").slideToggle("fast");c.find(".sub-menu-toggle").removeClass("activated").attr("aria-pressed","false");c.find(".sub-menu").slideUp("fast")}function r(a){var c=n();0< !b(c).length||b.each(c,function(d,
c){var e=c.replace(".","");d="genesis-"+e;var h="genesis-mobile-"+e;"none"==l(a)&&(d="genesis-mobile-"+e,h="genesis-"+e);e=b('.genesis-skip-link a[href\x3d"#'+d+'"]');null!==f&&c!==f[0]&&e.toggleClass("skip-link-hidden");0<e.length&&(c=e.attr("href"),c=c.replace(d,h),e.attr("href",c))})}function l(a){a=p.getElementById(a);return window.getComputedStyle(a).getPropertyValue("display")}function m(a,b){a.attr(b,function(a,b){return"false"===b})}function k(a){return b.map(a,function(a,b){return a}).join(",")}
function n(){var a=[];null!==f&&b.each(f,function(b,d){a.push(d.valueOf())});b.each(e.others,function(b,d){a.push(d.valueOf())});return 0<a.length?a:null}var g="undefined"===typeof genesis_responsive_menu?"":genesis_responsive_menu,e={},f=[];b.each(g.menuClasses,function(a){e[a]=[];b.each(this,function(c,d){c=b(d);1<c.length?b.each(c,function(c,g){c=d+"-"+c;b(this).addClass(c.replace(".",""));e[a].push(c);"combine"===a&&f.push(c)}):1==c.length&&(e[a].push(d),"combine"===a&&f.push(d))})});"undefined"==typeof e.others&&(e.others=[]);1==f.length&&(e.others.push(f[0]),f=e.combine=null);var x={init:function(){if(0!=b(n()).length){var a="undefined"!==typeof g.menuIconClass?g.menuIconClass:"dashicons-before dashicons-menu",c="undefined"!==typeof g.subMenuIconClass?g.subMenuIconClass:"dashicons-before dashicons-arrow-down-alt2",d=b("\x3cbutton /\x3e",{"class":"menu-toggle","aria-expanded":!1,"aria-pressed":!1}).append(g.mainMenu),h=b("\x3cbutton /\x3e",{"class":"sub-menu-toggle","aria-expanded":!1,"aria-pressed":!1}).append(b("\x3cspan /\x3e",
{"class":"screen-reader-text",text:g.subMenu}));b(k(e)).addClass("genesis-responsive-menu");b(k(e)).find(".sub-menu").before(h);null!==f?(h=e.others.concat(f[0]),b(k(h)).before(d)):b(k(e.others)).before(d);b(".menu-toggle").addClass(a);b(".sub-menu-toggle").addClass(c);b(".menu-toggle").on("click.genesisMenu-mainbutton",v).each(u);b(".sub-menu-toggle").on("click.genesisMenu-subbutton",w);b(window).on("resize.genesisMenu",q).triggerHandler("resize.genesisMenu")}}};b(p).ready(function(){null!==n()&&
x.init()})})(document,jQuery);
jQuery(function($){
if(window.matchMedia('(hover: none)').matches){
return;
}
window._paq=window._paq||[];
const TRIGGER_SEL='.tooltip-begriff';
const OPEN_CLASS='is-open';
const LEAVE_DELAY_MS=180;
let openState={ $trigger:null, $box:null, timer:null };
function decodeDesc(desc){
if(!desc) return '';
const $ta=$('<textarea/>').html(desc);
return $ta.val().replace(/&lt;br\s*\/?&gt;/gi,'<br>');
}
function ensureId($el){
let id=$el.attr('data-tooltip-id');
if(!id){
id='tb-' + Math.random().toString(36).slice(2,9);
$el.attr('data-tooltip-id', id);
}
return id;
}
function getTooltipKey($el){
return $el.data('begriff')||$el.data('title')||$.trim($el.text());
}
function classifyKind(rawUrl, rawLinktext){
let u=null;
try { u=new URL(rawUrl, window.location.origin); } catch(e){}
if(u&&u.hostname&&u.hostname!==window.location.hostname){
if(/(openjur|bundesverfassungsgericht|iww|lexetius|hessen|bayern|vogel|gerichtsentscheidungen|landesrecht|juris|bverwg|justiz|\.bundesgerichtshof)/i.test(u.hostname)){
return 'recht';
}
return 'extern';
}
const path=(u&&u.pathname) ? u.pathname:'';
if(/^\/tag\//i.test(path)){
const slug=path.toLowerCase();
if(/\/tag\/(nr-|vv-|vv-rvg|vo-|verordnung|anlage)/i.test(slug)){
return 'vorschrift';
}
if(/\/tag\/(%c2%a7-|§-|sgb|bgb|zpo|stgb|sgg|gkg|betrkv|wo|vw|rv|bg|be|ba|bu|bk|bs)/i.test(slug)){
return 'gesetz';
}
return 'stichwort';
}
if(/^\/(buergergeld|sozialhilfe|sozialversicherungsrecht|allgemeines-sozialrecht)(\/|$)/i.test(path)){
return 'intro';
}
if(u) return 'beitrag';
const lt=(rawLinktext||'').toLowerCase();
if(lt.includes('paragraf')||lt.includes('gesetz')) return 'gesetz';
if(lt.includes('einführungsseite')||lt.includes('einfuehrungsseite')) return 'intro';
if(lt.includes('beitrag')) return 'beitrag';
return 'stichwort';
}
function buildBox($trigger){
const title=$trigger.data('title')||$.trim($trigger.text());
const descHtml=decodeDesc($trigger.data('desc')||'');
const url=$trigger.attr('href')||'#';
let linktext=$trigger.data('linktext')||'Link';
if(linktext==='Beitrag')          linktext='zum Beitrag';
if(linktext==='Einführungsseite') linktext='zur Einführungsseite';
const kind=classifyKind(url, linktext);
const id=ensureId($trigger);
const key=getTooltipKey($trigger)||'(ohne)';
const $box=$('<div/>', {
'class': 'tooltip-box',
'id': 'box-' + id,
'role': 'dialog',
'aria-hidden': 'true'
}).css({ 'z-index': 9999 }).attr({
'data-linktext': linktext,
'data-kind': kind
});
$box.attr('data-href', url);
if(kind!=='gesetz'){
$box.addClass('tb-clickbox');
$box.on('click', function(e){
if($(e.target).closest('a.tooltip-title-link, a.tooltip-end-link').length) return;
const href=$(this).attr('data-href');
if(!href||href==='#') return;
const k=$(this).attr('data-kind');
if(k==='recht'||k==='extern'){
window.open(href, '_blank', 'noopener');
}else{
window.location.href=href;
}});
}
let $titleEl;
if((kind==='beitrag'||kind==='intro')&&url&&url!=='#'){
$titleEl=$('<a/>', {
'class': 'tooltip-title tooltip-title-link',
href: url,
text: title,
'data-tooltip-id': id,
'data-tooltip-key': key,
'data-linktext': linktext,
target: '_self'
});
}else if((kind==='recht'||kind==='extern')&&url&&url!=='#'){
$titleEl=$('<a/>', {
'class': 'tooltip-title tooltip-title-link',
href: url,
text: title,
'data-tooltip-id': id,
'data-tooltip-key': key,
'data-linktext': linktext,
target: '_blank',
rel: 'noopener noreferrer'
});
}else{
$titleEl=$('<div/>', { 'class': 'tooltip-title', text: title });
}
const $descEl=$('<div/>', { 'class':'tooltip-desc' }).html(descHtml);
const targetAttrs=((kind==='recht'||kind==='extern') ? { target:'_blank', rel:'noopener noreferrer' }:{});
let nativeTitle='Öffnen';
if(kind==='beitrag')      nativeTitle='Zum Beitrag: ' + title;
if(kind==='intro')        nativeTitle='Zur Einführungsseite: ' + title;
if(kind==='gesetz')       nativeTitle='Zur Vorschrift: ' + title;
if(kind==='vorschrift')   nativeTitle='Zur Vorschrift: ' + title;
if(kind==='stichwort')    nativeTitle='Zum Stichwort: ' + title;
if(kind==='recht')        nativeTitle='Rechtsprechung öffnen';
if(kind==='extern')       nativeTitle='Externer Link: ' + title;
const $linkEl=(url&&linktext)
? $('<a/>', Object.assign({
'class': 'tooltip-link tooltip-end-link',
'data-tooltip-id': id,
'data-tooltip-key': key,
'data-linktext': linktext,
href: url,
text: linktext,
title: nativeTitle
}, targetAttrs))
: null;
$trigger
.attr('data-tooltip-key', key)
.attr('data-kind', kind)
.addClass('tb-kind-' + kind);
$box.append($titleEl, $descEl);
if($linkEl) $box.append($linkEl);
$('body').append($box);
return $box;
}
function positionBox($trigger, $box){
const rect=$trigger[0].getBoundingClientRect();
const scrollY=window.scrollY||window.pageYOffset;
const scrollX=window.scrollX||window.pageXOffset;
const gap=8;
const vw=document.documentElement.clientWidth;
let top=rect.bottom + scrollY + gap;
let left=rect.left   + scrollX;
const bw=Math.min(($box.outerWidth()||350), vw - 16);
const overflowRight=(left + bw) - (scrollX + vw - 8);
if(overflowRight > 0) left=left - overflowRight - 8;
if(left < 8 + scrollX) left=8 + scrollX;
$box.css({ position: 'absolute', top, left, maxWidth: '92vw', width: 'auto' });
}
function attachBoxHover($box){
$box.on('mouseenter', ()=> { if(openState.timer){ clearTimeout(openState.timer); }});
$box.on('mouseleave', scheduleClose);
}
function trackEndShown($box, key){
if(!('IntersectionObserver' in window)) return;
const endEl=$box.find('a.tooltip-end-link').get(0);
if(!endEl) return;
let fired=false;
const io=new IntersectionObserver((entries)=> {
entries.forEach(entry=> {
if(fired) return;
if(entry.isIntersecting){
_paq.push(['trackEvent','Tooltip','endShown', key, 1]);
fired=true;
io.disconnect();
}});
}, { root: null, threshold: 0.25 });
io.observe(endEl);
}
function openTip($trigger){
if(openState.timer) clearTimeout(openState.timer);
if(openState.$box&&openState.$trigger&&openState.$trigger[0]!==$trigger[0]){
closeTip(openState.$trigger);
}
let $box=openState.$box;
if(!$box||(openState.$trigger&&openState.$trigger[0]!==$trigger[0])){
$box=buildBox($trigger);
attachBoxHover($box);
}
positionBox($trigger, $box);
$box.addClass(OPEN_CLASS).attr('aria-hidden','false');
const key=$trigger.attr('data-tooltip-key')||getTooltipKey($trigger);
_paq.push(['trackEvent','Tooltip','open', key, 1]);
if(!$box.data('endTracked')){
trackEndShown($box, key);
$box.data('endTracked', true);
}
$trigger.data('hoverStart', Date.now());
$trigger.attr({
'aria-expanded':'true',
'aria-controls': $box.attr('id')
});
openState={ $trigger, $box, timer:null };}
function scheduleClose(){
if(openState.timer) clearTimeout(openState.timer);
openState.timer=setTimeout(function(){
if(openState.$trigger) closeTip(openState.$trigger);
}, LEAVE_DELAY_MS);
}
function closeTip($trigger){
if(openState.timer) clearTimeout(openState.timer);
const key=$trigger ? ($trigger.attr('data-tooltip-key')||getTooltipKey($trigger)):'(ohne)';
const t0=$trigger ? ($trigger.data('hoverStart')||0):0;
if(t0){
const ms=Math.max(0, Date.now() - t0);
_paq.push(['trackEvent','Tooltip','hoverMs', key, Math.round(ms)]);
$trigger.removeData('hoverStart');
}
if(openState.$box){
openState.$box.removeClass(OPEN_CLASS).attr('aria-hidden','true');
}
if($trigger){
$trigger.attr('aria-expanded','false');
}
openState={ $trigger:null, $box:null, timer:null };}
$(document)
.on('mouseenter', TRIGGER_SEL, function(){ openTip($(this)); })
.on('mouseleave', TRIGGER_SEL, function(){ scheduleClose(); });
$(document)
.on('focusin', TRIGGER_SEL, function(){ openTip($(this)); })
.on('focusout', TRIGGER_SEL, function(){ scheduleClose(); });
$(document).on('click', function(e){
const $t=$(e.target);
const inBox=$t.closest('.tooltip-box').length > 0;
if(inBox) return;
const $tr=$t.closest(TRIGGER_SEL);
if($tr.length){
const sameIsOpen =
openState.$trigger &&
openState.$trigger[0]===$tr[0] &&
openState.$box &&
openState.$box.hasClass(OPEN_CLASS);
if(sameIsOpen){
return;
}
e.preventDefault();
openTip($tr);
return;
}
if(openState.$trigger) closeTip(openState.$trigger);
});
$(document).on('keydown', function(e){
if(e.key==='Escape'){
if(openState.$trigger) closeTip(openState.$trigger);
}
if((e.key==='Enter'||e.key===' ')&&$(e.target).closest(TRIGGER_SEL).length){
e.preventDefault();
openTip($(e.target).closest(TRIGGER_SEL));
}});
$(document).on('click', 'a.tooltip-end-link', function(e){
const $a=$(this);
const id=$a.data('tooltipId');
const realId=$a.attr('data-tooltip-id')||$a.data('tooltip-id')||$a.data('tooltipId')||null;
const $tr=realId
? $('a.tooltip-begriff[data-tooltip-id="'+ realId +'"]').first()
: $();
const key=$a.data('tooltipKey')||$a.attr('data-tooltip-key')||($tr.length ? $tr.attr('data-tooltip-key'):'(ohne)');
const href=$a.attr('href')||'';
_paq.push(['trackEvent','Tooltip','click', key, 1]);
if(!$a.attr('target')){
e.preventDefault();
setTimeout(function(){ window.location.href=href; }, 150);
}});
});
(function($){
$(document).ready(function(){
if(!$('body').hasClass('page-id-80')){
return;
}
const OFFSET=140;
$(window).on('scroll', function(){
if($(this).scrollTop() > 500){
$('.top-btn').addClass('visible');
}else{
$('.top-btn').removeClass('visible');
}});
$('#scroll-to-top').on('click', function(e){
e.preventDefault();
$('html, body').animate({ scrollTop: 0 }, 500);
});
function resolveAnchorTarget(hash){
if(!hash||hash.length < 2) return $();
var $target=$(hash);
if(!$target.length) return $();
if(hash==='#text'&&$target.is('div.tipp3#text')){
var $h2=$target.prevAll('h2').first();
if($h2.length) return $h2;
}
if((hash==='#kommentierung'||hash==='#liste')&&$target.is('div, section, article')){
var $h2k=$target.prevAll('h2').first();
if($h2k.length) return $h2k;
}
return $target;
}
function getStickyOffset(){
var $nav=$('.index-navigation:visible');
var navH=$nav.length ? ($nav.outerHeight()||0):0;
return navH + 12;
}
$('a[href*="#"]:not([href="#"])').on('click', function(e){
var hash=this.hash;
var $target=resolveAnchorTarget(hash);
if($target.length){
e.preventDefault();
var top=$target.offset().top - getStickyOffset() + OFFSET;
$('html, body').stop(true).animate({
scrollTop: top
}, 500, function(){
if(history&&history.replaceState){
history.replaceState(null, '', hash);
}else{
window.location.hash=hash;
}});
}});
var hash=window.location.hash;
if(hash&&hash.length > 1){
setTimeout(function(){
var $target=resolveAnchorTarget(hash);
if($target.length){
var top=$target.offset().top - getStickyOffset() + OFFSET;
$('html, body').stop(true).animate({
scrollTop: top
}, 500);
}}, 200);
}
var $menuToggle=$('#genesis-mobile-nav-primary');
function updateMainMenuTitle(){
var expanded=$menuToggle.attr('aria-expanded')==='true';
$menuToggle.attr('title',
expanded ? 'Hauptnavigation schließen':'Hauptnavigation öffnen'
);
}
if($menuToggle.length){
updateMainMenuTitle();
$menuToggle.on('click', function(){
setTimeout(function(){
updateMainMenuTitle();
window._paq=window._paq||[];
var expanded=$menuToggle.attr('aria-expanded')==='true';
_paq.push([
'trackEvent',
'Menu',
expanded ? 'Hauptmenü geöffnet':'Hauptmenü geschlossen',
window.location.pathname
]);
}, 5);
});
}
function updateSubToggleTitle($btn){
var expanded=$btn.attr('aria-expanded')==='true';
$btn.attr('title', expanded ? 'Untermenü schließen':'Untermenü öffnen');
}
$('.sub-menu-toggle').each(function(){
updateSubToggleTitle($(this));
});
$(document).on('click', '.sub-menu-toggle', function(){
var $btn=$(this);
setTimeout(function(){
updateSubToggleTitle($btn);
window._paq=window._paq||[];
var expanded=$btn.attr('aria-expanded')==='true';
var label=$.trim($btn.siblings('a, span').first().text())||'(ohne Label)';
_paq.push([
'trackEvent',
'Submenu',
expanded ? 'Submenü geöffnet':'Submenü geschlossen',
label
]);
}, 5);
});
$(document).on('click', '.beitragsliste-ul .beitragsliste-card a', function(){
var $a=$(this);
var title=$.trim($a.find('h3').text())||$a.attr('title')||'(ohne Titel)';
var href=$a.attr('href')||'';
window._paq=window._paq||[];
_paq.push([
'trackEvent',
'Beitragskarten',
'Klick',
title + ' | ' + href
]);
});
$(document).on('click', '.cpseo-breadcrumb .breadcrumb-link', function(){
var $a=$(this);
var label=$.trim($a.text())||'(ohne Titel)';
var href=$a.attr('href')||'';
window._paq=window._paq||[];
_paq.push([
'trackEvent',
'Breadcrumb',
'Klick',
label + ' | ' + href
]);
});
});
(function(){
window._paq=window._paq||[];
function trackScroll(){
var scrollPos=window.scrollY + window.innerHeight;
var pageHeight=document.documentElement.scrollHeight;
var percent=Math.round((scrollPos / pageHeight) * 100);
if(percent >=25&&!trackScroll._25){
_paq.push(['trackEvent','Scroll','scroll',25]);
trackScroll._25=true;
}
if(percent >=50&&!trackScroll._50){
_paq.push(['trackEvent','Scroll','scroll',50]);
trackScroll._50=true;
}
if(percent >=75&&!trackScroll._75){
_paq.push(['trackEvent','Scroll','scroll',75]);
trackScroll._75=true;
}
if(percent >=90&&!trackScroll._90){
_paq.push(['trackEvent','Scroll','scroll',90]);
trackScroll._90=true;
}}
window.addEventListener('scroll', trackScroll);
})();
})(jQuery);