Script causing 508 issues

Script causing 508 issues

This script wraps each image within a WordPress gallery [gallery] in its own link.

I am having 508 issues (Resource limit is reached) on my site and I suspect the script is to blame.

Can anyone suggest a better way to express it:

jQuery(document).ready(function() {
 jQuery('img[alt="starting-out"]').wrap('<a href="http://www.hpartners.webignite.com.au/dummy-image-attachment-page/"></a>');
jQuery('img[alt="professionals"]').wrap('<a href="http://www.hpartners.webignite.com.au/dummy-image-attachment-page/"></a>');
jQuery('img[alt="families"]').wrap('<a href="http://www.hpartners.webignite.com.au/dummy-image-attachment-page/"></a>');
jQuery('img[alt="thinking-of-retirement"]').wrap('<a href="http://www.hpartners.webignite.com.au/dummy-image-attachment-page/"></a>');
jQuery('img[alt="retirees"]').wrap('<a href="http://www.hpartners.webignite.com.au/dummy-image-attachment-page/"></a>');
});

Thanks