jquery cycle caption to show selected div
<p>I'm working on this site:</p>

<p>www.dimitrinube.com/work/a2bc_beta1</p>

<p>as you can see, once loaded, there is a jquery cycle previewing projects. If you click the project section in the menu, it goes in the project list, and when you click a project, it opens up.</p>

<p>in the old version every project was stored in different html pages. Now, i did a single page layout with hidden divs. </p>

<p>The things that i cant make work anymore is the caption below the projects previews, under the cycle plugin.</p>

<p>In the old version there was:</p>

<pre><code>$('#s2').cycle({
fx: 'scrollHorz',
speed: 500,
timeout: 0,
next: '#next2',
prev: '#prev2',
after: function(){$('#caption').html("&lt;a href=" + this.alt + "&gt;" + this.title + "&lt;/a&gt;");}
});
</code></pre>

<p>but now, i have to link it to the hidden divs of each project: for instance; here is one hidden div:</p>

<pre><code>&lt;div class="content_pr" id="tab3"&gt;
&lt;img src="img/projects/carcano/1.jpg" &gt;
&lt;img src="img/projects/carcano/2.jpg" &gt;
&lt;img src="img/projects/carcano/3.jpg" &gt;
&lt;img src="img/projects/carcano/4.jpg" &gt;
&lt;img src="img/projects/carcano/5.jpg" &gt;
&lt;img src="img/projects/carcano/6.jpg" &gt;
&lt;img src="img/projects/carcano/7.jpg" &gt;
&lt;img style="margin-bottom:0px" src="img/projects/carcano/8.jpg" &gt;
&lt;/div&gt;
</code></pre>

<p>that is identified by the id; the projects section work with this piece of code:</p>

<pre><code> //Handler Menu Progetti
function openTab(tab){    
$(tab).fadeTo(2000, 1);
}

$("#projects_tab a, #caption").click(function(){    
selectedTab = this.href.substr(this.href.indexOf('#'));
openTab(selectedTab);
$("#projects_tab").hide();
$("#projects_b").removeClass('active');
});
</code></pre>

<p>how can i modify the string after of the jquery cycle piece of code to make the magic happens ? thank you ! :)</p>
