title: Highlight area element with jquery
body: <p>I am a beginner in javascript.</p>
  
  <p>here is my javascript: Within the map 'demo' the code pushes all area elements into the array elementPositions. When the user mouses over an area element it is pushed into the array hoveredElements. Then for each area element in hoveredElements the overlay id tag shows, and I want the area element (a rectangle) to show as well. I tried '$(this).show()' but this did not work...</p>
  
  <p>Here is a typical area element:</p>
  
  <pre><code>&lt;map name="demo" id="demo"&gt;
  &lt;area shape="rect" coords="400,400,500,499" href="#" id="r6067" alt="r6067"&gt;
  &lt;/map&gt;
  &lt;div class= "cont" style="display:none" id="overlayr6067"&gt; mdtBIL1C09 &lt;/div&gt;
  </code></pre>
  
  <p>I have accepted Nikolay's refactoring of my javascript below, here is my code-in-progress in a jsfiddle: <a href="https://jsfiddle.net/sfs1926/wacd5bv5/1/" rel="nofollow">https://jsfiddle.net/sfs1926/wacd5bv5/1/</a></p>