Identifying clicked elements
In the HTML, give some id to your div with links, like this:

&lt;div id="links"&gt;
  &lt;a href="#" id="item-1"&gt;Item 1&lt;/a&gt;
  &lt;a href="#" id="item-2"&gt;Item 2&lt;/a&gt;
  &lt;a href="#" id="item-3"&gt;Item 3&lt;/a&gt;
  &lt;a href="#" id="item-4"&gt;Item 4&lt;/a&gt;
&lt;/div&gt;


Then change your JavaScript like this:

$("#links &gt; a").click(function(){
   $('.item-block').hide();
   $("#"+this.id.replace("item-","")).show();
})