I need to condense this javascript code
<p>I need to get the javascript code below to work with any of the following links:</p>

<pre><code>&lt;a href="#" class="example1"&gt;http://example.com&lt;/a&gt;
&lt;a href="#" class="test"&gt;Doesnt work now&lt;/a&gt;
</code></pre>

<p>The code that is displayed after the link is clicked:</p>

<pre><code>&lt;div style='display:none'&gt;
   &lt;div id='example1' style='padding:10px; background:#fff;'&gt;
      &lt;a href="http://example.com" target="_blank"&gt;Link&lt;/a&gt;
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>The javascript code I need condensed to work with any class/id values I give:</p>

<pre><code>&lt;script&gt;
    $(document).ready(function(){
        $(".example1").colorbox({width:"50%", inline:true, href:"#example1"});
        $(".example2").colorbox({width:"50%", inline:true, href:"#example2"});
        $(".example3").colorbox({width:"50%", inline:true, href:"#example3"});
        $(".example4").colorbox({width:"50%", inline:true, href:"#example4"});
        $(".example5").colorbox({width:"50%", inline:true, href:"#example5"});
    });
</code></pre>

<p></p>
