title: Linking image to post url
body: <p>I have a custom blogger template which displays image and post title(linked to the post) of posts on home page.
  What i need to do is linking that image to the post url, i have tired link the image but the whole code breaks</p>
  
  <p>Heres the java script code which is in head section</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  var thumbnail_mode = &amp;quot;float&amp;quot; ;
  summary_noimg = 250;
  summary_img = 250;
  &lt;/script&gt;
  &lt;script type='text/javascript'&gt;
  //&lt;![CDATA[
  function removeHtmlTag(strx,chop){
  if(strx.indexOf("&lt;")!=-1)
  {
  var s = strx.split("&lt;");
  for(var i=0;i&lt;s.length;i++){
  if(s[i].indexOf("&gt;")!=-1){
  s[i] = s[i].substring(s[i].indexOf("&gt;")+1,s[i].length);
  }
  }
  strx = s.join("");
  }
  chop = (chop &lt; strx.length-1) ? chop : strx.length-2;
  while(strx.charAt(chop-1)!=' ' &amp;&amp; strx.indexOf(' ',chop)!=-1) chop++;
  strx = strx.substring(0,chop-1);
  return strx+'.';
  }
  function createSummaryAndThumb(pID){
  var div = document.getElementById(pID);
  var imgtag = "";
  var img = div.getElementsByTagName("img");
  var summ = summary_noimg;
  if(img.length&gt;=1) {
    imgtag = '&lt;div class="crop"&gt;&lt;img src="'+img[0].src+'" width="300px;" height="350px;"/&gt;&lt;/div&gt;';
  summ = summary_img;
  }
  var summary = imgtag + '&lt;div class="posting"&gt;' + '&lt;/div&gt;';
  div.innerHTML = summary;
  }
  //]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>the code in body section</p>
  
  <pre><code>&lt;div class='cover'&gt;
  &lt;a expr:name='data:post.id'/&gt;
      &lt;b:if cond='data:post.title'&gt;
        &lt;h2&gt;
       &lt;b:if cond='data:post.link'&gt;
         &lt;a expr:href='data:post.link' expr:title='&amp;quot;Permanent Link to &amp;quot; + data:post.title' rel='bookmark'&gt;&lt;data:post.title/&gt;&lt;/a&gt;
       &lt;b:else/&gt;
          &lt;b:if cond='data:post.url'&gt;
            &lt;a expr:href='data:post.url' expr:title='&amp;quot;Permanent Link to &amp;quot; + data:post.title' rel='bookmark'&gt;&lt;data:post.title/&gt;&lt;/a&gt;
          &lt;b:else/&gt;
            &lt;data:post.title/&gt;
          &lt;/b:if&gt;
       &lt;/b:if&gt;
        &lt;/h2&gt;
      &lt;/b:if&gt;
  
  
  &lt;div class='jomore'&gt;&lt;div class='jomorelink'&gt;&lt;a class='anes' expr:href='data:post.url'&gt;&amp;#9658;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
          &lt;div class='bgjo'&gt;&lt;div expr:id='&amp;quot;summary&amp;quot; + data:post.id'&gt;&lt;a expr:href='data:post.url'&gt;&lt;data:post.body/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
          &lt;script type='text/javascript'&gt;createSummaryAndThumb(&amp;quot;summary&lt;data:post.id/&gt;&amp;quot;);&lt;/script&gt;
          &lt;div style='clear: both;'/&gt; &lt;!-- clear for photos floats --&gt;
        &lt;/div&gt;
  </code></pre>