Is there a commentary for the Dhammapada? I read somewhere that there was a traditional commentary for the Dhammapada that gave the stories that inspired the Buddha to write the various verses of the text. Does anyone know what that commentary is and is it available on the internet perhaps on something like accesstoinsight or maybe as a printed book?
Yes, there is indeed. The commentarial text includes both these stories and word-by-word commentary on the verses themselves.
The story parts were translated into English long ago by Burlingame as &quot;Buddhist Legends&quot;. The PDF version is available here:
http://static.sirimangalo.org/pdf/
in three volumes. (Search the page for &quot;Buddhist Legends&quot;, there's eight pdf files)
The commentary on the verses has never been fully translated, AFAIK. Here, as an example, is the commentary on the first verse (not found in Burlingame's translation):

Realities have mind as forerunner, have mind as chief, are formed of mind.  If, with a mind corrupted, one speaks or acts, because of that, suffering follows him, just as a wheel the foot of the one pulling the burden.
Therein, each and every mind of the four realms, categorized as sensual-sphere wholesome, etc. is called “mind”. But, in this passage, being fixed, determined and defined by the power of the doctor's arisen mind, just a mind associated with aversion and accompanied by displeasure was obtained. In reference to “having as forerunner”: having become because of it going first, they are associated with it.  in reference to “realities”, there are actually four types of reality, under the headings of virtue, dissemination, study, and non-being/non-soul.  In regards to these, in “dhamma and non-dhamma do not indeed both have the same result.  Non-dhamma leads to hell, dhamma causes to reach a happy destination.”,  this is called “dhamma as virtue”. In “I will disseminate the dhamma to you monks, beautiful in the beginning...”, this is called “dhamma as dissemination”.  In “So here, monks, some young men of a good families bring the dhamma to complete fulfilment: the sutta the geyya...” this is called “dhamma as study”.  In “But indeed, at that time dhammas exist, aggregates exist.” this is called “non-being dhamma”.  This indeed is also called “non-soul dhamma”. Of those, in this instance non-being/non-soul dhamma is intended. The meaning of that is the three formless aggregates - the aggregate of sensation the aggregate of perception and the aggregate of mental formation.  Because, these are spoken of as “mind is the forerunner of them”, they are called that which has mind as forerunner.
But why is mind, arising in a single instant together with these, of a single base, with a single object, not before nor after, called “forerunner”? By the meaning of being condition for arising. Just as where many villains are doing evil deeds together like pillaging, etc., when it is asked, “Who is the forerunner of these villains?” whoever is the condition for them, having depended on whom they do that deed, he, whether Datta or Mitta, is called “the forerunner” of them. Thus should the completion of this matter be understood. Since, by the meaning of being condition for arising, mind is the forerunner of them, so they have mind as forerunner; whereas they are not able to arise with mind not arising, mind, however, does indeed arise with some mental concomitants not arising. Further, by virtue of being ruler over, mind is foremost in regards to them, so they have mind as chief. For, just as senior villains, etc., are chiefs of villains, etc., by ruling over them, so, as the mind is ruler of those mental concomitants, they indeed have mind as chief. Further, just as whatever is fashioned with wood, etc., all of those wares are called made of wood, etc., so, as those mental concomitants are themselves fashioned from the mind, they are called mind-made.
In reference to “with a mind corrupted”, the meaning is with a mind corrupted by incoming faults beginning with covetousness.  For the bhavaṅgacitta is an normal mind that is uncorrupted.  But  just as clear water tainted by incoming blue colour, etc. is thus categorized as blue water, etc., and not new water, nor either the former same clear water, even so is that mind corrupted by incoming faults beginning with covetousness, and not a new mind, nor indeed the former same bhavaṅgacitta.  Thus the Blessed One said, “Radiant, monks, is this mind; yet indeed, it is defiled by incoming defilements (AN 1.49).” So, if with a mind corrupted a man speaks or acts, speaking, he speaks only the fourfold verbal misconduct; acting, performs only the threefold bodily misconduct; not speaking, not acting, while there exists that mind corrupted with covetousness, etc., he fulfils the threefold mental misconduct.  Thus he fulfils the ten means of unwholesome action.
In regards to, “because of that, suffering follows him,” the meaning is, because of that threefold misconduct, suffering goes after that individual; by the power of misconduct, in the four states of loss or in the realm of humans, going both as a body-entity and otherwise, thus by this explanation bodily and mental suffering as a result follows that state of being.
Just like what? In regards to “just as a wheel the foot of the one pulling the burden”, the meaning is, like a wheel the foot of the ox harnessed in the yoke, pulling the yoke. For, just as that ox pulling even for one day, even for two, even for five, even for ten, even for half-a-month, even for a month, is not able to leave behind, to abandon the wheel; then indeed, when he is advancing to the front, the yoke presses on his neck; when retreating to the back, the wheel strikes against the flesh of his legs.  Oppressing by these two means, the wheel is in-step with the feet of that ox.  Just so, with a mind defiled, having fulfilled the three types of misconduct, an individual  is set in hell, etc..  Gone into such and such places, both bodily and mental suffering rooted in misconduct follows after him.  This is the meaning.