Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
34 kB
1
Indexable
Never
window.topSLide = `
<div class="swiper mySwiper swiper-top" data-name-component="HeroCarousel" data-update="Only-3_1-image">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
                <div class="top-banner auto">
                    <div class="content">
                        <div class="image-wrapper loaded">
                            <div class="Half-degraded"></div>
                            <div class="image-background b-lazy b-loaded"
                                style="background-image: url(&quot;https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&amp;Quality=65&amp;Width=1800&amp;Height=600&amp;ImageUrl=331645.jpg&amp;imageType=hero3x1&quot;);">
                            </div>
                        </div>
                        <div class="row">
                            <div class="columns mobile">
                                <div class="wrapper">
                                    <nav role="navigation">
                                        <ul class="breadcrumbs">
                                            <li class="active">Featured</li>
                                        </ul>
                                    </nav> <img
                                        src="https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='png'&amp;Quality=50&amp;Width=419&amp;Height=140&amp;ImageUrl=331643.png&amp;imageType=brand"
                                        class="image-brand">
                                    <div data-tracking="">The Responder</div>
                                    <h1 class="Title-only-mobile">The Responder</h1>
                                    <p class="description">BAFTA-winner Martin Freeman delivers a spellbinding
                                        performance in this new crime thriller as police response officer Chris Carson,
                                        who struggles to keep a grip on his marriage and mental health.

                                    </p>
                                </div>
                                <div data-id="43053" class="actions"><a fragment="2c2e8df884"
                                        href="https://account.britbox.com/signup?callback=https://www.britbox.com/us/account/signupcallback?returnURL=/us/programmes&amp;country=us&amp;deviceName=Windows&amp;deviceType=Desktop&amp;exp=1642616559&amp;action=skipIdle&amp;key=7492a396a7260808f99d997485e7561cbc085635cdca82d7d78a28ef2a9ebef14a36628f23cea77b97270ff93b739f18cc7050129d405d59700319b31de150b8"
                                        data-itemid="24144" https:="" account.britbox.com="" class="play-now"><span
                                            class="play-animation"></span> <span>Start Your Free Trial</span></a> <a
                                        fragment="2c2e8df884" href="/us/show/The_Responder_p0b61z9j" class="discover"><i
                                            class="icon-discover-more"></i> <span>Discover
                                            more</span></a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="swiper-slide">
                <div class="top-banner auto">
                    <div class="content">
                        <div class="image-wrapper loaded">
                            <div class="Half-degraded"></div>
                            <div class="image-background b-lazy b-loaded" style="background-image: url(&quot;https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&amp;Quality=65&amp;Width=1800&amp;Height=600&amp;ImageUrl=325065.jpg&amp;imageType=hero3x1&quot;);"></div>
                        </div>
                        <div class="row">
                            <div class="columns mobile">
                                <div class="wrapper">
                                    <nav role="navigation">
                                        <ul class="breadcrumbs">
                                            <li class="active">Featured</li>
                                        </ul>
                                    </nav> <img src="https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='png'&amp;Quality=50&amp;Width=419&amp;Height=140&amp;ImageUrl=328507.png&amp;imageType=brand" class="image-brand">
                                    <div data-tracking="">Why Didn't They Ask Evans?</div>
                                    <h1 class="Title-only-mobile">Why Didn't They Ask Evans?</h1>
                                    <p class="description"> Agatha Christie's wittiest mystery ever. Lucy Boynton and Will Poulter star in Hugh Laurie’s new adaptation, where two amateur sleuths set out to find the meaning behind a dead man’s mysterious final words. </p>
                                </div>
                                <div data-id="42198" class="actions"><a fragment="fafc16606c" href="https://account.britbox.com/signup?callback=https://www.britbox.com/us/account/signupcallback?returnURL=/us/programmes&amp;country=us&amp;deviceName=Windows&amp;deviceType=Desktop&amp;exp=1642616559&amp;action=skipIdle&amp;key=7492a396a7260808f99d997485e7561cbc085635cdca82d7d78a28ef2a9ebef14a36628f23cea77b97270ff93b739f18cc7050129d405d59700319b31de150b8" data-itemid="42198" https:="" account.britbox.com="" class="play-now"><span class="play-animation"></span> <span>Start Your Free Trial</span></a> <a class="discover" href="/us/show/Why_Didnt_They_Ask_Evans_68247" fragment="fafc16606c"><i class="icon-discover-more"></i> <span>Discover
                                            more</span></a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="swiper-slide">
                <div class="top-banner auto">
                    <div class="content">
                        <div class="image-wrapper loaded">
                            <div class="Half-degraded"></div>
                            <div class="image-background b-lazy b-loaded" style="background-image: url(&quot;https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&amp;Quality=65&amp;Width=1800&amp;Height=600&amp;ImageUrl=211478.png&amp;imageType=hero3x1&quot;);"></div>
                        </div>
                        <div class="row">
                            <div class="columns mobile">
                                <div class="wrapper">
                                    <nav role="navigation">
                                        <ul class="breadcrumbs">
                                            <li class="active">Featured</li>
                                        </ul>
                                    </nav> <img src="https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='png'&amp;Quality=50&amp;Width=419&amp;Height=140&amp;ImageUrl=211480.png&amp;imageType=brand" class="image-brand">
                                    <div data-tracking="">Death in Paradise</div>
                                    <h1 class="Title-only-mobile">Death in Paradise</h1>
                                    <p class="description">Welcome to the idyllic island of Saint Marie. With its beautiful tropical charm, you might mistake it for paradise...until you see its murder rate.</p>
                                </div>
                                <div data-id="24258" class="actions"><a fragment="d0ad5608c4" href="https://account.britbox.com/signup?callback=https://www.britbox.com/us/account/signupcallback?returnURL=/us/programmes&amp;country=us&amp;deviceName=Windows&amp;deviceType=Desktop&amp;exp=1642616559&amp;action=skipIdle&amp;key=7492a396a7260808f99d997485e7561cbc085635cdca82d7d78a28ef2a9ebef14a36628f23cea77b97270ff93b739f18cc7050129d405d59700319b31de150b8" data-itemid="24258" https:="" account.britbox.com="" class="play-now"><span class="play-animation"></span> <span>Start Your Free Trial</span></a> <a class="discover" href="/us/show/Death_in_Paradise_b01pvmf6" fragment="d0ad5608c4"><i class="icon-discover-more"></i> <span>Discover
                                            more</span></a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="swiper-slide">
                <div class="top-banner auto">
                    <div class="content">
                        <div class="image-wrapper loaded">
                            <div class="Half-degraded"></div>
                            <div class="image-background b-lazy b-loaded" style="background-image: url(&quot;https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&amp;Quality=65&amp;Width=1800&amp;Height=600&amp;ImageUrl=321578.jpg&amp;imageType=hero3x1&quot;);"></div>
                        </div>
                        <div class="row">
                            <div class="columns mobile">
                                <div class="wrapper">
                                    <nav role="navigation">
                                        <ul class="breadcrumbs">
                                            <li class="active">Featured</li>
                                        </ul>
                                    </nav> <img src="https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format='png'&amp;Quality=50&amp;Width=419&amp;Height=140&amp;ImageUrl=321580.png&amp;imageType=brand" class="image-brand">
                                    <div data-tracking="">Murder in Provence</div>
                                    <h1 class="Title-only-mobile">Murder in Provence</h1>
                                    <p class="description"> Bienvenue en Provence! Among the sun-drenched hills of southern France, chief magistrate Antoine Verlaque (Roger Allam) and his spontaneous partner and amoureuse, Marine Bonnet (Nancy Carroll), investigate the dark underbelly of the beautiful town of Aix. Based on the much-loved books by ML Longworth.</p>
                                </div>
                                <div data-id="41571" class="actions"><a fragment="40a953c03e" href="https://account.britbox.com/signup?callback=https://www.britbox.com/us/account/signupcallback?returnURL=/us/programmes&amp;country=us&amp;deviceName=Windows&amp;deviceType=Desktop&amp;exp=1642616559&amp;action=skipIdle&amp;key=7492a396a7260808f99d997485e7561cbc085635cdca82d7d78a28ef2a9ebef14a36628f23cea77b97270ff93b739f18cc7050129d405d59700319b31de150b8" data-itemid="41571" https:="" account.britbox.com="" class="play-now"><span class="play-animation"></span> <span>Start Your Free Trial</span></a> <a class="discover" href="https://www.britbox.com/us/show/Murder_in_Provence_73779" fragment="40a953c03e" us="" show=""><i class="icon-discover-more"></i> <span>Discover
                                            more</span></a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row into-swiper">
            <div class="columns">
                <div class="swiper-pagination">
                    <div class="no-animation-pagination">
                        <ul class="horizontal"></ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
      `;



(function () {
    try {
      /* main variables */
      var debug = 0;
      var variation_name = "";
  
      /* all Pure helper functions */
      function waitForElement(selector, trigger, delayInterval, delayTimeout) {
        var interval = setInterval(function () {
          if (
            document &&
            document.querySelector(selector) &&
            document.querySelectorAll(selector).length > 0 && window.topSLide
          ) {
            clearInterval(interval);
            trigger();
          }
        }, delayInterval);
        setTimeout(function () {
          clearInterval(interval);
        }, delayTimeout);
      }
  
          //wait for swiper 
    function waitForSwiper(trigger){
      var interval = setInterval(function(){
          if(typeof Swiper != "undefined"){
            clearInterval(interval);
            trigger();
          }
      }, 50);
      setTimeout(function(){
        clearInterval(interval);
      }, 15000)
  }
  function getCookie(name) {
      var nameEQ = name + "=";
      var ca = document.cookie.split(';');
      for(var i=0;i < ca.length;i++) {
          var c = ca[i];
          while (c.charAt(0)==' ') c = c.substring(1,c.length);
          if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
      }
      return null;
  }
  
  function addScript() {
    var cssScript=''+ 
    '<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css"/>'+
    "<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.7/css/swiper.min.css'/>";
    $('#head').append(cssScript);
    var my_awesome_script = document.createElement('script');
  
  my_awesome_script.setAttribute('src','https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.7/js/swiper.min.js');
  
  document.head.appendChild(my_awesome_script);
    
  }
  var swipeDynamicData ;
      var data = [
        {
            title:'Death in Paradise',
            img:'https://us.britbox.com/shain/v1/dataservice/ResizeImage/$value?Format=%27png%27&Quality=80&Width=405&Height=227&ImageUrl=211472.png&imageType=tile',
            href:'/us/show/Death_in_Paradise_b01pvmf6',
            moreinfo:'Show· 1 Season',
            description: 'Welcome to the idyllic island of Saint Marie. With its beautiful tropical charm, you might mistake it for paradise...until you see its murder rate.',
            datacolnumber: '1',
            dataitemid:'24258',
            fragment:'9308899c9a',
        },  
        {
            title:'Shakespeare & Hathaway',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=213232.jpg&imageType=tile',
            href:'/us/show/Shakespeare_and_Hathaway_Private_Investigators_b09trrn9',
            moreinfo:'Show· 1 Season',
            description: 'The unlikely detective duo of Frank and Lu discover that not all is as peaceful as it seems in the picturesque Stratford-upon-Avon, where fact is stranger than fiction and low-life criminals get caught up in deliciously high drama.',
            datacolnumber: '2',
            dataitemid:'21883',
            fragment:'ee36af8512',
        },
          {
              title:'Father Brown',
              img:'https://us.britbox.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=284278.jpg&imageType=tile',
              href:'/us/show/Father_Brown_b03pmw4m',
              moreinfo:'Show· 1 Season',
              description: 'Mark Williams stars as Father Brown, a clergyman with a particular talent for crime-solving. Assisted in his efforts by a motley, and not always godly, squad of allies, he investigates crimes to save souls.',
              datacolnumber: '3',
              dataitemid:'22700',
              fragment:'46cd488d9d',
          },
        {
            title:'Agatha Christie\'s Poirot',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=224684.jpg&imageType=tile',
            href:'/us/show/Agatha_Christies_Poirot_p04m8lr8',
            moreinfo:'Show· 1 Season',
            description: 'David Suchet stars as Agatha Christie\'s celebrated detective Hercule Poirot in this collection of murder mysteries, where he pits his wits against crime and injustice using his "little grey cells.',
            datacolnumber: '4',
            dataitemid:'11569',
            fragment:'117df8dcea2',
          },
          {
            title:'Murder in Provence',
            img:'https://us.britbox.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=321588.jpg&imageType=tile',
            href:'https://www.britbox.com/us/show/Murder_in_Provence_73779',
            moreinfo:'Show· 1 Season',
            description: 'Bienvenue en Provence! Among the sun-drenched hills of southern France, Antoine Verlaque and his spontaneous amoureuse, Marine Bonnet, solve crimes in the beautiful town of Aix.',
            datacolnumber: '4',
            dataitemid:'41571',
            fragment:'1451c10ee89',
        },
          {
              title:'Vera',
              img:'https://us.britbox.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=201950.jpg&imageType=tile',
              href:'/us/show/Vera_p053fylw',
              moreinfo:'Show· 1 Season',
              description: 'Based on the novels by Ann Cleeves, Brenda Blethyn stars as Vera, the brilliant but irascible investigator obsessed with her work and driven by her own demons. She faces each case with caustic wit and guile, investigating crimes only she can solve.',
              datacolnumber: '6',
              dataitemid:'13500',
              fragment:'13098cb57d7',
          },
          {
              title:'Sister Boniface Mysteries',
              img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=319335.jpg&imageType=tile',
              href:'/us/show/Sister_Boniface_Mysteries_73774',
              moreinfo:'Show· 1 Season',
              description: 'First there was Father Brown. Now, say hello to Sister Boniface.  This clever, moped-riding nun is the police\'s secret weapon for solving murders in this divine Father Brown spin-off.',
              datacolnumber: '7',
              dataitemid:'41171',
              fragment:'1378753d31e',
          },
          {
            title:'Kate & Koji',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27png%27&Quality=80&Width=405&Height=227&ImageUrl=289222.png&imageType=tile',
            href:'/us/show/Kate_and_Koji_64800',
            moreinfo:'Show· 1 Season',
            description: 'There\'s common ground in never backing down. Golden Globe winner and Vera star Brenda Blethyn plays a working class cafe owner who forms an unlikely friendship with an educated asylum seeker.',
            datacolnumber: '8',
            dataitemid:'36719',
            fragment:'35c9d923c8',
        },
        {
            title:'Doctor Foster',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=298756.jpg&imageType=tile',
            href:'https://www.britbox.com/us/show/Doctor_Foster_b094m5t9',
            moreinfo:'Show· 1 Season',
            description: 'Suranne Jones (Vigil) stars in this explosive drama. Brilliant GP Gemma Foster appears to have it all - but when she suspects her husband of an affair, her charmed life is torn apart.',
            datacolnumber: '9',
            dataitemid:'38039',
            fragment:'13cbc6344e9',
        },
        {
            title:'Silent Witness',
            img:'https://us.britbox.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=230010.jpg&imageType=tile',
            href:'https://www.britbox.com/us/show/Silent_Witness_b007y6k8',
            moreinfo:'Show· 1 Season',
            description: 'Every body tells a story. A\
            crack team of forensic pathologists reveal the truth\
            behind murders and accidental deaths.',
            datacolnumber: '10',
            dataitemid:'10367',
            fragment:'14970dc7eb7',
          },
          {
            title:'The Bay',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=302259.jpg&imageType=tile',
            href:'/us/show/The_Bay_p07kgkwc',
            moreinfo:'Show· 1 Season',
            description: 'When Family Liaison Officer Lisa Armstrong is assigned to a missing persons investigations, it initially seems like any other - tragic, but all too familiar. This time, it is especially challenging for her not to get emotionally involved.',
            datacolnumber: '11',
            dataitemid:'24144',
            fragment:'353aa2ccd7',
          },
          {
            title:'Still Open All Hours',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=331130.jpg&imageType=tile',
            href:'/us/show/Still_Open_All_Hours_b04xd2nw',
            moreinfo:'Show· 1 Season',
            description: 'Comedy legend David Jason returns as the beloved, British character Granville for this warm-hearted cornershop comedy updating Roy Clarke’s classic “Open All Hours”.',
            datacolnumber: '12',
            dataitemid:'15098',
            fragment:'41ef948a91',
          },
          {
            title:'Shetland',
            img:'https://us.britbox.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=283110.jpg&imageType=tile',
            href:'https://www.britbox.com/us/show/Shetland_p05tb1sm',
            moreinfo:'Show· 1 Season',
            description: 'Based on the best-selling books\
            by award-winning crime writer Ann Cleeves, Shetland\
            follows Detective Jimmy Perez and his team as they\
            investigate crime within the close-knit island\
            community.',
            datacolnumber: '13',
            dataitemid:'16947',
            fragment:'1c6c29ae5',
          },
          {
            title:'Traces',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=302432.jpg&imageType=tile',
            href:'/us/show/Traces_63419',
            moreinfo:'Show· 1 Season',
            description: 'Breaking Bad’s Laura Fraser stars in this suspense-filled crime thriller driven by a personal tragedy and murder left unsolved - until now.',
            datacolnumber: '14',
            dataitemid:'35324',
            fragment:'17bc56e61c',
          },
          {
            title:'Line of Duty',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=233272.jpg&imageType=tile',
            href:'/us/show/Line_of_Duty_p00yzlr0',
            moreinfo:'Show· 1 Season',
            description: 'Catching criminals is tough enough, but try catching bent coppers… Anti-Corruption Unit AC-12 have their work cut out for them chasing crooked colleagues who have the skills and resources needed to cover their tracks.',
            datacolnumber: '15',
            dataitemid:'26065',
            fragment:'b642f14ee1',
          },
        {
            title:'New Tricks',
            img:'https://static.bbus-static.com/shain/v1/dataservice/ResizeImage/$value?Format=%27jpg%27&Quality=80&Width=405&Height=227&ImageUrl=255225.jpg&imageType=tile',
            href:'/us/show/New_Tricks_b006t0qx',
            moreinfo:'Show· 1 Season',
            description: 'A crew of retired, old-school cops is recruited to re-investigate unsolved cases long gone cold.',
            datacolnumber: '16',
            dataitemid:'32996',
            fragment:'2772afde67',
          }
      ];
      var slide ='';
      data.forEach(function(val,i){
      slide +=`<div class="swiper-slide">
      <div class="box">
          <div data-title="${val.title}" data-title-tracking="${val.title}" data-colnumber="${val.datacolnumber}"
              class="card "><a href="${val.href}"
                  onclick="dataLayer.push({'event':'eventSend','actionType': 'submit','actionName':'Navigation','eventLabels':{'eventType':'atc','container':'page','status':'success','label':'selects a program tile in a rail','name':'${val.title}'}})">
                  <div class="image pulsate loaded"><img 
                          src="${val.img}"
                          class="b-lazy b-loaded"></div>
              </a>
              <div class="card-content">
                  <div class="card-content-inside">
                      <div class="description">
                          <div class="top-animation"><a href="${val.href}"
                                  onclick="dataLayer.push({'event':'eventSend','actionType': 'submit','actionName':'Navigation','eventLabels':{'eventType':'atc','container':'page','status':'success','label':'selects a program tile in a rail','name':'${val.title}'}})">
                                  <div class="top">${val.title}</div>
                                  <div class="inner-content">
                                      <div class="season">
                                          <div class="description">${val.description}</div>
                                          <div class="more-info">${val.moreinfo}
                                          </div>
                                      </div>
                                  </div>
                              </a></div>
                          <div class="actions bottom">
                              <a fragment="${val.fragment}"
                                  href="/us/account/signup?returnURL=/us" data-itemid="${val.dataitemid}"
                                  class="play-now"><span class="play-animation">Free Trial</span>
                                  <span>Free Trial </span></a>
                              <!----> <a fragment="${val.fragment}" href="${val.href}"
                                  class="discover"><i class="icon-discover-more"></i>
                                  <span>Discover more</span></a>
                              
                          </div>
                      </div>
                  </div>
              </div>
          </div>
      </div>
      </div>`;
      });
       var bottomSlider = `
      <div class="swiper episodes new-episodes eg-slider" data-name-component="ProgrammeCarousel">
      <!-- Swiper -->
      <div class="row">
          <div class="columns">
              <div class="top-wrapper">
                  <h2 class="title">Trending on BritBox</h2>
                  <div class="swiper-pagination"></div>
              </div>
          </div>
      </div>
      <div class="row">
          <div class="columns">
              <div class="swiper-horizontal">
                  <div class="swiper-container" data-slides-per-view="4" data-slides-per-group="4">
                      <!-- Add Pagination -->
                      <div class="swiper-wrapper">
                      ${slide}
                      </div>
                      <div class="swiper-button-next"></div>
                      <div class="swiper-button-prev"></div>
                  </div>
              </div>
          </div>
      </div>
  </div>
      `;
      function init() {
        document.querySelector('.main-content.programmes > .row:first-child').insertAdjacentHTML('beforebegin', window.topSLide);
        document.querySelector('.mySwiper').insertAdjacentHTML('afterend', bottomSlider);
  //wait for swiper slider
          waitForSwiper(function(){
          var swiper = new Swiper(".mySwiper .swiper-container", {
              loop: true,
              slidesPerView: 1,
              spaceBetween: 30,
              autoplay: {
                  delay: 2500,
                  disableOnInteraction: false,
              },
              pagination: {
                  el: ".swiper-pagination",
                  clickable: true,
              },
              });
  
          });
      }
      //add trending data 
      function addData(){
          var xhttp = new XMLHttpRequest();
          xhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
             var dd= document.createElement('div');
                dd.innerHTML = this.responseText;
              var data=  dd.querySelector('.main-content div.new-episodes:nth-child(8) .swiper-wrapper');
              swipeDynamicData= data.innerHTML;
              if(getCookie('loggedIn'))
              document.querySelector('.eg-slider .swiper-wrapper').innerHTML=swipeDynamicData;
              
            }
          };
          xhttp.open("GET", "https://www.britbox.com/us", true);
          xhttp.send();
        }
        //get slider data for loggedin user 
       // addData();
        //add swiper script
      addScript();
      /* Initialise variation */
      waitForElement(".main-content.programmes > .row:first-child", init, 50, 15000);
    } catch (e) {
      if (debug) console.log(e, "error in Test" + variation_name);
    }
  })();


<style>
.mySwiper.swiper .swiper-slide {
    max-width: inherit !important;
    width: 100% !important;
  }
  .swiper-slide {
    opacity: 1;
  }
  
  .mySwiper .swiper-slide .top-banner .content .image-wrapper {
    background-color: #000;
    max-width: 87.5rem;
    left: 0;
    right: 0;
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
    width: 100%;
  }
  
  .mySwiper .swiper-wrapper .swiper-slide .top-banner .content .image-wrapper .Half-degraded {
    background: linear-gradient(90deg,#000 0,rgba(0,0,0,0));
    opacity: .7;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
  }
  
  .mySwiper .swiper-wrapper .swiper-slide {
    max-width: inherit;
  }
  .mySwiper .swiper-wrapper .swiper-slide {
    margin: 0;
    padding: 0;
    opacity: 1;
  }
  .mySwiper .swiper-wrapper .swiper-slide .top-banner {
    position: relative;
    background-color: rgba(0,0,0,0)!important;
    width: 100%;
  }
  
  .mySwiper .swiper-wrapper .swiper-slide .top-banner .row .wrapper p {
    color: #fff;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }
  .mySwiper .swiper-wrapper .swiper-slide .top-banner .content nav ~ p {
    margin-top: 1.875rem;
    font-size: 1rem;
    line-height: 1.625rem;
    max-width: 32.5rem;
  }
  .mySwiper .swiper-wrapper .swiper-slide .top-banner .row .wrapper img.image-brand {
    /* margin-top: 0; */
    /* margin-bottom: 0.625rem; */
    max-height: 6.75rem;
    width: auto;
    align-self: flex-start;
  }
  .collections .mySwiper .top-banner{
    height: 100% !important;
  }
  .episodes-slider .swiper-slide {
    text-align: center;
    font-size: 1.125rem;
    color: #2d6eff;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0.625rem 0.9375rem 1.0.75rem rgba(0,0,0,.3);
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    /* opacity: .05; */
    transition: all .3s ease-in-out;
    max-width: 25.625rem;
  }
  
  html body .swiper.episodes .swiper-slide .card .card-content .card-content-inside .description .actions.bottom a.play-now span.play-animation{
    margin-left: 0px;
    max-width: max-content;
  }
  .mySwiper .title h1 {
    font-size: 2.6875rem !important;
    margin-top: 3rem !important;
    margin-bottom: 2rem !important;
  }
  html body .mySwiper .actions .play-now{
    padding: 14px 31px !important;
    border-radius: 4px !important;
    background-color: #2d6eff;
    color: #fff;
    display: inline-block !important;
  }
  html body .mySwiper .actions .play-now:hover,
  html body .mySwiper .actions .play-now:focus{
    background-color: #004fff;
  }
  @media screen and (min-width:768px) {
    html body .mySwiper .row.into-swiper {
        top: -2.5rem;
    }    
  }
  
  html body .mySwiper .row.into-swiper {
    position: relative;
    text-align: right;
  }
  
  html body .mySwiper.swiper-top .swiper-pagination .swiper-pagination-bullet{
    width: 0.9375rem;
    height: 0.9375rem;
    border: 0.125rem solid #fff;
    background: #000;
    display: block;
    outline: 0;
    border-radius: 50%;
    text-indent: -999em;
    transition: all .3s ease;
    margin: 0px 25px 0px 0px !important;
    top: 1px;
  }
  
  html body .mySwiper span.swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #fff !important;
  }
  
  html body .mySwiper .swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets {
    position: relative;
    width: auto;
    display: inline-flex;
    height: auto;
  }
  
  html body .mySwiper .swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets:after {
    display: block;
    content: "";
    position: absolute;
    top: calc(50%);
    left: 0;
    width: 100%;
    height: 0.125rem;
    background-color: #fff;
    z-index: -1;
  }
  html body .mySwiper.swiper-top .swiper-pagination .swiper-pagination-bullet:after{
    background: transparent !important;
  }
  html body .mySwiper.swiper-top .swiper-pagination .swiper-pagination-bullet:last-child {
    margin-right: 0px !important;
  }
  html body .mySwiper .top-banner .content nav ul {
    margin-top: 20px !important;
  }
  @media screen and (max-width:350px) {
    html body .mySwiper.swiper .actions .play-now{
        padding: 14px!important;
        text-align: center;
    }
  }
  @media screen and (max-width:767px) {
    
    html body .mySwiper .row.into-swiper {
      display: none;
    }
  
    html body .mySwiper .actions {
      margin-bottom:40px;
    }
    html body .top-banner .content .actions {
    margin-bottom: 0px;
}

html body .collections .swiper-top .swiper-container .swiper-slide .top-banner p {
    min-height: 104px;
}
  }
</style>