(function(w, d) {
  try {
    d = w.top.document || d; w = w.top.document ? w.top : w;
  } catch (e) {}
  var ttag = function() {
    var inReadCount = window.top.document.querySelectorAll(".teads-inread"),
    _tt_slots = "tooManyInReads";
if (inReadCount.length === 0) {
    _tt_slots = window.top.document.querySelectorAll(".article-body p, .grid_8 .nonstory-links > p");
}
    w.teads.page(73857).placement(121977, {slider: {allow_corner_position: false, allow_top_position: false}, "format":"inread","slot":{"avoid":{"selector":"#taboola-thumbnails .tbl-feed-header .tbl-feed-header-logo","distance":250},"btf":false,"selector":".article-body p","minimum":7}}).passback(function passback() {/* jshint ignore:start*/
var passbackHtml = "<script data-aylplacement=\"ad03ed41b23610a002dc953edcfe8347\">  /* Newsquest video 600x340 */  (function(){      var o = document.createElement(\"script\");      o.setAttribute(\"src\", \"//fo-api.omnitagjs.com/fo-api/ot.js?Placement=ad03ed41b23610a002dc953edcfe8347\");      o.setAttribute(\"type\", \"text/javascript\");      o.setAttribute(\"async\",\"true\");      top.document.body.appendChild(o);})();  </script>    ";

var passbackSlot = window.top.document.querySelectorAll(".article-body p, .grid_8 .nonstory-links > p")[7];

var wrapper = new DOMParser().parseFromString(passbackHtml, "text/html");
var body = wrapper.getElementsByTagName("body")[0];

function cloneAttributes(element, sourceNode) {
    let attr;
    let attributes = Array.prototype.slice.call(sourceNode.attributes);
    while (attr = attributes.pop()) {
        element.setAttribute(attr.nodeName, attr.nodeValue);
    }
    element.innerHTML = sourceNode.innerHTML;
}

[].forEach.call(body.children, child => {
    passbackSlot.parentNode.insertBefore(child, passbackSlot.nextSibling);
});

var elements = wrapper.getElementsByTagName("script");
[].forEach.call(elements, element => {

    if (element.src != "") {
        var s = window.document.createElement("script");
        cloneAttributes(s, element);
        passbackSlot.parentNode.insertBefore(s, passbackSlot.nextSibling);
    } else {
        eval(element.innerHTML); 
    }

});
/* jshint ignore:end*/
                                                }).serve();
    w.teads.page(73857).placement(122031, {slider: {allow_corner_position: false, allow_top_position: false}, "css":"margin: 0px 0px 16px;","callbacks":{"AdStarted":function () {window.top.document.querySelectorAll(".teads-inread > div")[0].style.zIndex = 1;
}},"format":"inread","slot":{"btf":false,"selector":".article-body p","minimum":14}}).serve();
  };
  if (w.teads && w.teads.page) { ttag(); }
  else if (!w.teadsscript) {
    var s = document.createElement('script');
    s.src = 'https://static.teads.tv/static/master/media/format/v3/teads-format.min.js';
    s.async = true; s.onload = ttag; w.teadsscript = d.getElementsByTagName('head')[0].appendChild(s);
  } else {
    w.teadsscript.addEventListener('load', ttag);
  }
})(window, document);