\n {title}\n <\/strong>\n {msg}<\/p>\n {html}\n {created}<\/small>\n <\/div>\n <\/div>\n <\/a>\n {icon}<\/div>\n
\n <\/i>\n <\/button>\n<\/div>"
var requiredUserNotificationTemplateFields = ["href","onclick","status","element_class","element_id","type","image","icon","title","msg","html","id","created"]
window.abkw = 'home-page';
var subtitleIsOn = true;
var _adWasPlayed = 0;
$(document).ready(function () {
YPTHidenavbar();
});
$(function () {
$("#navBarFlag").change(function () {
var selfURI = "https://kk-th.com/view/";
window.location.href = addGetParam(selfURI, 'lang', $(this).val());
});
});
$(document).ready(function () {
loadPL('518','650e36935901d');
});
$(document).ready(function () {
loadPL('1044','650e36935ab85');
});
$(document).ready(function () {
loadPL('1402','650e36935cd0a');
});
$(document).ready(function () {
loadPL('1458','650e36935f3a0');
});
$(document).ready(function () {
loadPL('1002','650e369360bd2');
});
$(document).ready(function () {
loadPL('825','650e36936326f');
});
$(document).ready(function () {
loadPL('965','650e3693659b2');
});
$(document).ready(function () {
loadPL('510','650e369367fc7');
});
$(document).ready(function () {
loadPL('1306','650e369369462');
});
$(document).ready(function () {
loadPL('920','650e36936bba7');
});
$(document).ready(function () {
loadPL('1389','650e36936d034');
});
$(document).ready(function () {
loadPL('791','650e36936f47c');
});
$(document).ready(function () {
loadPL('838','650e369371789');
});
$(document).ready(function () {
loadPL('538','650e369373d0c');
});
$(document).ready(function () {
loadPL('1567','650e369375405');
});
$(document).ready(function () {
loadPL('902','650e369377a17');
});
$(document).ready(function () {
loadPL('1034','650e36937a057');
});
$(document).ready(function () {
loadPL('819','650e36937b32c');
});
$(document).ready(function () {
loadPL('824','650e36937c48d');
});
$(document).ready(function () {
loadPL('781','650e36937e2f4');
});
$(document).ready(function () {
loadPL('1306','650e3693a4a07');
});
$(document).ready(function () {
loadPL('1430','650e3693a681c');
});
$(document).ready(function () {
loadPL('510','650e3693a723d');
});
$(document).ready(function () {
loadPL('732','650e3693a8d17');
});
$(document).ready(function () {
loadPL('627','650e3693aaa7f');
});
$(document).ready(function () {
loadPL('538','650e3693ab285');
});
$(document).ready(function () {
loadPL('518','650e3693ab5c2');
});
$(document).ready(function () {
loadPL('1307','650e3693ad55e');
});
$(document).ready(function () {
loadPL('662','650e3693af7fa');
});
$(document).ready(function () {
loadPL('838','650e3693b01c6');
});
$(document).ready(function () {
loadPL('1567','650e3693b0613');
});
$(document).ready(function () {
loadPL('1166','650e3693b130c');
});
$(document).ready(function () {
loadPL('517','650e3693b31af');
});
$(document).ready(function () {
loadPL('962','650e3693b5727');
});
$(document).ready(function () {
loadPL('781','650e3693b61e8');
});
$(document).ready(function () {
loadPL('920','650e3693b6642');
});
$(document).ready(function () {
loadPL('965','650e3693b6a82');
});
$(document).ready(function () {
loadPL('544','650e3693b8bb6');
});
$(document).ready(function () {
loadPL('1002','650e3693b95e5');
});
$(document).ready(function () {
loadPL('1044','650e3693b9a69');
});
$(document).ready(function () {
loadPL('1070','650e3693bb833');
});
$(document).ready(function () {
loadPL('507','650e3693bdbbe');
});
$(document).ready(function () {
loadPL('1136','650e3693bff25');
});
$(document).ready(function () {
loadPL('506','650e3693c23dc');
});
$(document).ready(function () {
loadPL('825','650e3693c305d');
});
$(document).ready(function () {
loadPL('871','650e3693c4b69');
});
$(document).ready(function () {
loadPL('791','650e3693c53d0');
});
$(document).ready(function () {
loadPL('826','650e3693c6c13');
});
$(document).ready(function () {
loadPL('969','650e3693c8dec');
});
$(document).ready(function () {
loadPL('1041','650e3693cb26b');
});
$(document).ready(function () {
loadPL('1069','650e3693cc650');
});
$(document).ready(function () {
loadPL('508','650e3693cec7d');
});
$(document).ready(function () {
loadPL('1093','650e3693cfe78');
});
$(document).ready(function () {
loadPL('1565','650e3693d1852');
});
$(document).ready(function () {
loadPL('824','650e3693d2272');
});
$(document).ready(function () {
loadPL('780','650e3693d3bbc');
});
$(document).ready(function () {
loadPL('1614','650e3694a66d8');
});
$(document).ready(function () {
loadPL('1613','650e3694a79ed');
});
$(document).ready(function () {
loadPL('1612','650e3694a8a09');
});
$(document).ready(function () {
loadPL('1611','650e3694a9826');
});
$(document).ready(function () {
loadPL('1610','650e3694ab28c');
});
$(document).ready(function () {
loadPL('1609','650e3694ac1fc');
});
$(document).ready(function () {
loadPL('1608','650e3694acf9c');
});
$(document).ready(function () {
loadPL('1607','650e3694adf9b');
});
$(document).ready(function () {
loadPL('1597','650e3694af11b');
});
$(document).ready(function () {
loadPL('1583','650e3694b05a8');
});
$(document).ready(function () {
loadPL('1582','650e3694b15d1');
});
$(document).ready(function () {
loadPL('1581','650e3694b2483');
});
$(document).ready(function () {
loadPL('1580','650e3694b35aa');
});
$(document).ready(function () {
loadPL('1579','650e3694b4653');
});
$(document).ready(function () {
loadPL('1578','650e3694b5603');
});
$(document).ready(function () {
loadPL('1577','650e3694b6572');
});
$(document).ready(function () {
loadPL('1571','650e3694b72a8');
});
$(document).ready(function () {
loadPL('1510','650e3694b7f94');
});
$(document).ready(function () {
loadPL('1509','650e3694b8be3');
});
$(document).ready(function () {
loadPL('1508','650e3694b98c3');
});
$(document).ready(function () {
loadPL('1507','650e3694ba6c4');
});
$(document).ready(function () {
loadPL('1506','650e3694bb48f');
});
$(document).ready(function () {
loadPL('1505','650e3694bc60f');
});
$(document).ready(function () {
loadPL('1504','650e3694bd74c');
});
$(document).ready(function () {
loadPL('1503','650e3694be891');
});
$(document).ready(function () {
loadPL('1502','650e3694bfd03');
});
$(document).ready(function () {
loadPL('1501','650e3694c0d95');
});
$(document).ready(function () {
loadPL('1500','650e3694c1d8e');
});
$(document).ready(function () {
loadPL('1499','650e3694c2dbe');
});
$(document).ready(function () {
loadPL('1498','650e3694c3c6f');
});
$(document).ready(function () {
loadPL('1497','650e3694c4b47');
});
$(document).ready(function () {
loadPL('1496','650e3694c5bbe');
});
$(document).ready(function () {
loadPL('1495','650e3694c6c92');
});
$(document).ready(function () {
loadPL('1494','650e3694c7dd9');
});
$(document).ready(function () {
loadPL('1493','650e3694c8f02');
});
$(document).ready(function () {
loadPL('1492','650e3694ca049');
});
$(document).ready(function () {
loadPL('1618','650e369560ebd');
});
$(document).ready(function () {
loadPL('1617','650e36956335e');
});
$(document).ready(function () {
loadPL('1616','650e369564378');
});
$(document).ready(function () {
loadPL('1615','650e369566383');
});
$(document).ready(function () {
loadPL('1595','650e36956846d');
});
$(document).ready(function () {
loadPL('1594','650e36956a081');
});
$(document).ready(function () {
loadPL('1593','650e36956bcb9');
});
$(document).ready(function () {
loadPL('1592','650e36956d853');
});
$(document).ready(function () {
loadPL('1591','650e36956f4a6');
});
$(document).ready(function () {
loadPL('1590','650e3695715cb');
});
$(document).ready(function () {
loadPL('1588','650e369572809');
});
$(document).ready(function () {
loadPL('1587','650e369573ce4');
});
$(document).ready(function () {
loadPL('1586','650e369574d3f');
});
$(document).ready(function () {
loadPL('1585','650e369575d91');
});
$(document).ready(function () {
loadPL('1584','650e369576d47');
});
$(document).ready(function () {
loadPL('1576','650e36958f5bf');
});
$(document).ready(function () {
loadPL('1575','650e3695901b9');
});
$(document).ready(function () {
loadPL('1574','650e369590dc3');
});
$(document).ready(function () {
loadPL('1573','650e3695919b1');
});
$(document).ready(function () {
loadPL('1572','650e369592989');
});
$(document).ready(function () {
loadPL('1570','650e36959483b');
});
$(document).ready(function () {
loadPL('1565','650e36959521e');
});
$(document).ready(function () {
loadPL('1564','650e369595bd7');
});
$(document).ready(function () {
loadPL('1521','650e369596b33');
});
$(document).ready(function () {
loadPL('1512','650e369597b0d');
});
$(document).ready(function () {
loadPL('1511','650e369598b68');
});
$(document).ready(function () {
loadPL('1412','650e369599bd5');
});
$(document).ready(function () {
loadPL('1411','650e36959abdf');
});
$(document).ready(function () {
loadPL('1391','650e36959bcf3');
});
$(document).ready(function () {
loadPL('1390','650e36959d6a0');
});
$(document).ready(function () {
loadPL('1389','650e36959e199');
});
$(document).ready(function () {
loadPL('1388','650e36959ec61');
});
$(document).ready(function () {
loadPL('1387','650e36959fd87');
});
$(document).ready(function () {
loadPL('1357','650e3695a1dc4');
});
$(document).ready(function () {
loadPL('1354','650e3695a2ced');
});
$(document).ready(function () {
loadPL('1334','650e3695a41b4');
});
var $containerdb96e9ca5da617858019d65850f16780;
$(function () {
loadInfiniteScrooldb96e9ca5da617858019d65850f16780();
});
/*
*
document.addEventListener('scroll', function (e) {
var scrollPosition = window.pageYOffset;
var windowSize = window.innerHeight;
var bodyHeight = document.body.offsetHeight;
var distance = bodyHeight - (scrollPosition + windowSize);
//console.log('infiniteScroll ', distance, windowSize, distance < windowSize);
if (distance < windowSize) {
$containerdb96e9ca5da617858019d65850f16780.infiniteScroll('loadNextPage');
}
});*/
var append_infiniteScroll_timout;
function loadInfiniteScrooldb96e9ca5da617858019d65850f16780() {
if (typeof $('.categoriesContainerItem').infiniteScroll == 'function') {
$containerdb96e9ca5da617858019d65850f16780 = $('.categoriesContainerItem').infiniteScroll({
path: '.pagination__nextdb96e9ca5da617858019d65850f16780',
append: '.categoriesContainerItem',
status: '.scroller-statusdb96e9ca5da617858019d65850f16780',
hideNav: '.infiniteScrollPaginationdb96e9ca5da617858019d65850f16780',
debug: false,
prefill: true,
history: false,
checkLastPage: false,
button: '#loadInfiniteScrollButtondb96e9ca5da617858019d65850f16780'
});
$containerdb96e9ca5da617858019d65850f16780.on('scrollThreshold.infiniteScroll', function (event) {
//console.log('infiniteScroll Scroll at bottom');
});
$containerdb96e9ca5da617858019d65850f16780.on('request.infiniteScroll', function (event, path, fetchPromise) {
//console.log(`infiniteScroll Loading page: ${path}`);
});
let infScroll = $containerdb96e9ca5da617858019d65850f16780.data('infiniteScroll');
$containerdb96e9ca5da617858019d65850f16780.on('load.infiniteScroll', function (event, body, path, response) {
//console.log(`infiniteScroll Loaded: ${path}`, `Status: ${response.status}`, `Current page: ${infScroll.pageIndex}`, `${infScroll.loadCount} pages loaded`);
});
$containerdb96e9ca5da617858019d65850f16780.on('append.infiniteScroll', function (event, body, path, items, response) {
//console.log(`infiniteScroll Appended ${items.length} items on ${path}`, body);
clearTimeout(append_infiniteScroll_timout);
append_infiniteScroll_timout = setTimeout(function () {
lazyImage();
avideoSocket();
}, 1000);
});
$containerdb96e9ca5da617858019d65850f16780.on('error.infiniteScroll', function (event, error, path, response) {
//console.error(`infiniteScroll Could not load: ${path}. ${error}`);
});
$containerdb96e9ca5da617858019d65850f16780.on('last.infiniteScroll', function (event, body, path) {
//console.log(`infiniteScroll Last page hit on ${path}`, body, event);
});
$containerdb96e9ca5da617858019d65850f16780.on('history.infiniteScroll', function (event, title, path) {
//console.log(`infiniteScroll History changed to: ${path}`);
});
}
}
$(document).ready(function () {
loadPL('1615','650e3695e210a');
});
$(document).ready(function () {
loadPL('29','650e3695e3439');
});
$(document).ready(function () {
loadPL('256','650e3695e419e');
});
$(document).ready(function () {
loadPL('512','650e3695e50cc');
});
$(document).ready(function () {
loadPL('1280','650e3695e610e');
});
$(document).ready(function () {
loadPL('1','650e369606fcd');
});
$(document).ready(function () {
loadPL('257','650e369607ca1');
});
$(document).ready(function () {
loadPL('513','650e369608ac5');
});
$(document).ready(function () {
loadPL('1281','650e369609a8f');
});
$(document).ready(function () {
loadPL('2','650e36960aaab');
});
$(document).ready(function () {
loadPL('258','650e36960cade');
});
$(document).ready(function () {
loadPL('514','650e36960dac4');
});
$(function () {
/** showAlertMessage **/
/** showAlertMessage !requestComesFromSafePlace [] **/ });
var playListsAdding = false;
var playList = [];
async function reloadPlayLists() {
if (!isOnline()) {
return false;
}
//console.log('reloadPlayLists');
$.ajax({
url: webSiteRootURL + 'objects/playlists.json.php',
success: function (response) {
playList = response;
reloadPlayListButtons();
}
});
}
function reloadPlayListButtons() {
//console.log('reloadPlayListButtons');
$('.watchLaterBtnAdded').hide();
$('.favoriteBtnAdded').hide();
$('.watchLaterBtn').show();
$('.favoriteBtn').show();
for (var i in playList) {
if (!playList[i].id || (playList[i].status !== 'watch_later' && playList[i].status !== 'favorite')) {
continue;
}
for (var x in playList[i].videos) {
if (typeof (playList[i].videos[x]) === 'object') {
if (playList[i].status === 'watch_later') {
$('.watchLaterBtn' + playList[i].videos[x].videos_id).hide();
$('.watchLaterBtnAdded' + playList[i].videos[x].videos_id).show();
} else if (playList[i].status === 'favorite') {
$('.favoriteBtn' + playList[i].videos[x].videos_id).hide();
$('.favoriteBtnAdded' + playList[i].videos[x].videos_id).show();
}
}
}
}
}
loadPlayListsResponseObject = {timestamp: 0, response: false};
async function loadPlayLists(videos_id, crc) {
//console.log('loadPlayLists');
if (loadPlayListsResponseObject.timestamp + 5000 < Date.now()) {
loadPlayListsResponseObject.timestamp = Date.now();
loadPlayListsResponseObject.response = [];
setTimeout(function () {
$.ajax({
url: webSiteRootURL+'objects/playlists.json.php',
cache: true,
success: function (response) {
loadPlayListsResponseObject.response = response;
loadPlayListsResponse(loadPlayListsResponseObject.response, videos_id, crc);
}
});
;
}, 500);
} else {
if (loadPlayListsResponseObject.response) {
loadPlayListsResponse(loadPlayListsResponseObject.response, videos_id, crc);
} else {
setTimeout(function () {
loadPlayLists(videos_id, crc);
}, 1500);
}
}
}
var listGroupItemTemplate = "\n \n <\/i> \n <\/button>\n \n <\/i> \n <\/button>\n \n <\/i> \n {name_translated}<\/span>\n <\/span>\n \n \n <\/label>\n <\/div>\n<\/a>";
async function loadPlayListsResponse(response, videos_id, crc) {
//console.log('loadPlayListsResponse');
//console.log(response, videos_id, crc);
$('.searchlist' + videos_id + crc).html('');
for (var i in response) {
if (!response[i].id) {
continue;
}
var icon = "fa fa-lock"
if (response[i].status == "public") {
icon = "fa fa-globe"
} else if (response[i].status == "watch_later") {
icon = "fas fa-clock"
} else if (response[i].status == "favorite") {
icon = "fas fa-heart"
}
var checked = "";
for (var x in response[i].videos) {
if (typeof (response[i].videos[x]) === 'object' && response[i].videos[x].videos_id == videos_id) {
checked = "checked";
}
}
var randId = (("_" + response[i].id) + videos_id) + Math.random();
var itemsArray = {};
itemsArray.icon = icon;
itemsArray.id = response[i].id;
itemsArray.name_translated = response[i].name_translated;
itemsArray.response_id = response[i].id + '' + videos_id;
itemsArray.checked = checked;
itemsArray.videos_id = videos_id;
itemsArray.randId = randId;
$(".searchlist" + videos_id + crc).append(arrayToTemplate(itemsArray, listGroupItemTemplate));
}
$('.searchlist' + videos_id + crc).btsListFilter('#searchinput' + videos_id + crc, {itemChild: '.nameSearch', initial:false});
$('.playListsVideosIds' + videos_id).change(function () {
if (playListsAdding) {
return false;
}
playListsAdding = true;
addVideoToPlayList(videos_id, $(this).is(":checked"), $(this).val());
return false;
});
}
function addVideoToPlayList(videos_id, isChecked, playlists_id) {
//console.log('addVideoToPlayList');
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/playListAddVideo.json.php',
method: 'POST',
data: {
'videos_id': videos_id,
'add': isChecked,
'playlists_id': playlists_id
},
success: function (response) {
reloadPlayLists();
//console.log(".playListsIds_" + playlists_id + '_videos_id_' + videos_id);
$(".playListsIds_" + playlists_id + '_videos_id_' + videos_id).prop("checked", isChecked);
modal.hidePleaseWait();
setTimeout(function () {
playListsAdding = false
}, 500);
}
});
}
$(document).ready(function () {
reloadPlayLists();
});
$(document).ready(function () {
});
$(document).ready(function () {
});
$(function () {setTimeout(function(){if(typeof $("#mainNavBar").autoHidingNavbar == "function"){$("#mainNavBar").autoHidingNavbar();}},5000);});
$(function () {
$("#mainNavBar").on("show.autoHidingNavbar", function () {
if ($(window).scrollTop() < 10) {
$("body").removeClass("nopadding");
}
});
$("#mainNavBar").on("hide.autoHidingNavbar", function () {
if ($(window).scrollTop() < 10) {
$("body").addClass("nopadding");
}
});
});
iframeAllowAttributes = 'allow="fullscreen;autoplay;camera *;microphone *;" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"';
$(function(){
$('.carousel').carousel({
interval: 5000
});
});
var checkFooterTimout;
$(function () {
checkFooter();
$(window).scroll(function () {
clearTimeout(checkFooterTimout);
checkFooterTimout = setTimeout(function () {
checkFooter();
}, 100);
});
$(window).resize(function () {
clearTimeout(checkFooterTimout);
checkFooterTimout = setTimeout(function () {
checkFooter();
}, 100);
});
$(window).mouseup(function () {
clearTimeout(checkFooterTimout);
checkFooterTimout = setTimeout(function () {
checkFooter();
}, 100);
});
});
function checkFooter() {
$("#mainFooter").fadeIn();
var height = $("#mainFooter").height();
if (height < 150 && getPageHeight() <= $(window).height()) {
clearTimeout(checkFooterTimout);
checkFooterTimout = setTimeout(function () {
checkFooter();
}, 1000);
$("#mainFooter").css("position", "fixed");
$('body').css('padding-bottom', height+'px');
} else {
$("#mainFooter").css("position", "relative");
$('body').css('padding-bottom', '');
}
}
function getPageHeight() {
var mainNavBarH = 0;
if ($('#mainNavBar').length) {
mainNavBarH = $('#mainNavBar').height();
}
var mainFooterH = 0;
if ($('#mainFooter').length) {
mainFooterH = $('#mainFooter').height();
}
var containerH = getLargerContainerHeight();
return mainNavBarH + mainFooterH + containerH;
}
function getLargerContainerHeight() {
var conteiners = $('body > .container,body > .container-fluid');
var height = 0;
for (var item in conteiners) {
if (isNaN(item)) {
continue;
}
var h = $(conteiners[item]).height();
if (h > height) {
height = h;
}
}
return height;
}
$(document).ready(function () {
$('#TrailerModal').on('hidden.bs.modal', function () {
$('#TrailerModal iframe').attr('src', '');
});
$('#bigVideoCarousel').bind('slide.bs.carousel', function (e) {
setTimeout(function(){
lazyImage();
},500);
});
});