PDF Thumbnails Not Displaying

Omeka Version: 2.3.1
PHP: 5.3.3
Exhibit Builder: 3.2.1

We have an issue with PDF thumbnails that are not displaying correctly. When an item loads, the thumbnail displays for a second then breaks.

We found if we comment out the following javascript within /themes/ourtheme/items/show.php that the PDFs display correctly:

jQuery(document).ready(function ($) {
if (window.location.href.indexOf('/items/show/') >= 0) {
var href = $('.download-file').attr('href');
$('.thumb').attr('src', href);

We would like to know the function of this code and what consequences could come about with commenting this out?

Is that a custom theme? That doesn't look like anything that comes with Omeka or any official theme.

What that script does is, on items/show pages, it tries to replace the thumbnail images with the URL for a direct link to a file. The code looks like it would be totally broken for any pages with more than one file on them, and also for any page that had a thumbnail but no direct ".download-file" link, or whenever the thing being linked to wasn't an image the browser could display.

It looks like it might have been an attempt to work around some thumbnail issue in the past, but it doesn't look like it's something you'd want to keep around.