$('.ssEntryDetailLink:visible').click(); $('.ssEntrantImage').css({ maxWidth: '' + $('.ssEntrantDetails').first().width() / 2 + 'px' }); });