var lastScrollTop = 200; window.addEventListener("scroll", function(){ var st = window.pageYOffset || document.documentElement.scrollTop; var cathide = document.getElementById("main-header"); if (st > lastScrollTop) { //alert(st); cathide.classList.add("dark"); } else if (st < lastScrollTop) { cathide.classList.remove("dark") } //lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling }, false); $(document).ready(function(){ $(".sliderContent").scrollLeft(0); $(".focusyou").focus(); setTimeout(function() {$(".scroll-active").removeClass("scroll-active1111111111");}, 1000); Li_count(); $(window).resize(function(){Li_count();}); function Li_count(){ $('.lolomoRow').each(function(){ var listElements = $(this).find('.slider-item'); var windowsize2 = $(window).width(); if(windowsize2 > 1400) {var liPart =6;}else if(windowsize2 > 1100) {var liPart =5;}else{var liPart =4;} var listCount = listElements.length / liPart; $(this).find('.pagination-indicator').empty(); for(let i = 0; i < listCount; i++) { if(i==0){var liLast = "
";}else{var liLast = "";} $(this).find('.pagination-indicator').append(liLast); } }); } var timeoutId2; $('.account-menu-item00000').hover(function(e) { $(".account-drop-down").removeClass("hide"); setTimeout(function() {$(".account-menu-item").addClass("account-menu-show");}, 10); window.clearTimeout(timeoutId2); },function() { window.clearTimeout(timeoutId2); //$(this).removeClass("account-menu-show"); timeoutId2 = window.setTimeout(function() {$(".account-menu-item").removeClass("account-menu-show");setTimeout(function() {$(".account-drop-down").addClass("hide");}, 300);}, 1001); }); var timeoutId; $('.slider-item222,#actionMenu222').hover(function(e) { var openbox = $(this).attr("data-modal"); if(openbox){}else{ var xw = $(this).offset(); var img = $(this).find("img").attr("data-src"); var boxsize = $(this).width(); var VideoID = $(this).attr("data-post"); $("#actionMenu").attr("data-post",VideoID); var mini_delete = $(this).attr("data-delete"); window.clearTimeout(timeoutId); timeoutId = window.setTimeout(function() { $(".videoMerchPlayer--boxart-wrapper img").attr("src",img); Mini_modal_info(); $(".mini-pop-delete-btn").removeClass(mini_delete); var y = xw.top - 100; var x = xw.left - -5; //80 var windowsize = $(window).width(); if(windowsize>1920){var boxmax = 595;var xmax = "1vw";} if(windowsize<=1920 && windowsize>1680){var boxmax = 475;} if(windowsize<=1680 && windowsize>1280){var boxmax = 400;} if(windowsize<=1280){var boxmax = 350;} if(x<66){var x = "1vw";}else{ var gsgs = (boxmax - boxsize) / 2; var x = x - gsgs; var x = x +"px";} $("#actionMenu").css({position: "absolute",top: y + "px",left: x,maxWidth: boxmax + "px"}); $(".videoMerchPlayer--boxart-wrapper img").attr("src","https://imgcdn.media/poster/h/"+VideoID+".jpg"); // $(".videoMerchPlayer--boxart-wrapper img").attr("src","https://i0.wp.com/img.nfmirrorcdn.top/poster/h/"+VideoID+".jpg"); $("#pop-box").removeClass("hide"); $(".previewModal--info").show(200); $('#actionMenu').css({animation: "fadeIn2 0.215s linear"}); setTimeout(function(){ $("#actionMenu").attr("data-box","open"); }, 95); }, 700);} },function() { //$("#actionMenu").on("mouseleave",function() { var openbox = $("#actionMenu").attr("data-box"); window.clearTimeout(timeoutId); timeoutId = null; setTimeout(function() { if(openbox=="open"){ $('#actionMenu').css({animation: "fadeOut2 0.25s linear"}); setTimeout(function(){ $("#pop-box").addClass("hide");Mini_modal_info_clear();$("#actionMenu").attr("data-box","close");$(".videoMerchPlayer--boxart-wrapper img").attr("src",""); }, 195); } }, 100); }); //}); Re_newdata(); }); function Mini_modal_info(){ var t = $("body").attr("data-time"); var vid = $("#actionMenu[data-post]").attr("data-post"); $.ajax({type: "GET", url: "/mini-modal-info.php", data:{id:vid,t:t}, success: function(result){ $("#actionMenu[data-post="+vid+"]").find(".mini-modal-match").text(result.match); $("#actionMenu[data-post="+vid+"]").find(".mini-modal-hdsd").text(result.hdsd); $("#actionMenu[data-post="+vid+"]").find(".mini-modal-age").text(result.ua); $("#actionMenu[data-post="+vid+"]").find(".mini-modal-runtime").text(result.runtime); genre = result.genre.replaceAll(", ", ""); $("#actionMenu[data-post="+vid+"]").find(".evidence-text").html(genre); }, error: function () {alert("Post data fetch failed");} }); } function Mini_modal_info_clear(){ $("#actionMenu[data-post]").find(".mini-modal-match").empty(); $("#actionMenu[data-post]").find(".mini-modal-hdsd").empty(); $("#actionMenu[data-post]").find(".mini-modal-age").empty(); $("#actionMenu[data-post]").find(".mini-modal-runtime").empty(); $("#actionMenu[data-post]").find(".evidence-text").empty(); $("#actionMenu[data-post]").find(".mini-pop-delete-btn").addClass("hide"); $("#pop-box").addClass("hide"); } function createCookie(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else {expires = "";} document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; domain="+location.host.split(":")[0]+"; path=/"; } function readCookie(name) { var nameEQ = encodeURIComponent(name) + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) === ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) === 0)return decodeURIComponent(c.substring(nameEQ.length, c.length)); } return null; } $(".searchTab").click(function() { $(".searchInput").removeClass("hide"); $(".searchTab").addClass("hide"); $("#searchInput").focus(); }); $(".searchboxClose").click(function() { $(".searchInput").addClass("hide"); $(".searchTab").removeClass("hide"); //$("#bodyPage").removeClass("hide"); //$("#searchPage").addClass("hide"); $(".search-result").empty(); $("#bodyPage:not(.show)").toggle(500).addClass("show"); $("#searchPage:not(.notshow)").toggle(500).addClass("notshow"); $("#searchInput").val(null); }); var timeoutId; $("#searchInput").on("input", function() { window.clearTimeout(timeoutId); timeoutId = window.setTimeout(function() {search_input();}, 2000); $("#bodyPage.show").toggle(500).removeClass("show"); //$("#bodyPage").addClass("hide"); $("#searchPage.notshow").toggle(500).removeClass("notshow");}); $(".open-modal,.billboard-links").click(function() { var post_id = $(this).attr("data-post"); set_model_post(post_id); //$('.modal-body').css({animation: "fadeIn3 0.4s linear"}); }); $(".open-modal2,.modal-mini-play").click(function() { var post_id = $("#actionMenu").attr("data-post"); set_model_post(post_id); //$('.modal-body').css({animation: "fadeIn3 0.4s linear"}); }); $(".setOTT").click(function() { var ott_id = $(this).attr("data-ott"); $(".move-ott").removeClass("hide"); $.ajax({type: "POST", url: "/tv/setting.php", data:{ott:ott_id}, success: function(result){ if(result.error=="no"){setTimeout(function(){location.reload();}, 3000); }else{$(".move-ott").addClass("hide");alert_msg("danger",result.error);alert(result.error);} }}); }); $(".moreOTT").click(function() { if ($(".ottBOX").hasClass("hide123")) { $(".ottBOX").removeClass("hide123").hide(500);}else{$(".ottBOX").addClass("hide123").show(500);} }); $(".modal-bg,.previewModal-close").click(function() { clear_model_post(); $('.modal-body').css({animation: "fadeOut3 0.601s linear"}); }); function set_lang(elem,Lang){ $(".audio_lang_list a").removeClass("active"); var thislang = $(elem); $.ajax({type: "POST", url: "/language.php", data:{lang:Lang}, success: function(result){ thislang.addClass("active"); },error: function () {alert("Language Set Failed, Internet ERROR");} }); } function clear_model_post(){ $(".modal-main").scrollTop(0); setTimeout(function() { $("body").removeClass("overflow"); $(".modal-main").addClass("hide"); $(".modal-bg").addClass("hide"); $(".episode-lists").addClass("hide"); $(".modal-head-data").addClass("hide"); $(".modal-head-title").text(""); $(".model-ep-box .season-box").empty(); $(".btn-main-play").text('Play'); $("#modal-main").attr("data-post", "").attr("data-type", "").attr("data-ep", ""); $(".modal-img").attr("src",""); $(".modal-releted-content").addClass("collapsed"); $(".model-match").empty(); $(".model-year").empty(); $(".model-runtime").empty(); $(".model-hdsd").empty(); $(".more-episodes").addClass("hide"); $(".more-episodes .section-expandButton").attr("data-nextPage", "").attr("data-nextPageSeason", ""); $(".modal-m_reason").empty(); $(".model-Thisis").empty(); $(".model-Genres").empty(); $(".model-Cast").empty(); $(".model-Writer").empty(); $(".model-Director").empty(); $(".model-Creator").empty(); $(".model-ua").empty(); $(".model-Maturity-info").empty(); $(".audio_lang_list").empty(); $(".focusyou").focus(); ep_placeholder(); releted_placeholder(); $("#modal-main").addClass("modal-placeholder"); }, 500); } function set_model_post(post_id=""){ $('.modal-body').css({animation: "fadeIn3 0.4s linear"}); var t = $("body").attr("data-time"); $(".modal-main").removeClass("hide"); $(".modal-bg").removeClass("hide"); $("#modal-main").attr("data-post",post_id); //$(".modal-img").attr("src","https://i0.wp.com/img.nfmirrorcdn.top/poster/h/"+post_id+".jpg"); $(".modal-img").attr("src","https://imgcdn.media/poster/h/"+post_id+".jpg"); setTimeout(function() {$('.modal-main-play').focus();}, 1000); $("body").addClass("overflow"); $.ajax({type: "GET", url: "/post.php", data:{id:post_id,t:t}, success: function(result){ $(".model-title").text(result.title); $(".model-year").text(result.year); $(".model-ua").text(result.ua); $(".model-match").text(result.match); $(".model-runtime").text(result.runtime); $(".model-hdsd").text(result.hdsd); $(".model-description").text(result.desc); $("#modal-main").attr("data-type", result.type); if(result.resume){ $(".btn-main-play").text('Resume'); $(".modal-head-time").text(result.resume_time); $(".modal-head-data").removeClass("hide"); $(".modal-head-percent").css({width: result.resume_percent+"%"}); $(".modal-head-title").text(result.resume_title); } if(result.creator){$(".model-Creator").html(' '+result.creator+'');} if(result.director){$(".model-Director").html(' '+result.director+'');} if(result.writer){$(".model-Writer").html(' '+result.writer+'');} if(result.cast){$(".model-Cast").html(' '+result.cast+'');} if(result.genre){$(".model-Genres").html(' '+result.genre+'');} if(result.m_reason){$(".modal-m_reason").text(result.m_reason);} if(result.m_desc){$(".model-Maturity-info").text(result.m_desc);} if(result.oin){$(".model-film-series-img").html('"+getDesc+"
"); $(".jw-button-container .jw-icon-next").replaceWith(' '); //$(".jw-display-icon-rewind .jw-icon-rewind").html('