Is there a theory behind selecting elements that may be successful in potential superconductors? Looking at something like $\ce{YBa2Cu3O7}$ which was one of the first cuprate superconductors to be discovered, I'm always curious how the selection of these substances as likely superconductors comes about?  

Does it have to do with optimal crystalline structure, unpaired electrons, or is it similar to the way semiconductors are designed with doping to create "holes"?  Or are these superconductors simply determined experimentally based on small changes of what has worked in the past? 

As a side question: I've always been curious as to how they stumbled upon Yttrium for this particular case.  It's not something I think of as being carried in ready supply.  Would this have been after YAG lasers were already around?
Suffice to say, nobody really knows, and a Nobel prize surely awaits the first people who can explain the relationship between chemical composition and high-temperature superconductivity.