Changed dropdown ID assignment method & listener event

Instead of counting the number of crumbs, we actually use forum IDs.
That should be more future-proof.
Also changed the event listener, for B2 compatibility.