!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([4],{51:function(e,t,a){a(52),jQuery(document).ready(function(e){var t=function(t,a){t.addClass("wpra-loading"),e([document.documentElement,document.body]).animate({scrollTop:t.offset().top-50},500);var n=a.template;delete a.template;var o=n.length?n:"0",p=WpraPagination.baseUri.replace("%s",o);e.ajax({type:"POST",url:p,data:JSON.stringify(a),contentType:"application/json"}).done(function(a){$newEl=e(a.html),$newEl.find(".colorbox").colorbox({iframe:!0,width:"80%",height:"80%"}),t.replaceWith($newEl)})},a=function(e){var a=e.closest("[data-template-ctx]"),n=a.data("wpra-template"),o=a.data("template-ctx"),p=Object.assign({},{template:n},JSON.parse(atob(o)));p.page=e.data("wpra-page"),t(a,p)};e("body").on("click","a[data-wpra-page]",function(t){t.preventDefault(),a(e(this))})})},52:function(e,t){}},[51])}); |