//+-----------------------------------------------------------+
//| name : Loading Screen |
//| author : runzheimer |
//| description: Adds a loading screen when a link is clicked |
//+-----------------------------------------------------------+
jQuery.fn.loadingScreen = function(){
var o = $(this[0]);
o.click(function(event){
event.preventDefault();
$(document.documentElement).append('
');
$("#loadingScreen").width($(document).width());
$("#loadingScreen").height($(document).height());
$("#loadingScreen").css("position","absolute");
$("#loadingScreen").css("top","0");
$("#loadingScreen").css("left","0");
$("#loadingScreenBox").css("left",($(document).width()/2)-($("#loadingScreenBox").width()/2)+"px");
$("#loadingScreenBox").css("top",($(window).height()/2)-($("#loadingScreenBox").height()/2)+"px");
setTimeout(window.location.replace($(this).attr("href")),1000);
});
};