Getting Rel Attr value from <p> with an ID when parent TD is clicked

Getting Rel Attr value from <p> with an ID when parent TD is clicked

Not really sure how the best way to start explaining this, but I have a small script set up that activates a second section to an accordion to display information. The idea is that a table cell will be clicked and then the second according will activate displaying information relating to the cell that was clicked in accordion part 1.

I have managed to get it to update coding in the var's by hand, now I want to be able to get certain bits of information from a nested div that is hidden in the table cell (I know, very messy - but it will all be made a little less messy in the future when I have got the process correct).


Sections from the script that are affected: 

<script>
$("table.calendar td.date_has_event").click(function(){
var price = 600;
$('#hprice').val(price);
$("#eventticket").accordion("activate", 1)

});
</script>


<html>
...
<td class="date_has_event">11<sup>th</sup> December &mdash; Saturday Nights<div class="events">
<p id="price" rel="750">Tickets are &pound;750</p>
</div></td>
...
</html>


Have not had much experience with javascript at all, so this is quite a challenge for my headache ridden mind to get around. Any help or suggestions would be greatly appreciated.

Thanks in advanced.