diff --git a/docs/html/images/topic/instant-apps/s3-BandH-animated.gif b/docs/html/images/topic/instant-apps/s3-BandH-animated.gif index efa882740cb51..4e44f741f43c6 100644 Binary files a/docs/html/images/topic/instant-apps/s3-BandH-animated.gif and b/docs/html/images/topic/instant-apps/s3-BandH-animated.gif differ diff --git a/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif b/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif index 16c4619426714..7ed534eac88ec 100644 Binary files a/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif and b/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif differ diff --git a/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif b/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif index f5cbfb0d77ca1..4a14dc2e5fe12 100644 Binary files a/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif and b/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif differ diff --git a/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png b/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png index 1e07a74cc7609..fa9c2bfb6cfc5 100644 Binary files a/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png and b/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png differ diff --git a/docs/html/topic/instant-apps/index.jd b/docs/html/topic/instant-apps/index.jd index 28540aecfaa4e..b843405139a29 100644 --- a/docs/html/topic/instant-apps/index.jd +++ b/docs/html/topic/instant-apps/index.jd @@ -76,7 +76,9 @@ excludeFromSuggestions=true
+ src="/images/topic/instant-apps/s3-BandH-static.png" + data-stat="/images/topic/instant-apps/s3-BandH-static.png" + data-anim="/images/topic/instant-apps/s3-BandH-animated.gif">

B&H Photo
(via Google Search)
@@ -85,7 +87,9 @@ excludeFromSuggestions=true

+ src="/images/topic/instant-apps/s3-BuzzFeed-static.png" + data-stat="/images/topic/instant-apps/s3-BuzzFeed-static.png" + data-anim="/images/topic/instant-apps/s3-BuzzFeed-animated.gif">

BuzzfeedVideo
(via a shared link)
@@ -94,7 +98,9 @@ excludeFromSuggestions=true

+ src="/images/topic/instant-apps/s3-ParkandPay-static.png" + data-stat="/images/topic/instant-apps/s3-ParkandPay-static.png" + data-anim="/images/topic/instant-apps/s3-ParkandPay-animated.gif">

Park and Pay
(via NFC)
@@ -263,18 +269,30 @@ excludeFromSuggestions=true (function () { - function swapOnMouseover(evt) { - var target = evt.target; - var imageSrc = $(target).attr("src"); - - // Assumes that images are named *-static and *-animated. - if (imageSrc.indexOf("static") > -1) { - var newImageSrc = imageSrc.replace("static.png", "animated.gif"); - $(target).attr("src", newImageSrc).removeAttr("onmouseenter"); + function onMouseEnter(evt) { + if (evt.target.dataset && evt.target.dataset.anim) { + swap(evt.target, { + newStr: evt.target.dataset.anim + }); } } - $(".partner-gifs").mouseenter(swapOnMouseover); + function onMouseOut(evt) { + if (evt.target.dataset && evt.target.dataset.stat) { + swap(evt.target, { + newStr: evt.target.dataset.stat + }); + } + } + + function swap(target, options) { + if (options && options.newStr) { + $(target).attr("src", options.newStr); + } + } + + $(".partner-gifs").mouseenter(onMouseEnter); + $(".partner-gifs").mouseout(onMouseOut); })(); diff --git a/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif b/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif index efa882740cb51..4e44f741f43c6 100644 Binary files a/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif and b/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif differ diff --git a/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif b/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif index 16c4619426714..7ed534eac88ec 100644 Binary files a/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif and b/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif differ diff --git a/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif b/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif index f5cbfb0d77ca1..4a14dc2e5fe12 100644 Binary files a/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif and b/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif differ diff --git a/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png b/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png index 1e07a74cc7609..fa9c2bfb6cfc5 100644 Binary files a/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png and b/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png differ