jquery bug fixes / refactoring jquery + erb/routes

This solved the problem of the two-click link by passing the same event all the way through the function to the favorite() and unfavorite() functions. That way, just the one event is being dealt with.