$(document).ready(function(){
	loadMenu();
	fillQuote();
}); //close $.ajax(

function loadMenu(){
	$('#menu').load("menu.html");
}

function fillQuote(){
			$.getJSON("./xml/news/quotes.js", function(json) {
			/*$.each(json.quotes, function(i, quotes){
				alert(quotes.q);
			});*/
			
			var rand = Math.floor(Math.random()*3+1);		
			$(json.quotes).each(function(i, quotes){
				if (quotes.id == rand) {
					var str = quotes.q + "<p style=\"float: right; font-style: italic;\">" + quotes.author +"</p>";
					$('#header span').html(str);
				}
			});
			
     });
}
