{"id":904,"date":"2024-12-12T19:31:14","date_gmt":"2024-12-12T15:31:14","guid":{"rendered":"https:\/\/afraidstudio.com\/?page_id=904"},"modified":"2025-10-14T18:57:25","modified_gmt":"2025-10-14T14:57:25","slug":"afraid-home-page","status":"publish","type":"page","link":"https:\/\/afraidstudio.com\/","title":{"rendered":"Afraid Home Page"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"904\" class=\"elementor elementor-904\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-eed76b7 e-con-full bg-video-rotator e-flex e-con e-parent\" data-id=\"eed76b7\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;video&quot;,&quot;jet_parallax_layout_list&quot;:[],&quot;background_play_on_mobile&quot;:&quot;yes&quot;}\" data-videos=\"https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback1.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback2.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback3.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback4.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback5.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback6.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback7.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback9.mp4,https:\/\/afraidstudio.com\/wp-content\/uploads\/2025\/10\/siteback10.mp4,\">\n\t\t<div class=\"elementor-element elementor-element-9e991c4 e-con-full e-flex e-con e-child\" data-id=\"9e991c4\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t<div class=\"elementor-element elementor-element-76f5060 e-con-full e-flex e-con e-child\" data-id=\"76f5060\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-91a65ef elementor-widget elementor-widget-heading\" data-id=\"91a65ef\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><a href=\"mailto:CIAO@AFRAIDSTUDIO.COM\">AFRAID<\/a><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0538c5c elementor-widget elementor-widget-heading\" data-id=\"0538c5c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><a href=\"mailto:CIAO@AFRAIDSTUDIO.COM\">STUDIO<\/a><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-497349b elementor-widget elementor-widget-html\" data-id=\"497349b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!-- Include Moment.js e Moment Timezone -->\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/moment.js\/2.29.1\/moment.min.js\"><\/script>\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/moment-timezone\/0.5.34\/moment-timezone-with-data.min.js\"><\/script>\n\n    <script>\n        function updateTime() {\n            \/\/ Usa moment-timezone per ottenere l'ora di Dubai e Milano\n            let dubaiTime = moment().tz(\"Asia\/Dubai\");\n            let milanTime = moment().tz(\"Europe\/Rome\");\n\n            \/\/ Format the time as HH:MM:SS\n            let dubaiTimeString = dubaiTime.format('HH:mm:ss');\n            let milanTimeString = milanTime.format('HH:mm:ss');\n\n            \/\/ Display the time\n            document.getElementById('dubai-time').textContent = `${dubaiTimeString} GMT +4`;\n            document.getElementById('milan-time').textContent = `MILAN ${milanTimeString}`;\n        }\n\n        \/\/ Update the time every second\n        setInterval(updateTime, 1000);\n\n        \/\/ Initialize the clock\n        updateTime();\n    <\/script>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7e0c1e5 elementor-widget elementor-widget-html\" data-id=\"7e0c1e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script>\n(function() {\n  var DEFAULT_VIDEO_SOURCES = [\n    \"https:\/\/cdn.esempio.it\/video\/hero1.mp4\",\n    \"https:\/\/cdn.esempio.it\/video\/hero2.webm\",\n    \"https:\/\/cdn.esempio.it\/video\/hero3.mp4\",\n    \"https:\/\/cdn.esempio.it\/video\/hero4.mp4\"\n  ];\n  var DEFAULT_POSTER = \"\"; \/\/ opzionale\n  var FADE_MS = 250;       \/\/ durata cross-fade (ms) - super veloce\n\n  function parseCsvList(str) {\n    return (str || \"\")\n      .split(\",\")\n      .map(function(s){ return s.trim(); })\n      .filter(Boolean);\n  }\n\n  \/\/ Fisher\u2013Yates shuffle\n  function shuffle(arr) {\n    var a = arr.slice();\n    for (var i = a.length - 1; i > 0; i--) {\n      var j = Math.floor(Math.random() * (i + 1));\n      var tmp = a[i]; a[i] = a[j]; a[j] = tmp;\n    }\n    return a;\n  }\n\n  function initBgVideoRotators() {\n    var nodes = document.querySelectorAll(\".bg-video-rotator\");\n    if (!nodes.length) return;\n\n    nodes.forEach(function(container) {\n      if (container.__bgvInitialized) return;\n      container.__bgvInitialized = true;\n\n      var dataList = parseCsvList(container.getAttribute(\"data-videos\"));\n      var sources = dataList.length ? dataList : DEFAULT_VIDEO_SOURCES.slice();\n      if (!sources.length) return;\n\n      \/\/ --- Stato playlist per evitare duplicati nel ciclo ---\n      var playlist = shuffle(sources);\n      var idx = -1;\n      var lastSrc = null;\n\n      function nextSrc() {\n        idx++;\n        if (idx >= playlist.length) {\n          playlist = shuffle(sources);\n          idx = 0;\n          \/\/ evita ripetizione tra fine e inizio ciclo\n          if (playlist[0] === lastSrc && playlist.length > 1) {\n            var swapIdx = 1;\n            var tmp = playlist[0]; playlist[0] = playlist[swapIdx]; playlist[swapIdx] = tmp;\n          }\n        }\n        var chosen = playlist[idx];\n        lastSrc = chosen;\n        return chosen;\n      }\n\n      function createVideoElement(src) {\n        var video = document.createElement(\"video\");\n        video.className = \"bgv-video\";\n        video.autoplay = true;\n        video.muted = true;\n        video.loop = false;          \/\/ loop lo gestiamo noi\n        video.playsInline = true;    \/\/ iOS inline\n        video.preload = \"auto\";\n        if (DEFAULT_POSTER) video.poster = DEFAULT_POSTER;\n\n        var sourceEl = document.createElement(\"source\");\n        sourceEl.src = src;\n        if (src.toLowerCase().endsWith(\".mp4\")) sourceEl.type = \"video\/mp4\";\n        if (src.toLowerCase().endsWith(\".webm\")) sourceEl.type = \"video\/webm\";\n        video.appendChild(sourceEl);\n\n        return video;\n      }\n\n      function crossFadeIn(newVideo, oldVideo) {\n        \/\/ metti il nuovo sopra (append alla fine = on top)\n        container.appendChild(newVideo);\n\n        \/\/ setup fade\n        newVideo.style.opacity = \"0\";\n        newVideo.style.transition = \"opacity \" + FADE_MS + \"ms ease\";\n        if (oldVideo) {\n          oldVideo.style.transition = \"opacity \" + FADE_MS + \"ms ease\";\n          oldVideo.style.opacity = \"1\"; \/\/ assicurati parta visibile\n        }\n\n        var start = function() {\n          \/\/ avvia il nuovo e fai la dissolvenza\n          var p = newVideo.play();\n          if (p && typeof p.catch === \"function\") { p.catch(function(){}); }\n\n          \/\/ forza un frame prima di cambiare l'opacit\u00e0\n          requestAnimationFrame(function() {\n            newVideo.style.opacity = \"1\";\n            if (oldVideo) oldVideo.style.opacity = \"0\";\n            \/\/ rimuovi il vecchio dopo la dissolvenza\n            setTimeout(function() {\n              if (oldVideo && oldVideo.parentNode === container) {\n                oldVideo.remove();\n              }\n            }, FADE_MS + 50);\n          });\n        };\n\n        \/\/ quando pronto a suonare, fai partire la transizione\n        if (newVideo.readyState >= 3) {\n          start();\n        } else {\n          newVideo.addEventListener(\"canplay\", start, { once: true });\n        }\n      }\n\n      function loadAndPlayNext() {\n        var src = nextSrc();\n        var oldVideo = container.querySelector(\".bgv-video\") || null;\n        var newVideo = createVideoElement(src);\n\n        \/\/ quando termina \u2192 passa al prossimo (loop infinito no-dupes-per-ciclo)\n        newVideo.addEventListener(\"ended\", function() {\n          loadAndPlayNext();\n        });\n\n        \/\/ fallback: se 'ended' non scatta, forza cambio dopo durata stimata\n        newVideo.addEventListener(\"loadedmetadata\", function() {\n          if (isFinite(newVideo.duration) && newVideo.duration > 0) {\n            setTimeout(function() {\n              if (!newVideo.paused && !newVideo.ended) return;\n              \/\/ se gi\u00e0 finito, skip; altrimenti nulla\n            }, (newVideo.duration + 1) * 1000);\n          }\n        });\n\n        crossFadeIn(newVideo, oldVideo);\n\n        \/\/ helper autoplay (alcuni browser richiedono interazione)\n        var tryPlayOnTap = function() {\n          var p = newVideo.play();\n          if (p && typeof p.catch === \"function\") { p.catch(function(){}); }\n          document.removeEventListener(\"pointerdown\", tryPlayOnTap);\n        };\n        document.addEventListener(\"pointerdown\", tryPlayOnTap, { once: true });\n      }\n\n      \/\/ avvio\n      loadAndPlayNext();\n    });\n  }\n\n  if (window.jQuery && window.elementorFrontend) {\n    jQuery(window).on(\"elementor\/frontend\/init\", function(){\n      initBgVideoRotators();\n      elementorFrontend.hooks.addAction(\"frontend\/element_ready\/container\", initBgVideoRotators);\n    });\n  } else {\n    document.addEventListener(\"DOMContentLoaded\", initBgVideoRotators);\n  }\n})();\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d9ac672 e-con-full e-flex e-con e-child\" data-id=\"d9ac672\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t<div class=\"elementor-element elementor-element-6fe54df e-con-full e-flex e-con e-child\" data-id=\"6fe54df\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e9e744b elementor-widget-mobile__width-inherit elementor-widget elementor-widget-heading\" data-id=\"e9e744b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><a href=\"mailto:CIAO@AFRAIDSTUDIO.COM\">CIAO@AFRAIDSTUDIO.COM<\/a><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9b6ef9c elementor-widget-mobile__width-inherit elementor-widget elementor-widget-heading\" data-id=\"9b6ef9c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><a href=\"https:\/\/www.instagram.com\/afraidstudio\/\" target=\"_blank\">INSTAGRAM<\/a><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0ed0656 elementor-widget-mobile__width-inherit elementor-widget elementor-widget-heading\" data-id=\"0ed0656\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">DUBAI - MILAN \u00a9 2018<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e0af4ee elementor-widget__width-initial elementor-widget-mobile__width-inherit elementor-widget elementor-widget-heading\" data-id=\"e0af4ee\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><div id=\"dubai-time\">Load<\/div><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>AFRAID STUDIO CIAO@AFRAIDSTUDIO.COM INSTAGRAM DUBAI &#8211; MILAN \u00a9 2018 Load<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-904","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/afraidstudio.com\/index.php?rest_route=\/wp\/v2\/pages\/904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afraidstudio.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/afraidstudio.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/afraidstudio.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afraidstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=904"}],"version-history":[{"count":100,"href":"https:\/\/afraidstudio.com\/index.php?rest_route=\/wp\/v2\/pages\/904\/revisions"}],"predecessor-version":[{"id":1026,"href":"https:\/\/afraidstudio.com\/index.php?rest_route=\/wp\/v2\/pages\/904\/revisions\/1026"}],"wp:attachment":[{"href":"https:\/\/afraidstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}