!function(t,a){window.jpTracksAJAX=window.jpTracksAJAX||{};const o="dops:analytics"===localStorage.getItem("debug");window.jpTracksAJAX.record_ajax_event=function(n,c,e){"object"==typeof e&&null!==e&&window.jpTracksContext&&window.jpTracksContext.blog_id&&!e.blog_id&&(e.blog_id=window.jpTracksContext.blog_id);const r={tracksNonce:a.jpTracksAJAX_nonce,action:"jetpack_tracks",tracksEventType:c,tracksEventName:n,tracksEventProp:e||!1};return t.ajax({type:"POST",url:a.ajaxurl,data:r,success:function(t){o&&console.log("AJAX tracks event recorded: ",r,t)}})},t(document).ready(function(){t("body").on("click",".jptracks a, a.jptracks",function(a){const o=t(a.target),n=o.closest(".jptracks"),c=n.attr("data-jptracks-name");if(void 0===c)return;const e=n.attr("data-jptracks-prop")||!1,r=o.attr("href"),s=o.get(0).target;let i=null;r&&s&&"_self"!==s&&(i=window.open("",s),i.opener=null),a.preventDefault(),window.jpTracksAJAX.record_ajax_event(c,"click",e).always(function(){if(r&&!o.hasClass("thickbox")){if(i)return void(i.location=r);window.location=r}})})})}(jQuery,jpTracksAJAX);