if (typeof Cobalt === 'undefined') { var Cobalt = {}; };
if (typeof Cobalt.partners === 'undefined') { Cobalt.partners = {}; };
if (typeof Cobalt.partners.Lexus === 'undefined') { Cobalt.partners.Lexus = {}; };

Cobalt.partners.Lexus.models = {
  cthybrid: 'CTh',
  es: 'ES',
  gs: 'GS',
  gshybrid: 'GSh',
  gx: 'GX',
  hshybrid: 'HSh',
  is: 'IS',
  isc: 'ISC',
  isf: 'ISF',
  lfa: 'LFA',
  ls: 'LS',
  lshybrid: 'LSh',
  lx: 'LX',
  rx: 'RX', 
  rxhybrid: 'RXh',
  sc: 'SC'
};

Cobalt.partners.Lexus.MediaGallery = {

  template: "http://www.lexus.com/lexus-share/gallery/popup.html?launchGallery=true&model=%model%",

  /**
   * Given a model name, return a URL which will be used as the SRC
   * for the media gallery iframe modal window.
   */
  getSrc: function(model) {
    return this.template.replace(/%model%/ig, Cobalt.partners.Lexus.models[model]);
  }
  
};

Cobalt.partners.Lexus.FutureVehicles = {

  template: "http://www.lexus.com/fcv/index_dealer.html",

  /**
   * Given a model name, return a URL which will be used as the SRC
   * for the FutureVehicles iframe modal window.
   */
  getSrc: function(model) {
    return this.template.replace(/%model%/ig, Cobalt.partners.Lexus.models[model]);
  }
  
};
