if(typeof jQuery!="undefined"){var $=jQuery.noConflict()}
function ncPopupTips(type,msg){var c=type?"success":"error";var icon=type?"":"";var html='
";var tips=$(html);$("body").append(tips);setTimeout(function(){tips.addClass("nice-popup-open")},300);if(typeof lazyLoadInstance!=="undefined"){lazyLoadInstance.update()}
setTimeout(function(){tips.removeClass("nice-popup-open");setTimeout(function(){setTimeout(function(){tips.remove()},600)},1000)},1600)}
function ncPopup(type,html,maskStyle,btnCallBack){var maskStyle=maskStyle?'style="'+maskStyle+'"':"";var size="";if(type=="big"){size="nice-popup-lg"}else if(type=="no-padding"){size="nice-popup-nopd"}else if(type=="cover"){size="nice-popup-cover nice-popup-nopd"}else if(type=="full"){size="nice-popup-xl"}else if(type=="scroll"){size="nice-popup-scroll"}else if(type=="middle"){size="nice-popup-md"}else if(type=="small"){size="nice-popup-sm"}
var template='\
\
";var popup=$(template);$("body").append(popup);$("body").addClass("nice-popup-hidden");setTimeout(function(){popup.addClass("nice-popup-open")},300);if(typeof lazyLoadInstance!=="undefined"){lazyLoadInstance.update()}
var close=function(){$("body").removeClass("nice-popup-hidden");$(popup).removeClass("nice-popup-open");setTimeout(function(){setTimeout(function(){popup.remove()},300)},600)};$(popup).on("click touchstart",".nice-popup-close, .nice-popup-overlay",function(event){event.preventDefault();close()});if(typeof btnCallBack=="object"){Object.keys(btnCallBack).forEach(function(key){$(popup).on("click touchstart",key,function(event){var ret=btnCallBack[key](event,close)})})}
return popup}
$(document).ready(function(){$(".post-video .wp-video").attr("style","");$(".post-video video").attr("width","100%");$(".post-video video").attr("height",null);if(typeof globals!=="undefined"&&globals.comment_ip==="1"){$(".author-ip").each(function(){var ip=$(this).data("ip")+"";var that=this;if(ip.split(".").length!==4)return;$.ajax({url:"https://ip-delta.vercel.app/"+ip,}).done(function(location){if(location&&location.length&&location.length>2){$(that).text(location[1]+" "+location[2])}})})}});function nicethemeResponsiveEmbeds(){var proportion,parentWidth;document.querySelectorAll('iframe').forEach(function(iframe){if(iframe.width&&iframe.height){proportion=parseFloat(iframe.width)/parseFloat(iframe.height);parentWidth=parseFloat(window.getComputedStyle(iframe.parentElement,null).width.replace('px',''));iframe.style.maxWidth='100%';iframe.style.maxHeight=Math.round(parentWidth/proportion).toString()+'px'}})}
nicethemeResponsiveEmbeds();window.onresize=nicethemeResponsiveEmbeds
;