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(){

    },
    eventInit:function(){
        $("#goMain").off("click").on("click", function(){
            app.onClickGotoMain();
        });
        $("#goScheme").off("click").on("click", function(){
            app.onClickGotoUrl();
        });
    },
    otherInit:function(){

    },
    onClickGotoMain:function(){
        cordova.plugins.finPlugin.setUseType("통합형", function(res){
            cordova.plugins.finPlugin.moveStack(MAIN.DATA,null, null);
            //window.location="../html/main.html"
        }, function(error){
            //에러 팝업
        });
    },
    onClickGotoUrl:function(){
        cordova.plugins.finPlugin.setUseType("연동형", function(res){
            cordova.plugins.finPlugin.moveStack(SET01.DATA,null, null);
            //window.location="../html/01_01.html"
        }, function(error){
            //에러 팝업
        });
    }
};

app.initialize();