$(document).ready(function(){	

 	var d = new Date();
	var theDay = d.getDay();
	var todaymsg = "";
	switch (theDay)
	{
		case 1:
		  todaymsg = "<p>We're open from <strong>6am to 10pm</strong>.</p><ul><li>Sub special: <a href=\"#specials\" class=\"scroll\"><strong>The Louie</strong></a></li><li>Turkey special: <a href=\"#specials\" class=\"scroll\"><strong>The Wake Up</a></strong></li></ul>";
		  break;
		case 2:
		  todaymsg = "<p>We're open from <strong>6am to 10pm</strong>.</p><ul><li>Sub special: <a href=\"#specials\" class=\"scroll\"><strong>The Joey</strong></a></li><li>Turkey special: <a href=\"#specials\" class=\"scroll\"><strong>The Ragin Cajun</a></strong></li></ul>";
		  break;
		case 3:
		  todaymsg = "<p>We're open from <strong>6am to 10pm</strong>.</p><ul><li>Sub special: <a href=\"#specials\" class=\"scroll\"><strong>Sausage &amp; Peppers</strong></a></li><li>Turkey special: <a href=\"#specials\" class=\"scroll\"><strong>The Killer Keller</a></strong></li></ul>";
		  break;
		case 4:
		  todaymsg = "<p>We're open from <strong>6am to 10pm</strong>.</p><ul><li>Sub special: <a href=\"#specials\" class=\"scroll\"><strong>The O'Shea</strong></a></li><li>Turkey special: <a href=\"#specials\" class=\"scroll\"><strong>The Mardi Gras</a></strong></li></ul>";
		  break;
		case 5:
		  todaymsg = "<p>We're open from <strong>6am to 10pm</strong>.</p><ul><li>Sub special: <a href=\"#specials\" class=\"scroll\"><strong>The Troylet</strong></a></li><li>Turkey special: <a href=\"#specials\" class=\"scroll\"><strong>The Sunrise</a></strong></li></ul>";
		  break;
		case 6:
		  todaymsg = "<p>We're open from <strong>8am to 10pm</strong>.</p>";
		  break;
		case 0:
		  todaymsg = "<p>We're open from <strong>9am to 9pm</strong>.</p>";
		  break;  
	}
	
 	$("#hourstoday").html(todaymsg);
  	

	$(".scroll").click(function(event){
		//prevent the default action for the click event
		event.preventDefault();

		//get the full url
		var full_url = this.href;

		//split the url by # and get the anchor target name
		var parts = full_url.split("#");
		var trgt = parts[1];

		//get the top offset of the target anchor
		var target_offset = $("#"+trgt).offset();
		var target_top = target_offset.top;

		//goto that anchor by setting the body scroll top to anchor top
		$('html, body').animate({scrollTop:target_top}, 1000);
	});
});

























