Office network

Forty offices, one single network .

Four decades opening offices — always with the same method. Find the one closest to you and come and say hello.

(function(){ var root = document.getElementById(‘oficinas’); if (!root) return; var search = root.querySelector(‘.ofl-search’); var chips = root.querySelectorAll(‘.ofl-chip’); var cards = root.querySelectorAll(‘.ofl-card’); var empty = root.querySelector(‘.ofl-empty’); var state = { region: ‘all’, q: ” }; function apply(){ var q = (state.q || ”).toLowerCase().trim(); var visible = 0; cards.forEach(function(c){ var matchRegion = state.region === ‘all’ || c.getAttribute(‘data-region’) === state.region; var hs = c.getAttribute(‘data-haystack’) || ”; var matchQ = !q || hs.indexOf(q) !== -1; var show = matchRegion && matchQ; c.style.display = show ? ” : ‘none’; if (show) visible++; }); empty.hidden = visible > 0; } search.addEventListener(‘input’, function(e){ state.q = e.target.value; apply(); }); chips.forEach(function(chip){ chip.addEventListener(‘click’, function(){ chips.forEach(function(c){ c.classList.remove(‘is-active’); }); chip.classList.add(‘is-active’); state.region = chip.getAttribute(‘data-region’); apply(); }); }); })();