<!-- Favorites Script Add/Delete (s) -->
$(document).ready(function() {
//$('.remove_from_favorites').attr("disabled", true);
    $('.remove_from_favorites').livequery('click', function(event) {
     var request=$(this).attr('id');
        hideMessage();
       var url = $(this).attr('href');
       $('#page-content-message').load($(this).attr('href'), null, showMessage);
       $('dd:has(a[href="'+url+'"])').remove();
       $('a[href="#fav-places"] > span').text('('+$('dl#favorite-listings > dd').length+')');
// add by eric
       $('#removeit_'+request).remove();

$.get("/global/trip_planner_count", function(data) {
    $(".tripPlannerBottom").html(data);
    // same for second
});
$.get("/global/see_favorites_button", function(data) {
    $("#showMore").html(data);
    // same for second
});
$.get("/features/list_favorites", function(data) {
    $("#favorite-listings").html(data);
    // same for second
});
$.get("/global/favorites_add_list/"+request, function(data) {
    $('#refreshme_'+request).html(data);
    // same for second
});
                        // Make the id overview show
                        $('#'+request).remove(); 
                        $('#loading_'+request).show(); 
        return false;
})
  });

<!-- New Section End -->
$(document).ready(function() {
$('.add_to_favorites').livequery('click', function(event){
     var request=$(this).attr('id');
        hideMessage();
        $('#page-content-message').load($(this).attr('href'), null, showMessage);
  $.ajax({
           type: "GET",
           url: "/features/favorite-add/"+request+"/add",
           success: function(response){$('#favorite-listings').html(response);}
});

$.get("/global/trip_planner_count", function(data) {
    $(".tripPlannerBottom").html(data);
    // same for second
});
$.get("/global/see_favorites_button", function(data) {
   $("#showMore").html(data);
    // same for second
});
// refreshes the button in the listings
$.get("/global/favorites_add_list/"+request, function(data) {
   $('#refreshme_'+request).html(data);
    // same for second
});
// add by eric
                        // Make the id overview show
                        $('#'+request).remove(); 
                        $('#loading_'+request).show(); 
return false;
})
  });

function hideMessage() {
    $('#page-content-message:visible').hide("slide", {direction: "up"}, 500);
}

function showMessage() {
    $.scrollTo($("#page-content-message"), 500);
    $('#page-content-message').show("slide", {direction: "up"}, 500);
}
<!-- Favorites Script Add/Delete (e) -->
