Warning: Undefined array key "post_type_share_twitter_account" in /var/www/vhosts/casinonewsblogger.com/public_html/wp-content/themes/cryptocurrency/vslmd/share/share.php on line 24
Artificial intelligence has quickly become one of the most discussed topics across the gaming industry, with operators, suppliers and technology providers exploring how these tools can improve efficiency, decision-making and innovation. Yet beyond the headlines and bold predictions, many organizations are still trying to understand what practical AI adoption looks like in day-to-day business operations.
In this exclusive interview with Yogonet, Aleš Gornjec, CEO of Comtrade Gaming, shares his perspective on the realities of integrating AI into a modern gaming business. From productivity gains and software development to cultural challenges and common misconceptions, he reflects on the lessons Comtrade Gaming has learned while incorporating AI into its workflows and explains why human oversight remains as important as ever.
AI has become one of the industry’s biggest talking points, but what initially motivated you to start exploring these tools in your day-to-day work? And before using AI extensively, what assumptions or expectations did you have about what it could do?
Like many people, I was initially intrigued by the sheer speed at which AI seemed to be advancing. But what motivated me to explore it seriously was not the technology itself—it was the potential impact on productivity and decision-making.
In our industry, we constantly process large amounts of information: regulations, technical specifications, project documentation, customer requirements, market research, and operational data. The question was simple: could AI help our teams spend less time searching, summarizing, and documenting, and more time solving real problems?
Initially, I think many of us expected AI to behave almost like a highly knowledgeable digital assistant that could reliably provide answers and create high-quality outputs with minimal effort. What we quickly learned is that AI is incredibly powerful, but it is not autonomous expertise. The quality of the output depends heavily on the quality of the input, context, and human guidance. AI did not replace critical thinking; if anything, it made critical thinking even more important.
Can you describe some of the practical ways AI has become part of your daily workflow at Comtrade Gaming? How do you decide which tasks are suitable for AI assistance and which ones still require a fully human approach?
Today, AI is integrated into many aspects of our daily work. Teams use it to draft documents, prepare presentations, analyze requirements, summarize lengthy discussions, create meeting notes, generate technical documentation, assist with coding, and perform research much faster than before.
Personally, I use AI extensively for reviewing information, exploring different perspectives on a problem, structuring ideas, and preparing first drafts of strategies, communications, and presentations. Rather than staring at a blank page, I can start with a reasonably solid foundation and then refine it.
A simple guideline we follow is that AI is excellent for acceleration but not for accountability. Tasks that involve pattern recognition, summarization, drafting, or information retrieval are typically strong candidates for AI assistance. Tasks involving final decisions, customer commitments, regulatory interpretation, strategic judgment, or creative innovation require human ownership and responsibility.
The question is not whether AI or humans should perform a task. The question is how humans and AI can work together most effectively.
What are some examples where AI has genuinely improved efficiency or helped solve a problem that would have been difficult otherwise? On the other hand, can you recall situations where AI didn’t deliver the expected results?
One of the biggest gains has come from reducing the time required to process information. Tasks that previously took several days or weeks—such as analyzing large documents, comparing multiple requirements, preparing summaries, or drafting responses to RFIs and RFPs—can often be completed in a fraction of the time.
We’ve also seen significant benefits in software development. AI can help developers understand unfamiliar code, generate boilerplate implementations, produce test cases, and evaluate different design approaches. This doesn’t eliminate the need for engineering expertise, but it does increase productivity.
At the same time, we’ve learned that AI is not equally effective across all use cases. One common misconception is that AI always knows the correct answer. In reality, it can be confidently wrong. We’ve seen situations where responses sounded convincing but contained factual inaccuracies, misunderstood business context, or overlooked important constraints.
Another lesson is that AI struggles more when dealing with incomplete information, highly specialized domain knowledge, or problems that require deep organizational understanding. Human experience remains essential in these situations.
Introducing new technologies can sometimes be met with skepticism. What challenges have you encountered when encouraging AI adoption within teams? And has AI influenced how teams collaborate, communicate, or make decisions?
The biggest challenge was not technological—it was cultural.
People generally fall into two camps when new technology appears. Some expect it to solve everything immediately. Others assume it will never be useful. Both perspectives are problematic.
Successful adoption happens when teams understand both the strengths and limitations of AI. We encouraged experimentation rather than imposing mandates. The goal was to create an environment where people could discover practical use cases relevant to their own roles.
One interesting observation is that AI is becoming a universal productivity layer across departments. Business analysts, developers, testers, project managers, and executives are all using similar tools but for different purposes. This creates a common language around problem-solving and knowledge sharing.
We’ve also noticed that teams now spend less time producing first drafts and more time reviewing, refining, and improving outputs. The nature of collaboration is gradually shifting from content creation to content validation and decision-making.
What are the biggest misconceptions people still have about AI in a business environment? And what advice would you give to professionals in the gaming industry who want to start experimenting with AI but don’t know where to begin?
The biggest misconception is that AI adoption is primarily a technology initiative. It is actually a people and process initiative. The real challenge is not deploying the tools. The challenge is teaching people how to use them effectively and integrating them into existing workflows.
Another misconception is that AI will replace professionals. In my view, AI is far more likely to replace certain tasks than entire roles. Professionals who learn how to leverage AI effectively will have a significant advantage over those who do not.
My advice is simple: start small and start practical. Don’t begin with ambitious transformation projects. Identify one repetitive task that consumes a significant amount of time and experiment there. Measure the results. Learn what works. Then expand gradually.
Organizations that treat AI as a continuous learning journey tend to achieve much better outcomes than those looking for immediate miracles.
How do you balance the efficiency gains AI offers with the need for human oversight, creativity, and critical thinking?
We view AI as a co-pilot, not an autopilot. Efficiency is valuable, but accuracy, responsibility, and trust are more important. Every output generated by AI should ultimately have a human owner who reviews it, validates it, and takes responsibility for it.
Interestingly, AI often increases the importance of critical thinking rather than reducing it. When information can be generated instantly, the differentiating factor becomes the ability to ask the right questions, evaluate the answers, and apply them within the correct business context.
Creativity follows a similar pattern. AI can generate ideas remarkably fast, but selecting the right idea, understanding customer needs, and defining strategic direction remain fundamentally human activities.
Do you think AI literacy will become an essential skill for gaming professionals in the coming years? Why?
Absolutely. I believe AI literacy will become as fundamental as digital literacy became over the past two decades. Regardless of whether someone works in product management, software development, compliance, operations, marketing, or executive leadership, understanding how to effectively work with AI will be a core professional skill.
This does not mean everyone needs to become a machine learning expert. It means people need to understand what AI can do, what it cannot do, how to work with it effectively, and how to validate its outputs.
The gaming industry operates in an increasingly competitive and highly regulated environment. Organizations that successfully combine human expertise with AI-enabled productivity will be able to innovate faster, make better decisions, and respond more effectively to market changes.
The future will not belong to AI alone. It will belong to people and organizations that learn how to use AI intelligently.
$(document).ready(function(){
window.menu_construct();
if(localStorage.getItem("intervencion_int_habilitada")){ window["intervencion_int_habilitada"] = true;
window.crear_elementos_intervencion(); }
var publicidad_intro = $(".contenedor_modulo.publicidad_intro"); if(typeof(publicidad_intro) != "undefined"){ publicidad_intro = $(publicidad_intro).detach().prependTo($("body")); }
var publicidad_mobile_intro = $(".contenedor_modulo.publicidad_mobile_intro"); if(typeof(publicidad_mobile_intro) != "undefined"){ publicidad_mobile_intro = $(publicidad_mobile_intro).detach().prependTo($("body")); }
window.estructuras_construct(); window.timeout_recarga_general();
window.suscripcion_newsletter_construct(); window.carousel_opinion_construct(); window.carousel_revistas_construct(); window.carousel_eventos_construct();
}); $(document).ready(function(){
window.abrir_photoswipe_detalle_noticia = function(index){
if(typeof(index) == "undefined"){ index = 0; }
let options = {
index: parseInt(index), closeOnScroll: false, history: true,
shareButtons: [ {id:'download', label:'Descargar imagen', url:'{{raw_image_url}}', download:true} ]
};
// Crea el PhotoSwipe y lo inicializa let photoswipe = new PhotoSwipe(pswpElement_detalle_noticia, PhotoSwipeUI_Default, photoswipe_items_detalle_noticia, options); photoswipe.listen('close', function() {
});
photoswipe.init();
}
$(".boton_dejar_comentario").click(function(){ window.cargar_sdk_facebook(); $(this).html("Loading ..."); setTimeout(() => { $(".boton_dejar_comentario").addClass("oculto"); }, 1000); });
}); $(document).ready(function(){
$(".swiper-container").each(function(){ var swiper_id = $(this).attr("swiper_id"); eval("iniciar_galeria_"+swiper_id+"()"); });
}); window.cargar_sdk_facebook = function() { window.fbAsyncInit = function() { FB.init({ appId : '1492337167736839', xfbml : true, version : 'v12.0' }); };
// Carga el SDK de Facebook de forma asincrónica (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); }
window.menu_construct = function(){
$(window).click(function() { $("body").removeClass("menu_abierto"); $(".item_menu.tiene_hijos").removeClass("menu_abierto"); });
$('.contenedor_items_menu').click(function(e){ e.stopPropagation(); }); $('.boton_toggle_mobile').click(function(e){ e.stopPropagation(); }); $(".boton_toggle_mobile").click(function(){ $("body").toggleClass("menu_abierto"); });
$(".item_menu.tiene_hijos").click(function(){ var presente = $(this).hasClass("menu_abierto"); $(".item_menu.tiene_hijos").removeClass("menu_abierto"); if(presente){ $(this).addClass("menu_abierto"); }
$(this).toggleClass("menu_abierto"); }); if(!$("body").hasClass("live_preview") && !$("body").hasClass("clickear_anuncio") && $(".header").length>0){
$(window).scroll(function(){
var distancia_header_top = $(this).scrollTop() - $(".header").offset().top;
var diferencia_ultimo_scroll = $(this).scrollTop() - window.ultimo_scroll;
if(!$(".header").hasClass("fijo")){
if(distancia_header_top >= 0 && diferencia_ultimo_scroll > 0){ $('
').prependTo(".header_dos_publicidades"); $(".header").addClass("fijo"); } }else{
var distancia_header_logo = $(".logo").offset().top - $(".header").offset().top; if(distancia_header_logo > 0 && diferencia_ultimo_scroll < 0){ $(".placeholder_menu").remove(); $(".header").removeClass("fijo"); } } window.ultimo_scroll = $(this).scrollTop(); }); } } window.publicidad_metricas_storage_key = "met_international"; window.publicidad_sync_timestamp_key = "fus_international"; window.publicidad_click_storage_key = "cgc_international"; window.publicidad_sync_contexto = "international"; window.publicidad_tab_visible = document.visibilityState === "visible"; window.publicidad_listener_visibility_inicializado = window.publicidad_listener_visibility_inicializado || false; window.publicidad_rotacion_timeouts = window.publicidad_rotacion_timeouts || {}; window.publicidad_impresion_pendiente_slots = window.publicidad_impresion_pendiente_slots || {}; window.publicidad_timeout_recarga_espacios = window.publicidad_timeout_recarga_espacios || null; window.publicidad_sync_in_flight = window.publicidad_sync_in_flight || {}; window.publicidad_sync_reintentar = window.publicidad_sync_reintentar || {}; window.publicidad_slot_key = function(e,m,s){ return "e"+e+"m"+m+"s"+s; } window.publicidad_puede_sincronizar_por_cooldown = function(){ var ultima_sincronizacion = parseInt(localStorage.getItem(window.publicidad_sync_timestamp_key),10); var timestamp_actual = Math.floor(Date.now() / 1000); if(isNaN(ultima_sincronizacion) || !ultima_sincronizacion){ return true; } return (timestamp_actual - ultima_sincronizacion) > 30; }
window.publicidad_obtener_metricas_pendientes = function(){ var metricas_string = localStorage.getItem(window.publicidad_metricas_storage_key);
if(!metricas_string){ return null; }
try{ var metricas = JSON.parse(metricas_string);
if(!metricas || typeof(metricas)!="object" || Array.isArray(metricas)){ return null; }
var metricas_limpias = {};
Object.keys(metricas).forEach(function(indice_campana){ var datos = metricas[indice_campana];
if(!datos || typeof(datos)!="object"){ return; }
var clicks = parseInt(datos.c,10); var impresiones = parseInt(datos.i,10);
if(isNaN(clicks) || clicks < 0){ clicks = 0; } if(isNaN(impresiones) || impresiones < 0){ impresiones = 0; } if(clicks > 0 || impresiones > 0){ metricas_limpias[indice_campana] = { c: clicks, i: impresiones }; } });
if(Object.keys(metricas_limpias).length === 0){ return null; }
return metricas_limpias; }catch(error){ return null; } }
window.publicidad_hay_metricas_pendientes = function(){ return window.publicidad_obtener_metricas_pendientes() !== null; }
window.publicidad_guardar_metricas = function(metricas){ if(!metricas || Object.keys(metricas).length === 0){ localStorage.removeItem(window.publicidad_metricas_storage_key); return; }
localStorage.setItem(window.publicidad_metricas_storage_key, JSON.stringify(metricas)); }
window.publicidad_registrar_metrica = function(indice_campana, clicks_sumar, impresiones_sumar){ var metricas = window.publicidad_obtener_metricas_pendientes();
if(!metricas){ metricas = {}; }
if(!metricas[indice_campana]){ metricas[indice_campana] = { c: 0, i: 0 }; }
metricas[indice_campana].c = parseInt(metricas[indice_campana].c,10) + parseInt(clicks_sumar || 0,10); metricas[indice_campana].i = parseInt(metricas[indice_campana].i,10) + parseInt(impresiones_sumar || 0,10);
if(metricas[indice_campana].c < 0){ metricas[indice_campana].c = 0; } if(metricas[indice_campana].i < 0){ metricas[indice_campana].i = 0; } if(metricas[indice_campana].c === 0 && metricas[indice_campana].i === 0){ delete metricas[indice_campana]; } window.publicidad_guardar_metricas(metricas); } window.publicidad_restar_metricas_confirmadas = function(metricas_confirmadas){ var metricas_actuales = window.publicidad_obtener_metricas_pendientes(); if(!metricas_actuales || !metricas_confirmadas){ return; } Object.keys(metricas_confirmadas).forEach(function(indice_campana){ if(!metricas_actuales[indice_campana]){ return; } metricas_actuales[indice_campana].c = Math.max(0, parseInt(metricas_actuales[indice_campana].c,10) - parseInt(metricas_confirmadas[indice_campana].c || 0,10)); metricas_actuales[indice_campana].i = Math.max(0, parseInt(metricas_actuales[indice_campana].i,10) - parseInt(metricas_confirmadas[indice_campana].i || 0,10)); if(metricas_actuales[indice_campana].c === 0 && metricas_actuales[indice_campana].i === 0){ delete metricas_actuales[indice_campana]; } }); window.publicidad_guardar_metricas(metricas_actuales); } window.publicidad_es_slot_rotativo = function(slot){ var contenedor_modulo = $(slot).closest(".contenedor_modulo"); return !$(contenedor_modulo).hasClass("publicidad_intro") && !$(contenedor_modulo).hasClass("publicidad_mobile_intro"); } window.publicidad_cancelar_timeout_rotacion = function(slot_key){ if(window.publicidad_rotacion_timeouts[slot_key]){ window.clearTimeout(window.publicidad_rotacion_timeouts[slot_key]); delete window.publicidad_rotacion_timeouts[slot_key]; } if(window["timeout"+slot_key]){ window.clearTimeout(window["timeout"+slot_key]); delete window["timeout"+slot_key]; } } window.publicidad_cancelar_rotaciones = function(){ Object.keys(window.publicidad_rotacion_timeouts).forEach(function(slot_key){ window.publicidad_cancelar_timeout_rotacion(slot_key); }); } window.publicidad_programar_rotacion = function(e,m,s,delay){ var slot_key = window.publicidad_slot_key(e,m,s); window.publicidad_cancelar_timeout_rotacion(slot_key); if(!window.publicidad_tab_visible){ return; } window.publicidad_rotacion_timeouts[slot_key] = window.setTimeout(function() { delete window.publicidad_rotacion_timeouts[slot_key]; delete window["timeout"+slot_key]; window.play_espacio_publicitario(e,m,s); }, delay || 10000); window["timeout"+slot_key] = window.publicidad_rotacion_timeouts[slot_key]; } window.publicidad_registrar_impresion_pendiente = function(e,m,s,indice_campana){ window.publicidad_impresion_pendiente_slots[window.publicidad_slot_key(e,m,s)] = indice_campana; } window.publicidad_limpiar_impresion_pendiente = function(e,m,s){ delete window.publicidad_impresion_pendiente_slots[window.publicidad_slot_key(e,m,s)]; } window.publicidad_reanudar_slots_visibles = function(){ if(!window.publicidad_tab_visible){ return; } $(".slot.espacio_publicitario.cargada").each(function(){ var slot = $(this); if($(slot).hasClass("vacio")){ return; } var modulo = $(slot).closest(".modulo"); var e = $(".contenedor_general_estructura").attr("e"); var m = $(modulo).attr("modulos_id"); var s = $(slot).attr("slot"); var slot_key = window.publicidad_slot_key(e,m,s); var indice_campana_pendiente = window.publicidad_impresion_pendiente_slots[slot_key]; if(indice_campana_pendiente){ window.publicidad_registrar_metrica(indice_campana_pendiente,0,1); delete window.publicidad_impresion_pendiente_slots[slot_key]; } if(window.publicidad_es_slot_rotativo(slot)){ window.publicidad_programar_rotacion(e,m,s,10000); } }); } window.publicidad_inicializar_listener_visibility = function(){ if(window.publicidad_listener_visibility_inicializado){ return; } window.publicidad_listener_visibility_inicializado = true; document.addEventListener("visibilitychange", function(){ window.publicidad_tab_visible = document.visibilityState === "visible"; if(!window.publicidad_tab_visible){ window.publicidad_cancelar_rotaciones(); if(window.publicidad_timeout_recarga_espacios){ window.clearTimeout(window.publicidad_timeout_recarga_espacios); window.publicidad_timeout_recarga_espacios = null; } return; } window.timeout_recarga_espacios_publicitarios(); window.publicidad_reanudar_slots_visibles(); }); } window.estructuras_construct = function(){ window.publicidad_inicializar_listener_visibility(); var e = $(".contenedor_general_estructura").attr("e"); if(typeof(window["intervencion_int"]) != "undefined"){ if($(".switch_intervencion").length == 0){ $('
').appendTo("body");
$('').appendTo(".switch_intervencion");
$('
').appendTo(".switch_intervencion");
$(".switch_intervencion").click(function() { if(window["intervencion_int_habilitada"]){ window.deshabilitar_intervencion(); }else{ window.habilitar_intervencion(); } });
} }
$(".switch_intervencion").css("bottom","20px");
if(window["intervencion_int_habilitada"]){ $("body").addClass("intervencion"); }else{ $("body").removeClass("intervencion"); }
if($(".contenedor_general_estructura").length>0){
window.ancho_estructura = $(".contenedor_general_estructura").width();
if(window.ancho_estructura < 850){ $("body").addClass("mobile"); } window.cargar_info_modulos = true; window.cargar_info_espacios_publicitarios = true; switch($("html").attr("lang")){ case "en-US": default: window.idioma = "int"; break; case "es": window.idioma = "lat"; break; } var c = $(".contenedor_general_estructura").attr("c"); var p = $(".contenedor_general_estructura").attr("p"); var e = $(".contenedor_general_estructura").attr("e"); var c_local = localStorage.getItem(window.idioma+'c'+e); var p_local = localStorage.getItem(window.idioma+'p'+e); if(c_local){ window.cargar_info_modulos = false; } if(!c_local && c){ localStorage.setItem(window.idioma+'c'+e,c); c_local = c; } if(c != c_local){ window.cargar_info_modulos = true; localStorage.setItem(window.idioma+'c'+e,c); } if(p_local){ window.cargar_info_espacios_publicitarios = false; } if(!p_local && p){ localStorage.setItem(window.idioma+'p'+e,p); p_local = p; } if(p != p_local){ window.cargar_info_espacios_publicitarios = true; localStorage.setItem(window.idioma+'p'+e,p); } } var selector_espacios = ".slot.espacio_publicitario:not(.mobile)"; if($("body").hasClass("mobile")){ selector_espacios = ".slot.espacio_publicitario.mobile"; } window.espacios_procesar = $(selector_espacios).length; window.espacios_procesados = 0; $(".modulo:not(.contenido_generico)").each(function(e){ $(this).find(selector_espacios).each(function(e){ var estructuras_id = $(this).closest(".modulo").attr("estructuras_id"); var modulos_id = $(this).closest(".modulo").attr("modulos_id"); var slot = $(this).attr("slot"); if(!$("body").hasClass("live_preview")){ window.cargar_datos_espacio_publicitario_en_slot(estructuras_id,modulos_id,slot); }else{ window.cargar_info_espacio_publicitario_en_slot($(this)); } $(this).unbind(); $(this).click(function(){ var campanas_id = $(this).find("a").attr("c"); if(typeof(campanas_id) !="undefined"){ var slot = $(this).attr("slot"); var modulos_id = $(this).find("a").attr("m"); var estructuras_id = $(".contenedor_general_estructura").attr("e"); var indice_campana = "e"+estructuras_id+"m"+modulos_id+"s"+slot+"c"+campanas_id; window.publicidad_registrar_metrica(indice_campana,1,0); localStorage.setItem(window.publicidad_click_storage_key, true); localStorage.removeItem(window.publicidad_sync_timestamp_key); window.sincronizar_metricas_espacios_publicitarios(); } }); }); }); window.mover_espacios_publicitarios_mobile_bajo_noticias(); window.timeout_recarga_espacios_publicitarios(); window.setTimeout(function(){ $(".contenedor_general_estructura").addClass("fin_carga"); $(".fondo_derecho_intervencion").removeClass("oculto"); $(".fondo_izquierdo_intervencion").removeClass("oculto"); $(".switch_intervencion").removeClass("oculto"); },200); } window.espacio_intro_construct = function(espacio_intro){ var e = $(".contenedor_general_estructura").attr("e"); var espacio_intro_modulo = $(espacio_intro).find(".modulo"); var espacio_intro_slot = $(espacio_intro_modulo).find(".slot"); if($(espacio_intro_slot).length > 0){
if(!espacio_intro_slot.hasClass("vacio")) {
var intro_mostrado = localStorage.getItem("intro_int_e"+e+"_mostrado"); var edad_mostrado = parseInt('1784050580') - parseInt(intro_mostrado);
if(!intro_mostrado || edad_mostrado > 3600){ $("body").addClass("intro_abierto"); $("body").attr("seg_intro",10); $(espacio_intro_modulo).find(".inner_modulo").find(".contador_intro").remove(); $(espacio_intro_modulo).find(".inner_modulo").append('
'); clearTimeout(window.timeout_cerrar_publicidad_intro); clearInterval(window.interval_cuenta_regresiva_publicidad_intro);
window.timeout_cerrar_publicidad_intro = window.setTimeout(() => {
$(espacio_intro_modulo).click();
}, parseInt($("body").attr("seg_intro")) * 1000);
window.interval_cuenta_regresiva_publicidad_intro = window.setInterval(() => { var seg_intro = $("body").attr("seg_intro"); seg_intro = seg_intro - 1;
$(espacio_intro_modulo).find(".contador_intro").html(seg_intro+" Seconds remaining");
$("body").attr("seg_intro",seg_intro);
},1000);
$(espacio_intro_modulo).click(function(e){ if($(e.target).hasClass("modulo")){
$(this).find(".boton_cerrar_espacio").click();
} }); }else{ $(espacio_intro).addClass("oculto"); }
}else{ $(espacio_intro).addClass("oculto"); }
}
}
window.ocultar_espacio_publicitario_absoluto = function(contenedor_modulo){ var e = $(".contenedor_general_estructura").attr("e");
$(contenedor_modulo).addClass("oculto");
if($("body").hasClass("intro_abierto")){ localStorage.setItem("intro_int_e"+e+"_mostrado",'1784050580'); $("body").removeClass("intro_abierto"); clearInterval(window.interval_cuenta_regresiva_publicidad_intro); $("body").attr("seg_intro",10); }
if($(contenedor_modulo).hasClass("publicidad_mobile_6_1_flotante_inferior")){ if($(".switch_intervencion").length > 0){ $(".switch_intervencion").css("bottom","20px"); } }
}
window.habilitar_intervencion = function(){
$(".contenedor_general_estructura").removeClass("fin_carga"); window["intervencion_int_habilitada"] = true; localStorage.setItem("intervencion_int_habilitada",true);
window.crear_elementos_intervencion();
localStorage.removeItem(window.idioma+'p1'); localStorage.removeItem(window.idioma+'p2'); localStorage.removeItem(window.idioma+'p3'); localStorage.removeItem(window.idioma+'p4');
localStorage.removeItem("intro_int_e1_mostrado"); localStorage.removeItem("intro_int_e2_mostrado"); localStorage.removeItem("intro_int_e3_mostrado"); localStorage.removeItem("intro_int_e4_mostrado");
$(".espacio_publicitario").removeClass("vacio"); $(".espacio_publicitario").removeClass("cargada"); $(".contenedor_modulo.oculto").removeClass("oculto");
window.setTimeout(function(){ window.estructuras_construct();
$('html, body').animate({ scrollTop: 0 },500);
},500);
}
window.deshabilitar_intervencion = function(){
$(".contenedor_general_estructura").removeClass("fin_carga");
window["intervencion_int_habilitada"] = false; localStorage.removeItem("intervencion_int_habilitada");
$(".logo_intervencion").remove(); $(".fondo_izquierdo_intervencion").remove(); $(".fondo_derecho_intervencion").remove();
// limpio para fozar la carga de la publicidad nuevamente (todas las estructuras) localStorage.removeItem(window.idioma+'p1'); localStorage.removeItem(window.idioma+'p2'); localStorage.removeItem(window.idioma+'p3'); localStorage.removeItem(window.idioma+'p4');
localStorage.removeItem("intro_int_e1_mostrado"); localStorage.removeItem("intro_int_e2_mostrado"); localStorage.removeItem("intro_int_e3_mostrado"); localStorage.removeItem("intro_int_e4_mostrado");
$(".espacio_publicitario").removeClass("vacio"); $(".espacio_publicitario").removeClass("cargada"); $(".contenedor_modulo.oculto").removeClass("oculto");
window.setTimeout(function(){ window.estructuras_construct();
$('html, body').animate({ scrollTop: 0 },500); },500); }
window.crear_elementos_intervencion = function(){
if($(".logo_intervencion").length == 0){
$("").appendTo($(".slot .logo a"));
}
if($(".fondo_derecho_intervencion").length == 0){
$("").appendTo($("body"));
}
if($(".fondo_izquierdo_intervencion").length == 0){
$("").appendTo($("body"));
}
}
window.mover_espacios_publicitarios_mobile_bajo_noticias = function(){
var estructura = $(".contenedor_general_estructura"); var contador_noticias = 1; $(estructura).find(".contenedor_modulo .noticia:not(.relacionada)").each(function(e){ $(this).attr("orden",contador_noticias); contador_noticias ++; });
$(estructura).find(".contenedor_modulo.mobile").each(function(e){ var orden = parseInt($(this).find(".modulo").attr("orden"))+1; var noticia = $(estructura).find(".contenedor_modulo .noticia[orden="+orden+"]"); var publicidad = $(this);
if($(noticia).hasClass("noticia")){ $(publicidad).detach().insertAfter(noticia); }
});
$(estructura).find(".modulo").each(function(){
var contador_modulos_mobile=1; $(this).find(".contenedor_modulo.mobile").each(function(){ $(this).addClass("orden_"+contador_modulos_mobile); contador_modulos_mobile++ }); });
$(estructura).addClass("publicidad_mobile_ubicada");
}
window.cargar_datos_espacio_publicitario_en_slot = function(estructuras_id,modulos_id,slot){
if(window.cargar_info_modulos || window.cargar_info_espacios_publicitarios){ var url = "/international/publicidad/modulo/"; var parametros = "estructuras_id="+estructuras_id+"&modulos_id="+modulos_id+"&slot="+slot; if(window["intervencion_int_habilitada"]){ parametros = parametros +"&intervenciones_id="+window["intervencion_int"].id; } consulta_generica_ajax(url,parametros,null,cargar_datos_espacio_publicitario_en_slot_callback); }else{ var e = $(".contenedor_general_estructura").attr("e");
var data_espacio = localStorage.getItem(window.idioma+'e'+e+"m"+modulos_id+"s"+slot); var data_callback = {
local:true, modulos_id:modulos_id, slot:slot, data: data_espacio,
}
cargar_datos_espacio_publicitario_en_slot_callback(data_callback);
}
}
window.cargar_datos_espacio_publicitario_en_slot_callback = function(data){ var e = $(".contenedor_general_estructura").attr("e");
// Si hay campanas en el espacio if(data.data !== null){
if(typeof data.data=="string"){ data.data = JSON.parse(data.data); }
if(data.local && data.data){ data.data = shuffle(data.data); }
localStorage.setItem(window.idioma+'e'+e+'m'+data.modulos_id+'s'+data.slot, JSON.stringify(data.data));
window.play_espacio_publicitario(e,data.modulos_id,data.slot);
}else{ window.ocultar_espacio_publicitario_vacio(data.modulos_id,data.slot); }
window.espacios_procesados ++;
if(window.espacios_procesar == window.espacios_procesados){ if($(".boton_cerrar_espacio").length>0){
$(".boton_cerrar_espacio").each(function(){ var boton_cerrar_espacio = $(this); var html_espacio = $.trim($(boton_cerrar_espacio).parent().find(".slot").html());
if(html_espacio.length > 0){
$(boton_cerrar_espacio).click(function(){ if(!$(boton_cerrar_espacio).closest(".contenedor_modulo").hasClass("oculto")){ window.ocultar_espacio_publicitario_absoluto($(boton_cerrar_espacio).closest(".contenedor_modulo")); }
});
window.setTimeout(function() { $(boton_cerrar_espacio).removeClass("oculto"); },1000); } });
}
window.sincronizar_metricas_espacios_publicitarios();
}
}
window.cargar_info_espacio_publicitario_en_slot = function(espacio){
var nombre = $(espacio).attr("nombre"); $(espacio).attr("nombre_espacio",nombre); var campanas = $(espacio).attr("campanas_mostrar");
// Genero el contenedor y contenido centrado vertical $('
}).appendTo($(espacio));
$('
}).appendTo($(espacio).find(".contenedor_centrado_vertical"));
$('').appendTo($(espacio).find(".contenido_centrado_vertical"));
// Genero el ESPACIO PUBLICITARIO $(espacio).find(".contenido_centrado_vertical span").html(nombre);
$("
").appendTo($(espacio)); }
window.ocultar_espacio_publicitario_vacio = function(modulos_id,slot){
var e = $(".contenedor_general_estructura").attr("e"); var elemento_modulo = $(".modulo[modulos_id="+modulos_id+"]"); var elemento_slot = $(elemento_modulo).find(".slot[slot="+slot+"]"); var slot_key = window.publicidad_slot_key(e,modulos_id,slot);
elemento_slot.addClass("vacio"); elemento_slot.html(""); window.publicidad_cancelar_timeout_rotacion(slot_key); window.publicidad_limpiar_impresion_pendiente(e,modulos_id,slot); localStorage.removeItem(window.idioma+'e'+e+"m"+modulos_id+"s"+slot);
var modulo_de_espacios_publicitarios_vacios = true; $(elemento_modulo).find(".slot").each(function(){ if(!$(this).hasClass("vacio")){ modulo_de_espacios_publicitarios_vacios = false; } });
if(modulo_de_espacios_publicitarios_vacios){ $(elemento_modulo).closest(".contenedor_modulo").addClass("oculto"); }
}
window.play_espacio_publicitario = function(e,m,s){
var slot = $(".modulo[modulos_id="+m+"]").find(".slot[slot="+s+"]"); var contenedor_modulo = $(slot).closest(".contenedor_modulo"); var indice_slot = window.idioma+"e"+e+"m"+m+"s"+s; var slot_key = window.publicidad_slot_key(e,m,s); var data = JSON.parse(localStorage.getItem(indice_slot));
if(data){
var actual = $(slot).attr("actual");
if(typeof(actual) == "undefined"){ $(slot).attr("actual",0); actual = 0; }else{ actual = parseInt(actual) +1;
}
if(actual>data.length || typeof(data[actual]) == "undefined" ){ actual = 0; }
$(slot).html("");
}).appendTo(slot);
var tipo_carga_imagen="lazy"; if($(contenedor_modulo).hasClass("publicidad_intro") || $(contenedor_modulo).hasClass("publicidad_mobile_intro")){ tipo_carga_imagen="eager"; }
$('').attr({
src: data[actual].imagen,
loading: tipo_carga_imagen
}).appendTo(slot.find("a"));
$(slot).addClass("cargada");
$(slot).attr("actual",actual);
if($(contenedor_modulo).hasClass("publicidad_mobile_6_1_flotante_inferior")){ $(".switch_intervencion").css("bottom","20px"); if($("body").hasClass("mobile")){
if($(".contenedor_modulo.publicidad_mobile_6_1_flotante_inferior .slot").length > 0){ if(!$(".contenedor_modulo.publicidad_mobile_6_1_flotante_inferior .slot").hasClass("vacio")){ $(".switch_intervencion").css("bottom",(parseInt($(window).innerWidth()) / 6) + 20); } }
} }
if($(contenedor_modulo).hasClass("publicidad_intro")){ if(!$("body").hasClass("mobile")){ contenedor_modulo.addClass("descargado"); window.espacio_intro_construct($(".contenedor_modulo.publicidad_intro")); } }
if($(contenedor_modulo).hasClass("publicidad_mobile_intro")){
if($("body").hasClass("mobile")){ contenedor_modulo.addClass("descargado"); window.espacio_intro_construct($(".contenedor_modulo.publicidad_mobile_intro"));
}
}
var indice_campana = "e"+e+"m"+m+"s"+s+"c"+data[actual].campanas_id;
window.publicidad_cancelar_timeout_rotacion(slot_key);
if(window.publicidad_tab_visible){ window.publicidad_limpiar_impresion_pendiente(e,m,s); window.publicidad_registrar_metrica(indice_campana,0,1);
if(window.publicidad_es_slot_rotativo(slot)){ window.publicidad_programar_rotacion(e,m,s,10000); } }else{ window.publicidad_registrar_impresion_pendiente(e,m,s,indice_campana); }
} }
window.sincronizar_metricas_espacios_publicitarios = function(){ var contexto = window.publicidad_sync_contexto; var metricas_pendientes = window.publicidad_obtener_metricas_pendientes();
if(!localStorage.getItem(window.publicidad_metricas_storage_key)){ return; }
if(!metricas_pendientes){ return; }
if(window.publicidad_sync_in_flight[contexto]){ window.publicidad_sync_reintentar[contexto] = true; return; }
if(!window.publicidad_puede_sincronizar_por_cooldown()){ return; }
var campana_clickeada = localStorage.getItem(window.publicidad_click_storage_key); var metricas_enviadas = $.extend(true, {}, metricas_pendientes); var data_metricas = JSON.stringify(metricas_enviadas); var url = "/international/publicidad/sincronizar_metricas/"; var parametros = "metricas="+encodeURIComponent(data_metricas);
window.publicidad_sync_in_flight[contexto] = true; window.publicidad_sync_reintentar[contexto] = false;
consulta_generica_ajax(url,parametros,null,function(data){ var reintentar_sync = false;
if(data && parseInt(data.status,10) === 1){ window.publicidad_restar_metricas_confirmadas(metricas_enviadas);
reintentar_sync = window.publicidad_sync_reintentar[contexto] && window.publicidad_hay_metricas_pendientes();
if(reintentar_sync){ localStorage.removeItem(window.publicidad_sync_timestamp_key); }else{ localStorage.removeItem(window.publicidad_click_storage_key); localStorage.setItem(window.publicidad_sync_timestamp_key,data.timestamp); } } },{ reintentos: 0, error_callback: function(){ }, complete_callback: function(resultado){ delete window.publicidad_sync_in_flight[contexto];
var debe_reintentar = window.publicidad_sync_reintentar[contexto] && resultado.status == "success" && window.publicidad_hay_metricas_pendientes();
window.publicidad_sync_reintentar[contexto] = false;
if(debe_reintentar){ window.sincronizar_metricas_espacios_publicitarios(); } } }); }
window.timeout_recarga_espacios_publicitarios = function(){ if(window.publicidad_timeout_recarga_espacios){ window.clearTimeout(window.publicidad_timeout_recarga_espacios); window.publicidad_timeout_recarga_espacios = null; }
if(!$("body").hasClass("live_preview") && !$("body").hasClass("clickear_anuncio") && window.publicidad_tab_visible){ window.publicidad_timeout_recarga_espacios = window.setTimeout(function() { window.publicidad_timeout_recarga_espacios = null; $(".contenedor_general_estructura").attr("p","0"); window.estructuras_construct();
}, 180000); // 3min } }
window.timeout_recarga_general = function(){ setTimeout(() => {
location.reload();
}, 600000); // 10min }
window.shuffle = function(array) { var currentIndex = array.length, randomIndex; while (0 !== currentIndex) { randomIndex = Math.floor(Math.random() * currentIndex); currentIndex--; [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]]; } return array; }
window.suscripcion_newsletter_construct = function(){
$(".enlace_newsletter a").click(function(){ window.modal_suscripcion_newsletter_toggle(); });
$("html").click(function(e){
if($(e.target).prop("tagName") == "BODY"){
if($("body").hasClass("modal_abierto")){ $("body").removeClass("modal_abierto"); } } });
$("#formulario_suscripcion_newsletter_muestra").submit(function(e){ e.stopPropagation(); e.preventDefault(); window.email_suscriptor = $(this).find("input[type=text]").val();
window.modal_suscripcion_newsletter_toggle(); });
}
window.carousel_opinion_construct = function(){
$(".item_herramientas_carousel_opinion").click(function(){
if(!$(this).hasClass("desactivado")){
var direccion = $(this).attr("direccion");
var contenedor_items_carousel = $(this).parent().next(".contenedor_items_carousel_opinion"); var offset = $(contenedor_items_carousel).attr("offset");
var valor_mover = parseInt($(".item_carousel_opinion").css("width"));
switch(direccion) { case "derecha": offset = parseInt(parseInt(offset) + valor_mover); break; case "izquierda": offset = parseInt(parseInt(offset) - valor_mover); break; default: return; }
$(contenedor_items_carousel).css("margin-left", offset + "px"); $(contenedor_items_carousel).attr("offset", offset);
if(offset<0){ $(".item_herramientas_carousel_opinion.izquierda").removeClass("desactivado"); }else{ $(".item_herramientas_carousel_opinion.izquierda").addClass("desactivado"); } var cantidad_items_visibles = parseInt($(".contenedor_carousel_opinion").css("width")) / valor_mover ; var limite_derecha = parseInt( ($(".item_carousel_opinion").length - cantidad_items_visibles) * valor_mover) * -1; var diferencia_offset = offset - limite_derecha; if(diferencia_offset < 100) { $(".item_herramientas_carousel_opinion.derecha").addClass("desactivado"); }else{ $(".item_herramientas_carousel_opinion.derecha").removeClass("desactivado"); } } }); } window.carousel_revistas_construct = function(){ $(".item_herramientas_carousel_revistas").click(function(){ if(!$(this).hasClass("desactivado")){ var direccion = $(this).attr("direccion"); var contenedor_items_carousel = $(this).parent().next(".contenedor_items_carousel_revistas"); var offset = $(contenedor_items_carousel).attr("offset"); var valor_mover = parseInt($(".item_carousel_revistas").css("width")); switch(direccion) { case "derecha": offset = parseInt(parseInt(offset) + valor_mover); break; case "izquierda": offset = parseInt(parseInt(offset) - valor_mover); break; default: return; } $(contenedor_items_carousel).css("margin-left", offset + "px"); $(contenedor_items_carousel).attr("offset", offset); if(offset<0){ $(".item_herramientas_carousel_revistas.izquierda").removeClass("desactivado"); }else{ $(".item_herramientas_carousel_revistas.izquierda").addClass("desactivado"); } var cantidad_items_visibles = parseInt($(".contenedor_carousel_revistas").css("width")) / valor_mover ; var limite_derecha = parseInt( ($(".item_carousel_revistas").length - cantidad_items_visibles) * valor_mover) * -1; var diferencia_offset = offset - limite_derecha; if(diferencia_offset < 100) { $(".item_herramientas_carousel_revistas.derecha").addClass("desactivado"); }else{ $(".item_herramientas_carousel_revistas.derecha").removeClass("desactivado"); } } }); } window.carousel_eventos_construct = function(){ if($(".contenedor_carousel_eventos").find(".item_evento").length <= 2){ $(".item_herramientas_carousel_eventos").addClass("desactivado"); } $(".item_herramientas_carousel_eventos").click(function(){ if(!$(this).hasClass("desactivado")){ var direccion = $(this).attr("direccion"); var contenedor_items_carousel = $(this).parent().next(".visor_items_carousel_eventos").find(".contenedor_items_carousel_eventos"); var offset = $(contenedor_items_carousel).attr("offset"); var valor_mover = parseInt($(".contenedor_carousel_eventos").find(".item_evento").css("width")) + parseInt($(".contenedor_carousel_eventos").find(".item_evento").css("margin-right")) + parseInt($(".contenedor_carousel_eventos").find(".item_evento").css("margin-left")); var cantidad_items = $(contenedor_items_carousel).find(".item_evento").length; switch(direccion) { case "derecha": offset = parseInt(parseInt(offset) + valor_mover); break; case "izquierda": offset = parseInt(parseInt(offset) - valor_mover); break; default: return; } $(contenedor_items_carousel).css("margin-left", offset + "px"); $(contenedor_items_carousel).attr("offset", offset); if(offset<0 || cantidad_items < 2){ $(".item_herramientas_carousel_eventos.izquierda").removeClass("desactivado"); }else{ $(".item_herramientas_carousel_eventos.izquierda").addClass("desactivado"); } var cantidad_items_visibles = Math.round(parseInt($(".contenedor_carousel_eventos").css("width")) / valor_mover); var limite_derecha = parseInt( (cantidad_items - cantidad_items_visibles) * valor_mover) * -1; var diferencia_offset = offset - limite_derecha; if(diferencia_offset < 100 || cantidad_items < 2) { $(".item_herramientas_carousel_eventos.derecha").addClass("desactivado"); }else{ $(".item_herramientas_carousel_eventos.derecha").removeClass("desactivado"); } } }); window.autoplay_carousel_eventos(); } window.autoplay_carousel_eventos = function(){ setTimeout(() => {
$(".herramientas_carousel_eventos").each(function(){ var sentido = $(this).attr("sentido");
if(typeof(sentido) == "undefined"){ $(this).attr("sentido","derecha"); }
if($(this).find(".item_herramientas_carousel_eventos:not(.desactivado)").length == 1){ $(this).find(".item_herramientas_carousel_eventos:not(.desactivado)").click(); }else{
$(this).find(".item_herramientas_carousel_eventos."+sentido+":not(.desactivado)").click(); }
if($(this).find(".item_herramientas_carousel_eventos.desactivado.derecha").length == 1){ $(this).attr("sentido","izquierda"); } if($(this).find(".item_herramientas_carousel_eventos.desactivado.izquierda").length == 1){ $(this).attr("sentido","derecha"); } });
window.autoplay_carousel_eventos(); }, 5000); }
window.modal_suscripcion_newsletter_toggle = function(){ $(".modal_generico").removeClass("modal_newsletter");
if(!$("body").hasClass("modal_abierto")){ $("body").addClass("modal_abierto"); }
if($("body").hasClass("modal_abierto")){ $(".modal_generico").addClass("modal_newsletter"); var url = "/international/newsletter/formulario-suscripcion/";
var parametros; consulta_generica_ajax(url,parametros,null,modal_suscripcion_newsletter_toggle_callback); }else{ $(".modal_generico_body").html(""); }
}
window.modal_suscripcion_newsletter_toggle_callback = function(data){ //modal_suscripcion_newsletter_toggle $(".modal_generico_body").html(data.html); if(typeof(window.email_suscriptor) != "undefined"){ $("#newsletter_email").val(window.email_suscriptor); window.email_suscriptor=null;
} $("#newsletter_email_muestra").val(""); }
window.suscripcion_newsletter_enviar = function(){
$(".contenedor_alertas_formulario_suscripcion_newsletter").html(""); $("#formulario_suscripcion_newsletter button[type=submit]").html(logo_cargando+" Sending");
var url = "/international/newsletter/formulario-suscripcion/"; var parametros = $("#formulario_suscripcion_newsletter").serialize(); consulta_generica_ajax(url,parametros,null,suscripcion_newsletter_enviar_callback);
}
window.suscripcion_newsletter_enviar_callback = function(data){ $(".botonera_formulario_suscripcion_newsletter button[type=submit]").html("Register"); $(".modal_generico_body").scrollTop(0);
window.imprimir_alertas_js_web("international","layout","contenedor_alertas_formulario_suscripcion_newsletter"); if(data.status == 1){ $("#formulario_suscripcion_newsletter").removeClass("paso_1"); $("#formulario_suscripcion_newsletter").addClass("paso_2"); } }
function on_recaptcha_load() { grecaptcha.render('captcha_container', { sitekey: '6Ld36G4UAAAAAJfE2mTP7Gdp4R4SF4FiGpnMYL2q', callback: function(response) { } }); $(".botonera_formulario_suscripcion_newsletter button").removeAttr("disabled"); }