/**  
 * 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('us.sunlife')) { 
            return '#@f41d0a5b5072fd8359f';
       } else if(keyDomain.match('sunlifecorp.com')) { 
            return '#@55bb240b4e2d822356f';
       } else if(keyDomain.match('sloc.co.uk')) { 
            return '#@929b2ef2b5dd59e94dd';
       } else if(keyDomain.match('sunlife.ca')) { 
            return '#@3222ee9d5f63bc696cf';
       } else if(keyDomain.match('sunlife.co.id')) { 
            return '#@1e89bdf041dd2818924';
       } else if(keyDomain.match('sunlife.com.hk')) { 
            return '#@c346bff10363e9954c5';
       } else if(keyDomain.match('sunlife.com.ph')) { 
            return '#@a79056a8bf7faaa9d37';
       } else if(keyDomain.match('sunlife.com')) { 
            return '#@a9c3be00546530f65f0';
       } else if(keyDomain.match('sunlife.ie')) { 
            return '#@fb9c0163e71c373cda0';
       } else if(keyDomain.match('sunlifedistributors.com')) { 
            return '#@a5dfd6fac072d9c99f8';
       } else if(keyDomain.match('sunlifeglobalinvestments.com')) { 
            return '#@098c98679d5f39022e5';
       }
};

var conf = {

    player: 'http://cdn.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://cdn.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'  
      } 
   }
}
