var isUserLoggedIn = false; if (!isUserLoggedIn) { $().ready(function() {$("body").html(""); }); location.href = "/Account/LogOn/?ReturnUrl=" + encodeURI(window.location.pathname); } else { $().ready(function() { $("body").css("opacity",100).show(); }); }