var Router_t = Backbone.Router.extend ({
  default_route: "editorial",
  current_route: undefined,

  routes: {
    "/:m/*_": "load_content",
    "/:m":    "load_content",
    ":m":     "load_content"
  },

  load_content: function (pvn) {
    var that = this;

    setTimeout (function () {
      that._load_content (pvn);
    }, 100);
  },

  _load_content: function (page_view_name) {
    if (page_view_name.length == 0) {
      ;                          page_view_name = this.default_route;
      return this.navigate ("#/"+page_view_name, true);
    }

    if ($('#pv-'+page_view_name).length == 0)
      page_view_name = "404";


    if (this.current_route !== undefined) {
      $('#pv-'+this.current_route).hide ();
    }

    $('a.active').removeClass ('active');

    if (el = $('#header').find ('[href="#/'+page_view_name+'"]')) {
      $(el).addClass ('active');
    }

    $('#pv-'+(this.current_route = page_view_name)).show ();
  }
});


