Use an external jquery based function for story tree expand collapse to improve performance