jQuery(document).ready(function($) {
    // Event handler for adding social item
    $(document).on('click', '.newshit-social-add', function(e) {
        e.preventDefault();
        var socialWrapper = $(this).prev('.newshit-social-wrapper');
        var socialItem = socialWrapper.find('.newshit-social-item').last().clone();
        socialItem.find('input[type="text"]').val('');
        socialItem.find('select').val('');
        socialWrapper.append(socialItem);
    });

    // Event handler for removing social item
    $(document).on('click', '.newshit-social-remove', function(e) {
        e.preventDefault();
        $(this).closest('.newshit-social-item').remove();
    });
});

