) - Callback before lightbox is being opened. Parameters: `( instance )`.
  - **onClose** (fn) - Callback before lightbox is being closed. Parameters: `( instance )`.


## Image Link

Triggered when the HREF attribute is URL that ends with jpg / jpeg / png / gif / svg.

**EXAMPLE**

```html
<a href="/img/my-larger-image.jpg" class="my-image-link">
  <img src="/img/my-thumbnail-image.jpg">
</a>
```

```js
document.addEventListener('DOMContentLoaded', () => {

  hLightbox( document.querySelectorAll('.my-image-link'), {
    closeButton: true
  } );

});
```

## Template Link

Triggered when the HREF attribute is ID. It will look for `<template>` with that ID.

**EXAMPLE**

```html
<a href="#template-readmore" class="my-template-link"> Read More </a>

<template id="template-readmore">
  <h1>Hello World</h1>
  <p>
    Lorem ipsum dolor sit amet consectetur adipisicing elit.
    Eos eveniet possimus architecto nisi dolor vel adipisci atque magni ut sequi.
  </p>
</template>
```

```js
document.addEventListener('DOMContentLoaded', () => {

  hLightbox( document.querySelectorAll('.my-template-link') );

});
```

## Iframe Link

Triggered when the HREF attribute is URL that has `width` and `height` parameters, it will be shown inside iframe with that specified size.

```html
<a href="https://wikipedia.com?width=720&height=480" class="my-iframe-link">
	Open Wikipedia
</a>
```

```js
document.addEventListener('DOMContentLoaded', () => {

  hLightbox( document.querySelectorAll('.my-iframe-link') );

});
```

## FAQ

1. **How to add image caption?**
	
	Create a HTML template with image and it's caption.

1. **How to add next / prev arrow?**

	Currently this library doesn't support that.

-----

### Requirements

hLightbox depends on the following browser features and APIs:

- [Array.from](https://www.ecma-international.org/ecma-262/6.0/#sec-array.from)
- [Object.assign](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign)
- [requestAnimationFrame](https://www.w3.org/TR/animation-timing/#dom-windowanimationtiming-requestanimationframe)

Some of these APIs are capable of being polyfilled in older browsers. Check the linked resources above to determine if you must polyfill to achieve your desired level of browser support.

### Credit

This is a fork of [basicSlider](https://github.com/electerious/basicSlider) with some added features. So big thanks to [<NAME>](https://github.com/electerious) for creating an awesome basis for this library.
Even in a time of declining early-stage VC investment, nearly $5B was pumped into artificial intelligence startups in 2016. The most abused buzzword of 2017, everyone seemed to be talking about “artificial intelligence” and “AI,” but a lot was left to the imagination when it came to actual adoption. Despite the hullabaloo around AI, augmented reality and other futuristic technologies, little old personalization ended up the top inquiry made by retailers into leading analyst firm Gartner.
However, the problem with adoption of AI in industries like eCommerce has not been due to limitations of the technology itself. In fact, while eCommerce may not commonly be thought of as a hotbed for AI innovation, there are scores of machine learning startups that serve the sector. eCommerce giants Amazon and Alibaba are already using AI to implement end-to-end solutions focusing on the overall retail experience. And even for the rest of us, low hanging applications of artificial intelligence, albeit less sexy, can still support a desire for providing consumers with a more human touch. For example, identifying which recommendations strategy to serve new, returning, or loyal visitors to an eCommerce website.
But in order to meaningfully impact the customer experience on this one-to one level, machine learning algorithms need to ingest vast amounts of data. Much like an in-store associate collects information from a customer about what they are looking for, brands need to piece together clues users leave behind to better serve them. And the more data sources, the more successful an algorithm will be at predicting the desired outcome for each user. Trouble today is that even for tech-forward retailers, this data often exists across a myriad of siloed software programmes, making it impossible for them to create unified profiles of their customers for powering truly individualized recommendations, and experiences beyond.
Only with an understanding of all the actions a user took before interacting with a brand, can the modern customer journey be tailored to the person, and we all know that requires more than a sliver of data. It means understanding which homepage banner a user clicked on, how they arrived on a product page, and what incentives they commonly respond to. Then, using algorithms that constantly collect all user data and signals, serving the best variation to each individual user in real time, regardless of where they arrive from, what device they are using, and so on. AI not only rids eCommerce marketers of infinite tedious data analysis, it maximizes revenue generated as it optimizes more quickly than the average A/B test.
The key to humanizing experiences and influencing action is to treat each outcome as unique and dynamically respond to each customer individually, a feat which can only be scaled with machine learning. So while AI won’t upend retail anytime soon, practical applications of machine learning to common eCommerce problems will proliferate in 2018, benefiting brands that adopt the technology and a more personalized approach.
Very interesting article. I think the increase in AI within e-commerce is already starting to show due to it being easier to implement there, but where it will fit in within real world stores is a little harder to picture.MODERATOR: Thank you all for being here. This will be a briefing on background to discuss the events of the last few days with regard to Chen Guangcheng. We have with us two senior State Department officials. For your records, the first is [Senior State Department Official One], the second is [Senior State Department Official Two], both of whom are intimately involved in all of this.
[Senior State Department Official One] will have a statement, and then we’ll take about three or four questions from the room. People on the phone will be able to hear, but they will not be able to ask questions.
SENIOR STATE DEPARTMENT OFFICIAL ONE: [Senior State Department Official Two]?
MODERATOR: I’m sorry. [Senior State Department Official Two] is going to start. Go ahead.
SENIOR STATE DEPARTMENT OFFICIAL ONE: No. I go then he goes.
MODERATOR: Sorry. [Senior State Department Official One’s] statement and then [Senior State Department Official Two’s] statement. Go ahead.
PARTICIPANT: And we do want to thank you. Go ahead. Sorry.
SENIOR STATE DEPARTMENT OFFICIAL ONE: Okay. Good afternoon, everyone. Sorry to keep you all waiting here a little bit. I’ll have a statement, and then again as [Moderator] said, I think we’d be pleased to take some questions subsequently.
Chen Guangcheng, who I think of you all know, entered the United States Embassy in Beijing under exceptional circumstances on April 26, 2012, requesting medical treatment from the Embassy. In part because of his visual disability, he was injured while traveling to Beijing from his home village of Donshigu in Shandong province. That’s a couple hundred miles away. On humanitarian grounds, we assisted Mr. Chen in entering our facilities and allowed him to remain on a temporary basis. U.S. medical personnel conducted a series of medical tests and administered appropriate treatment while he was there.
Mr. Chen decided to depart the Embassy today and traveled to a hospital in Beijing. He did so on the basis of a number of understandings. China acknowledged that Mr. Chen will be treated humanely while he remains in China. During his stay at the hospital over the coming days, U.S. doctors and other visitors, including those from the U.S. Embassy, will have access to him. He has been reunited with his family, his wife and two children, at the hospital, and they will remain together with him as a family. He had not seen his son in a few years, and his wife had not seen him either, so this was a family reunification after a long and difficult separation.
When he leaves the hospital, the Chinese authorities have stated that Mr. Chen and his family will be relocated to a safe environment so that he may attend a university to pursue a course of study. I think many of you know that