var speed = 250;
var between = 250;
var ajax_content
	$(document).ready(function(){// When the DOM loads
		//$('.content').hide().slideDown(speed);
     		$('#menu a').click(function(a) { //when menu link is clicked
			var ajax_page = $(this).attr("title"); //get the title attribute to pass to content.php
			a.preventDefault();//prevent default behavior of a link
			$(".content").slideUp(speed,function () {
				$.ajax({
					method: "get",url: "content.php",data: "p="+ajax_page, //for example content.php?p=Home
					success: function(html){ //store whats returned by content.php in html
						$(".content").html(html).slideDown(speed);
					}//sucess
				}); // $.ajax
			});//slide up callback
	         }); // click

	});//document ready
function addBlurb(blurbDiv){
	
	function updateBlurb(){
		$("#"+blurbDiv).fadeOut(speed,function () {
			$.ajax({
				method: "get",url: "blurbs.php", data: "a=1", //pass a=1 to blurbs.php to tell it we are accessing it asyncronously
				success: function(html){ //store whats returned by blurbs.php in html
					$("#"+blurbDiv).html(html).fadeIn(speed);
				}//sucess
			}); // $.ajax
		});//slide up callback
	}//newBlurb
	setInterval(updateBlurb,30 *1000);
}