Javascript: Sexy Pub sub