
$(function() {

	if (document.URL.match(/^http/)) {
	
		$.LiVE.loading = {
			activate: true,
			set: function() {
				$(document).ready(function() {
					var overlay = $("<div/>").attr({
							id: "loadingOverlay"
						}).css({
							position: "fixed",
							top: 0,
							left: 0,
							width: "100%",
							height: "100%",
							background: "#000",
							opacity: "0.8",
							textAlign: "center",
							zIndex: 1111
						}).appendTo("body"),
						loading = $("<img/>").attr({
							src: "core/loading/default/loading.gif"
						}).css({
							paddingTop: $.LiVE.winHeight()/3
						}).appendTo(overlay);
				});
				
				$(window).load(function() {
					$("#loadingOverlay").fadeOut("slow");
				});
			}
		};
	}
	
});