var sectionEvents = []; sectionEvents.push({ id: 'section-1611592897129', events: [ { event: "click", behavior: "redirect_to_page" , path: "/" , target: "_self" } ]}); sectionEvents.push({ id: 'section-1611592897239', events: [ { event: "click", behavior: "redirect_to_path" , path: "https://icom.museum/en/" , target: "_blank" } ]}); sectionEvents.push({ id: 'section-1611593015562', events: [ { event: "click", behavior: "redirect_to_path" , path: "https://www.facebook.com/ICOMGC" , target: "_blank" } ]}); sectionEvents.push({ id: 'section-1611593015632', events: [ { event: "click", behavior: "redirect_to_path" , path: "https://twitter.com/icomgc?lang=cs" , target: "_blank" } ]}); sectionEvents.push({ id: 'section-1611593015702', events: [ { event: "click", behavior: "redirect_to_path" , path: "https://www.instagram.com/icomgc/" , target: "_blank" } ]}); sectionEvents.push({ id: 'section-1611593004148', events: [ { event: "click", behavior: "redirect_to_page" , path: "/registration" , target: "_self" } ]}); sectionEvents.push({ id: 'section-1611593004257', events: [ { event: "click", behavior: "redirect_to_page" , path: "/partners" , target: "_self" } ]}); sectionEvents.push({ id: 'section-1611593004366', events: [ { event: "click", behavior: "redirect_to_page" , path: "/important-dates" , target: "_self" } ]}); sectionEvents.push({ id: 'section-1611593004475', events: [ { event: "click", behavior: "redirect_to_page" , path: "/mobile-app" , target: "_self" } ]}); // -------- section events resolver var actionHandler = function(event) { var action = event.data.action; if ((action.behavior == 'open_file' || action.behavior == 'download_file') && action.path && action.path != '') { event.stopPropagation(); window.open( action.path, (action.target ? action.target : '_self')); } else if ((action.behavior == 'redirect_to_page' || action.behavior == 'redirect_to_path') && action.path && action.path != '') { event.stopPropagation(); window.open( action.path, (action.target ? action.target : '_self')); } else if (action.behavior == 'open_popup') { $(window).trigger('open-popup', [event, action]); } else if (action.behavior == 'close_popup') { $(window).trigger('close-popup', [event, action]); } } function initActionHandlers(parentElement) { sectionEvents.forEach(function(item, sindex) { var element = null; if (parentElement) { element = $(parentElement).find('#' + item.id); } else { element = $('#' + item.id); } if (element.length) { item.events.forEach(function(action, aindex) { element.unbind(action.event, actionHandler); element.bind(action.event, { action: action } , actionHandler); if ((action.behavior == 'open_file' || action.behavior == 'download_file') && action.path && action.path != '') { element.css('cursor', 'pointer'); } if ((action.behavior == 'redirect_to_page' || action.behavior == 'redirect_to_path') && action.path && action.path != '') { element.css('cursor', 'pointer'); } if (action.behavior == 'open_popup' || action.behavior == 'close_popup') { element.css('cursor', 'pointer'); } }); } }); } initActionHandlers(); // -------------------------------- /* UUID - e1d87493-a0f7-4443-8a02-433708da6c86 */ var templateDatas = {}; // SECTION TEMPLATE [simple-language-menu-follow] - 1610019049810 // BEGIN #st-1610019049810 // END // SECTION TEMPLATE [responsive-menu-1200px] - 1610019043437 // BEGIN #st-1610019043437 { let parameters = {}; parameters['hamburger-caption'] = 'Menu'; parameters['item-active-color'] = '#FFFFFF'; parameters['item-color-text'] = '#777777'; parameters['subitem-active-color'] = '#646464'; parameters['subitem-color-text'] = '#f1f1f1'; parameters['hamburger-color'] = '#eaeaea'; parameters['subitems-panel-color'] = '#b1b1b1'; parameters['item-active-color-text'] = '#62a5d9'; parameters['hamburger-background-color'] = '#62a5d9'; let sectionTemplateId = 1610019043437; (function($) { $.fn.menumaker = function(options) { var thisMenu = this; var clicked = false; var mediasize = 0; var $parent = this.parent(); if ($(window).width() < 1200) { thisMenu.find('ul').first().children('li').each( function(i){ mediasize += $(this).outerWidth(); }); } // console.log(mediasize); $parent.bind("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", function(event) { if (!clicked) { resizeFix(); } }); // console.log(mediasize);, var cssmenu = $(this), settings = $.extend({ format: "dropdown", sticky: false }, options); return this.each(function() { $(this).find(".button").on('click', function(){ clicked = true; $(this).toggleClass('menu-opened'); var mainmenu = $(this).next('ul'); if (mainmenu.hasClass('open')) { mainmenu.slideToggle(function() { mainmenu.removeClass('open'); clicked = false; }); } else { mainmenu.slideToggle(function() { mainmenu.addClass('open'); if (settings.format === "dropdown") { mainmenu.find('ul').show(); } clicked = false; }); } }); cssmenu.find('li ul').parent().addClass('has-sub'); multiTg = function() { cssmenu.find(".has-sub").prepend(''); cssmenu.find('.submenu-button').on('click', function() { $(this).toggleClass('submenu-opened'); if ($(this).siblings('ul').hasClass('open')) { $(this).siblings('ul').removeClass('open').slideToggle(); } else { $(this).siblings('ul').addClass('open').slideToggle(); } }); }; if (settings.format === 'multitoggle') multiTg(); else cssmenu.addClass('dropdown'); if (settings.sticky === true) cssmenu.css('position', 'fixed'); resizeFix = function() { /* var mediasize = 1200; if ($( window ).width() > mediasize) { cssmenu.find('ul').show(); } if ($(window).width() <= mediasize) { cssmenu.find('ul').hide().removeClass('open'); } */ mediasize = 0; if ($(window).width() < 1200) { thisMenu.find('ul').first().children('li').each( function(i){ mediasize += $(this).outerWidth(); }); } // console.log(thisMenu.find('ul').first().children('li').first().width(), $(window).width(), mediasize + ' - ' + $parent.width()); if ($parent.width() > mediasize) { if (cssmenu.hasClass('packed')) { cssmenu.find('ul').show(); cssmenu.removeClass('packed'); var $button = cssmenu.find(".button"); $button.removeClass('menu-opened'); var mainmenu = $button.next('ul'); mainmenu.removeClass('open'); } } if ($parent.width() <= mediasize) { if (!cssmenu.hasClass('packed')) { cssmenu.find('ul').hide().removeClass('open'); cssmenu.addClass('packed'); } } }; setTimeout(function() { resizeFix(); }, 200); return $(window).on('resize', resizeFix); }); }; })(jQuery); (function($){ $(document).ready(function(){ // $(window).on('load', function () { let $menu = $('#st-' + sectionTemplateId + ' nav.hnav-resp'); $menu.menumaker({ format: "multitoggle" }); }); })(jQuery); } // END // SITE ADDON - code-1638888244791 $('article p img').addClass('img-responsive');