function BlogLoad() {	
}

BlogLoad.backEndScript = "index.php";

BlogLoad.initiate = function(){
	$.get(BlogLoad.backEndScript,  { v: "blog" }, BlogLoad.loadData);
};
//get load handler
BlogLoad.loadData = function(response){
	var returnedData = eval(response);
	counter = 0;
	for(i in returnedData)
	{
		if(counter > 1) break; //no more than 2 links
		counter++;
		//thehtml = "DATE: "+ returnedData[i]['date'] +"<br>" + returnedData[i]['title'];
		thehtml = "" + returnedData[i]['title'] + "" + "<br>" + returnedData[i]['description'];
		$("p.recent_post").eq(i).html(thehtml);
	}
	//remove excess
	if(counter == 2)
	{
		$("p.recent_post").eq(counter).remove();
	}	
};
