summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2016-01-17 00:01:26 +0100
committerVictor Häggqvist <[email protected]>2016-01-17 00:01:26 +0100
commit7155e6074e766392a31b9bd4daded85c6a8a80a1 (patch)
tree701d186d2342c9ea188303e7afcbdf3e26b61d27
parent718441beb6b9fca1f2824ed6bee700ca9debe2ea (diff)
rebuild dist and demo
-rw-r--r--demo/LightBox.Core.js8
-rw-r--r--demo/index.html85
-rw-r--r--dist/LightBox.Core.min.js2
-rw-r--r--dist/LightBox.Plugins.min.js1
4 files changed, 51 insertions, 45 deletions
diff --git a/demo/LightBox.Core.js b/demo/LightBox.Core.js
index cd7898b..f3f369b 100644
--- a/demo/LightBox.Core.js
+++ b/demo/LightBox.Core.js
@@ -188,7 +188,13 @@ var LightBox = LightBox || {}; LightBox["Core"] =
key: 'onImageClick',
value: function onImageClick(event) {
log.debug(event);
- var element = event.srcElement.parentElement;
+ var srcElement = event.srcElement;
+
+ if (srcElement === undefined) {
+ srcElement = event.originalTarget;
+ }
+
+ var element = srcElement.parentElement;
if (!this.isTargetValid(element)) return true;
event.preventDefault();
diff --git a/demo/index.html b/demo/index.html
index d1e167c..34be1c2 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -19,6 +19,7 @@
<header>
<h1>Image Lightbox<span>Responsive & Touch-Friendly</span></h1>
<p>View source of demos on <a href="https://github.com/victorhaggqvist/touch-imagelightbox/tree/gh-pages">Github</a>.</p>
+ <p style="color: #353535; font-size: 13px;">Fair waring to mobile users, big image are can be up to about 5MB each.</p>
</header>
@@ -26,20 +27,20 @@
<h2>Core</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452963510533-a6368b834bf8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=02a0de155409ee591fea7040c8acedb3" data-imagelightbox="0">
- <img src="https://images.unsplash.com/photo-1452963510533-a6368b834bf8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=8d7880cd80b6a9f1169d0680c7a3c20d" alt="Photo by Lucia Velez de Paz">
+ <a href="https://images.unsplash.com/photo-1452976218590-7b9de7005af9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=a612e4609107caddc122f3b887a3132c" data-imagelightbox="0">
+ <img src="https://images.unsplash.com/photo-1452976218590-7b9de7005af9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=41f73fb91506e58a3b288001178ac0b1" alt="Photo by Scott Webb">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452963409233-e624c6cd4c11?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=eaa1bfb15011d3ee8243c40ffb6a873d" data-imagelightbox="0">
- <img src="https://images.unsplash.com/photo-1452963409233-e624c6cd4c11?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=a39955db5ea08eac8891df7a33be5f39" alt="Photo by Kate Zaidova">
+ <a href="https://images.unsplash.com/photo-1452975674591-23278034af1f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=7d9b5e879892afd2e0d4d6c8081bbc7f" data-imagelightbox="0">
+ <img src="https://images.unsplash.com/photo-1452975674591-23278034af1f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=131b124025b78e4dd4dfb1faa7b26f64" alt="Photo by Paul Green">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452962654861-dc5c7e89a3aa?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=2f8a1740919fed67fa3e92a5924a3dea" data-imagelightbox="0">
- <img src="https://images.unsplash.com/photo-1452962654861-dc5c7e89a3aa?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=38dd54d73602c09921e2a4dffdfc48d8" alt="Photo by Vladimir Kudinov">
+ <a href="https://images.unsplash.com/photo-1452975261254-982078333ab5?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=8fbe505068d6265cb87096611674f9e1" data-imagelightbox="0">
+ <img src="https://images.unsplash.com/photo-1452975261254-982078333ab5?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=8148bde06b7d7a1f13d07beb8339f0f6" alt="Photo by Paul Green">
</a>
</li>
</ul>
@@ -48,20 +49,20 @@
<h2>With activity indication</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452960962994-acf4fd70b632?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=e2bf2701a295324cd0c50b924fe208a6" data-imagelightbox="1">
- <img src="https://images.unsplash.com/photo-1452960962994-acf4fd70b632?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=aa2a0c19b8dd309357b4b27d03037825" alt="Photo by davide ragusa">
+ <a href="https://images.unsplash.com/photo-1452968011964-24f8831c43c3?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=b09459cef28f47eed3601df2a6ca92ed" data-imagelightbox="1">
+ <img src="https://images.unsplash.com/photo-1452968011964-24f8831c43c3?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=f8f1b709a845b3d20f8338a659701303" alt="Photo by Mantra Media">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452957731583-658917836266?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=bf0789c8876a9ad3342cba4c38ac6963" data-imagelightbox="1">
- <img src="https://images.unsplash.com/photo-1452957731583-658917836266?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=0bc4f8220d93fde1e8799b8832d1102a" alt="Photo by Camilla Bundgaard">
+ <a href="https://images.unsplash.com/photo-1452967712862-0cca1839ff27?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9c2153686f713f2a4810d102e29919de" data-imagelightbox="1">
+ <img src="https://images.unsplash.com/photo-1452967712862-0cca1839ff27?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=23bd60490ce1dd4b477a387cf42940ee" alt="Photo by Mantra Media">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452957689853-fd2b4f3d3aa2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=2ffc1e7221beba3ba73e48a15e78ef7f" data-imagelightbox="1">
- <img src="https://images.unsplash.com/photo-1452957689853-fd2b4f3d3aa2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=3407b7de6a14bc903d596940985acb26" alt="Photo by Camilla Bundgaard">
+ <a href="https://images.unsplash.com/photo-1452964668643-b8f0a1601be4?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=0fbd8861578feabfcb21e87ab48be98c" data-imagelightbox="1">
+ <img src="https://images.unsplash.com/photo-1452964668643-b8f0a1601be4?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=e34b5a2bbb7d1282d6dc05e89d3c91d0" alt="Photo by Michael Duliba">
</a>
</li>
</ul>
@@ -70,20 +71,20 @@
<h2>With overlay & activity indication</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452955767226-455c94ad1bf2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=987ec039e5bde5c23a29f83534c5a624" data-imagelightbox="2">
- <img src="https://images.unsplash.com/photo-1452955767226-455c94ad1bf2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=fdd2f37c0bf66df35763fd971b0e8c2d" alt="Photo by Georgi Petrov">
+ <a href="https://images.unsplash.com/photo-1452963510533-a6368b834bf8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=02a0de155409ee591fea7040c8acedb3" data-imagelightbox="2">
+ <img src="https://images.unsplash.com/photo-1452963510533-a6368b834bf8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=8d7880cd80b6a9f1169d0680c7a3c20d" alt="Photo by Lucia Velez de Paz">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452953523127-a0949218fc33?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=0024f2c2152c99931b896f97a4895e58" data-imagelightbox="2">
- <img src="https://images.unsplash.com/photo-1452953523127-a0949218fc33?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=3aec9b2ff90657182333a50800c5111b" alt="Photo by Harshal Hirve">
+ <a href="https://images.unsplash.com/photo-1452963409233-e624c6cd4c11?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=eaa1bfb15011d3ee8243c40ffb6a873d" data-imagelightbox="2">
+ <img src="https://images.unsplash.com/photo-1452963409233-e624c6cd4c11?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=a39955db5ea08eac8891df7a33be5f39" alt="Photo by Kate Zaidova">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452953008873-ae5837174535?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=164f5bdd08fb25efe4e91973e8f392df" data-imagelightbox="2">
- <img src="https://images.unsplash.com/photo-1452953008873-ae5837174535?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=11ecbf2ad3e60ff796998f2ffcfe4942" alt="Photo by Alex Wing">
+ <a href="https://images.unsplash.com/photo-1452962654861-dc5c7e89a3aa?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=2f8a1740919fed67fa3e92a5924a3dea" data-imagelightbox="2">
+ <img src="https://images.unsplash.com/photo-1452962654861-dc5c7e89a3aa?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=38dd54d73602c09921e2a4dffdfc48d8" alt="Photo by Vladimir Kudinov">
</a>
</li>
</ul>
@@ -92,20 +93,20 @@
<h2>With "close" button & activity indication</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452952797148-d161124db4c8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=1e4db22040a9df9756ed8eae82ec9213" data-imagelightbox="3">
- <img src="https://images.unsplash.com/photo-1452952797148-d161124db4c8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=4914671db2468a15d6eabbae5da14316" alt="Photo by Andreas Kahlhöfer">
+ <a href="https://images.unsplash.com/photo-1452960962994-acf4fd70b632?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=e2bf2701a295324cd0c50b924fe208a6" data-imagelightbox="3">
+ <img src="https://images.unsplash.com/photo-1452960962994-acf4fd70b632?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=aa2a0c19b8dd309357b4b27d03037825" alt="Photo by davide ragusa">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452948491233-ad8a1ed01085?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=e9d56706132524d1c080ba95b50f66ed" data-imagelightbox="3">
- <img src="https://images.unsplash.com/photo-1452948491233-ad8a1ed01085?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=d7d2fdeeb16f4504d87e971e6a206b08" alt="Photo by Sven Scheuermeier">
+ <a href="https://images.unsplash.com/photo-1452957731583-658917836266?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=bf0789c8876a9ad3342cba4c38ac6963" data-imagelightbox="3">
+ <img src="https://images.unsplash.com/photo-1452957731583-658917836266?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=0bc4f8220d93fde1e8799b8832d1102a" alt="Photo by Camilla Bundgaard">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452947637175-7dc3f84f3350?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=b6986ce7c9660bb45280b0c4205fc7f1" data-imagelightbox="3">
- <img src="https://images.unsplash.com/photo-1452947637175-7dc3f84f3350?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=32bfef29b8549e2d30492fd1aaa5be51" alt="Photo by Sven Scheuermeier">
+ <a href="https://images.unsplash.com/photo-1452957689853-fd2b4f3d3aa2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=2ffc1e7221beba3ba73e48a15e78ef7f" data-imagelightbox="3">
+ <img src="https://images.unsplash.com/photo-1452957689853-fd2b4f3d3aa2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=3407b7de6a14bc903d596940985acb26" alt="Photo by Camilla Bundgaard">
</a>
</li>
</ul>
@@ -114,20 +115,20 @@
<h2>With caption & activity indication</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452942000102-9c4c7aaeac81?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=8c0269da7206a0dcc83a840a3fc7c57a" data-imagelightbox="4">
- <img src="https://images.unsplash.com/photo-1452942000102-9c4c7aaeac81?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=b9bc7dec4ff29dbfde154d74148eb94c" alt="Photo by Miriam Miles">
+ <a href="https://images.unsplash.com/photo-1452955767226-455c94ad1bf2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=987ec039e5bde5c23a29f83534c5a624" data-imagelightbox="4">
+ <img src="https://images.unsplash.com/photo-1452955767226-455c94ad1bf2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=fdd2f37c0bf66df35763fd971b0e8c2d" alt="Photo by Georgi Petrov">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452933006409-19b87dc327b7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=703b8f947dc61bebde4e1fdb5e008eeb" data-imagelightbox="4">
- <img src="https://images.unsplash.com/photo-1452933006409-19b87dc327b7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=74354b0faacb8cf70d2655b9fadf5846" alt="Photo by Timon Studler">
+ <a href="https://images.unsplash.com/photo-1452953523127-a0949218fc33?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=0024f2c2152c99931b896f97a4895e58" data-imagelightbox="4">
+ <img src="https://images.unsplash.com/photo-1452953523127-a0949218fc33?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=3aec9b2ff90657182333a50800c5111b" alt="Photo by Harshal Hirve">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452924872281-04696e001ea3?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=17fbca60da821287959eacae0ab6144b" data-imagelightbox="4">
- <img src="https://images.unsplash.com/photo-1452924872281-04696e001ea3?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=5905984278271e96ec6e2d0ac7710109" alt="Photo by Justin Cron">
+ <a href="https://images.unsplash.com/photo-1452953008873-ae5837174535?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=164f5bdd08fb25efe4e91973e8f392df" data-imagelightbox="4">
+ <img src="https://images.unsplash.com/photo-1452953008873-ae5837174535?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=11ecbf2ad3e60ff796998f2ffcfe4942" alt="Photo by Alex Wing">
</a>
</li>
</ul>
@@ -136,20 +137,20 @@
<h2>With navigation & activity indication</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452924447697-482a22f55f42?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=262ee0b03a7c11fca9765f804fd71f82" data-imagelightbox="5">
- <img src="https://images.unsplash.com/photo-1452924447697-482a22f55f42?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=c87406375635ef275c0d437a279296b4" alt="Photo by Madeline Gibbs">
+ <a href="https://images.unsplash.com/photo-1452952797148-d161124db4c8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=1e4db22040a9df9756ed8eae82ec9213" data-imagelightbox="5">
+ <img src="https://images.unsplash.com/photo-1452952797148-d161124db4c8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=4914671db2468a15d6eabbae5da14316" alt="Photo by Andreas Kahlhöfer">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452915858640-325b467fe554?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=0044ed81a2d247724c452ba939980a6d" data-imagelightbox="5">
- <img src="https://images.unsplash.com/photo-1452915858640-325b467fe554?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=02ed27e7bb8e15fb1df067ee7beb89dc" alt="Photo by Nathan Shively">
+ <a href="https://images.unsplash.com/photo-1452948491233-ad8a1ed01085?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=e9d56706132524d1c080ba95b50f66ed" data-imagelightbox="5">
+ <img src="https://images.unsplash.com/photo-1452948491233-ad8a1ed01085?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=d7d2fdeeb16f4504d87e971e6a206b08" alt="Photo by Sven Scheuermeier">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452915285804-941a8c0cd8af?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=251ef836ada7088607cb82c4f51a674d" data-imagelightbox="5">
- <img src="https://images.unsplash.com/photo-1452915285804-941a8c0cd8af?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=7886267096c4f963c7e58efdb50fe9fc" alt="Photo by Callum Gale">
+ <a href="https://images.unsplash.com/photo-1452947637175-7dc3f84f3350?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=b6986ce7c9660bb45280b0c4205fc7f1" data-imagelightbox="5">
+ <img src="https://images.unsplash.com/photo-1452947637175-7dc3f84f3350?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=32bfef29b8549e2d30492fd1aaa5be51" alt="Photo by Sven Scheuermeier">
</a>
</li>
</ul>
@@ -158,20 +159,20 @@
<h2>Combination</h2>
<ul>
<li>
- <a href="https://images.unsplash.com/photo-1452914793772-af331bf6e4b6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=c2e9ecd41653d863b79cecb82afccacf" data-imagelightbox="6">
- <img src="https://images.unsplash.com/photo-1452914793772-af331bf6e4b6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=54a8d7b094f32816d42dd6ab9b410be4" alt="Photo by Sang Huynh">
+ <a href="https://images.unsplash.com/photo-1452942168079-6ec82039465d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=e481ae0a2f95c79268ad81d164fd84ae" data-imagelightbox="6">
+ <img src="https://images.unsplash.com/photo-1452942168079-6ec82039465d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=2bd7dd32e6d7ad2a360ae7a7eeb5f4eb" alt="Photo by Susana Fernández">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452909809578-94f609b1facc?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=df0633cfc264005f30d4b54a7b4a463e" data-imagelightbox="6">
- <img src="https://images.unsplash.com/photo-1452909809578-94f609b1facc?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=bef3ff82adca61b4477f84ea16f4c61d" alt="Photo by Vladimir Kudinov">
+ <a href="https://images.unsplash.com/photo-1452942000102-9c4c7aaeac81?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=8c0269da7206a0dcc83a840a3fc7c57a" data-imagelightbox="6">
+ <img src="https://images.unsplash.com/photo-1452942000102-9c4c7aaeac81?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=b9bc7dec4ff29dbfde154d74148eb94c" alt="Photo by Miriam Miles">
</a>
</li>
<li>
- <a href="https://images.unsplash.com/photo-1452902793598-4a506dd9a38e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=a4e8de5703122be9dfc2e9a1eba64f1e" data-imagelightbox="6">
- <img src="https://images.unsplash.com/photo-1452902793598-4a506dd9a38e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=a813370d501160abb1c9b63ba953baa8" alt="Photo by David Boozer">
+ <a href="https://images.unsplash.com/photo-1452933006409-19b87dc327b7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=703b8f947dc61bebde4e1fdb5e008eeb" data-imagelightbox="6">
+ <img src="https://images.unsplash.com/photo-1452933006409-19b87dc327b7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=200&fit=max&s=74354b0faacb8cf70d2655b9fadf5846" alt="Photo by Timon Studler">
</a>
</li>
</ul>
diff --git a/dist/LightBox.Core.min.js b/dist/LightBox.Core.min.js
index 2e084e4..a239e34 100644
--- a/dist/LightBox.Core.min.js
+++ b/dist/LightBox.Core.min.js
@@ -5,4 +5,4 @@
* @license MIT
* @author Victor Häggqvist <[email protected]> (https://victorhaggqvist.com/)
*/
-var LightBox=LightBox||{};LightBox.Core=function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();Object.defineProperty(e,"__esModule",{value:!0});var r=i(1),s=i(2),a=i(3),u=function(){function t(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n(this,t),a.info("LightBox"),this.targets=document.querySelectorAll(e),a.debug(this.targets),a.debug("HAS_TOUCH "+t.HAS_TOUCH);var o={allowedTypes:"png|jpg|jpeg|gif",restrictTypes:!1,selectorId:"imagelightbox",animationSpeed:350,preloadNext:!0,enableKeyboard:!0,quitOnEnd:!1,quitOnImgClick:!1,quitOnDocClick:!0};this.options=Object.assign(i,o),a.info(this.options),this.target=null,this.image=null,this.imageWidth=0,this.imageHeight=0,this.swipeDiff=0,this.inProgress=!1,this.swipeStart=0,this.swipeEnd=0,this.onStartListeners=[],this.onEndListeners=[],this.onLoadStartListeners=[],this.onLoadEndListeners=[],this.bindEvents()}return o(t,[{key:"bindEvents",value:function(){var e=this;Array.prototype.forEach.call(this.targets,function(t){t.addEventListener("click",e.onImageClick.bind(e))}),window.addEventListener("resize",this.windowResizeListener.bind(this)),this.options.quitOnDocClick&&document.body.addEventListener(t.HAS_TOUCH?"touchend":"click",this.documentClick.bind(this)),this.options.enableKeyboard&&document.body.addEventListener("keyup",this.handleKeyboard.bind(this))}},{key:"handleKeyboard",value:function(t){if(null===this.image)return!0;if(t.preventDefault(),27===t.keyCode&&this.quitLightbox(),37===t.keyCode||39===t.keyCode){var e=Array.prototype.indexOf.call(this.targets,this.target)-(37===t.keyCode?1:-1);e>this.targets.length-1?this.target=this.targets[0]:0>e?this.target=this.targets[this.targets.length-1]:this.target=this.targets[e],this.loadImage()}}},{key:"documentClick",value:function(){a.debug("document click"),null!==this.image&&this.target.href===this.image.src&&(a.info("quitting"),this.options.quitOnDocClick&&this.quitLightbox())}},{key:"quitLightbox",value:function(){var t=this;a.debug("quitLightbox"),null!==this.image&&(r.CSSUtil.setTransitionProperty(this.image,"opacity "+this.options.animationSpeed/1e3+"s linear"),setTimeout(function(){t.image.style.opacity=0},5),setTimeout(function(){t.removeImage(),t.inProgress=!1,t.onEndListeners.forEach(function(t){return t()})},this.options.animationSpeed))}},{key:"onImageClick",value:function(t){a.debug(t);var e=t.srcElement.parentElement;return this.isTargetValid(e)?(t.preventDefault(),void(this.inProgress||(this.inProgress=!1,this.onStartListeners.forEach(function(t){return t()}),this.target=e,this.loadImage()))):!0}},{key:"isTargetValid",value:function(t){if(this.options.restrictTypes===!1)return!0;var e=new RegExp("(.("+this.options.allowedTypes+")$)");return"a"===t.tagName.toLowerCase()&&e.test(t.href)}},{key:"loadImage",value:function(){var e=this,i=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(a.info("loadImage"),this.inProgress)return!1;if(a.debug("not progress"),null!==this.image){if(a.debug("has current image"),i!==!1&&(this.targets.length<2||this.options.quitOnEnd===!0&&(i===s.LightDirection.RIGHT&&0===Array.prototype.indexOf(this.targets,this.target)||i===s.LightDirection.LEFT&&Array.prototype.indexOf(this.targets,this.target)===targets.length-1)))return this.quitLightbox(),!1;a.debug("unload"),r.CSSUtil.setTransitionProperty(this.image,"opacity "+this.options.animationSpeed/1e3+"s linear");var n="0px";i!==!1&&(n=100*i-this.swipeDiff+"px"),this.image.style.transform="translateX("+n+")",setTimeout(function(){e.image.style.opacity=0},5),setTimeout(function(){a.debug("remove from dom"),e.removeImage()},this.options.animationSpeed),this.swipeDiff=0}this.inProgress=!0,this.onLoadStartListeners.forEach(function(t){return t()}),setTimeout(function(){a.debug("loadImage in");var i=new Image;e.image=i,i.onload=function(){i.id=e.options.selectorId,a.debug("img loaded"),document.body.appendChild(i),e.setImage(),i.style.opacity=0;var t=e.options.animationSpeed/1e3;if(a.debug(t),r.CSSUtil.setTransitionProperty(i,"opacity "+t+"s ease"),i.style.transform="translateX(0px)",setTimeout(function(){i.style.opacity=1},10),setTimeout(function(){e.inProgress=!1,e.onLoadEndListeners.forEach(function(t){return t()})},e.options.animationSpeed),e.options.preloadNext){var n=Array.prototype.indexOf.call(e.targets,e.target),o=e.targets[n+1];if(null!==o&&void 0!==o){a.debug("preloading next");var s=new Image;s.src=o.href}else a.debug("no preloading")}},i.src=e.target.href,e.swipeStart=0,e.swipeEnd=0,t.HAS_POINTERS?(i.addEventListener("pointerup",e.imageClickEvent.bind(e)),i.addEventListener("MSPointerUp",e.imageClickEvent.bind(e))):i.addEventListener("click",e.imageClickEvent.bind(e)),["touchstart","pointerdown","MSPointerDown"].forEach(function(t){i.addEventListener(t,e.imageTouchStart.bind(e))}),["touchmove","pointermove","MSPointerMove"].forEach(function(t){i.addEventListener(t,e.imageTouchMove.bind(e))}),["touchend","touchcancel","pointerup","MSPointerUp"].forEach(function(t){i.addEventListener(t,e.imageTouchEnd.bind(e))})},this.options.animationSpeed+100)}},{key:"removeImage",value:function(){var t=document.querySelector("#"+this.options.selectorId);document.body.removeChild(t),this.image=null}},{key:"imageClickEvent",value:function(t){if(t.preventDefault(),a.debug("click"),this.options.quitOnImgClick)return this.quitLightbox(),!1;if(this.wasTouched(t))return!0;var e=t.pageX-t.target.offsetLeft;a.debug(e);var i=Array.prototype.indexOf.call(this.targets,this.target)-(this.imageWidth/2>e?1:-1);i>this.targets.length-1?this.target=this.targets[0]:0>i?this.target=this.targets[this.targets.length-1]:this.target=this.targets[i],this.loadImage()}},{key:"imageTouchStart",value:function(t){return!this.wasTouched(t)||this.options.quitOnImgClick?!0:void(this.swipeStart=t.pageX||t.touches[0].pageX)}},{key:"imageTouchMove",value:function(t){return!this.wasTouched(t)||this.options.quitOnImgClick?!0:(t.preventDefault(),this.swipeEnd=t.pageX||t.touches[0].pageX,this.swipeDiff=this.swipeStart-this.swipeEnd,void(this.image.style.transform="translateX("+-this.swipeDiff+"px)"))}},{key:"imageTouchEnd",value:function(t){if(!this.wasTouched(t)||this.options.quitOnImgClick)return!0;if(a.debug(this.swipeDiff),Math.abs(this.swipeDiff)>50){var e=Array.prototype.indexOf.call(this.targets,this.target)-(this.swipeDiff<0?1:-1);e>this.targets.length-1?this.target=this.targets[0]:0>e?this.target=this.targets[this.targets.length-1]:this.target=this.targets[e];var i=this.swipeDiff>0?s.LightDirection.RIGHT:s.LightDirection.LEFT;this.loadImage(i)}else this.image.style.transform="translateX(0px)"}},{key:"setImage",value:function(){var t=this;if(!this.image)return!1;var e=.8*window.innerWidth,i=.9*window.innerHeight,n=new Image;n.src=this.image.src,n.onload=function(){if(t.imageWidth=n.width,t.imageHeight=n.height,t.imageWidth>e||t.imageHeight>i){var o=t.imageWidth/t.imageHeight>e/i?t.imageWidth/e:t.imageHeight/i;t.imageWidth/=o,t.imageHeight/=o}t.image.style.width=t.imageWidth+"px",t.image.style.height=t.imageHeight+"px",t.image.style.top=(window.innerHeight-t.imageHeight)/2+"px",t.image.style.left=(window.innerWidth-t.imageWidth)/2+"px"}}},{key:"wasTouched",value:function(e){if(t.HAS_TOUCH)return!0;if(!t.HAS_POINTERS||"undefined"==typeof e||"undefined"==typeof e.pointerType)return!1;if("undefined"!=typeof e.MSPOINTER_TYPE_MOUSE){if(e.MSPOINTER_TYPE_MOUSE!==e.pointerType)return!0}else if("mouse"!==e.pointerType)return!0;return!1}},{key:"switchToIndex",value:function(t){t>=0&&t<this.targets.length&&(this.target=this.targets[t],this.loadImage())}},{key:"windowResizeListener",value:function(){a.debug("resized"),this.setImage()}},{key:"addOnStartListener",value:function(t){this.onStartListeners.push(t)}},{key:"addOnEndListener",value:function(t){this.onEndListeners.push(t)}},{key:"addOnLoadStartListener",value:function(t){this.onLoadStartListeners.push(t)}},{key:"addOnLoadEndListener",value:function(t){this.onLoadEndListeners.push(t)}},{key:"registerPlugin",value:function(t){t.register(this)}}]),t}();e["default"]=u,u.HAS_TOUCH="ontouchstart"in window,u.HAS_POINTERS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,t.exports=e["default"]},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=e.CSSUtil=function(){function t(){i(this,t)}return n(t,null,[{key:"setTransitionProperty",value:function(t,e){var i=t.style;return""===i.transition?void(i.transition=e):""===i.WebkitTransition?void(i.WebkitTransition=e):""===i.MozTransition?void(i.MozTransition=e):void(""===i.OTransition&&(i.OTransition=e))}},{key:"cssTransitionSupport",value:function(){var t=document.body||document.documentElement,e=t.style;return""===e.WebkitTransition?"-webkit-":""===e.MozTransition?"-moz-":""===e.OTransition?"-o-":""===e.transition?"":!1}},{key:"cssTransitionTranslateX",value:function(e,i,n){var o=t.cssTransitionSupport();e.style[o+"transform"]="translateX("+i+")",e.style[o+"transition"]=o+"transform "+n+"s linear"}}]),t}();o.isCssTransitionSupport=o.cssTransitionSupport()!==!1},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=e.LightDirection=function o(){i(this,o)};n.LEFT=1,n.RIGHT=-1},function(t,e,i){var n,o;(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(s,a){"object"===r(t)&&t.exports?t.exports=a():"object"===r(i(5))?(n=a,o="function"==typeof n?n.call(e,i,e,t):n,!(void 0!==o&&(t.exports=o))):s.log=a()}(void 0,function(){function t(t){return("undefined"==typeof console?"undefined":r(console))===u?!1:void 0!==console[t]?e(console,t):void 0!==console.log?e(console,"log"):a}function e(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(n){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function i(t,e,i){return function(){("undefined"==typeof console?"undefined":r(console))!==u&&(n.call(this,e,i),this[t].apply(this,arguments))}}function n(t,e){for(var i=0;i<l.length;i++){var n=l[i];this[n]=t>i?a:this.methodFactory(n,t,e)}}function o(e,n,o){return t(e)||i.apply(this,arguments)}function s(t,e,i){function s(t){var e=(l[t]||"silent").toUpperCase();try{return void(window.localStorage[h]=e)}catch(i){}try{window.document.cookie=encodeURIComponent(h)+"="+e+";"}catch(i){}}function a(){var t;try{t=window.localStorage[h]}catch(e){}if(("undefined"==typeof t?"undefined":r(t))===u)try{var i=window.document.cookie,n=i.indexOf(encodeURIComponent(h)+"=");n&&(t=/^([^;]+)/.exec(i.slice(n))[1])}catch(e){}return void 0===c.levels[t]&&(t=void 0),t}var d,c=this,h="loglevel";t&&(h+=":"+t),c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=i||o,c.getLevel=function(){return d},c.setLevel=function(e,i){if("string"==typeof e&&void 0!==c.levels[e.toUpperCase()]&&(e=c.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=c.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;return d=e,i!==!1&&s(e),n.call(c,e,t),("undefined"==typeof console?"undefined":r(console))===u&&e<c.levels.SILENT?"No console available for logging":void 0},c.setDefaultLevel=function(t){a()||c.setLevel(t,!1)},c.enableAll=function(t){c.setLevel(c.levels.TRACE,t)},c.disableAll=function(t){c.setLevel(c.levels.SILENT,t)};var g=a();null==g&&(g=null==e?"WARN":e),c.setLevel(g,!1)}var a=function(){},u="undefined",l=["trace","debug","info","warn","error"],d=new s,c={};d.getLogger=function(t){if("string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=c[t];return e||(e=c[t]=new s(t,d.getLevel(),d.methodFactory)),e};var h=("undefined"==typeof window?"undefined":r(window))!==u?window.log:void 0;return d.noConflict=function(){return("undefined"==typeof window?"undefined":r(window))!==u&&window.log===d&&(window.log=h),d},d})}).call(e,i(4)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){(function(e){t.exports=e}).call(e,{})}]); \ No newline at end of file
+var LightBox=LightBox||{};LightBox.Core=function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();Object.defineProperty(e,"__esModule",{value:!0});var r=i(1),s=i(2),a=i(3),u=function(){function t(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n(this,t),a.info("LightBox"),this.targets=document.querySelectorAll(e),a.debug(this.targets),a.debug("HAS_TOUCH "+t.HAS_TOUCH);var o={allowedTypes:"png|jpg|jpeg|gif",restrictTypes:!1,selectorId:"imagelightbox",animationSpeed:350,preloadNext:!0,enableKeyboard:!0,quitOnEnd:!1,quitOnImgClick:!1,quitOnDocClick:!0};this.options=Object.assign(i,o),a.info(this.options),this.target=null,this.image=null,this.imageWidth=0,this.imageHeight=0,this.swipeDiff=0,this.inProgress=!1,this.swipeStart=0,this.swipeEnd=0,this.onStartListeners=[],this.onEndListeners=[],this.onLoadStartListeners=[],this.onLoadEndListeners=[],this.bindEvents()}return o(t,[{key:"bindEvents",value:function(){var e=this;Array.prototype.forEach.call(this.targets,function(t){t.addEventListener("click",e.onImageClick.bind(e))}),window.addEventListener("resize",this.windowResizeListener.bind(this)),this.options.quitOnDocClick&&document.body.addEventListener(t.HAS_TOUCH?"touchend":"click",this.documentClick.bind(this)),this.options.enableKeyboard&&document.body.addEventListener("keyup",this.handleKeyboard.bind(this))}},{key:"handleKeyboard",value:function(t){if(null===this.image)return!0;if(t.preventDefault(),27===t.keyCode&&this.quitLightbox(),37===t.keyCode||39===t.keyCode){var e=Array.prototype.indexOf.call(this.targets,this.target)-(37===t.keyCode?1:-1);e>this.targets.length-1?this.target=this.targets[0]:0>e?this.target=this.targets[this.targets.length-1]:this.target=this.targets[e],this.loadImage()}}},{key:"documentClick",value:function(){a.debug("document click"),null!==this.image&&this.target.href===this.image.src&&(a.info("quitting"),this.options.quitOnDocClick&&this.quitLightbox())}},{key:"quitLightbox",value:function(){var t=this;a.debug("quitLightbox"),null!==this.image&&(r.CSSUtil.setTransitionProperty(this.image,"opacity "+this.options.animationSpeed/1e3+"s linear"),setTimeout(function(){t.image.style.opacity=0},5),setTimeout(function(){t.removeImage(),t.inProgress=!1,t.onEndListeners.forEach(function(t){return t()})},this.options.animationSpeed))}},{key:"onImageClick",value:function(t){a.debug(t);var e=t.srcElement;void 0===e&&(e=t.originalTarget);var i=e.parentElement;return this.isTargetValid(i)?(t.preventDefault(),void(this.inProgress||(this.inProgress=!1,this.onStartListeners.forEach(function(t){return t()}),this.target=i,this.loadImage()))):!0}},{key:"isTargetValid",value:function(t){if(this.options.restrictTypes===!1)return!0;var e=new RegExp("(.("+this.options.allowedTypes+")$)");return"a"===t.tagName.toLowerCase()&&e.test(t.href)}},{key:"loadImage",value:function(){var e=this,i=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(a.info("loadImage"),this.inProgress)return!1;if(a.debug("not progress"),null!==this.image){if(a.debug("has current image"),i!==!1&&(this.targets.length<2||this.options.quitOnEnd===!0&&(i===s.LightDirection.RIGHT&&0===Array.prototype.indexOf(this.targets,this.target)||i===s.LightDirection.LEFT&&Array.prototype.indexOf(this.targets,this.target)===targets.length-1)))return this.quitLightbox(),!1;a.debug("unload"),r.CSSUtil.setTransitionProperty(this.image,"opacity "+this.options.animationSpeed/1e3+"s linear");var n="0px";i!==!1&&(n=100*i-this.swipeDiff+"px"),this.image.style.transform="translateX("+n+")",setTimeout(function(){e.image.style.opacity=0},5),setTimeout(function(){a.debug("remove from dom"),e.removeImage()},this.options.animationSpeed),this.swipeDiff=0}this.inProgress=!0,this.onLoadStartListeners.forEach(function(t){return t()}),setTimeout(function(){a.debug("loadImage in");var i=new Image;e.image=i,i.onload=function(){i.id=e.options.selectorId,a.debug("img loaded"),document.body.appendChild(i),e.setImage(),i.style.opacity=0;var t=e.options.animationSpeed/1e3;if(a.debug(t),r.CSSUtil.setTransitionProperty(i,"opacity "+t+"s ease"),i.style.transform="translateX(0px)",setTimeout(function(){i.style.opacity=1},10),setTimeout(function(){e.inProgress=!1,e.onLoadEndListeners.forEach(function(t){return t()})},e.options.animationSpeed),e.options.preloadNext){var n=Array.prototype.indexOf.call(e.targets,e.target),o=e.targets[n+1];if(null!==o&&void 0!==o){a.debug("preloading next");var s=new Image;s.src=o.href}else a.debug("no preloading")}},i.src=e.target.href,e.swipeStart=0,e.swipeEnd=0,t.HAS_POINTERS?(i.addEventListener("pointerup",e.imageClickEvent.bind(e)),i.addEventListener("MSPointerUp",e.imageClickEvent.bind(e))):i.addEventListener("click",e.imageClickEvent.bind(e)),["touchstart","pointerdown","MSPointerDown"].forEach(function(t){i.addEventListener(t,e.imageTouchStart.bind(e))}),["touchmove","pointermove","MSPointerMove"].forEach(function(t){i.addEventListener(t,e.imageTouchMove.bind(e))}),["touchend","touchcancel","pointerup","MSPointerUp"].forEach(function(t){i.addEventListener(t,e.imageTouchEnd.bind(e))})},this.options.animationSpeed+100)}},{key:"removeImage",value:function(){var t=document.querySelector("#"+this.options.selectorId);document.body.removeChild(t),this.image=null}},{key:"imageClickEvent",value:function(t){if(t.preventDefault(),a.debug("click"),this.options.quitOnImgClick)return this.quitLightbox(),!1;if(this.wasTouched(t))return!0;var e=t.pageX-t.target.offsetLeft;a.debug(e);var i=Array.prototype.indexOf.call(this.targets,this.target)-(this.imageWidth/2>e?1:-1);i>this.targets.length-1?this.target=this.targets[0]:0>i?this.target=this.targets[this.targets.length-1]:this.target=this.targets[i],this.loadImage()}},{key:"imageTouchStart",value:function(t){return!this.wasTouched(t)||this.options.quitOnImgClick?!0:void(this.swipeStart=t.pageX||t.touches[0].pageX)}},{key:"imageTouchMove",value:function(t){return!this.wasTouched(t)||this.options.quitOnImgClick?!0:(t.preventDefault(),this.swipeEnd=t.pageX||t.touches[0].pageX,this.swipeDiff=this.swipeStart-this.swipeEnd,void(this.image.style.transform="translateX("+-this.swipeDiff+"px)"))}},{key:"imageTouchEnd",value:function(t){if(!this.wasTouched(t)||this.options.quitOnImgClick)return!0;if(a.debug(this.swipeDiff),Math.abs(this.swipeDiff)>50){var e=Array.prototype.indexOf.call(this.targets,this.target)-(this.swipeDiff<0?1:-1);e>this.targets.length-1?this.target=this.targets[0]:0>e?this.target=this.targets[this.targets.length-1]:this.target=this.targets[e];var i=this.swipeDiff>0?s.LightDirection.RIGHT:s.LightDirection.LEFT;this.loadImage(i)}else this.image.style.transform="translateX(0px)"}},{key:"setImage",value:function(){var t=this;if(!this.image)return!1;var e=.8*window.innerWidth,i=.9*window.innerHeight,n=new Image;n.src=this.image.src,n.onload=function(){if(t.imageWidth=n.width,t.imageHeight=n.height,t.imageWidth>e||t.imageHeight>i){var o=t.imageWidth/t.imageHeight>e/i?t.imageWidth/e:t.imageHeight/i;t.imageWidth/=o,t.imageHeight/=o}t.image.style.width=t.imageWidth+"px",t.image.style.height=t.imageHeight+"px",t.image.style.top=(window.innerHeight-t.imageHeight)/2+"px",t.image.style.left=(window.innerWidth-t.imageWidth)/2+"px"}}},{key:"wasTouched",value:function(e){if(t.HAS_TOUCH)return!0;if(!t.HAS_POINTERS||"undefined"==typeof e||"undefined"==typeof e.pointerType)return!1;if("undefined"!=typeof e.MSPOINTER_TYPE_MOUSE){if(e.MSPOINTER_TYPE_MOUSE!==e.pointerType)return!0}else if("mouse"!==e.pointerType)return!0;return!1}},{key:"switchToIndex",value:function(t){t>=0&&t<this.targets.length&&(this.target=this.targets[t],this.loadImage())}},{key:"windowResizeListener",value:function(){a.debug("resized"),this.setImage()}},{key:"addOnStartListener",value:function(t){this.onStartListeners.push(t)}},{key:"addOnEndListener",value:function(t){this.onEndListeners.push(t)}},{key:"addOnLoadStartListener",value:function(t){this.onLoadStartListeners.push(t)}},{key:"addOnLoadEndListener",value:function(t){this.onLoadEndListeners.push(t)}},{key:"registerPlugin",value:function(t){t.register(this)}}]),t}();e["default"]=u,u.HAS_TOUCH="ontouchstart"in window,u.HAS_POINTERS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,t.exports=e["default"]},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=e.CSSUtil=function(){function t(){i(this,t)}return n(t,null,[{key:"setTransitionProperty",value:function(t,e){var i=t.style;return""===i.transition?void(i.transition=e):""===i.WebkitTransition?void(i.WebkitTransition=e):""===i.MozTransition?void(i.MozTransition=e):void(""===i.OTransition&&(i.OTransition=e))}},{key:"cssTransitionSupport",value:function(){var t=document.body||document.documentElement,e=t.style;return""===e.WebkitTransition?"-webkit-":""===e.MozTransition?"-moz-":""===e.OTransition?"-o-":""===e.transition?"":!1}},{key:"cssTransitionTranslateX",value:function(e,i,n){var o=t.cssTransitionSupport();e.style[o+"transform"]="translateX("+i+")",e.style[o+"transition"]=o+"transform "+n+"s linear"}}]),t}();o.isCssTransitionSupport=o.cssTransitionSupport()!==!1},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=e.LightDirection=function o(){i(this,o)};n.LEFT=1,n.RIGHT=-1},function(t,e,i){var n,o;(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(s,a){"object"===r(t)&&t.exports?t.exports=a():"object"===r(i(5))?(n=a,o="function"==typeof n?n.call(e,i,e,t):n,!(void 0!==o&&(t.exports=o))):s.log=a()}(void 0,function(){function t(t){return("undefined"==typeof console?"undefined":r(console))===u?!1:void 0!==console[t]?e(console,t):void 0!==console.log?e(console,"log"):a}function e(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(n){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function i(t,e,i){return function(){("undefined"==typeof console?"undefined":r(console))!==u&&(n.call(this,e,i),this[t].apply(this,arguments))}}function n(t,e){for(var i=0;i<l.length;i++){var n=l[i];this[n]=t>i?a:this.methodFactory(n,t,e)}}function o(e,n,o){return t(e)||i.apply(this,arguments)}function s(t,e,i){function s(t){var e=(l[t]||"silent").toUpperCase();try{return void(window.localStorage[h]=e)}catch(i){}try{window.document.cookie=encodeURIComponent(h)+"="+e+";"}catch(i){}}function a(){var t;try{t=window.localStorage[h]}catch(e){}if(("undefined"==typeof t?"undefined":r(t))===u)try{var i=window.document.cookie,n=i.indexOf(encodeURIComponent(h)+"=");n&&(t=/^([^;]+)/.exec(i.slice(n))[1])}catch(e){}return void 0===c.levels[t]&&(t=void 0),t}var d,c=this,h="loglevel";t&&(h+=":"+t),c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=i||o,c.getLevel=function(){return d},c.setLevel=function(e,i){if("string"==typeof e&&void 0!==c.levels[e.toUpperCase()]&&(e=c.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=c.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;return d=e,i!==!1&&s(e),n.call(c,e,t),("undefined"==typeof console?"undefined":r(console))===u&&e<c.levels.SILENT?"No console available for logging":void 0},c.setDefaultLevel=function(t){a()||c.setLevel(t,!1)},c.enableAll=function(t){c.setLevel(c.levels.TRACE,t)},c.disableAll=function(t){c.setLevel(c.levels.SILENT,t)};var g=a();null==g&&(g=null==e?"WARN":e),c.setLevel(g,!1)}var a=function(){},u="undefined",l=["trace","debug","info","warn","error"],d=new s,c={};d.getLogger=function(t){if("string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=c[t];return e||(e=c[t]=new s(t,d.getLevel(),d.methodFactory)),e};var h=("undefined"==typeof window?"undefined":r(window))!==u?window.log:void 0;return d.noConflict=function(){return("undefined"==typeof window?"undefined":r(window))!==u&&window.log===d&&(window.log=h),d},d})}).call(e,i(4)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){(function(e){t.exports=e}).call(e,{})}]); \ No newline at end of file
diff --git a/dist/LightBox.Plugins.min.js b/dist/LightBox.Plugins.min.js
index ced5c13..d80cb5b 100644
--- a/dist/LightBox.Plugins.min.js
+++ b/dist/LightBox.Plugins.min.js
@@ -8,6 +8,5 @@
var LightBox=LightBox||{};LightBox.ActivityIndicator=function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){n(this,t),this.element=document.createElement("div"),this.element.id="imagelightbox-loading",this.element.appendChild(document.createElement("div"))}return i(t,[{key:"register",value:function(t){t.addOnLoadStartListener(this.activityIndicatorOn.bind(this)),t.addOnLoadEndListener(this.activityIndicatorOff.bind(this)),t.addOnEndListener(this.activityIndicatorOff.bind(this))}},{key:"activityIndicatorOn",value:function(){document.body.appendChild(this.element)}},{key:"activityIndicatorOff",value:function(){try{document.body.removeChild(this.element)}catch(t){}}}]),t}();e["default"]=r,t.exports=e["default"]}]);
var LightBox=LightBox||{};LightBox.Captions=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){n(this,t),this.element=document.createElement("div"),this.element.id="imagelightbox-caption"}return i(t,[{key:"register",value:function(t){this.lightbox=t,t.addOnLoadStartListener(this.hideCaption.bind(this)),t.addOnLoadEndListener(this.showCaption.bind(this)),t.addOnEndListener(this.hideCaption.bind(this))}},{key:"showCaption",value:function(){var t=this.lightbox.target.querySelector("img");if(null!==t){var e=t.getAttribute("alt");null!==e&&e.length>0&&(this.element.innerHTML=t.alt,document.body.appendChild(this.element))}}},{key:"hideCaption",value:function(){try{document.body.removeChild(this.element)}catch(t){}}}]),t}();e["default"]=o,t.exports=e["default"]}]);
var LightBox=LightBox||{};LightBox.CloseButton=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];n(this,t),this.closeOnDocumentClick=e,this.element=document.createElement("a"),this.element.id="imagelightbox-close",this.element.innerHTML="Close"}return i(t,[{key:"register",value:function(t){this.lightbox=t,t.addOnStartListener(this.showButton.bind(this)),t.addOnEndListener(this.hideButton.bind(this))}},{key:"showButton",value:function(){var t=this;this.lightbox.options.quitOnDocClick=this.closeOnDocumentClick,["click","touchend"].forEach(function(e){t.element.addEventListener(e,t.exitLightbox.bind(t))}),document.body.appendChild(this.element)}},{key:"hideButton",value:function(){document.body.removeChild(this.element)}},{key:"exitLightbox",value:function(){this.lightbox.quitLightbox()}}]),t}();e["default"]=o,t.exports=e["default"]}]);
-var LightBox=LightBox||{};LightBox.Core=function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();Object.defineProperty(e,"__esModule",{value:!0});var r=i(1),s=i(2),a=i(3),u=function(){function t(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n(this,t),a.info("LightBox"),this.targets=document.querySelectorAll(e),a.debug(this.targets),a.debug("HAS_TOUCH "+t.HAS_TOUCH);var o={allowedTypes:"png|jpg|jpeg|gif",restrictTypes:!1,selectorId:"imagelightbox",animationSpeed:350,preloadNext:!0,enableKeyboard:!0,quitOnEnd:!1,quitOnImgClick:!1,quitOnDocClick:!0};this.options=Object.assign(i,o),a.info(this.options),this.target=null,this.image=null,this.imageWidth=0,this.imageHeight=0,this.swipeDiff=0,this.inProgress=!1,this.swipeStart=0,this.swipeEnd=0,this.onStartListeners=[],this.onEndListeners=[],this.onLoadStartListeners=[],this.onLoadEndListeners=[],this.bindEvents()}return o(t,[{key:"bindEvents",value:function(){var e=this;Array.prototype.forEach.call(this.targets,function(t){t.addEventListener("click",e.onImageClick.bind(e))}),window.addEventListener("resize",this.windowResizeListener.bind(this)),this.options.quitOnDocClick&&document.body.addEventListener(t.HAS_TOUCH?"touchend":"click",this.documentClick.bind(this)),this.options.enableKeyboard&&document.body.addEventListener("keyup",this.handleKeyboard.bind(this))}},{key:"handleKeyboard",value:function(t){if(null===this.image)return!0;if(t.preventDefault(),27===t.keyCode&&this.quitLightbox(),37===t.keyCode||39===t.keyCode){var e=Array.prototype.indexOf.call(this.targets,this.target)-(37===t.keyCode?1:-1);e>this.targets.length-1?this.target=this.targets[0]:0>e?this.target=this.targets[this.targets.length-1]:this.target=this.targets[e],this.loadImage()}}},{key:"documentClick",value:function(){a.debug("document click"),null!==this.image&&this.target.href===this.image.src&&(a.info("quitting"),this.options.quitOnDocClick&&this.quitLightbox())}},{key:"quitLightbox",value:function(){var t=this;a.debug("quitLightbox"),null!==this.image&&(r.CSSUtil.setTransitionProperty(this.image,"opacity "+this.options.animationSpeed/1e3+"s linear"),setTimeout(function(){t.image.style.opacity=0},5),setTimeout(function(){t.removeImage(),t.inProgress=!1,t.onEndListeners.forEach(function(t){return t()})},this.options.animationSpeed))}},{key:"onImageClick",value:function(t){a.debug(t);var e=t.srcElement.parentElement;return this.isTargetValid(e)?(t.preventDefault(),void(this.inProgress||(this.inProgress=!1,this.onStartListeners.forEach(function(t){return t()}),this.target=e,this.loadImage()))):!0}},{key:"isTargetValid",value:function(t){if(this.options.restrictTypes===!1)return!0;var e=new RegExp("(.("+this.options.allowedTypes+")$)");return"a"===t.tagName.toLowerCase()&&e.test(t.href)}},{key:"loadImage",value:function(){var e=this,i=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(a.info("loadImage"),this.inProgress)return!1;if(a.debug("not progress"),null!==this.image){if(a.debug("has current image"),i!==!1&&(this.targets.length<2||this.options.quitOnEnd===!0&&(i===s.LightDirection.RIGHT&&0===Array.prototype.indexOf(this.targets,this.target)||i===s.LightDirection.LEFT&&Array.prototype.indexOf(this.targets,this.target)===targets.length-1)))return this.quitLightbox(),!1;a.debug("unload"),r.CSSUtil.setTransitionProperty(this.image,"opacity "+this.options.animationSpeed/1e3+"s linear");var n="0px";i!==!1&&(n=100*i-this.swipeDiff+"px"),this.image.style.transform="translateX("+n+")",setTimeout(function(){e.image.style.opacity=0},5),setTimeout(function(){a.debug("remove from dom"),e.removeImage()},this.options.animationSpeed),this.swipeDiff=0}this.inProgress=!0,this.onLoadStartListeners.forEach(function(t){return t()}),setTimeout(function(){a.debug("loadImage in");var i=new Image;e.image=i,i.onload=function(){i.id=e.options.selectorId,a.debug("img loaded"),document.body.appendChild(i),e.setImage(),i.style.opacity=0;var t=e.options.animationSpeed/1e3;if(a.debug(t),r.CSSUtil.setTransitionProperty(i,"opacity "+t+"s ease"),i.style.transform="translateX(0px)",setTimeout(function(){i.style.opacity=1},10),setTimeout(function(){e.inProgress=!1,e.onLoadEndListeners.forEach(function(t){return t()})},e.options.animationSpeed),e.options.preloadNext){var n=Array.prototype.indexOf.call(e.targets,e.target),o=e.targets[n+1];if(null!==o&&void 0!==o){a.debug("preloading next");var s=new Image;s.src=o.href}else a.debug("no preloading")}},i.src=e.target.href,e.swipeStart=0,e.swipeEnd=0,t.HAS_POINTERS?(i.addEventListener("pointerup",e.imageClickEvent.bind(e)),i.addEventListener("MSPointerUp",e.imageClickEvent.bind(e))):i.addEventListener("click",e.imageClickEvent.bind(e)),["touchstart","pointerdown","MSPointerDown"].forEach(function(t){i.addEventListener(t,e.imageTouchStart.bind(e))}),["touchmove","pointermove","MSPointerMove"].forEach(function(t){i.addEventListener(t,e.imageTouchMove.bind(e))}),["touchend","touchcancel","pointerup","MSPointerUp"].forEach(function(t){i.addEventListener(t,e.imageTouchEnd.bind(e))})},this.options.animationSpeed+100)}},{key:"removeImage",value:function(){var t=document.querySelector("#"+this.options.selectorId);document.body.removeChild(t),this.image=null}},{key:"imageClickEvent",value:function(t){if(t.preventDefault(),a.debug("click"),this.options.quitOnImgClick)return this.quitLightbox(),!1;if(this.wasTouched(t))return!0;var e=t.pageX-t.target.offsetLeft;a.debug(e);var i=Array.prototype.indexOf.call(this.targets,this.target)-(this.imageWidth/2>e?1:-1);i>this.targets.length-1?this.target=this.targets[0]:0>i?this.target=this.targets[this.targets.length-1]:this.target=this.targets[i],this.loadImage()}},{key:"imageTouchStart",value:function(t){return!this.wasTouched(t)||this.options.quitOnImgClick?!0:void(this.swipeStart=t.pageX||t.touches[0].pageX)}},{key:"imageTouchMove",value:function(t){return!this.wasTouched(t)||this.options.quitOnImgClick?!0:(t.preventDefault(),this.swipeEnd=t.pageX||t.touches[0].pageX,this.swipeDiff=this.swipeStart-this.swipeEnd,void(this.image.style.transform="translateX("+-this.swipeDiff+"px)"))}},{key:"imageTouchEnd",value:function(t){if(!this.wasTouched(t)||this.options.quitOnImgClick)return!0;if(a.debug(this.swipeDiff),Math.abs(this.swipeDiff)>50){var e=Array.prototype.indexOf.call(this.targets,this.target)-(this.swipeDiff<0?1:-1);e>this.targets.length-1?this.target=this.targets[0]:0>e?this.target=this.targets[this.targets.length-1]:this.target=this.targets[e];var i=this.swipeDiff>0?s.LightDirection.RIGHT:s.LightDirection.LEFT;this.loadImage(i)}else this.image.style.transform="translateX(0px)"}},{key:"setImage",value:function(){var t=this;if(!this.image)return!1;var e=.8*window.innerWidth,i=.9*window.innerHeight,n=new Image;n.src=this.image.src,n.onload=function(){if(t.imageWidth=n.width,t.imageHeight=n.height,t.imageWidth>e||t.imageHeight>i){var o=t.imageWidth/t.imageHeight>e/i?t.imageWidth/e:t.imageHeight/i;t.imageWidth/=o,t.imageHeight/=o}t.image.style.width=t.imageWidth+"px",t.image.style.height=t.imageHeight+"px",t.image.style.top=(window.innerHeight-t.imageHeight)/2+"px",t.image.style.left=(window.innerWidth-t.imageWidth)/2+"px"}}},{key:"wasTouched",value:function(e){if(t.HAS_TOUCH)return!0;if(!t.HAS_POINTERS||"undefined"==typeof e||"undefined"==typeof e.pointerType)return!1;if("undefined"!=typeof e.MSPOINTER_TYPE_MOUSE){if(e.MSPOINTER_TYPE_MOUSE!==e.pointerType)return!0}else if("mouse"!==e.pointerType)return!0;return!1}},{key:"switchToIndex",value:function(t){t>=0&&t<this.targets.length&&(this.target=this.targets[t],this.loadImage())}},{key:"windowResizeListener",value:function(){a.debug("resized"),this.setImage()}},{key:"addOnStartListener",value:function(t){this.onStartListeners.push(t)}},{key:"addOnEndListener",value:function(t){this.onEndListeners.push(t)}},{key:"addOnLoadStartListener",value:function(t){this.onLoadStartListeners.push(t)}},{key:"addOnLoadEndListener",value:function(t){this.onLoadEndListeners.push(t)}},{key:"registerPlugin",value:function(t){t.register(this)}}]),t}();e["default"]=u,u.HAS_TOUCH="ontouchstart"in window,u.HAS_POINTERS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,t.exports=e["default"]},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=e.CSSUtil=function(){function t(){i(this,t)}return n(t,null,[{key:"setTransitionProperty",value:function(t,e){var i=t.style;return""===i.transition?void(i.transition=e):""===i.WebkitTransition?void(i.WebkitTransition=e):""===i.MozTransition?void(i.MozTransition=e):void(""===i.OTransition&&(i.OTransition=e))}},{key:"cssTransitionSupport",value:function(){var t=document.body||document.documentElement,e=t.style;return""===e.WebkitTransition?"-webkit-":""===e.MozTransition?"-moz-":""===e.OTransition?"-o-":""===e.transition?"":!1}},{key:"cssTransitionTranslateX",value:function(e,i,n){var o=t.cssTransitionSupport();e.style[o+"transform"]="translateX("+i+")",e.style[o+"transition"]=o+"transform "+n+"s linear"}}]),t}();o.isCssTransitionSupport=o.cssTransitionSupport()!==!1},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=e.LightDirection=function o(){i(this,o)};n.LEFT=1,n.RIGHT=-1},function(t,e,i){var n,o;(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(s,a){"object"===r(t)&&t.exports?t.exports=a():"object"===r(i(5))?(n=a,o="function"==typeof n?n.call(e,i,e,t):n,!(void 0!==o&&(t.exports=o))):s.log=a()}(void 0,function(){function t(t){return("undefined"==typeof console?"undefined":r(console))===u?!1:void 0!==console[t]?e(console,t):void 0!==console.log?e(console,"log"):a}function e(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(n){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function i(t,e,i){return function(){("undefined"==typeof console?"undefined":r(console))!==u&&(n.call(this,e,i),this[t].apply(this,arguments))}}function n(t,e){for(var i=0;i<l.length;i++){var n=l[i];this[n]=t>i?a:this.methodFactory(n,t,e)}}function o(e,n,o){return t(e)||i.apply(this,arguments)}function s(t,e,i){function s(t){var e=(l[t]||"silent").toUpperCase();try{return void(window.localStorage[h]=e)}catch(i){}try{window.document.cookie=encodeURIComponent(h)+"="+e+";"}catch(i){}}function a(){var t;try{t=window.localStorage[h]}catch(e){}if(("undefined"==typeof t?"undefined":r(t))===u)try{var i=window.document.cookie,n=i.indexOf(encodeURIComponent(h)+"=");n&&(t=/^([^;]+)/.exec(i.slice(n))[1])}catch(e){}return void 0===c.levels[t]&&(t=void 0),t}var d,c=this,h="loglevel";t&&(h+=":"+t),c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=i||o,c.getLevel=function(){return d},c.setLevel=function(e,i){if("string"==typeof e&&void 0!==c.levels[e.toUpperCase()]&&(e=c.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=c.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;return d=e,i!==!1&&s(e),n.call(c,e,t),("undefined"==typeof console?"undefined":r(console))===u&&e<c.levels.SILENT?"No console available for logging":void 0},c.setDefaultLevel=function(t){a()||c.setLevel(t,!1)},c.enableAll=function(t){c.setLevel(c.levels.TRACE,t)},c.disableAll=function(t){c.setLevel(c.levels.SILENT,t)};var g=a();null==g&&(g=null==e?"WARN":e),c.setLevel(g,!1)}var a=function(){},u="undefined",l=["trace","debug","info","warn","error"],d=new s,c={};d.getLogger=function(t){if("string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=c[t];return e||(e=c[t]=new s(t,d.getLevel(),d.methodFactory)),e};var h=("undefined"==typeof window?"undefined":r(window))!==u?window.log:void 0;return d.noConflict=function(){return("undefined"==typeof window?"undefined":r(window))!==u&&window.log===d&&(window.log=h),d},d})}).call(e,i(4)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){(function(e){t.exports=e}).call(e,{})}]);
var LightBox=LightBox||{};LightBox.Navigation=function(t){function i(n){if(e[n])return e[n].exports;var a=e[n]={exports:{},id:n,loaded:!1};return t[n].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i){"use strict";function e(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(i,e,n){return e&&t(i.prototype,e),n&&t(i,n),i}}();Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function t(){e(this,t)}return n(t,[{key:"register",value:function(t){this.lightbox=t,t.addOnStartListener(this.showNavigation.bind(this)),t.addOnEndListener(this.hideNavigation.bind(this)),t.addOnLoadEndListener(this.updateNavigation.bind(this))}},{key:"showNavigation",value:function(){var t=this;this.sink=document.createElement("div"),this.sink.id="imagelightbox-nav-sink",this.nav=document.createElement("div"),this.nav.id="imagelightbox-nav",this.sink.appendChild(this.nav),Array.prototype.forEach.call(this.lightbox.targets,function(i){t.nav.appendChild(document.createElement("a"))}),document.body.appendChild(this.sink);var i=this.nav.querySelectorAll("a");Array.prototype.forEach.call(i,function(i,e){["click","touchend"].forEach(function(n){i.addEventListener(n,t.navClick.bind(t,e))})});var e=this.nav.getBoundingClientRect(),n=e.width/2;this.nav.style.marginLeft="-"+n+"px"}},{key:"updateNavigation",value:function(){Array.prototype.forEach.call(this.nav.childNodes,function(t){t.classList.remove("active")});var t=Array.prototype.indexOf.call(this.lightbox.targets,this.lightbox.target);this.nav.childNodes[t].classList.add("active")}},{key:"hideNavigation",value:function(){try{document.body.removeChild(this.sink)}catch(t){}}},{key:"navClick",value:function(t,i){i.stopPropagation(),i.cancelBubble=!0,this.lightbox.switchToIndex(t)}}]),t}();i["default"]=a,t.exports=i["default"]}]);
var LightBox=LightBox||{};LightBox.Overlay=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){n(this,e),this.element=document.createElement("div"),this.element.id="imagelightbox-overlay"}return r(e,[{key:"register",value:function(e){e.addOnStartListener(this.overlayOn.bind(this)),e.addOnEndListener(this.overlayOff.bind(this))}},{key:"overlayOn",value:function(){document.body.appendChild(this.element)}},{key:"overlayOff",value:function(){document.body.removeChild(this.element)}}]),e}();t["default"]=o,e.exports=t["default"]}]); \ No newline at end of file