(function(b){b(document).ready(function(){b('[data-action="smueLightbox"]').magnificPopup({type:"image",closeOnContentClick:!0,mainClass:"mfp-img-mobile",image:{verticalFit:!0}});b('[data-action="smueGalleryLightbox"]').magnificPopup({type:"image",mainClass:"mfp-img-mobile",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]}});b('[data-action="smue-modal"]').each(function(){var a=b(this),e=a.attr("data-mfp-show-animation").length?" "+a.attr("data-mfp-show-animation"):"",c=a.attr("data-mfp-hide-animation").length?
" "+a.attr("data-mfp-hide-animation"):"",d=""!==c?500:0,f=a.attr("data-modal-style"),g=" smue-modal-"+a.attr("data-uniqid");a.magnificPopup({key:"smue-modal-obj",mainClass:"smue-modal"+g+" "+f,midClick:!0,closeBtnInside:!1,fixedBgPos:!0,removalDelay:d,closeMarkup:'<button title="%title%" class="smue-modal-close"></button>',callbacks:{beforeOpen:function(){a.attr("disabled",!0);if(e){var c=b(this.bgOverlay),d=b(this.wrap);c.add(d).addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",
function(){b(this).removeClass(e)})}},beforeClose:function(){if(c){var a=b(this.bgOverlay),d=b(this.wrap);a.add(d).addClass(c).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(this).removeClass(c)})}},afterClose:function(){a.removeAttr("disabled")}}})});b(".smue-popup-trigger").each(function(){var a=b(this),e=a.attr("data-delay").length?parseInt(a.attr("data-delay")):0,c=a.attr("data-mfp-show-animation").length?" "+a.attr("data-mfp-show-animation"):
"",d=a.attr("data-mfp-hide-animation").length?" "+a.attr("data-mfp-hide-animation"):"",f=""!==d?500:0,g=a.attr("data-modal-style"),h=a.attr("data-uniqid"),k=" smue-modal-"+h,l=a.attr("data-custom-classes");a.waypoint(function(m){this.enabled=!1;clearTimeout(window.smuePopupTimeout);window.smuePopupTimeout=setTimeout(function(){a.magnificPopup({key:"smue-popup-obj"+h,mainClass:"smue-modal "+g+" "+l+k,closeBtnInside:!1,fixedBgPos:!0,removalDelay:f,closeMarkup:'<button title="%title%" class="smue-modal-close"></button>',
items:{src:"#smue-modal-content-"+h,type:"inline"},callbacks:{beforeOpen:function(){if(c){var a=b(this.bgOverlay),d=b(this.wrap);a.add(d).addClass(c).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(this).removeClass(c)})}},beforeClose:function(){if(d){var a=b(this.bgOverlay),c=b(this.wrap);a.add(c).addClass(d).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(this).removeClass(d)})}},open:function(){var b=
a.attr("data-show-once");"undefined"!==typeof b&&MPCECookies.set(b,"true")}}}).magnificPopup("open");clearTimeout(window.smuePopupTimeout)},e)},{offset:"100%",continuous:!1,group:"smue-popups"})})})})(jQuery);

