if (typeof (Tody) === "undefined") var Tody = {};

(function($) {
  
  Tody.Menu = new function(){

    var self = this;
    
    self.init = function(){
   
      var months = Tody.Common.getUrlParameter("months");
   
      if(months === ""){
        $("ul#leftModules:eq(1)").hide();
        $("ul#leftModules:eq(2)").show();
        $("ul#leftModules:eq(0) input:checkbox").removeAttr('checked');
      }else{
        $("ul#leftModules:eq(2)").hide();
        $("ul#leftModules:eq(1)").show();
        $("ul#leftModules:eq(0) input:checkbox").attr('checked','checked');
      }
      
    };
    
    self.lastMonthsModules = function(chk){
      
      if(chk.checked)
          window.location = Tody.Common.createRedirectUrlMvc("months", 3, ['m', 'sm']);
      else
          window.location = Tody.Common.createRedirectUrlMvc("", "", ["months"]);
    };

  };
  
})(jQuery);


jQuery(document).ready(function(){
    Tody.Menu.init();
});

