jQuery(document).ready(function(e){function t(){return-1!=navigator.platform.indexOf("iPhone")}function a(){const e=window.navigator.userAgent;if(e.indexOf("iPad")>-1)return!0;if(e.indexOf("Macintosh")>-1)try{return document.createEvent("TouchEvent"),!0}catch(e){}return!1}function n(e){return Math.abs(e)>999?Math.floor(Math.sign(e)*(Math.abs(e)/1e3).toFixed(1))+"k":Math.sign(e)*Math.abs(e)}function i(e){var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}function o(e,t){return Math.floor(Math.random()*(t-e+1))+e}function r(){x_val=o(2,50),y_val=o(2,6),x_anchor=1==o(1,2)?"left":"right",y_anchor=1==o(1,2)?"top":"bottom",e(".video_watermark").attr("style",x_anchor+": "+x_val+"%;"+y_anchor+": "+y_val+"%;")}function s(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.webkitEnterFullscreen?e.webkitEnterFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}function l(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}if(document.addEventListener("DOMContentLoaded",function(){var e;if("IntersectionObserver"in window){e=document.querySelectorAll(".c_lazy");var t=new IntersectionObserver(function(e,a){e.forEach(function(e){if(e.isIntersecting){var a=e.target;a.classList.remove("c_lazy"),t.unobserve(a)}})});e.forEach(function(e){t.observe(e)})}else{var a;function n(){a&&clearTimeout(a),a=setTimeout(function(){var t=window.pageYOffset;e.forEach(function(e){e.offsetTop0&&e("#billing_country").trigger("change"),e("#instagram-feed").length>0&&e.instagramFeed({username:"carlasecrets_",callback:function(t){!function(t){var a,o="",r=t.edge_owner_to_timeline_media.edges;e("#followers-instagram").html(n(t.edge_followed_by.count)),e("#posts-instagram").html(t.edge_owner_to_timeline_media.count),r.length>0&&(e.each(r,function(e,t){if(e>5)return!1;img=t.node,o+='
Avatar
'+i(img.edge_liked_by.count)+'
'+i(img.edge_media_to_comment.count)+"
"}),e("#instagram-feed").html(o)),a='
profile
",e("#instagram-profile").html(a),e(window).width()}(t)}}),e("body.single-lesson.logged-in").length>0){setInterval(function(){jQuery.post(cb_vars.ajaxurl,{action:"is_user_logged_in"},function(e){e||(window.location="/")})},6e4);e(".video_wrapper").append('
'+e("#w_val").val()+"
"),e(".video_wrapper").append(''),r();setInterval(function(){0==e(".video_watermark").length&&e(".video_wrapper").append('
'+e("#w_val").val()+"
"),r()},15e3);var c=document.querySelector(".video_wrapper iframe"),d=document.querySelector(".video_wrapper"),u=e(this).parents(".video_wrapper"),g=new Vimeo.Player(c);e(document).on("click","#fs_button",function(n){t()||a()?(u.toggleClass("fS"),e("body").toggleClass("fullScreen")):g.getFullscreen().then(function(e){e?l():s(d)}).catch(function(e){})})}else e(".video_wrapper").length>0&&(e(document).on("click","#fs_button",function(n){console.log(this.previousSibling);var i=this.previousSibling,o=this.closest(".video_wrapper"),r=e(this).parents(".video_wrapper"),c=new Vimeo.Player(i);t()||a()?(r.toggleClass("fS"),e("body").toggleClass("fullScreen")):c.getFullscreen().then(function(e){e?l():s(o)}).catch(function(e){})}),e(".video_wrapper").append(''))});