function preloadImages(){ 
	var args = preloadImages.arguments;
	document.imageArray = new Array(args.length);
	
	for(var i=0; i<args.length; i++){
		document.imageArray[i] = new Image;
		document.imageArray[i].src = args[i];
	}	
}


var currentbox = 1;
var textstrings = new Array();
textstrings[0] = "<p>Are threatened by repossession or in financial difficulties? Do you need to move quickly? Have your circumstances changed? We purchase property in ANY condition. There are no hidden charges and no commission and the process is completely confidential.</p>";
textstrings[1] = "<p>This means: no estate agents, no for sale boards and no wasted viewings. We will quickly and efficiently help you through the sale process. We will match you with a professional homebuyer through our network of investors.</p>";
textstrings[2] = "<p>You do not need a HIP to sell to us. We will buy your house quickly for cash so you can continue living in the property or move on. What we offer you is what you receive as we pay all of the costs of the sale.</p>";
textstrings[3] = "<p>After sales solutions we can offer - if you want to continue living in your home you can rent it back for as long as you wish. You can also have a buy-back option to re-purchase the property in the future at a price agreed upon now.</p>";

function swapbottom(num){
	if(currentbox != num){
		currentbox = num;
		for(i=1;i<=4;i++){
			boxupperdiv = '#box'+i+'_upper';
			boxdiv = '#box'+i;
			if(i==num){
				height = "down";
			}else{
				height = "up";
			}
			$(boxupperdiv).css("background-image","url(images/boxes/box"+i+"_upper_"+height+".jpg)");
			$(boxdiv).css("background-image","url(images/boxes/box"+i+"_lower_"+height+".jpg)");
		}
		$('#box_lower').html(textstrings[num-1]);
		$('#box_lower').css("background-image","url(images/boxes/box"+num+"_bottom_down.jpg)");
	}
}
