$(document).ready(function()
{
  $('input[type="file"]').click(function()
  {
    $(this).nextAll('input[type="checkbox"]:first').attr('checked', true);
  });
});
