function popup() {
	$("#popup").modal({
		onOpen: function (dialog) {
			dialog.overlay.fadeIn(250, function () {
				dialog.data.show();
				dialog.container.fadeIn(250);
			});
		},
		onClose: function (dialog) {
			dialog.data.fadeOut(200, function () {
				dialog.container.hide();
				dialog.overlay.fadeOut(75, function () {
					$.modal.close();
				});
			});
		},
		containerCss: {
			height: 675,
			width: 630
		},
		minHeight: 675,
		minWidth: 630
		
	});
}

function closePopup() {
	$.modal.close();
}

// Popup window code
function htmlPopup(url) {
 popupWindow = window.open(url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}



var myimages = new Array();
function preloading(){
  for (x=0; x<preloading.arguments.length; x++){
    myimages[x] = new Image();
    myimages[x].src = preloading.arguments[x]; 
  }
}
preloading("images/learn-btn-hi.png", "images/updates-btn-hi.png");


function swapImg(id) {
	$("#footlink"+id+" img").attr("src", "images/footer-link"+id+"-hi.png");
}

function reswap(id) {
	$("#footlink"+id+" img").attr("src", "images/footer-link"+id+".png");
}