Javascript app object

var app = function(){
 
    function init(){
        $('.file-wrap').each(function(index){
            var $wrap = $(this);
 
            var $link = $wrap.find('.file-link');
            //console.log($link.hasClass('off'));
            if($link.hasClass('off') == true){//no uploaded file
                upload_switch('on', $wrap);
            }else{
                upload_switch('off', $wrap);
            }
        });
 
        $('.bt-delete').on('click', function(e){
            var $this = $(this);
 
            if(confirm('Are you sure?')){
                delete_file($this.data('project-id'), $this.data('index'));
            }
        });
    }
 
    return {
        init: init
    }
}();