/*! jquery.shortlist */function updateShortlist(propertyId, container, image, headline,requiresLogin){
    if (requiresLogin) {
        
    }
    else {
        $.ajax({
            type: 'POST',
            url: '/svc/shortlistService.asmx/SaveProperty',
            data: "{ 'propertyId': " + propertyId + " }",
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function(result) {
                returnData(result, container, image, headline);
            }
        });
    }
}

function returnData(result,container,image,headline){
    result = result.d || result;
  
    if (result != 0) {
        var jContainer = $(container);
        jContainer.empty();
        if (image != '') {
           jContainer.append("<img src='" + image + "' class='button' alt='This property is already in your shortlist' />");
        }
        else {
            jContainer.append('<span title="This property is already in your shortlist" class="dummy_link">Property Saved</span>');
        }
        $(headline).html(result + ' saved propert' + (result === 1 ? 'y' : 'ies'));
    } else {
        alert("Maximum number of saved properties reached. Please login to save more property");
    }
}

