<div class="am-smartembed am-embed-ratio"> <script> (function () { var current; var dim = {"242":{"height":285},"280":{"height":453},"380":{"height":423},"480":{"height":431},"500":{"height":350},"580":{"height":399},"680":{"height":459},"780":{"height":519},"980":{"height":430}}; if (document.currentScript) { current = document.currentScript; } else { current = [].slice.call(document.getElementsByTagName('script')).pop(); } var iframe = document.createElement('iframe'); iframe.setAttribute('frameborder', 0); iframe.setAttribute('src', '//www.ta.no/vis/lesernes/bilder/embeds/collections/32771104'); iframe.setAttribute('width', '100%'); iframe.setAttribute('height', '100%'); iframe.setAttribute('class', 'am-embed-container'); var parent = current.parentNode; var parentWidth = parent.offsetWidth; var allDim = Object.keys(dim) .map(function (key) { return parseInt(key, 10); }) .sort(); var currentDim = allDim .filter(function (key) { return key <= parentWidth; }); if (currentDim.length > 0) { currentDim = currentDim.pop(); } else { currentDim = allDim[0]; } parent.style.paddingTop = ((dim[currentDim].height / currentDim) * 100) + '%'; parent.appendChild(iframe); }()); </script> </div>