You need to compare your value to a proper input. You are everyitme cojmparing to the same input when you use $('.RatedSelection input').val();
Using $(this).find('input') will enable you to refere to the current element your iterating over with a class RatedSelection and find an input element inside the current element.