(function(){
  document.write('<div id="RGvideoWall');
  document.write('"><\/div>');
 
  var ks = document.createElement('script'),
    ad = document.createElement('script');
  ks.src = "http://anomaly.realgravity.com/javascripts/app_kitchensink.min.js";
  document.body.appendChild(ks);
  ad.src = "http://anomaly.realgravity.com/javascripts/ads/rg_companion_ad.min.js";
  document.body.appendChild(ad);
}());

(function(){
  var doWhen;
  (function(){var b={interval:100},d=function(f,e){var g;for(g in e){if(e.hasOwnProperty(g)){f[g]=e[g]}}return f},a=function(e){if(e.test()){clearInterval(e.iid);e.cb.call(e.context||window,e.data)}},c=function(e){e.iid=setInterval(function(){a(e)},e.interval)};doWhen=function(h,e,f){var g=d({test:h,cb:e},b);c(d(g,f))}}());

  doWhen(function(){
    return !!window.RealGravity;
  }, function(){

(function(RG) {
  RG.videoWall.themes.cyclenews_lb = RG.videoWall.themes.cashmere;
  RG.onReady(function(){
    var videosPerSlide = 6;
    RG.videoWall('RGvideoWall', {
      theme: 'cyclenews_lb',
          company_uuid: '40b33840-d827-012e-17bf-12313d18ea79',
          ad_player_uuid: "4e522150-d829-012e-17c2-12313d18ea79",
          templateData: {
            title: 'DigitalTrottle',
            titleUrl: 'http://www.digitalthrottle.com',
            titleImage: 'http://demos.realgravity.com/images/transparent_logo.png'
          },
          playerOptions: {
            player_uuid: "0a010590-d82c-012e-f9b6-12313d18e962",
            width: 550,
            height: 375
          },
            adPlayerOptions: {
              width: 300,
              height: 204
            },
          channelListOptions: {
            channels: [
              {
                title: 'NASCAR',
                videosPerSlide: videosPerSlide,
                thumbnail_url: 'http://www.digitalthrottle.com/digitalthrottle.tv/thumbs/300x250miniwall/nascar.jpg',
                params: {
                 providers: '244', 
                 per_page: 5 * videosPerSlide,
                 order: 'created_at desc',
                 search_term: '"nascar")'
                }
              },
              {
                title: 'NHRA',
                videosPerSlide: videosPerSlide,
                thumbnail_url: 'http://www.digitalthrottle.com/digitalthrottle.tv/thumbs/300x250miniwall/nhra_300x250_lightbox_thumb.jpg',
                params: {
                per_page: 5 * videosPerSlide,
                 providers: '',
                 order: 'created_at desc',
                 search_term: '"dtaudience$automotive"&"dtracing$drag racing"&"dtautoraceseries$nhra"'
                }
              },
              {
                title: 'Motorcycle Racing',
                videosPerSlide: videosPerSlide,
                thumbnail_url: 'http://www.digitalthrottle.com/digitalthrottle.tv/thumbs/300x250miniwall/mcracing.jpg',
                params: {
                per_page: 5 * videosPerSlide,
                 providers: '',
                 order: 'created_at desc',
                 search_term: '"dtaudience$motorcycle"&"dtcontent$racing"'
                }
              },
              {
                title: 'New Cars & Motorcycles',
                videosPerSlide: videosPerSlide,
                thumbnail_url: 'http://www.digitalthrottle.com/digitalthrottle.tv/thumbs/300x250miniwall/new_camaro.jpg',
                params: {
                 per_page: 5 * videosPerSlide,
                 providers: '',
                 order: 'created_at desc',
                 search_term:'("dtcontent$vehicle info"|"dtcontent$vehicle profile"|"dtcontent$vehicle review")&("dtyear$2011"|"dtyear$2012"|"dtyear$2013")'
                }
              }
            ]
          }
        });
      });
} (window.RealGravity));

  });
}());
