﻿// Presumes import.css is the first <link> in the page

var rootpath = document.getElementsByTagName('link')[0].getAttribute('href').replace(/css\/global\.css/i,'');

var frutigerBold = {
  src: rootpath + 'flash/frutiger-bold.swf'
};
var frutiger = {
  src: rootpath + 'flash/frutiger.swf'
};

sIFR.prefetch(frutigerBold,frutiger);

// Disable sifr in webkit versions less than rev. 522
sIFR.ua.supported = sIFR.ua.supported && (!sIFR.ua.webkit || sIFR.ua.webkitVersion >= 522);

sIFR.activate();

sIFR.replace(frutigerBold, {
  selector: 'h1.pagetitle'
  ,css: [
  '.sIFR-root {color: #00234C; background-color: #FFFFFF;}'
  ]
  ,wmode: 'transparent'
});


sIFR.replace(frutiger, {
  selector: '.con-bulletin h2'
  ,css: [
  '.sIFR-root {background-color: #eeece0; color: #564a25}'
      ,'a { text-decoration: none }'
      ,'a:link { color: #0044aa }'
      ,'a:hover { color: #0011dd }'
  ]
  ,wmode: 'transparent'
});

sIFR.replace(frutiger, {
  selector: '.con-blurb h2'
  ,css: [
  '.sIFR-root {background-color: #eeece0; color: #564a25; leading: 4;}'
  ]
  ,wmode: 'transparent'
});


sIFR.replace(frutiger, {
  selector: '.con-panels h2'
  ,css: [
  '.sIFR-root {color: #564a25; background-color: #ffffff;}'
  ]
  ,wmode: 'transparent'
});

sIFR.replace(frutiger, {
  selector: '.mod-quicklinks h2'
  ,css: [
  '.sIFR-root {color: #ffffff; background-color: #0E244D; leading: 20px;}'
  ]
  ,wmode: 'transparent'
});

sIFR.replace(frutiger, {
  selector: '.mod-quicklinks li'
  ,css: [
  '.sIFR-root {color: #21478d;}'
      ,'a { text-decoration: none }'
      ,'a:link { color: #21478d }'
      ,'a:hover { color: #0099ff }'
  ]
  ,wmode: 'transparent'
});
