//= require store/spree_frontend
$(function() {
  var timezone = "US/Pacific";
  $.getJSON("http://json-time.appspot.com/time.json?tz="+timezone+"&callback=?",
    function(data){
      var wday = data.datetime.substring(0,3).toLowerCase();
      $("div#store-hours ul li."+wday).addClass("today");
    })
});

//= require store/spree_frontend
if (!window.SpreeStoreHours) {
    window.SpreeStoreHours = {};

    SpreeStoreHours.wday = function() {
        return ["sun","mon","tue","wed","thu","fri","sat"][(new Date()).getDay()];
    }
}

$(function() {
    $("div#store-hours ul li." + SpreeStoreHours.wday()).addClass("today");
});

Fix javascript day calculation to highlight current day
Fix javascript day calculation to highlight current day

  * Remove jsonp call to appspot.com becuase of "Over Quota" error.

  * This new solution does not depend on an external service and just
    uses local browser time.
