anchor.diff:          var datequery;
           switch ($.deparam.fragment().period) {
               case 'day':
  +                $('#day').button('toggle');
                   var today = new Date();
                   datequery = "&startDate=" + today.getFullYear() + "-" + ("0" + (today.getMonth() + 1)).slice(-2) + "-"
                           + ("0" + today.getDate()).slice(-2);
                   break;
               case 'week':
  +                $('#week').button('toggle');
                   var thisweek = new Date();
                   thisweek.setDate(thisweek.getDate() - 7);
                   datequery = "&startDate=" + thisweek.getFullYear() + "-" + ("0" + (thisweek.getMonth() + 1)).slice(-2)
  
positive.code:         var items = [];
          $.each(state, function(id, content) {
              var allStatesLink = '<a href="#" class="btn" onclick="$.bbq.pushState(\'#mode=details&file=' + content
                      .entity.name + '\', 0); return false">Show all states</a>';
              var stopLink = '<a href="#" class="btn" onclick="stop(\'' + content.entity.name
                      + '\'); return false">Stop</a>';
              var restartLink = '<a href="#" class="btn" onclick="restart(\'' + content.entity.name
                      + '\'); return false">Restart</a>';
  
              var item = "<tr>";
              item += "<td>" + content.entity.name + "</td>";
              item += "<td>" + new Date(content.date) + "</td>";
              item += "<td>" + content.component + ": " + content.stateName + "</td>";
              item += "<td>" + (content.message == null ? '' : content.message) + "</td>";
              item += "<td>";
              if ($.deparam.fragment().mode != 'details') {
                  item += allStatesLink;
              }
  
negative.code:             if ($.deparam.fragment().mode != 'details' && content.stateName != "<%= RESTARTED_STATE %>") {
                  item += restartLink;
              }
              item += "</div></td>";
              item += "</tr>";
              items.push(item);
          });
  