!function(e){if(e.HNObject){var t=e.HNObject,n="//embed.hitelnet.hu/";e[t]&&(e[t].afrm={},e[t].guid=function(e){if(!e)e=2;for(var t="hn",n=1;n<=e;n++)t+=Math.floor(65536*(1+Math.random())).toString(16).substring(1),n!=e&&(t+="-");return t},e[t].onMessage=function(n){if("seturl"==n.method)e[t].initLayer(),e[t].loadLayer(n.url);else if("framesize"==n.method){if(n.id)if(e[t].d[n.id][0]&&"auto"==e[t].d[n.id][0].height&&document.getElementById(e[t].d[n.id][0].container))document.getElementById(e[t].d[n.id][0].container).style.height=n.height+"px"}},e[t].odefaults=function(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t},e[t]._layerid="",e[t].loadLayer=function(n){if(document.getElementById(e[t]._layerid+"_fc").innerHTML='',document.getElementById(e[t]._layerid).style.display="table",document.location.href.toString().indexOf("#")>-1){var i=document.location.href.split("#");document.location.href=i[0]+"#open:"+e[t]._layerid}else document.location.href=document.location.href+"#open:"+e[t]._layerid},e[t].initLayer=function(){if(!e[t]._layerid){e[t]._layerid=e[t].guid(1);var n=document.getElementsByTagName("body")[0],i=document.createElement("style");i.innerHTML="div.hitelnet_overlay { display:table; width:100%; z-index:9999; height:100%; position:fixed; top:0; left:0; bottom:0; right:0; margin:0; padding:0; float:none!important; background: rgba(0,0,0,0.65); }",i.innerHTML+="div.hitelnet_table { width:100%; height:100%; display: table-cell; text-align: center; vertical-align: middle; padding:30px; float:none!important;} ",i.innerHTML+="div.hitelnet_panel { position: relative; margin:0; display: inline-table; border: none; width:1024px; height:90%; padding:0; box-shadow: 0px 0px 10px 0px rgba(50, 50, 50, 0.75); background:#fff; text-align:left;} ",i.innerHTML+="div.hitelnet_panel div.hitelnet_head { position:absolute; width:100%; z-index:10; overflow:auto; padding:10px 10px 0px 0px; } ",/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream?i.innerHTML+="div.hitelnet_panel div.hitelnet_body { position: absolute; z-index:9; width:100%; height:100%; margin:0; -webkit-overflow-scrolling: touch; overflow-y: scroll;} ":i.innerHTML+="div.hitelnet_panel div.hitelnet_body { position: absolute; z-index:9; width:100%; height:100%; margin:0;} ",i.innerHTML+="div.hitelnet_panel span.close { display:block; height:30px; overflow:hidden; cursor:pointer; line-height:25px; float:right; background:#999; color:white; margin:0 20px 0 0; text-align:center; font-family: Verdana; font-weight:bold; font-size:12pt; width:30px; padding: 2px; transition:width .2s ease; } ",i.innerHTML+='div.hitelnet_panel span.close:hover { width: 200px; } div.hitelnet_panel span.close:hover:after { content: " Ablak bezárása"; }',i.innerHTML+="@media screen and (max-width: 1024px) { div.hitelnet_table { padding:0; } div.hitelnet_panel { width:95%!important; height:95% !important;}}",i.innerHTML+="@media screen and (max-width: 800px) { div.hitelnet_table { padding:0; } div.hitelnet_panel { width:100%!important; height:100% !important;}}",n.appendChild(i);var a=document.createElement("div");a.setAttribute("id",e[t]._layerid),a.className="hitelnet_overlay",a.style.display="none",a.onclick=function(){e[t].closeLayer()},a.innerHTML='
',n.appendChild(a),document.getElementById(e[t]._layerid+"_close").onclick=function(){document.getElementById(e[t]._layerid).style.display="none"},e[t].addEventListener("keypress",function(n){27==(n.which?n.whick:n.keyCode)&&"none"!=document.getElementById(e[t]._layerid).style.display&&e[t].closeLayer()},n)}},e[t].addEventListener=function(t,n,i){if(!i)i=e;i.attachEvent?i.attachEvent("on"+t,n):i.addEventListener&&i.addEventListener(t,n,!1)},e[t].closeLayer=function(){var n=document.location.href.split("#");document.location.href=n[0]+"#",document.getElementById(e[t]._layerid+"_fc").innerHTML="",document.getElementById(e[t]._layerid).style.display="none"},e[t].support={},e[t].checkSupported=function(){var n=/^[^{]+\{\s*\[native \w/;e[t].support.MessageChannel=n.test(e.MessageChannel),e[t].support.querySelectorAll=n.test(document.querySelectorAll)},e[t].initState=!1,e[t].init=function(){if(0==e[t].initState){if(e[t].checkSupported(),e[t].support.MessageChannel?("onhashchange"in window?e[t].addEventListener("hashchange",function(n){document.location.href.indexOf("#open:")>-1||e[t].closeLayer()}):(e[t].prevHash=e.location.hash,e.setInterval(function(){e.location.hash!=e[t].prevHash&&(e[t].prevHash=e.location.hash,document.location.href.indexOf("#open:")>-1||e[t].closeLayer())},100)),e[t].m=[]):e.addEventListener("message",function(i){i.origin!="http:"+n&&i.origin!="https:"+n||e[t].onMessage(i.data)}),e[t].support.querySelectorAll){var i=document.querySelectorAll(".hitelnet-calculator"),a=new RegExp("^"+t+"-");for(var d in i)if(i[d].attributes){var o={},r=0;Array.prototype.slice.call(i[d].attributes).forEach(function(e){if(null!=a.exec(e.name.toString())){var t=e.name.toString().replace(a,"");o[t]=e.value,i[d].removeAttribute(e.name),r++}}),r>0&&(o.container=e[t].guid(2)+"cnt",i[d].setAttribute("id",o.container),e[t](o))}}if(e[t].d.length>0)for(var l in e[t].initState=!0,e[t].d){if(e[t].d[l][0].container&&document.getElementById(e[t].d[l][0].container)){var h=document.getElementById(e[t].d[l][0].container);h.style.textAlign="center";var s=e[t].odefaults({type:"layer",width:"auto",height:"auto",amo:5e6,lt:1,i1:!1,uid:!1,pid:!1,ttl:(new Date).getTime()},e[t].d[l][0]);e[t].d[l][0].frameId=e[t].guid(2),"auto"==e[t].d[l][0].width?(h.style.width="100%",h.style.maxWidth="100%"):h.style.width=e[t].d[l][0].width+"px",e[t].support.MessageChannel?(e[t].m[l]=new MessageChannel,e[t].m[l].port1.onmessage=function(n){"object"==typeof n.data&&e[t].onMessage(n.data)}):(s._nomc=1,s.frameid=l),"auto"!=e[t].d[l][0].height&&(h.style.height=e[t].d[l][0].height+"px");var c="?hjs=true";for(var p in s)"container"!=p&&"frameId"!=p&&(c+="&"+p+"="+encodeURIComponent(s[p]));"auto"==e[t].d[l][0].width?mw="100%":e[t].d[l][0].width>600?mw=e[t].d[l][0].width+"px":mw="600px",h.innerHTML='',e[t].support.MessageChannel?!e[t].m[l]||"layer"!=s.type&&"auto"!=s.height||(document.getElementById(e[t].d[l][0].frameId).onload=function(n){var i=n.target.contentWindow,a=this.getAttribute("data-id"),d=this;setTimeout(function(){i.postMessage({method:"loaded",type:d.getAttribute("data-type"),id:a},"*",[e[t].m[a].port2])},300)}):"postMessage" in document.getElementById(e[t].d[l][0].frameId).contentWindow||e[t].onMessage({method:"framesize",id:l,width:"100%",height:"450"})}}}},e[t].addEventListener("load",function(){e[t].init()}),"complete"===document.readyState&&e[t].init())}}(window);