var billing = function() {

	return {
	    init : function() {
	        this.rules();
	        billing.reset(false);
	    },
	    
	    rules : function() {
	        Ext.get('payEgold').on('click', billing.load, this, 'egold');
	        //Ext.get('paySofortuw').on('click', billing.load, this, 'sofortuw');
	        
	        Ext.select('#payMethods img').on('mouseover', function(e){ 
               Ext.get(e.target).setStyle('cursor', 'pointer'); 
	        });
	        
	        Ext.select('#payMethods img').on('mouseout', function(e){ 
               Ext.get(e.target).setStyle('cursor', 'default'); 
	        });
	    },
	    
	    load : function(e, o, param) {
	       billing.reset(true);
	       var summaryElm = Ext.get('summary');
	       
	       obj = Ext.get(e.target);
	       obj.setOpacity(1, true);
	       
	       Ext.UpdateManager.defaults.showLoadIndicator = false;
	       summaryElm.load({
	           url : lang+'/payprocess/methodData/',
               method : 'POST',
               params : {
                   ajax: true, 
                   method: param,
                   choice: Ext.get('inputChoice').dom.value,
                   amount: Ext.get('inputAmount').dom.value
               },
               text : 'Zahlungsdaten werden neu berechnet ...'
            });
            
	    },
	    
        reset : function(anim) {
            Ext.select('#payMethods img').setOpacity(.5, anim);
        }
	}
	
}();