If I have the following markup:
Hours&am
$("a span[sortcat]").attr('sortcat')
That'll give you the first element's sortcat value. To get all of them, do this:
sortcat
$("a span[sortcat]").map(function(){ return $(this).attr('sortcat') })
See this working demo: http://jsfiddle.net/BwgDW/