function gssInitImagePopup(a){"use strict";document.addEventListener("click",function(f){if(f.target.matches(a+" img")){var g,c=f.target,b=document.createElement("img");b.setAttribute("src",c.src),b.style.width=c.width+"px",b.style.height=c.height+"px",b.style.left=c.offsetLeft+"px",b.style.top=c.offsetTop+"px",b.classList.add("popImage");var d=document.createElement("div");d.classList.add("popupContainer");var e=document.createElement("div");e.classList.add("popUpBackground"),d.appendChild(e),d.appendChild(b),document.body.appendChild(d),h(),window.onresize=function(){clearTimeout(g),g=setTimeout(h,100)},b.addEventListener("click",function(a){i()}),e.addEventListener("click",function(a){i()})}function h(){setTimeout(function(){e.classList.add("active"),document.body.classList.contains("rtl")?b.style.right="15%":b.style.left="15%",b.style.top="50px",b.style.width=.7*window.innerWidth+"px",b.style.height="auto"},10)}function i(){b.style.width=c.width+"px",b.style.left=c.offsetLeft+"px",b.style.top=c.offsetTop+"px",e.classList.remove("active"),setTimeout(function(){d.remove()},300)}})}gssInitImagePopup(".gssimglightbox")