fires before a segment is clicked
segmented.attachEvent("onBeforeTabClick", function(id, e){ //code });
Unlike the onItemClick event this one watches clicks over separate tabs and passes the ID of a clicked tab into its handler.