/**
 * JavaScript Library required for all pages of the public site.
 *
 */

$(document).ready(function()
{
    // apply class name to a tags in menu; for IE fix:
    $('body.ie6 .main-menu li a').each(function(i) {
        $(this).attr('class', $(this).parent().attr('class'));
    });
    
    // top link behavior:
    $('a#top').bind('click', function() {
        window.scrollTo(0,0);
        return false;
    })

});

// SIFR:
var heading = {
  src: '/wp-content/themes/secondcitychurch/heading.swf'
  ,ratios: [7, 1.32, 8, 1.31, 12, 1.27, 20, 1.22, 28, 1.19, 30, 1.17, 36, 1.18, 45, 1.17, 61, 1.16, 62, 1.15, 65, 1.16, 66, 1.15, 67, 1.16, 116, 1.15, 117, 1.14, 123, 1.15, 124, 1.14, 1.15]
};
sIFR.useStyleCheck = true;
sIFR.activate(heading);

sIFR.replace(heading, {
  selector: 'h1, #sermon h2'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { color: #ba1f00; }'
    ,'a { text-decoration: none; }'
    ,'a:link { color: #ba1f00; }'
    ,'a:hover { color: #3f1500; }'
  ],
});

sIFR.replace(heading, {
  selector: 'h2'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { color: #3f1500; }'
    ,'a { text-decoration: none; }'
    ,'a:link { color: #3f1500; }'
    ,'a:hover { color: #ba1f00; }'
  ],
});
