Do not check equality, because we need to support subpages
Proper break from $.each()
Make getSelectedProjectLocales() function global
Also use getSelectedProjectLocales() for other locales menus
Proper break from &.each()