Seymour.register(function(response){
    // bail out if sckey isnt available
    if(document.selfReg && document.selfReg['scKey']) {
        var sckeyField = document.selfReg['scKey'];
    }
    else {
        return;
    }
    
    // normalize state
    var state = response.fields['state']['value'].toUpperCase();
    
    // update sckey based on state
    console.log('Registered Seymour hook for state: ' + state);
    Seymour.$setAttribute(
        sckeyField,
        'value',
        state == 'TX' ? 'electricity'
            : state == 'GA' ? 'gas'
            : 'bundleMyServices'
    );
});
