A simple plugin for jquery that adds the hasAttr method