module Hpricot::Traverse

def position

def position
  parent.children_of_type(self.pathname).index(self)
end