var parseSelector = $;
var avenir_book_shadow = { src: '/_media/js/avenir_book.swf', wmode: 'transparent', filters: {
        DropShadow: {
            knockout: false,
            distance: 1,
            color: '#000000',
            strength: 0.6,
            blurX: 0,
            blurY: 0
        }
    } };
var avenir_book = { src: '/_media/js/avenir_book.swf', wmode: 'transparent' }
var avenir_heavy = { src: '/_media/js/avenir_heavy.swf', wmode: 'transparent' }

sIFR.activate(avenir_book_shadow, avenir_book, avenir_heavy);
// sIFR.activate(avenir_book);

function do_tab() {
  sIFR.replace(avenir_book, {
    selector: '#main-content h2, #home-title',
    css: [ 
      '.sIFR-root { color: #000000; font-size: 24px; cursor: arrow; }',
      '.sIFR-root a { color: #000000; text-decoration: none; cursor: arrow; }',
      '.sIFR-root a:hover { color: #000000; text-decoration: none; cursor: arrow; }'
    ]
  });

  sIFR.replace(avenir_book, {
    selector: '.form h4, #feature-info, #community-info, #newsletter',
    css: '.sIFR-root { color: #ffffff; font-size: 21px; }'
  });
}
do_tab();

sIFR.replace(avenir_book_shadow, {
  selector: 'h1',
  css: '.sIFR-root { color: #ffffff; font-size: 34px; }'
});


sIFR.replace(avenir_book_shadow, {
  selector: '#web-church strong',
  css: [
    '.sIFR-root { color: #ffffff; font-size: 38px; cursor: arrow; }',
    '.sIFR-root a { color: #ffffff; text-decoration: none; cursor: arrow; }',
    '.sIFR-root a:hover { color: #ffffff; text-decoration: none; cursor: arrow; }'
  ],
  'letter-spacing': -50
})

sIFR.replace(avenir_book_shadow, {
  selector: '#web-church span',
  css: [
    '.sIFR-root { color: #ffffff; font-size: 19px; cursor: arrow; }',
    '.sIFR-root a { color: #ffffff; text-decoration: none; cursor: arrow; }',
    '.sIFR-root a:hover { color: #ffffff; text-decoration: none; cursor: arrow; }'
  ]
})

function do_h3s() {
  sIFR.replace(avenir_heavy, {
    selector: 'h3:not(#assistant .feature-list h3, #web-church)',
    css: [
      '.sIFR-root { color: #333333; font-size: 15px; }',
      '.sIFR-root a { color: #F44015; text-decoration: none; }',
      '.sIFR-root a:hover { color: #ababab; text-decoration: none; }'
    ],
    forceWidth: true,
    fitExactly: true
  });
}
do_h3s();
function do_sifr_lbox() {
  sIFR.replace(avenir_book, {
    selector: '#lbox h4',
    css: '.sIFR-root { color: #ffffff; font-size: 21px; }'
  });

  sIFR.replace(avenir_heavy, {
    selector: '#lbox h5',
    css: '.sIFR-root { color: #505050; font-size: 18px; }'
  });
}