// Landing page const target_landing = setUrl(); var path = ""; if(window.location.pathname != '/') { path = window.location.pathname; } const project_domain = window.location.protocol + "//" + window.location.host + path; var current_location=window.location.href; $(document).click(function(event) { var adLayerVisible = $("#aD").is(":visible"); // ignore links with classname var styleC = $(event.target).attr("class"); const link = event.target.closest("a"); var href = link.getAttribute('href'); var nopu = $(event.target).attr('class'); var parent_div = $(event.target.parentNode).attr('class'); if(styleC !== "no_pu_js" && parent_div !== "kmtrTgl" && adLayerVisible === false && href.indexOf('ed2k://') == -1){ var cookie = document.cookie.indexOf("_pop="); if(typeof(href) !== "undefined" && cookie == -1) { event.preventDefault(); event.stopPropagation(); // interner link if (href.indexOf("http") == -1) { // Spezialfix für links "register" und so if (href.indexOf("/") != 0) { current_location = window.location.origin + "/" + href; } else { current_location = project_domain + href; } } else { current_location = href; } document.cookie = "_pop=1;max-age=" + (5 * 1800) + ";path=/"; window.open(current_location); // pu target window.location.href = target_landing; } } });