
window.addEvent('domready', function() {
	
	//load facebook box content
	var FBurl = "ajax/facebookBoxContent";
	new Request.HTML( {
		url : FBurl,
		method : 'get',
		onSuccess : function(html) {
			//Clear the text currently inside the results div.
			$('facebookBoxContent').set('text', '');
			//Inject the new DOM elements into the results div.
			$('facebookBoxContent').adopt(html);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure : function() {
			$('facebookBoxContent').set('text', 'The request failed.');
		}
	}).send();

	//load twitter box content
	var TWurl = "ajax/twitterBoxContent";
	new Request.HTML( {
		url : TWurl,
		method : 'get',
		onSuccess : function(html) {
			//Clear the text currently inside the results div.
			$('twitterBoxContent').set('text', '');
			//Inject the new DOM elements into the results div.
			$('twitterBoxContent').adopt(html);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure : function() {
			$('twitterBoxContent').set('text', 'The request failed.');
		}
	}).send();
	
	
});



	
