/**
 * 
 */

define(function(require, exports, module) {
    'use strict';
    
    var Backbone = require('backbone');
    
    var Router = Backbone.Router.extend({
        routes: {
            '': 'goHome',
        },
        
        execute: function(callback, args, name) {
            if (! window.isLogged ) {
                this.goLogin();
                return false;
            }
            
            this._isLogin = false;
            if ( callback ) callback.apply(this, args); 
        },
        
        goHome: function() {
            require(['views/layout', 'views/desk'], function(layout, Desk) {
                layout.show(new Desk());
            });
        },
        
        goLogin: function() {
            if ( this._isLogin === true ) {
                return;
            }
            
            this._isLogin = true;
            require(['views/login'], function(Login) {
                (new Login()).render();
            });
        },
    });
    
    module.exports = new Router;
});
@@ -204,16 +204,59 @@
 oHome',%0A
+            'tasks(/:project)': 'goTasks',%0A
         
@@ -1016,24 +1016,364 @@
 %0A        %7D,%0A
+        %0A        goTasks: function(id) %7B%0A            require(%5B%0A                'views/layout', %0A                'views/tasks/tasks',%0A                'views/tasks/my-tasks',%0A            %5D, function(layout, TasksView, MyTasksView) %7B%0A                layout.show((id === null) ? new MyTasksView() : new TasksView());%0A            %7D);%0A        %7D,%0A
     %7D);%0A    

add tasks module views and route