

//- Custom Scripts -//

GoldInvestments = {

    storageWarnLb: new Lightbox({
        id:'sw-lightbox',
        resizeToContent: true,
        contentEl: 'storage-warn',
        maskColour: '#ffffff',
        maskOpacity: 0.3
    }),

    checkoutForm: null,

    deliverySelect: function(obj) {

        var val = obj.options[obj.selectedIndex].value;

        this.deliverySelectBox = obj;
        this.checkoutForm = obj.form;

        if(val == 'store') {
            this.storageWarnLb.show();
        }
        else {
            this.checkoutForm.submit();
        }
    },

    agreeToStorage: function() {
//        Lightbox.close();
        this.checkoutForm.submit();
    },
    cancelToStorage: function() {
//        Lightbox.close();
        this.deliverySelectBox.selectedIndex = 0;
        this.checkoutForm.submit();
    }

}