so you have somewhow to identify. I don't know that accordion thing. But what I would try - use jqury selector. On acordiaon click - somehow identiry the 1 - if its 1 then let the acordion to show submenu.
Otherwise if its 2 - maybe e.preventDefault would work so preventing expanding acordion and do other code (redirecty in your case).
So the first thing - you need identify what user wants. Secodn - you need to stop acordion from expanding.
MAybe acordion plugin has some callback on click or something liek that.