Otevírací doba / Open hours
xxx
var data = [
{}, //Sunday - closed
{ open: 8, close: 15 }, //Monday
{ open: 8, close: 15 }, //Tuesday
{ open: 8, close: 15 }, //Wednesday
{ open: 8, close: 15 }, //Thursday
{ open: 8, close: 15 }, //Friday
{} //Saturday - closed
];
var date = new Date();
var dayOfWeek = date.getDay(); // 0 is Sunday, 1 is Monday, etc...
var openingTimes = data[dayOfWeek];
var openClosed = false; // closed by default
// check that there are opening times for today
if (openingTimes.hasOwnProperty('open') && openingTimes.hasOwnProperty('close')){
var hour = date.getHours()
openClosed = openingTimes.open <= hour && hour < openingTimes.close;
}
$(".open_hours_dot").css(openClosed ? 'We are open': 'Sorry, we are closed.');