var app = {
    // Application Constructor
    initialize: function() {
        document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
    },

    // deviceready Event Handler
    //
    // Bind any cordova events here. Common events are:
    // 'pause', 'resume', etc.
    onDeviceReady: function() {
        this.itemInit();
        this.eventInit();
        this.otherInit();
    },
    itemInit:function(){
        cordova.plugins.finPlugin.getAliCancelCost("", function(res){
            $("#uSum").val(res);
        }, function(error){
            alert(error);
        });
    },
    eventInit:function(){
       
    },
    otherInit:function(){

    },
    reqConfirmAliCancel:function()
    {
        var data = {
            "uniqueNumber":$("#pId").val()
        };
        cordova.plugins.finPlugin.reqConfirmAliCancelSelfInput(data, function(res){
            alert(res);
        }, function(error){
            alert(error);
        });
    },
    backbuttonAction:function()
    {
        if(isIphone())
        {
            if(!isPopupClose){
                cordova.plugins.finPlugin.backButton("", null, null);
            }
        }else
        {
            
        }
    },
    hideWarnningPopup:function(){
        $('#layerPopup.Popup12').hide();
    }

};

app.initialize();

