change class onclick

change class onclick

Hello all,

I am having some trouble here, I have this code:
         $(document).ready(function(){
         
            $('.account').click(function() {
               $(this).removeClass("account");
                $(this).addClass("account_selected");
               });
            
         });

This is changing my class name from account to account_selected, which is great but what I need it to do is when another div is clicked is change the class back to "account" and set the one that was clicked to "account_selected." If anymore info is needed please let me know. Thanks in advance.