; $(function () { $('.gs_link').click(function () { var letter = $(this).attr('id'); $('.gs_link').removeClass('gs_active'); $(this).addClass('gs_active'); $(this).closest("ul").siblings(".gs_link").css("font-weight", "normal"); if (letter == "all") { $('.gs_content').show(); $('.backtotop').show(); } else { $('.gs_content').hide(); // $('.backtotop').hide(); $('#' + letter + '_block').show(); } }); $('.see_also').click(function () { var allBlock = true; var blocks = $('.gs_content'); for (var i = 0; i < blocks.length; i++) { if ($(blocks[i]).css('display') == "none") { allBlock = false; } } if (!allBlock) { var firstLetter = $(this).text().charAt(0).toLowerCase(); $('.gs_content').hide(); $('#gs_' + firstLetter + '_block').show(); $('.gs_link').removeClass('gs_active'); $('#gs_' + firstLetter).addClass('gs_active'); } }); $(".PortalHelp a[href^='#']").click(function () { var block = $(this).attr('href').substring(1); $('.gs_link').removeClass('gs_active'); $("#" + block.split("_")[0]).addClass('gs_active'); $('.gs_content').hide(); // $('.backtotop').hide(); $('#' + block).show(); }); })