SW.domWidget.add({
    id:"sIFRManager",
    initialize:function(config) {
        // standard function name - manually called - SW.domWidget.WidgetId.initialize(params...);

    },
    load:function() {
        // do load stuff, find elements and setup
        if (typeof sIFR == "function") {
            this.isSupported = true;
            sIFR.setup();
            //sIFR.debug();
            this.setup();
        }
    },
    update:function(root) {
        // do update stuff, find elements and setup. root element is passed in.
        if (self.isSupported) {

        }
    },
    setup: function(root) {
        var self = this;
        if (self.isSupported) {
            // with out this sIFR will not work if swfObject existed on the page
            //sIFR.useDomContentLoaded = false;

            sIFR.replaceElement(named({
                sSelector:"#primaryNavigation ul li.selected",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sLinkColor:"#EE4D9B",
                sHoverColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent"
            }))
            sIFR.replaceElement(named({
                sSelector:"#primaryNavigation ul li",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#2c363c",
                sLinkColor:"#2c363c",
                sHoverColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent"
            }))

//            sIFR.replaceElement(named({
//                sSelector:"#rightColumn .secondarySmallHeader",
//                sFlashSrc:"/alofthotels/sIFR/digital.swf",
//                sColor:"#EE4D9B",
//                sCase:"lower",
//                sWmode:"transparent"
//            }))
            sIFR.replaceElement(named({
                sSelector:"#leftColumn .pageHeader, #leftColumn h3.sectionHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=-5"
            }))

            sIFR.replaceElement(named({
                sSelector:"#leftColumn .sectionHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#556067",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=3"
            }))

            sIFR.replaceElement(named({
                sSelector:"#leftColumn #regSelectHead",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent"
            }))

            sIFR.replaceElement(named({
                sSelector:"#contentArea h1#taleoFAQHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#556067",
                sCase:"lower",
                sWmode:"transparent"
            }))

            sIFR.replaceElement(named({
                sSelector:"#consoleHeader h1#askHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#556067",
                sCase:"lower",
                sWmode:"transparent"
            }))

                 sIFR.replaceElement(named({
                sSelector:"#leftColumn  .bookingFlowStepsBanner",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

                sIFR.replaceElement(named({
                sSelector:"#leftColumn  .content #rateListContainer #headContentArea h2",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

               sIFR.replaceElement(named({
                sSelector:"#leftColumn  .content #rateListPage h2",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

             sIFR.replaceElement(named({
                 
                sSelector:".content #searchResultPage #banner h1",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

             sIFR.replaceElement(named({
                sSelector:"#leftColumn  .content #bookingHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))


                sIFR.replaceElement(named({
                sSelector:".popup .spgCategory h1, .popup .spgLimitedParticipation h2",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

                sIFR.replaceElement(named({
                sSelector:".popup #content h2",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
                }))

              sIFR.replaceElement(named({
                sSelector:"#leftColumn .content div #noAvailPageHeader h1",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

                sIFR.replaceElement(named({
                sSelector:"#leftColumn .content #genericHeader h2",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))

                sIFR.replaceElement(named({
                sSelector:"#leftColumn .content #wwrPageContent .worldWideTitle",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent"
            }))
            
                sIFR.replaceElement(named({
                sSelector:"#rightColumn #enrollNowContainer h2",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                XsFlashVars:"offsetTop=-5"
            }))
            sIFR.replaceElement(named({
                sSelector:"#reservationsHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))
            sIFR.replaceElement(named({
                sSelector:"#searchHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#303E47",
                sCase:"lower",
                sWmode:"transparent"
            }))
            sIFR.replaceElement(named({
                sSelector:"#leftColumn h1.en_header",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=-5"
            }))
            sIFR.replaceElement(named({
                sSelector:"#rightColumn div.modifySearchHeader strong",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=0"
            }))
            sIFR.replaceElement(named({
                sSelector:"h1.hotelDirectoryHeader",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=0"
            }))
            sIFR.replaceElement(named({
                sSelector:"#regionGroupHeading h4",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=0"
            }))
            sIFR.replaceElement(named({
                sSelector:"#filterGroupHeading h4",
                sFlashSrc:"/alofthotels/sIFR/digital.swf",
                sColor:"#EE4D9B",
                sCase:"lower",
                sWmode:"transparent",
                sFlashVars:"offsetTop=0"
            }))
        }

    }
});

if (typeof SW.domWidget.sIFRManager!="undefined") SW.domWidget.sIFRManager.setEnabled(true);
if (typeof SW.domWidget.dhtmlSelect!="undefined") SW.domWidget.dhtmlSelect.setEnabled(true);
if (typeof SW.domWidget.bodyClickHandler!="undefined") SW.domWidget.bodyClickHandler.setEnabled(true);
if (typeof SW.domWidget.toolTips!="undefined") SW.domWidget.toolTips.setEnabled(true);
