Added a for each loop in javascript so that when a favorite is clicked, it only selects the one clicked on.