// Closes all the tipping panels when the DOM is ready
$(document).ready(function () {	
	// hide the logon panel if there's no 'rightLogonDontHide' div
	if ($("span[id*='rightLogonTitleTextActivate']").parent().parent().parent().find("#rightLogonDontHide").length == 0 ) {
		$("span[id*='rightLogonTitleTextActivate']").parent().parent().parent().find("#hidingTarget").hide();
	}
	
	// attach the event so that users can show / hide the logon panel
	$("span[id*='rightLogonTitleTextActivate']").click(function() {	
		
		$.logonArea = $(this).parent().parent().parent().find("#hidingTarget");
	
		if ($.logonArea.is(":hidden")) {	
			// show
			$.logonArea.fadeTo(1, 0).show(400).fadeTo(400, 1);
		} else {
			// hide
			$.logonArea.fadeTo(400, 0).hide(400);
		}
    });	
});
