window.MSTR = $('meta[name="generator"]').data("variable")!=null?$('meta[name="generator"]').data("variable").split("|"):$('meta[name="generator"]').attr("data-variable").split("|"), window.M = [], M.weburl = MSTR[0], M.lang = MSTR[1]; $(function() { $.ajax({ type: "POST", url: M.weburl + "index.php?m=Web&c=Service&a=index&lang=" + M.lang, dataType: "json", success: function(e) { var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.type='text/css'; link.rel = 'stylesheet'; link.href = M.weburl + "/Public/Web/css/online.css"; head.appendChild(link); e.html = e.html.replace(" onclick='return onlineclose();'", "").replace(" onclick='return onlinemin();'", ""), $("body").append(e.html); var t = $("#onlinebox"),n = e.t > 2 ? "fixed" : "absolute"; e.x = parseInt(e.x), e.y = parseInt(e.y), t.css({ position: n, top: e.y, bottom: "auto" }), e.t % 2 ? t.css({ left: e.x, right: "auto" }) : t.css({ right: e.x, left: "auto" }); $(".onlinebox-open").click(function(e) { e.preventDefault(), t.removeClass("min"), $(this).hide() }); $(".onlinebox-min").click(function(e) { e.preventDefault(), t.addClass("min"), $(".onlinebox-open").show() }); $(".onlinebox-close").click(function(e) { e.preventDefault(), t.hide() }); setTimeout(function() { if (t.show(), e.t < 3) { var n = function() { var n = .08 * ($(window).scrollTop() + e.y - parseInt(t.offset().top)); n = (n > 0 ? 1 : -1) * Math.ceil(Math.abs(n)); var i = parseInt(t.offset().top + n); t.css({ top: i }) }; t.css({ top: $(window).scrollTop() + e.y }), setInterval(function() { n() }, 10) } }, 100) } }) });