// Set the floor and ceiling the get a random integer from within those parameters
var numLow = 1;
var numHigh = 9;
var adjustedHigh = (parseFloat(numHigh) - parseFloat(numLow)) + 1;
var numRand = Math.floor(Math.random()*adjustedHigh) + parseFloat(numLow);

$(document).ready(function(){
	$.ajax({
		type: "GET",
		url: "banners.xml",
		dataType: "xml",
		success: function(xml) {
			$(xml).find('site').each(function(){
				var id = $(this).attr('id');
				var title = $(this).find('title').text();
				var url = $(this).find('url').text();
                                var sani_url = url.replace('&amp;','&');
				var img = $(this).find('img').text();

				if(id == numRand){
					$("#inhouse-banner").html("<a href='"+sani_url+"'><img border='0' src='"+img+"' /></a>");
				}

			});
		}
	});
});

// Set the floor and ceiling the get a random integer from within those parameters
var numLow2 = 1;
var numHigh2 = 9;
var adjustedHigh2 = (parseFloat(numHigh2) - parseFloat(numLow2)) + 1;
var numRand2 = Math.floor(Math.random()*adjustedHigh2) + parseFloat(numLow2);

$(document).ready(function(){
	$.ajax({
		type: "GET",
		url: "banners-footer.xml",
		dataType: "xml",
		success: function(xml) {
			$(xml).find('site').each(function(){
				var id2 = $(this).attr('id');
				var title2 = $(this).find('title').text();
				var url2 = $(this).find('url').text();
                                var sani_url2 = url2.replace('&amp;','&');
				var img2 = $(this).find('img').text();

				if(id2 == numRand2){
					$("#inhouse-footerbanner").html("<a href='"+sani_url2+"'><img border='0' src='"+img2+"' /></a>");
				}

			});
		}
	});
});

