function updateLoginClickEvents(selector) {
	if (typeof selector == 'undefined') selector = '';
	else selector = selector + ' ';

	jQuery(selector + '.openLoginBox').loginLightWindow({ 
		loginSuccessCallback: function(data) {
			/* 	
				The getScript call is necessary because it loads up the user's browser with 
				the tp_SSID cookie from ThePort. This cookie gets used to determine the 
				header presentation, and also to post / view comments.
			*/
			jQuery.getScript('http://my.madison.com/apis/scripts/remoteViewer.ashx?tp_rv_type=mostactivetags', function() { 
				window.location.href = window.location.href;
			});
		}
	});
}

jQuery(document).ready(function() {
	updateLoginClickEvents();
});