/* Constants */
var rootDirectory = "";
// Initialize PINT
if(typeof this.PINT=="undefined"){var PINT={};}

PINT_BrowserDetection("browserupgrade.htm");

function init() {
	//var fileName  = PINT_GetCurrentFileName();
	//var directory = PINT_GetCurrentDirectory();
	PINT_sifr();
        PINT.showHide();
};

function cleanup(){};

function PINT_sifr() {
	if(typeof sIFR == "function") {
		sIFR.replaceElement(named({sSelector:".quickfind h2", sFlashSrc: themeRootDirectory + "/flash/helvetica_neue_lt_std.swf", sColor:"#00315c", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".quickfind h3", sFlashSrc: themeRootDirectory + "/flash/helvetica_neue_lt_std.swf", sColor:"#008dc2", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".s_content h1", sFlashSrc: themeRootDirectory + "/flash/helvetica_neue_black_cond.swf", sColor:"#008cc1", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".s_content blockquote, .s_col1 h2", sFlashSrc: themeRootDirectory + "/flash/helvetica_neue_lt_std_cn.swf", sColor:"#008cc1", sWmode:"transparent"}));
                sIFR.replaceElement(named({sSelector:"h2, .productcat li", sFlashSrc: themeRootDirectory + "/flash/helvetica_neue_lt_std_cn.swf", sColor:"#008cc1", sWmode:"transparent"}));
	}
};

// Show/Hide Toggle Box ('Hide Filters' on Hotel pages)
PINT.showHide = function() {
    if ($('.toggle').length) {
        $('.toggle-box').addClass('toggle-box-js');
        $('.toggle').click(function(){
            if ($('.toggle-box').is('.open')) {
                $('.toggle').toggleClass('minus');
                $('.toggle-box').toggleClass('open');
            } else {
                $('.toggle').toggleClass('minus');
                $('.toggle-box').toggleClass('open');
            }
        });
    }
}; 

window.onload = init;
window.onunload = cleanup;