 if(typeof fonts !== 'object'){
  fonts={list:['Uni-Sans']}
 }





 fonts['Council']=
 {
       dir : '/theme/fonts/Council/',

    weight : {   normal : {    600 : 'Council-Regular' }  },

    family : {'Council' : { Normal : 600               }   }



 }





 fonts['Proxima-Nova']=
 {
       dir : '/theme/fonts/ProximaNova/',

    weight : {    normal : { 200 : 'Proxima-Nova-Light'          ,
                             400 : 'Proxima-Nova-Regular'        ,
                             500 : 'Proxima-Nova-SemiBold'       ,
                             700 : 'Proxima-Nova-Bold'              },
                  italic : { 200 : 'Proxima-Nova-Light-Italic'   ,
                             400 : 'Proxima-Nova-Regular-Italic' ,
                             500 : 'Proxima-Nova-SemiBold-Italic' ,
                             700 : 'Proxima-Nova-Bold-Italic'       }
             },

    family : {    'Proxima-Nova'  : {    Normal : 400,
                                           Bold : 700,
                                         Italic : 400,
                                     BoldItalic : 700},

            'Proxima-Nova-Light'  : {    Normal : 200,
                                           Bold : 500,
                                         Italic : 200,
                                     BoldItalic : 500},


          'Proxima-Nova-Regular'  : {    Normal : 400,
                                           Bold : 700,
                                         Italic : 400,
                                     BoldItalic : 700},

          'Proxima-Nova-SemiBold' : {    Normal : 500,
                                           Bold : 700,
                                         Italic : 500,
                                     BoldItalic : 700},


             'Proxima-Nova-Bold'  : {    Normal : 700,
                                           Bold : 700,
                                         Italic : 700,
                                     BoldItalic : 700},



     'Proxima-Nova-Light-Italic'  : {    Italic : 200},
   'Proxima-Nova-Regular-Italic'  : {    Italic : 400},
   'Proxima-Nova-SemiBold-Italic' : {    Italic : 500},
      'Proxima-Nova-Bold-Italic'  : {    Italic : 700}


             }
 }





 fonts['Uni-Sans']=
 {
       dir : '/theme/fonts/UniSans/',

    weight : {    normal : { 100 : 'Uni-Sans-Thin'           ,
                             200 : 'Uni-Sans-Light'          ,
                             300 : 'Uni-Sans-Book'           ,
                             400 : 'Uni-Sans-Regular'        ,
                             600 : 'Uni-Sans-SemiBold'       ,
                             700 : 'Uni-Sans-Bold'           ,
                             900 : 'Uni-Sans-Heavy'             },
                  italic : { 100 : 'Uni-Sans-Thin-Italic'    ,
                             200 : 'Uni-Sans-Light-Italic'   ,
                             300 : 'Uni-Sans-Book-Italic'    ,
                             400 : 'Uni-Sans-Regular-Italic' ,
                             600 : 'Uni-Sans-SemiBold-Italic',
                             700 : 'Uni-Sans-Bold-Italic'    ,
                             900 : 'Uni-Sans-Heavy-Italic'      }
             },

    family : {        'Uni-Sans' : {    Normal : 400,
                                          Bold : 700,
                                        Italic : 400,
                                    BoldItalic : 700},

                 'Uni-Sans-Thin' : {    Normal : 100,
                                          Bold : 300,
                                        Italic : 100,
                                    BoldItalic : 300},

                'Uni-Sans-Light' : {    Normal : 200,
                                          Bold : 400,
                                        Italic : 200,
                                    BoldItalic : 400},


                 'Uni-Sans-Book' : {    Normal : 300,
                                          Bold : 400,
                                        Italic : 300,
                                    BoldItalic : 400},

              'Uni-Sans-Regular' : {    Normal : 400,
                                          Bold : 600,
                                        Italic : 400,
                                    BoldItalic : 600},

             'Uni-Sans-SemiBold' : {    Normal : 600,
                                          Bold : 700,
                                        Italic : 600,
                                    BoldItalic : 700},

                 'Uni-Sans-Bold' : {    Normal : 700,
                                          Bold : 900,
                                        Italic : 700,
                                    BoldItalic : 900},

                'Uni-Sans-Heavy' : {    Normal : 900,
                                          Bold : 900,
                                        Italic : 900,
                                    BoldItalic : 900},


          'Uni-Sans-Thin-Italic' : {    Italic : 100},
         'Uni-Sans-Light-Italic' : {    Italic : 200},
          'Uni-Sans-Book-Italic' : {    Italic : 300},
       'Uni-Sans-Regular-Italic' : {    Italic : 400},
      'Uni-Sans-SemiBold-Italic' : {    Italic : 600},
          'Uni-Sans-Bold-Italic' : {    Italic : 700},
         'Uni-Sans-Heavy-Italic' : {    Italic : 900}


             }
 }




 // safari 3.1: otf
 // firefox 3.6+: woff
 // firefox 3.5+: otf
 // chrome 4+: otf
 // chrome 6+: woff
 // IE 5+: eot
 // IE 9: woff
 // opera 10.1+: otf
 // mobile safari: svg/otf
 // android: otf

 fonts.webfontType = 'otf';






 if (/MSIE (\d+\.\d+)/.test(navigator.userAgent)){
  fonts.browserName = 'MSIE';
  fonts.browserVersion = new Number(RegExp.$1);
  fonts.webfontType = 'eot';
  if (fonts.browserVersion >= 9.0 && fonts.woffEnabled)
   fonts.webfontType = 'woff';
  else if (fonts.browserVersion >= 5.0)
   fonts.webfontType = 'eot';
 } else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
  fonts.browserName = 'Firefox';
  fonts.browserVersion = new Number(RegExp.$1);
  if (fonts.browserVersion >= 3.6 && fonts.woffEnabled)
   fonts.webfontType = 'woff';
  else if (fonts.browserVersion >= 3.5)
   fonts.webfontType = 'otf';
 } else if (/Chrome\/(\d+\.\d+)/.test(navigator.userAgent)){ // must check before safari
  fonts.browserName = 'Chrome';
  fonts.browserVersion = new Number(RegExp.$1);
  if (fonts.browserVersion >= 6.0 && fonts.woffEnabled)
   fonts.webfontType = 'woff';
  else if (fonts.browserVersion >= 4.0)
   fonts.webfontType = 'otf';
 } else if (/Mozilla.*(iPhone|iPad).* OS (\d+)_(\d+).* AppleWebKit.*Safari/.test(navigator.userAgent)){
  fonts.browserName = 'MobileSafari';
  fonts.browserVersion = new Number(RegExp.$2) + (new Number(RegExp.$3) / 10)
  if(fonts.browserVersion >= 4.2)
   fonts.webfontType = 'otf';
  else
   fonts.webfontType = 'svg';
 } else if (/Mozilla.*(iPhone|iPad|BlackBerry).*AppleWebKit.*Safari/.test(navigator.userAgent)) {
  fonts.browserName = 'MobileSafari';
  fonts.webfontType = 'svg';
 } else if (/Safari\/(\d+\.\d+)/.test(navigator.userAgent)) {
  fonts.browserName = 'Safari';
  if (/Version\/(\d+\.\d+)/.test(navigator.userAgent)){
   fonts.browserVersion = new Number(RegExp.$1);
   if (fonts.browserVersion >= 3.1)
    fonts.webfontType = 'otf';
  }
 } else if (/Opera\/(\d+\.\d+)/.test(navigator.userAgent)) {
  fonts.browserName = 'Opera';
  if (/Version\/(\d+\.\d+)/.test(navigator.userAgent)){
   fonts.browserVersion = new Number(RegExp.$1);
   if (fonts.browserVersion >= 10.1)
    fonts.webfontType = 'otf';
   }
 }















  document.write("<style>\n");
  for (i in fonts.list){
   f=fonts.list[i]
   for (x in fonts[f].family){
    if(fonts.webfontType=='svg'){
     fonts.hashNormal='#'+fonts[f].weight.normal[  fonts[f].family[x].Normal  ]
     fonts.hashItalic='#'+fonts[f].weight.italic[  fonts[f].family[x].Italic  ]
    } else {
     fonts.hashNormal='';
     fonts.hashItalic='';
    }
    for (j in fonts[f].family[x]){
     if (j.toLowerCase().indexOf('italic') == -1){o='normal';} else {o='italic';}
     if (j.toLowerCase().indexOf('bold')   == -1){b='normal';} else {b='bold';  }
     document.write(' @font-face {font-family:"'+x+'";src:url("'+fonts[f].dir+fonts.webfontType+'/'+o+'_'+fonts[f].family[x][j]+'.'+fonts.webfontType+fonts.hashNormal+'");font-style:'+o+';font-weight:'+b+';}\n');


// console.info(' @font-face {font-family:"'+x+'";src:url("'+fonts[f].dir+fonts.webfontType+'/'+o+'_'+fonts[f].family[x][j]+'.'+fonts.webfontType+fonts.hashNormal+'");font-style:'+o+';font-weight:'+b+';}\n');

    }
   }
  }
  document.write("</style>\n");







//  window.onload=function(){
//   if (fonts.browserName == 'MSIE'){
//    document.body.style.filter = 'alpha(opacity=0)';
//   } else {
//    document.body.style.opacity="0";
//   }
//
//   setTimeout(function(){
//    if (fonts.browserName == 'MSIE'){
//     document.body.style.filter = 'alpha(opacity=100)';
//    } else {
//     document.body.style.opacity="1";
//    }},fonts.wait);
//  }

