Ignore links without data-slide-index inside slides

This link must scroll to slide:
&lt;a data-slide-index="1" href=""&gt;Slide #2&lt;/a&gt;

This link must go to URL:
&lt;a href="#top"&gt;Top&lt;/a&gt;