Works:
<div id="mapOhio"> <img id="myImage" src="<?php bloginfo('template_url'); ?>/images/ohioMap.png" width="253" height="285" alt="Image of a map of Ohio." usemap="#image_map" border="0"/> </div>
<!--[if lte IE 8]>
<script>
$("#myImage").attr("src", "/wp-content/themes/TRTheme/images/Chester-4317.jpg");
</script>
<![endif]-->
Doesn't work:
<div id="mapOhio"> <img id="myImage" src="<?php bloginfo('template_url'); ?>/images/ohioMap.png" width="253" height="285" alt="Image of a map of Ohio." usemap="#image_map" border="0"/> </div>
<!--[if lte IE 8]>
<script>
$(document).ready(function(){
$("#myImage").attr("src", "/wp-content/themes/TRTheme/images/Chester-4317.jpg");
}
</script>
<![endif]-->