\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 _adWasPlayed = 0;
$(document).ready(function () {
YPTHidenavbar();
});
$(function () {
$("#navBarFlag").change(function () {
var selfURI = "https://hello-th.com/view/";
window.location.href = addGetParam(selfURI, 'lang', $(this).val());
});
});
$(document).ready(function () {
loadPL('1835','650f89f64f5d4');
});
$(document).ready(function () {
loadPL('2147','650f89f6505c5');
});
$(document).ready(function () {
loadPL('2818','650f89f651528');
});
$(document).ready(function () {
loadPL('2360','650f89f652204');
});
$(document).ready(function () {
loadPL('2202','650f89f653610');
});
$(document).ready(function () {
loadPL('1836','650f89f654b1e');
});
$(document).ready(function () {
loadPL('2361','650f89f656119');
});
$(document).ready(function () {
loadPL('3124','650f89f65754b');
});
$(document).ready(function () {
loadPL('2001','650f89f658688');
});
$(document).ready(function () {
loadPL('2742','650f89f6598cf');
});
$(document).ready(function () {
loadPL('3115','650f89f65acdb');
});
$(document).ready(function () {
loadPL('2096','650f89f65bc3c');
});
$(document).ready(function () {
loadPL('1974','650f89f65cb74');
});
$(document).ready(function () {
loadPL('2142','650f89f65da93');
});
$(document).ready(function () {
loadPL('3191','650f89f65eb49');
});
$(document).ready(function () {
loadPL('3116','650f89f65fae9');
});
$(document).ready(function () {
loadPL('2086','650f89f660c53');
});
$(document).ready(function () {
loadPL('2614','650f89f661e4e');
});
$(document).ready(function () {
loadPL('1841','650f89f6636c5');
});
$(document).ready(function () {
loadPL('2076','650f89f664be9');
});
$(document).ready(function () {
loadPL('2001','650f89f68abee');
});
$(document).ready(function () {
loadPL('2362','650f89f68bb56');
});
$(document).ready(function () {
loadPL('1974','650f89f68c403');
});
$(document).ready(function () {
loadPL('1835','650f89f68c98c');
});
$(document).ready(function () {
loadPL('1986','650f89f68da64');
});
$(document).ready(function () {
loadPL('3124','650f89f68e2e8');
});
$(document).ready(function () {
loadPL('2363','650f89f68f5ae');
});
$(document).ready(function () {
loadPL('2076','650f89f68fdea');
});
$(document).ready(function () {
loadPL('2818','650f89f69009b');
});
$(document).ready(function () {
loadPL('2147','650f89f690346');
});
$(document).ready(function () {
loadPL('3414','650f89f691372');
});
$(document).ready(function () {
loadPL('2360','650f89f691d1e');
});
$(document).ready(function () {
loadPL('3506','650f89f74bee6');
});
$(document).ready(function () {
loadPL('3505','650f89f750242');
});
$(document).ready(function () {
loadPL('3504','650f89f75334b');
});
$(document).ready(function () {
loadPL('3503','650f89f7564da');
});
$(document).ready(function () {
loadPL('3502','650f89f759cdd');
});
$(document).ready(function () {
loadPL('3501','650f89f75c3bc');
});
$(document).ready(function () {
loadPL('3500','650f89f75f423');
});
$(document).ready(function () {
loadPL('3499','650f89f76235b');
});
$(document).ready(function () {
loadPL('3498','650f89f7652df');
});
$(document).ready(function () {
loadPL('3497','650f89f765fd2');
});
$(document).ready(function () {
loadPL('3496','650f89f76697b');
});
$(document).ready(function () {
loadPL('3495','650f89f76749b');
});
$(document).ready(function () {
loadPL('3494','650f89f767fb5');
});
$(document).ready(function () {
loadPL('3493','650f89f768fb6');
});
$(document).ready(function () {
loadPL('3492','650f89f769d04');
});
$(document).ready(function () {
loadPL('3491','650f89f76aa46');
});
$(document).ready(function () {
loadPL('3490','650f89f76b6c8');
});
$(document).ready(function () {
loadPL('3489','650f89f76c3f5');
});
$(document).ready(function () {
loadPL('3488','650f89f76d11c');
});
$(document).ready(function () {
loadPL('3487','650f89f76ddcf');
});
$(document).ready(function () {
loadPL('3486','650f89f76e9d5');
});
$(document).ready(function () {
loadPL('3485','650f89f76f690');
});
$(document).ready(function () {
loadPL('3484','650f89f7703cb');
});
$(document).ready(function () {
loadPL('3483','650f89f771266');
});
$(document).ready(function () {
loadPL('127','650f89f7c4b49');
});
$(document).ready(function () {
loadPL('431','650f89f7c5db4');
});
$(document).ready(function () {
loadPL('233','650f89f7c6cb4');
});
$(document).ready(function () {
loadPL('132','650f89f7c7e4f');
});
$(document).ready(function () {
loadPL('128','650f89f7c8b3a');
});
$(document).ready(function () {
loadPL('88','650f89f7c9844');
});
$(document).ready(function () {
loadPL('1560','650f89f7ca7c4');
});
$(document).ready(function () {
loadPL('230','650f89f7cb53b');
});
$(document).ready(function () {
loadPL('136','650f89f7cc2c4');
});
$(document).ready(function () {
loadPL('224','650f89f7ccedd');
});
$(document).ready(function () {
loadPL('231','650f89f7cdccf');
});
$(document).ready(function () {
loadPL('129','650f89f7ceabf');
});
$(document).ready(function () {
loadPL('2725','650f89f820b32');
});
$(document).ready(function () {
loadPL('2386','650f89f821902');
});
$(document).ready(function () {
loadPL('2317','650f89f822920');
});
$(document).ready(function () {
loadPL('2153','650f89f823ad6');
});
$(document).ready(function () {
loadPL('1978','650f89f8246c8');
});
$(document).ready(function () {
loadPL('1582','650f89f8251a6');
});
$(document).ready(function () {
loadPL('1560','650f89f82576e');
});
$(document).ready(function () {
loadPL('690','650f89f825ffa');
});
$(document).ready(function () {
loadPL('688','650f89f8269c7');
});
$(document).ready(function () {
loadPL('605','650f89f82752a');
});
$(document).ready(function () {
loadPL('570','650f89f827e6b');
});
$(document).ready(function () {
loadPL('565','650f89f82883f');
});
$(document).ready(function () {
loadPL('1309','650f89f875493');
});
$(document).ready(function () {
loadPL('957','650f89f876396');
});
$(document).ready(function () {
loadPL('954','650f89f8771d3');
});
$(document).ready(function () {
loadPL('822','650f89f877d80');
});
$(document).ready(function () {
loadPL('771','650f89f8789d4');
});
$(document).ready(function () {
loadPL('726','650f89f879987');
});
$(document).ready(function () {
loadPL('720','650f89f87a8c6');
});
$(document).ready(function () {
loadPL('718','650f89f87b59a');
});
$(document).ready(function () {
loadPL('717','650f89f87c0d9');
});
$(document).ready(function () {
loadPL('714','650f89f87cbfb');
});
$(document).ready(function () {
loadPL('702','650f89f87d63d');
});
$(document).ready(function () {
loadPL('693','650f89f87e158');
});
$(document).ready(function () {
loadPL('3033','650f89f8c4257');
});
$(document).ready(function () {
loadPL('2155','650f89f8c5047');
});
$(document).ready(function () {
loadPL('2154','650f89f8c5cf2');
});
$(document).ready(function () {
loadPL('2099','650f89f8c675c');
});
$(document).ready(function () {
loadPL('2098','650f89f8c747e');
});
$(document).ready(function () {
loadPL('2097','650f89f8c80ee');
});
$(document).ready(function () {
loadPL('1974','650f89f8c8b81');
});
$(document).ready(function () {
loadPL('1971','650f89f8c977b');
});
$(document).ready(function () {
loadPL('1970','650f89f8ca884');
});
$(document).ready(function () {
loadPL('1957','650f89f8cb87b');
});
$(document).ready(function () {
loadPL('1956','650f89f8cc854');
});
$(document).ready(function () {
loadPL('1954','650f89f8cd809');
});
var $container14f9bd9d6b01a61b2c0c709e4ee39e08;
$(function () {
loadInfiniteScrool14f9bd9d6b01a61b2c0c709e4ee39e08();
});
/*
*
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) {
$container14f9bd9d6b01a61b2c0c709e4ee39e08.infiniteScroll('loadNextPage');
}
});*/
var append_infiniteScroll_timout;
function loadInfiniteScrool14f9bd9d6b01a61b2c0c709e4ee39e08() {
if (typeof $('.categoriesContainerItem').infiniteScroll == 'function') {
$container14f9bd9d6b01a61b2c0c709e4ee39e08 = $('.categoriesContainerItem').infiniteScroll({
path: '.pagination__next14f9bd9d6b01a61b2c0c709e4ee39e08',
append: '.categoriesContainerItem',
status: '.scroller-status14f9bd9d6b01a61b2c0c709e4ee39e08',
hideNav: '.infiniteScrollPagination14f9bd9d6b01a61b2c0c709e4ee39e08',
debug: false,
prefill: true,
history: false,
checkLastPage: false,
button: '#loadInfiniteScrollButton14f9bd9d6b01a61b2c0c709e4ee39e08'
});
$container14f9bd9d6b01a61b2c0c709e4ee39e08.on('scrollThreshold.infiniteScroll', function (event) {
//console.log('infiniteScroll Scroll at bottom');
});
$container14f9bd9d6b01a61b2c0c709e4ee39e08.on('request.infiniteScroll', function (event, path, fetchPromise) {
//console.log(`infiniteScroll Loading page: ${path}`);
});
let infScroll = $container14f9bd9d6b01a61b2c0c709e4ee39e08.data('infiniteScroll');
$container14f9bd9d6b01a61b2c0c709e4ee39e08.on('load.infiniteScroll', function (event, body, path, response) {
//console.log(`infiniteScroll Loaded: ${path}`, `Status: ${response.status}`, `Current page: ${infScroll.pageIndex}`, `${infScroll.loadCount} pages loaded`);
});
$container14f9bd9d6b01a61b2c0c709e4ee39e08.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);
});
$container14f9bd9d6b01a61b2c0c709e4ee39e08.on('error.infiniteScroll', function (event, error, path, response) {
//console.error(`infiniteScroll Could not load: ${path}. ${error}`);
});
$container14f9bd9d6b01a61b2c0c709e4ee39e08.on('last.infiniteScroll', function (event, body, path) {
//console.log(`infiniteScroll Last page hit on ${path}`, body, event);
});
$container14f9bd9d6b01a61b2c0c709e4ee39e08.on('history.infiniteScroll', function (event, title, path) {
//console.log(`infiniteScroll History changed to: ${path}`);
});
}
}
$(function () {
/** showAlertMessage **/
/** showAlertMessage !requestComesFromSafePlace [] **/ });
$(document).ready(function () {
});
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 () {
});
$(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
});
});
(function(d,z,s){s.src='https://'+d+'/400/'+z;try{(document.body||document.documentElement).appendChild(s)}catch(e){}})('rndskittytor.com',6065009,document.createElement('script'))
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);
});
});