Extended plugin so that it's alignment and width can be specified according to a parent element