$(document).ready(function()
{
	$("#divHeader").load("header.html");
	
	$("#divFooter").load("footer.html");

	$("#divRandomImage").html(getImage());
	

});



var theImages = new Array()

theImages[0] = 'images/random_photos/001.jpg'
theImages[1] = 'images/random_photos/002.jpg'
theImages[2] = 'images/random_photos/003.jpg'
theImages[3] = 'images/random_photos/004.jpg'
theImages[4] = 'images/random_photos/005.jpg'
theImages[5] = 'images/random_photos/006.jpg'
theImages[6] = 'images/random_photos/007.jpg'
theImages[7] = 'images/random_photos/008.jpg'
theImages[8] = 'images/random_photos/009.jpg'
theImages[9] = 'images/random_photos/010.jpg'
theImages[10] = 'images/random_photos/011.jpg'
theImages[11] = 'images/random_photos/012.jpg'
theImages[12] = 'images/random_photos/013.jpg'
theImages[13] = 'images/random_photos/014.jpg'

var j = 0
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));

function getImage()
{
	return "<img src='" + theImages[whichImage] + "'/>";
}





$(".rollover").live("mouseover", function(){
 		var currentImg = $(this).attr('src');
		$(this).attr('src', $(this).attr('hover'));
		$(this).attr('hover', currentImg);
});

$(".rollover").live("mouseout", function() {
		var currentImg = $(this).attr('src');
		$(this).attr('src', $(this).attr('hover'));
		$(this).attr('hover', currentImg);
});

