With jquery it would be something like
$(".id_of_offer").click(function(){
window.open($(this).attr("href"));
});
for an <a class="id_of_offer" href="url-of-offer"> - just as example as it wouldn't be necessary to attach an event handler for click events on an anchor-tag that actually has the url as href value.
Question is how you relate the offer id and url - are there any links on the page or is the url stored elsewhere? Just not sure about this part of your question: "the url of the offer whose id matches the id of the div".
You can store the url as data-attribute on the div, e.g. like that:
<div id="id_of_offer" data-url="url_of_offer>..</div>
Then it works like that:
$("#id_of_offer").click(function(){
window.open($(this).data("url"));
});
for opening the url in a new tab. If you want to open the url in the current window, it'd be location.href = $(this).data("url");
Update: As mentioned in the comment, the ids will get created on the fly. Therefore this could be adjusted by e.g. setting a class="offer" to each div and change the jquery to
$(".offer").click(function(){
window.open($(this).data("url"));
});
Reference: http://api.jquery.com/data/