Added support for videos href,attach code refact