Cleaned up popup javascript and created a jQuery plugin out of it.  Performance and adaptability.