JavaScript: jQuery pubsub