(function() { if (typeof NodeList.prototype.forEach === "function") return false; NodeList.prototype.forEach = Array.prototype.forEach; })(); var FinestModelsXMLHttp = new XMLHttpRequest(); var AmbassadeurModelsXMLHttp = new XMLHttpRequest(); var opn = "marqueeOpen", i, i2; function child_of(node, ancestor) { var child = node; while (child !== null) { if (child === ancestor) return true; child = child.parentNode; } return false; } function close_foldout() { foldout.classList.remove(opn); } function menu_init() { window.fmtitle = document.getElementById("FinestModelsTitle"); window.foldout = document.getElementById("foldOut"); window.collapse = document.getElementsByClassName("marqueeCollapsible"); window.uls = document.querySelectorAll(".marqueeContent ul"); for (i = 0; i < uls.length; i++) { var children = uls[i].getElementsByTagName("li"); for (i2 = 0; i2 < children.length; i2++) { children[i2].style.transitionDelay = i2 / 10 + "s"; } } for (i = 0; i < collapse.length; i++) { collapse[i].addEventListener("click", function() { this.classList.toggle("collapsibleOpen"); var content = this.nextElementSibling; content.classList.toggle("collapsibleContainer"); if (content.classList.contains("collapsibleContainer")) { content.style.transitionDelay = content.getElementsByTagName("li").length / 10 + "s"; } else { content.style.transitionDelay = "0s"; } }); } document.addEventListener("click", function(event) { if (foldout !== event.target && !child_of(event.target, foldout) && foldout.classList.contains(opn)) { close_foldout(); } }); fmtitle.addEventListener("click", function() { setTimeout(function() { foldout.classList.add(opn); }, 300); }) window.onscroll = function(e) { if (window.pageYOffset > 55) { close_foldout(); } } } function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array[i]; array[i] = array[j]; array[j] = temp; } } var FinestModelsArray = []; AmbassadeurModelsXMLHttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { new DOMParser().parseFromString(AmbassadeurModelsXMLHttp.responseText, "text/xml").querySelectorAll("item").forEach(function(node) { FinestModelsArray.push("
⭐️ " + node.getElementsByTagName("title")[0].childNodes[0].nodeValue + " ⭐️
"); }); var FinestModelsHtml = ""; if(FinestModelsArray.length > 0) { shuffleArray(FinestModelsArray); while((link = FinestModelsArray.pop()) != null) { FinestModelsHtml+= link; } } document.getElementById("FinestModelsMarquee").innerHTML = FinestModelsHtml; var FinestModelsWidth = 0; document.getElementById("FinestModelsMarquee").querySelectorAll("p").forEach(function(node) { FinestModelsWidth += node.offsetWidth; }); FinestModelsWidth += document.getElementById("FinestModelsWrapper").offsetWidth; document.getElementById("FinestModelsMarquee").width = FinestModelsWidth; var FinestModelsAnimation = document.createElement("style"); FinestModelsAnimation.innerHTML = "#FinestModels #FinestModelsMarquee{" + "white-space:nowrap;display:block;" + "width:" + FinestModelsWidth + "px;" + "position:absolute;z-index:10001;" + "animation:marquee " + (FinestModelsWidth/70) + "s linear infinite}" + "#FinestModels #FinestModelsMarquee:hover{" + "animation-play-state:paused;cursor:pointer}" + "@keyframes marquee{" + "0%{left:100%}" + "100%{left:-" + FinestModelsWidth + "px}" + "}"; document.body.appendChild(FinestModelsAnimation); } }; window.addEventListener("DOMContentLoaded", function() { var div = document.createElement("DIV"); var htmlMenu = "