var bIconsVisible = false; function showHidden() { $('#account_list tr:not(.primary)').show(); $('#show_hidden').hide(); return; } function showOrHideIcons(e) { if (!bIconsVisible && e.ctrlKey && e.type == 'keydown') { $('.icons img').animate({opacity: 1}, 'slow'); bIconsVisible = true; } else if (bIconsVisible && e.type == 'keyup') { $('.icons img').stop().animate({opacity: 0}, 'slow'); bIconsVisible = false; } } $(document).ready(function() { if ( $('#account_list tbody tr:not(.primary)').length > 0 ) { $('#account_list tbody tr:not(.primary)').hide(); } else { $('#show_hidden').hide(); } $(window).keydown(showOrHideIcons); $(window).keyup(showOrHideIcons); if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { $('a').each(function() { var url = $(this).attr('href'); url = url.replace(/\baccount\.php/, 'm.account.php'); $(this).attr('href', url); }); } $('.true_balance').each(function() { var that = $(this); that.prev('.balance').mouseover(function() { $(this).stop().fadeOut('fast', function() { that.stop().fadeIn('fast'); }); }); that.mouseout(function() { that.stop().fadeOut('fast', function() { that.prev('.balance').stop().fadeIn('fast'); }); }); }); });