jQuery(function(e){f();function f(){b();d();a();c()}function b(){e(document).on("click","[data-ad-href]",function(h){var g=e(this).data("ad-href").toString();if(e.type(g)==="string"&&g.length){if(h.ctrlKey||e(this).data("ad-target")=="_blank"){window.open(g);return false}else{window.location.href=g;return false}}}).on("mousedown","[data-ad-href]",function(h){var g=e(this).data("ad-href").toString();if(e.type(g)==="string"&&g.length){if(h.which==2){window.open(g);return false}}})}function d(){var g=e(".ad-content-ajax");if(typeof adcontent==="undefined"){g.remove();return false}g.each(function(){var h=e(this);e.ajax({type:"POST",url:adcontent.ajaxurl,data:{action:"ad_content_ajax",ajaxnonce:adcontent.ajaxnonce,id:h.attr("data-id")?h.data("id"):0},dataType:"html"}).done(function(i){if(i!="0"&&i!=""){h.replaceWith(i)}else{h.remove()}})})}function a(){var g=e(".ads-content-ajax");if(typeof adcontent==="undefined"||typeof adcontent.ads_content_ajax==="undefined"){g.remove();return false}g.each(function(){var h=e(this);e.ajax({type:"POST",url:adcontent.ajaxurl,data:{action:"ads_content_ajax",ajaxnonce:adcontent.ajaxnonce,num:h.attr("data-num")?h.data("num"):0,type:h.attr("data-type")?h.data("type"):0,post_id:adcontent.post_id,post_type:adcontent.post_type,term_id:adcontent.term_id,term_taxonomy:adcontent.term_taxonomy,device:h.attr("data-device")?h.data("device"):"",format:h.attr("data-format")?h.data("format"):"",location:h.attr("data-location")?h.data("location"):"",orderby:h.attr("data-orderby")?h.data("orderby"):"",order:h.attr("data-order")?h.data("order"):""},dataType:"html"}).done(function(i){if(i!="0"&&i!=""){h.replaceWith(i);d()}else{h.remove()}})})}function c(){var g='';e("head").append(g)}});