/**  
 * Sun Life Financial configuration file.
 */  

// Feed the appropriate key depending on the domain
function getKey(keyDomain) {
       if(keyDomain.match('ca.sunlife')) { 
            return '#@895f9aaf3048809b45f';
       } else if(keyDomain.match('sunlife.ca')) { 
            return '#@3222ee9d5f63bc696cf';
       } else if(keyDomain.match('sunlife.com')) { 
            return '#@a9c3be00546530f65f0';
       }
};

var conf = {

    player: 'http://www.sunlife.com/static/global/player/flowplayer.commercial-3.1.5.swf',


    // default clip configuration
   defaults: {

      autoPlay: true,
      autoBuffering: true,
 
      // functions are also supported
      onBegin: function() {
         // make controlbar visible in 4000 seconds
         this.getControls().fadeIn(4000);
      }
   },

   play: {
      en: {
         // use built in label text at end of video clip
        label: 'Play'
      },
      fr: {
         // label text at end of video clip
        label: 'Lire',
        replayLabel: 'Relire'
      }
   },

   logo: {
      url: 'http://www.sunlife.com/static/global/player/slf-watermark.png',
      fullscreenOnly: false,
      displayTime: 0,
      opacity: 1,
      bottom: 50,
      left: 30
   }, 
 
   // my skins
   skins: {
      gray:  {
         backgroundColor: '#666666',
         buttonColor: '#333333',
         opacity: 0,
         time: false
      }                  
      // setup additional skins here ...             
   },

   controls: {
      en: {

         // tooltips configuration
         tooltips: {
            // enable english tooltips on all buttons
            buttons: true

            // use built in English text for buttons
         }

         // background color for all tooltips
         //tooltipColor: '#003946',

         // text color
         //tooltipTextColor: '#5482ab'  
      }, 

      fr: {

         // tooltips configuration
         tooltips: {
            // enable english tooltips on all buttons
            buttons: true,

            // customized text for buttons
            play: 'Lire',
            pause: 'Pause',
            mute: 'Sourdine',
            unmute: 'Son',
            fullscreen: 'Plein &eacute;cran',
            fullscreenexit: 'Quitter mode plein &eacute;cran'
         }

         // background color for all tooltips
         //tooltipColor: '#003946',

         // text color
         //tooltipTextColor: '#5482ab'  
      } 
   },

   audio: {
      en: {
         fullscreen: false,
         height: 30,

         // tooltips configuration
         tooltips: {
            // enable english tooltips on all buttons
            buttons: true

            // use built in English text for buttons
         }

         // background color for all tooltips
         //tooltipColor: '#003946',

         // text color
         //tooltipTextColor: '#5482ab'  
      }, 

      fr: {
         fullscreen: false,
         height: 30,

         // tooltips configuration
         tooltips: {
            // enable english tooltips on all buttons
            buttons: true,

            // customized text for buttons
            play: 'Play',
            pause: 'Pause',
            mute: 'Muet'
         }

         // background color for all tooltips
         //tooltipColor: '#003946',

         // text color
         //tooltipTextColor: '#5482ab'  
      } 
   }
}