$(document).ready(function () { patt = /http(s)?\:\/\/(www\.)?teamtourist(\-network)?(\.com)?\/(.*)/; arr = location.href.match(patt); if (arr != null) { next = encodeURIComponent("/" + arr[5]); if (next == "") next = ""; } else { next = ""; } $('.islogin #header ul li:last').parent().attr('href', "/Login@Logout/?next=" + next); loc = window.location.pathname + window.location.search + window.location.hash; $('#socials a').each(function () { $(this).attr('href', $(this).attr('href') + "&next=" + escape(loc)); }); }); function confirmEmailAddress(value) { $.post("/Account@Change", { field: 'email', value1: value }, function () { $('#popup, #popup-back').fadeOut('slow', function () { $(this).remove(); }); }); }