Do not use href
attributes to bind event handlers to elements. You have jQuery, use that to bind the events.
<div id="favorites">
<a href="#" class="add">+</a>
</div>
Then, simply do:
$('#favorites a').click(function(e){
e.preventDefault();
$( '#dialog' ).dialog({width: 850, height: 300});
});
Do the same with the addToFavorites
button.
<a href="#" class="addToFavorites button" style="width: 150px;">Add to My Favorites</a>
Then do:
$('.addToFavorites').click(function(e){
e.preventDefault();
addToFavorites();
});
Here's a demo: http://jsfiddle.net/aRpcL/3/