// ===========================================================================
// Cufon Replacements for Peppers
// ===========================================================================
// A bit of redirection to handle font replacement in the Peppers header, with
// respect to the StellaPhone control. Cufon won't replace text if it is hidden
// at the time of replacement, which the fields in this control are by default.
// This function delays the replacement until such time as they are made visible,
// and is called from the header (at the bottom of this script), and from the
// callback of the webservice call in PhoneNumbers.js. The flag is used to force
// a Cufon update, which we don't want to do in the former case (since it occurs
// at the end of the page), but do in the latter.
function cufon_init_phonenumbers(doCufonNow) {
    if (typeof jQuery != 'undefined') {
        if (jQuery('div.internationaltext') && jQuery('div.internationaltext').css && jQuery('div.internationaltext').css('visibility') && (jQuery('div.internationaltext').css('visibility') != 'hidden')) {
            Cufon.replace('div.internationaltext', { fontFamily: 'Helvetica LT Std Cond Bold', fontStretch: '93%' });
        }
        if (jQuery('div.reservationstext') && jQuery('div.reservationstext').css && jQuery('div.reservationstext').css('visibility') && (jQuery('div.reservationstext').css('visibility') != 'hidden')) {
            Cufon.replace('div.reservationstext', { fontFamily: 'Helvetica LT Std Cond Bold', fontStretch: '93%' });
        }
    }
    if (doCufonNow) {
        Cufon.now();
    }
}

//Work around to get cufon working on IE9
var browserName=navigator.appName; 
var browserVer=parseInt(navigator.appVersion); 
if (browserName=="Microsoft Internet Explorer" && browserVer >=5)
{
	// Cufon.set('engine', 'canvas');
}
//End work around to get cufon working on IE9



Cufon.replace('h1, h2', { fontFamily: 'ZapfHumnst Dm BT' });
Cufon.replace('h3, h4', { fontFamily: 'ZapfHumnst Dm BT' });
Cufon.replace('.footerheader', { fontFamily: 'Helvetica LT Std Cond Bold' });
Cufon.replace('.mc-link', { fontFamily: 'Helvetica LT Std Cond Bold' });
Cufon.replace('.mc-link-left', { fontFamily: 'Helvetica LT Std Cond Bold' });
Cufon.replace('#copyright', { fontFamily: 'Helvetica LT Std Cond Bold', fontStretch: '93%' });
Cufon.replace('.rmLink', { fontFamily: 'ZapfHumnst Dm BT', hover: 'false' });
cufon_init_phonenumbers(false);
