//sIFR font replacements

/*
var gothamLight = { src: '/scripts/sifr436/fonts/gothamLight.swf' };
sIFR.useDomLoaded = false;
sIFR.activate(gothamLight);

//h1
sIFR.replace(gothamLight, {
    selector: 'h1',
    css: '.sIFR-root{ font-size: 26px; color: #58585a; }',
    wmode: 'transparent',
    offsetTop: '0',
    tuneHeight: '0px'
});

//home page slider text
sIFR.replace(gothamLight, {
    selector: '.SlideText .Large',
    css: '.sIFR-root{ font-size: 38px; color: #ffffff; }',
    wmode: 'transparent',
    offsetTop: '0',
    tuneHeight: '0px'
});
sIFR.replace(gothamLight, {
    selector: '.SlideText',
    css: '.sIFR-root{ font-size: 26px; color: #ffffff; }',
    wmode: 'transparent',
    offsetTop: '0',
    tuneHeight: '0px'
});

//home page callouts
sIFR.replace(gothamLight, {
    selector: '#Callouts h3',
    css: '.sIFR-root{ font-size: 22px; color: #58585a; }',
    wmode: 'transparent',
    offsetTop: '0',
    tuneHeight: '0px'
});

//sub page header caption
sIFR.replace(gothamLight, {
    selector: '#TopTitleContainer',
    css: '.sIFR-root{ font-size: 30px; color: #ffffff; }',
    wmode: 'transparent',
    offsetTop: '0',
    tuneHeight: '0px'
});

//Division of Pharmachem
sIFR.replace(gothamLight, {
    selector: '#DivisionOfPharmachem',
    css: '.sIFR-root{ font-size: 11px; color: #000000; }',
    wmode: 'transparent',
    offsetTop: '0',
    tuneHeight: '0px'
});

////h2
//sIFR.replace(gothamLight, {
//    selector: 'h2',
//    css: '.sIFR-root{ font-size: 20px; color: #be0f34; }',
//    wmode: 'transparent',
//    offsetTop: '0',
//    tuneHeight: '0px'
//});

*/

//shadowbox initialization
var pause_anythingslider = null;
function moveCloseLink(){ 
    var cb=document.getElementById('sb-nav-close'); 
    var tb=document.getElementById('sb-title'); 
    if(tb) tb.appendChild(cb);
} 
Shadowbox.init({
    displayNav:     true,
    skipSetup:      true,
    onOpen:         moveCloseLink,
    onClose:        function(){
                        pause_anythingslider = null;
                    },
    onFinish:       function(){
                        $('#sb-nav-close').css('background', 'url(/scripts/shadowbox/skin/classic/icons/close.png) no-repeat');
                    }
});


// JAVASCRIPT FORMATTING
$('document').ready(function(){
    if($('#SecondaryMenu').length){
        if($('#Main').height() > $('#SecondaryMenu').height()){
            $('div#SecondaryMenu').css('height', $('#Main').height() + 'px');
        }
    }
});
