public function switchWith($markup)
{
$markup = pq($markup, $this->getDocumentID());
$content = null;
foreach ($this->stack(1) as $node) {
pq($node)->contents()->toReference($content)->end()->replaceWith($markup->clone()->append($content));
}
return $this;
}