SW.domWidget.add({
    id:"sIFRManager",
    /* every param in config is required */
    selectors: [ /* these params are set from CMS content */ ],
    initialize:function(config) {
        this.selectors.push(config);
    },
    load:function() {
        // do load stuff, find elements and setup
        var locale = SW.tools.Cookie.get("LOCALECOOKIE");
        if (typeof sIFR == "function") {
            if (locale == "ja_JP" || locale == "zh_CN") {
                // this is a hack to remove main sifr class - due to sIFR.js containing sIFR.setup()
                yuiDom.getElementsByClassName("sIFR-hasFlash").forEach(function(el) {
                    yuiDom.removeClass(el, "sIFR-hasFlash");
                });
            } else {
                this.isSupported = true;
                //      sIFR.debug();
                //            sIFR.setup();// DL: removed this call, as I do not think it is needed
                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) {
            self.selectors.forEach(function(config) {
                sIFR.replaceElement(named(config));
            });
        }
    }
});

SW.domWidget.sIFRManager.setEnabled(true);