title: apply javascript to all images with same name
body: <p>The JavaScript below only replaces the src for one image on a page how can i get it to do it for multiple images on the same page</p>
  
  <pre><code>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
  
  loadImage1 = new Image();
  loadImage1.src = "http://4.bp.blogspot.com/-Xzm-yUJ_dz0/Tsj3Q57J2tI/AAAAAAAAAGE/bohLMRj5FCY/s1600/hover.png";
  
  staticImage1 = new Image();
  staticImage1.src = "http://3.bp.blogspot.com/--0FurTdrYzg/Tsj3RPXGz4I/AAAAAAAAAGI/mm_4UvmoD-A/s1600/standard.png";
  
  replaceImage1 = new Image();
  replaceImage1.src = "http://4.bp.blogspot.com/-oacZCbBUhQ0/Tsj3Qkl4IaI/AAAAAAAAAGA/5_z-2VXKCi8/s1600/clicked.png";
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The Image HTML is below if required.I don't mind applying and ID or CLASS to the images either :)</p>
  
  <pre><code>&lt;img onMouseOver="image1.src=loadImage1.src;" onMouseOut="image1.src=staticImage1.src;" onmousedown="image1.src=replaceImage1.src;" onmouseup="image1.src=loadImage1.src;" style=width:480px;height:360px;background-image:url('http://i1.ytimg.com/vi/XtNcZnfkL2A/hqdefault.jpg');" name="image1" src="http://3.bp.blogspot.com/--0FurTdrYzg/Tsj3RPXGz4I/AAAAAAAAAGI/mm_4UvmoD-A/s1600/standard.png"&gt;
  </code></pre>
  
  <p><strong>AND/OR is there a cleaner jquery for this I would much rather use jQuery, thankyou!</strong></p>