// buy button options here.
var RADIO_OFFERS = {
    'shirt' : {aId:1334,bId:56968,cId:10031102,persist:true},
    'digital+shirt' : {aId:1334,bId:56990,cId:10031110,persist:true},
    'cd+shirt' : {aId:1334,bId:56998,cId:10031112,persist:true},
    'ttsp+shirt' : {aId:1334,bId:56997,cId:10031111,persist:true},
	'mother+shirt' : {aId:1334,bId:57000,cId:10031114,persist:true},
};
// gets value of radio object passed by radioSelect
function radioValue (radioGroup) {
    if (radioGroup)
    {
        for (var i = 0; i < radioGroup.length; i++)
        {
            if (radioGroup[i].checked)
            {
                var retVal = radioGroup[i].value;
                radioGroup = null;
                return retVal;
            }
        }
    }
    return null;
};
// needs the actual dom reference of the radio object in the form object.
function radioSelect (formRef) {
    var radios = formRef;
    var value = radioValue(radios);
    if (value === null) {
        alert("Please select a package.");
    }
    var initHash = RADIO_OFFERS[value];
    if (initHash) {
        TSPurchase.load(initHash);
    }
}