$(document).ready(function () {
    $('.complimentedItems').on('click', '.browseComplimented', function () {
        var url = '/shop/admin/products/manage.products.mini.php?';
        url += 'field=complimented_' + $(this).attr('data-id');
        window.open(
            url,
            'productselector',
            'status=yes,scrollbars=yes,resizable=yes,width=500,height=600'
        );
    });
    $('.complimentedItems').on('click', '.cancelComplimented', function () {
        $('#complimented_' + $(this).attr('data-id')).val('');
        $('#complimented_' + $(this).attr('data-id') + '_name').val('');
    });
});

