It's simple: You build your gallery out of <figure>
elements inside the <div id="slider">
.
Each figure has an image and possibly a title. Like this:
<figure>
<figcaption>The Title</figcaption>
<img src="path/to.jpg" alt="The Title" />
</figure>
Styling is done via simple CSS - use what you like!
The snippet is brought to you by Bowstreet. Licensed under MIT-License.