\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"]
var _adWasPlayed = 0;
$(document).ready(function () {
YPTHidenavbar();
});
$(function () {
$("#navBarFlag").change(function () {
var selfURI = "https://shorts.flixhouse.com/view/";
window.location.href = addGetParam(selfURI, 'lang', $(this).val());
});
});
$(document).ready(function () {
loadPL('1238','63da9f0bc6414');
});
$(document).ready(function () {
loadPL('1254','63da9f0bc89c0');
});
$(document).ready(function () {
loadPL('1253','63da9f0bc9640');
});
$(document).ready(function () {
loadPL('1239','63da9f0bca28f');
});
$(document).ready(function () {
loadPL('1238','63da9f0bca9f7');
});
$(document).ready(function () {
loadPL('1237','63da9f0bcb23e');
});
$(document).ready(function () {
loadPL('1235','63da9f0bcbc3a');
});
$(document).ready(function () {
loadPL('1234','63da9f0bcc63e');
});
$(document).ready(function () {
loadPL('1233','63da9f0bcd15f');
});
$(document).ready(function () {
loadPL('1232','63da9f0bcdb7f');
});
$(document).ready(function () {
loadPL('1231','63da9f0bce580');
});
$(document).ready(function () {
loadPL('1230','63da9f0bcef6a');
});
$(document).ready(function () {
loadPL('1229','63da9f0bcfa72');
});
$(document).ready(function () {
loadPL('1141','63da9f0bd1f4f');
});
$(document).ready(function () {
loadPL('1190','63da9f0bd2988');
});
$(document).ready(function () {
loadPL('1136','63da9f0bd341c');
});
$(document).ready(function () {
loadPL('1205','63da9f0bd3f0f');
});
$(document).ready(function () {
loadPL('1160','63da9f0bd4a14');
});
$(document).ready(function () {
loadPL('1254','63da9f0bd50bb');
});
$(document).ready(function () {
loadPL('1140','63da9f0bd590f');
});
$(document).ready(function () {
loadPL('1175','63da9f0bd62fb');
});
$(document).ready(function () {
loadPL('1156','63da9f0bd6cdc');
});
$(document).ready(function () {
loadPL('1142','63da9f0bd76c6');
});
$(document).ready(function () {
loadPL('1177','63da9f0bd80cc');
});
$(document).ready(function () {
loadPL('1218','63da9f0bd8aa4');
});
$(document).ready(function () {
loadPL('1254','63da9f0bd992e');
});
$(document).ready(function () {
loadPL('1253','63da9f0bd9e57');
});
$(document).ready(function () {
loadPL('1239','63da9f0bda335');
});
$(document).ready(function () {
loadPL('1238','63da9f0bda80e');
});
$(document).ready(function () {
loadPL('1237','63da9f0bdace1');
});
$(document).ready(function () {
loadPL('1235','63da9f0bdb21c');
});
$(document).ready(function () {
loadPL('1234','63da9f0bdb6e9');
});
$(document).ready(function () {
loadPL('1233','63da9f0bdbbb8');
});
$(document).ready(function () {
loadPL('1232','63da9f0bdc098');
});
$(document).ready(function () {
loadPL('1231','63da9f0bdc566');
});
$(document).ready(function () {
loadPL('1230','63da9f0bdca27');
});
$(document).ready(function () {
loadPL('1229','63da9f0bdceec');
});
$(document).ready(function () {
loadPL('1220','63da9f0bdf482');
});
$(document).ready(function () {
loadPL('1217','63da9f0bdfead');
});
$(document).ready(function () {
loadPL('1215','63da9f0be08f8');
});
$(document).ready(function () {
loadPL('1213','63da9f0be13f6');
});
$(document).ready(function () {
loadPL('1209','63da9f0be1dfe');
});
$(document).ready(function () {
loadPL('1206','63da9f0be27fd');
});
$(document).ready(function () {
loadPL('1157','63da9f0be3219');
});
$(document).ready(function () {
loadPL('1126','63da9f0be3c8b');
});
$(document).ready(function () {
loadPL('1233','63da9f0be540c');
});
$(document).ready(function () {
loadPL('1232','63da9f0be5931');
});
$(document).ready(function () {
loadPL('1231','63da9f0be5e65');
});
$(document).ready(function () {
loadPL('1230','63da9f0be6453');
});
$(document).ready(function () {
loadPL('1218','63da9f0be6982');
});
$(document).ready(function () {
loadPL('1214','63da9f0be71e9');
});
$(document).ready(function () {
loadPL('1212','63da9f0be7bbe');
});
$(document).ready(function () {
loadPL('1211','63da9f0be858a');
});
$(document).ready(function () {
loadPL('1210','63da9f0be8f72');
});
$(document).ready(function () {
loadPL('1190','63da9f0be961f');
});
$(document).ready(function () {
loadPL('1176','63da9f0be9e6a');
});
$(document).ready(function () {
loadPL('1171','63da9f0bea8c4');
});
var $containerd74d3767b9bf6207475483c3705b6e31;
$(function () {
loadInfiniteScroold74d3767b9bf6207475483c3705b6e31();
});
/*
*
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) {
$containerd74d3767b9bf6207475483c3705b6e31.infiniteScroll('loadNextPage');
}
});*/
var append_infiniteScroll_timout;
function loadInfiniteScroold74d3767b9bf6207475483c3705b6e31() {
if (typeof $('.categoriesContainerItem').infiniteScroll == 'function') {
$containerd74d3767b9bf6207475483c3705b6e31 = $('.categoriesContainerItem').infiniteScroll({
path: '.pagination__nextd74d3767b9bf6207475483c3705b6e31',
append: '.categoriesContainerItem',
status: '.scroller-statusd74d3767b9bf6207475483c3705b6e31',
hideNav: '.infiniteScrollPaginationd74d3767b9bf6207475483c3705b6e31',
debug: false,
prefill: true,
history: false,
checkLastPage: false,
button: '#loadInfiniteScrollButtond74d3767b9bf6207475483c3705b6e31'
});
$containerd74d3767b9bf6207475483c3705b6e31.on('scrollThreshold.infiniteScroll', function (event) {
//console.log('infiniteScroll Scroll at bottom');
});
$containerd74d3767b9bf6207475483c3705b6e31.on('request.infiniteScroll', function (event, path, fetchPromise) {
//console.log(`infiniteScroll Loading page: ${path}`);
});
let infScroll = $containerd74d3767b9bf6207475483c3705b6e31.data('infiniteScroll');
$containerd74d3767b9bf6207475483c3705b6e31.on('load.infiniteScroll', function (event, body, path, response) {
//console.log(`infiniteScroll Loaded: ${path}`, `Status: ${response.status}`, `Current page: ${infScroll.pageIndex}`, `${infScroll.loadCount} pages loaded`);
});
$containerd74d3767b9bf6207475483c3705b6e31.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);
});
$containerd74d3767b9bf6207475483c3705b6e31.on('error.infiniteScroll', function (event, error, path, response) {
//console.error(`infiniteScroll Could not load: ${path}. ${error}`);
});
$containerd74d3767b9bf6207475483c3705b6e31.on('last.infiniteScroll', function (event, body, path) {
//console.log(`infiniteScroll Last page hit on ${path}`, body, event);
});
$containerd74d3767b9bf6207475483c3705b6e31.on('history.infiniteScroll', function (event, title, path) {
//console.log(`infiniteScroll History changed to: ${path}`);
});
}
}
$(function () {
/** showAlertMessage !requestComesFromSafePlace **/ });
$(document).ready(function () {
});
var playListsAdding = false;
var playList = [];
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};
function loadPlayLists(videos_id, crc) {
//console.log('loadPlayLists');
if (loadPlayListsResponseObject.timestamp + 5000 < Date.now()) {
loadPlayListsResponseObject.timestamp = Date.now();
loadPlayListsResponseObject.response = [];
setTimeout(function () {
$.ajax({
url: 'https://shorts.flixhouse.com/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);
}
}
}
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();
$(".searchlist" + videos_id + crc).append(' '
+ response[i].name_translated + '
');
}
$('.searchlist' + videos_id + crc).btsListFilter('#searchinput' + videos_id + crc, {itemChild: 'span'});
$('.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 () {
});
iframeAllowAttributes = 'allow="fullscreen;autoplay;camera *;microphone *;" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"';
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();
if (getPageHeight() <= $(window).height()) {
clearTimeout(checkFooterTimout);
checkFooterTimout = setTimeout(function () {
checkFooter();
}, 1000);
$("#mainFooter").css("position", "fixed");
} else {
$("#mainFooter").css("position", "relative");
}
}
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;
}
function showTrailer(iframe) {
avideoModalIframe(iframe);
}
$(document).ready(function () {
$('#TrailerModal').on('hidden.bs.modal', function () {
$('#TrailerModal iframe').attr('src', '');
});
$('#bigVideoCarousel').bind('slide.bs.carousel', function (e) {
setTimeout(function(){
lazyImage();
},500);
});
});