/*! Akamai Image Viewer - v - 2017-06-01 * Copyright (c) 2017 Akamai */ !function(a){"function"==typeof define&&define.amd?define(["shoestring"],a):"object"==typeof module&&module.exports?module.exports=a():a()}(function(){function a(b,c){var d,e=typeof b,f=[];if(!b)return new i(f);if(b.call)return a.ready(b);if(b.constructor===i&&!c)return b;if("string"===e&&0===b.indexOf("<")){var j=h.createElement("div");return j.innerHTML=b,a(j).children().each(function(){j.removeChild(this)})}return"string"===e?c?a(c).find(b):(d=h.querySelectorAll(b),new i(d,b)):"[object Array]"===Object.prototype.toString.call(e)||g.NodeList&&b instanceof g.NodeList?new i(b,b):b.constructor===Array?new i(b,b):new i([b],b)}function b(a,b){var c=!1;return a.each(function(){for(var a=0;a1&&(b=b.reverse()),this.each(function(a){for(var c=0,d=b.length;c0?b[c].cloneNode(!0):b[c];this.parentNode.insertBefore(e,this.nextSibling)}})},a.fn.append=function(b){return"string"!=typeof b&&void 0===b.nodeType||(b=a(b)),this.each(function(a){for(var c=0,d=b.length;c0?b[c].cloneNode(!0):b[c])})},a.fn.appendTo=function(b){return this.each(function(){a(b).append(this)})},a.fn.attr=function(a,b){var c="string"==typeof a;return void 0===b&&c?this[0]?this[0].getAttribute(a):void 0:this.each(function(){if(c)this.setAttribute(a,b);else for(var d in a)a.hasOwnProperty(d)&&this.setAttribute(d,a[d])})},a.fn.before=function(b){return"string"!=typeof b&&void 0===b.nodeType||(b=a(b)),this.each(function(a){for(var c=0,d=b.length;c0?b[c].cloneNode(!0):b[c],this)})},a.fn.children=function(){var b,c,d=[];return this.each(function(){for(b=this.children,c=-1;c++-1&&c.push(this)}}),a(c)},a.fn.find=function(b){var c,d=[];return this.each(function(){c=this.querySelectorAll(b);for(var a=0,e=c.length;a0?b[c].cloneNode(!0):b[c];this.firstChild?this.insertBefore(e,this.firstChild):this.appendChild(e)}})},a.fn.prependTo=function(b){return this.each(function(){a(b).prepend(this)})},a.fn.prev=function(){var b=[];return this.each(function(){var c,d,e;c=a(this.parentNode)[0].childNodes;for(var f=c.length-1;f>=0;f--){if(d=c.item(f),e&&1===d.nodeType){b.push(d);break}d===this&&(e=!0)}}),a(b)},a.fn.prevAll=function(){var b=[];return this.each(function(){for(var c=a(this).prev();c.length;)b.push(c[0]),c=c.prev()}),a(b)},a.propFix={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",tabindex:"tabIndex"},a.fn.prop=function(b,c){if(this[0])return b=a.propFix[b]||b,void 0!==c?this.each(function(){this[b]=c}):this[0][b]},a.fn.removeAttr=function(a){return this.each(function(){this.removeAttribute(a)})},a.fn.removeClass=function(a){var b=a.replace(/^\s+|\s+$/g,"").split(" ");return this.each(function(){for(var a,c,d=0,e=b.length;d1&&(b=b.reverse()),this.each(function(a){var d,e=this.cloneNode(!0);if(c.push(e),this.parentNode)if(1===b.length)d=a>0?b[0].cloneNode(!0):b[0],this.parentNode.replaceChild(d,this);else{for(var f=0,g=b.length;f0?b[f].cloneNode(!0):b[f],this.parentNode.insertBefore(d,this.nextSibling);this.parentNode.removeChild(this)}}),a(c)},a.inputTypes=["text","hidden","password","color","date","datetime","email","month","number","range","search","tel","time","url","week"],a.inputTypeTest=new RegExp(a.inputTypes.join("|")),a.fn.serialize=function(){var b={};return a("input, select",this).each(function(){var c=this.type,d=this.name,e=this.value;a.inputTypeTest.test(c)||("checkbox"===c||"radio"===c)&&this.checked?b[d]=e:"SELECT"===this.nodeName&&(b[d]=this.options[this.selectedIndex].nodeValue)}),b},a.fn.siblings=function(){if(!this.length)return a([]);var b=[],c=this[0].parentNode.firstChild;do{1===c.nodeType&&c!==this[0]&&b.push(c),c=c.nextSibling}while(c);return a(b)};var n=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=n(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=n(b);return c};return a.fn.text=function(){return n(this)},a.fn.val=function(b){var c;return void 0!==b?this.each(function(){if("SELECT"===this.tagName){var c,d,e,f=this.options,g=[],h=f.length;for(g[0]=b;h--;)d=f[h],(d.selected=a.inArray(d.value,g)>=0)&&(c=!0,e=h);this.selectedIndex=c?e:-1}else this.value=b}):(c=this[0],"SELECT"===c.tagName?c.selectedIndex<0?"":c.options[c.selectedIndex].value:c.value)},a.fn.width=function(b){return a._dimension(this,"width",b)},a.fn.wrapInner=function(b){return this.each(function(){var c=this.innerHTML;this.innerHTML="",a(this).append(a(b).html(c))})},a.fn.bind=function(a,b,e){function f(a,c,d){var f;if(!a._namespace||a._namespace===c){a.data=b,a.namespace=a._namespace;var g=function(){return!0};a.isDefaultPrevented=function(){return!1};var h=a.preventDefault;return a.target=d||a.target||a.srcElement,a.preventDefault=function(){return h?function(){a.isDefaultPrevented=g,h.call(a)}:function(){a.isDefaultPrevented=g,a.returnValue=!1}}(),a.stopPropagation=a.stopPropagation||function(){a.cancelBubble=!0},f=e.apply(this,[a].concat(a._args)),!1===f&&(a.preventDefault(),a.stopPropagation()),f}}"function"==typeof b&&(e=b,b=null);var g=a.split(" ");return this.each(function(){for(var a,b,h,i=this,j=0,k=g.length;j0?l[1]:null;a=function(a){return i.ssEventTrigger&&(a._namespace=i.ssEventTrigger._namespace,a._args=i.ssEventTrigger._args,i.ssEventTrigger=null),f.call(i,a,n)},b=null,h=null,c(this,m),this.addEventListener(m,a,!1),d(this,m,{callfunc:b||a,isCustomEvent:!!b,customEventLoop:h,originalCallback:e,namespace:n})}})},a.fn.on=a.fn.bind,a.fn.unbind=function(a,b){var c=a?a.split(" "):[];return this.each(function(){if(this.shoestringData&&this.shoestringData.events)if(c.length)for(var a,d,g,h=0,i=c.length;h0?a[1]:null,d?e.call(this,d,g,b):f.call(this,g,b);else f.call(this)})},a.fn.off=a.fn.unbind,a.fn.one=function(b,c){var d=b.split(" ");return this.each(function(){for(var b,e={},f=a(this),g=0,h=d.length;g0?a[1]:null,"click"===d&&"INPUT"===this.tagName&&"checkbox"===this.type&&this.click)return this.click(),!1;if(h.createEvent){var i=h.createEvent("Event");i.initEvent(d,!0,!0),i._args=b,i._namespace=e,this.dispatchEvent(i)}}})},a}),window.jQuery||(window.jQuery=window.jQuery||window.shoestring),function(a){a.Akamai=a.Akamai||{},window.componentNamespace="Akamai"}("undefined"==typeof exports?window:exports),function(a,b){var c;b(a),c=b(document.documentElement);var d=a.componentNamespace=a.componentNamespace||"FG";a[d]=a[d]||{},Function.prototype.bind=Function.prototype.bind||function(a){var b=this;return function(){b.apply(a,arguments)}};var e=a[d].Tau=function(c,d){var f;this.element=c,this.options=d||{},this.$element=b(c),this.$initial=this.$element.find("img"),this.$loading=this.$element.find(".loading"),this.index=0,this.frames=this.$initial.length>1?this.$initial.length:parseInt(this.$initial.attr("data-frames"),10)||this.options.frames,f=parseInt(this.$initial.attr("data-reduced-step-size"),10)||4,this.stepSize=a.requestAnimationFrame?1:f,this.autoRotateStartDelay=(this.options.autoplay||{}).delay||parseInt(this.$initial.attr("data-auto-rotate-delay"),10)||e.autoRotateStartDelay,this.mouseMoveBinding=this.rotateEvent.bind(this),this.touchMoveBinding=this.rotateEvent.bind(this),this.path=new e.Path,this.$initial.first().addClass("focused"),this.$element.addClass("tau-enhanced"),this.$render=b('
').css("position","absolute").css("left","0").css("top","0").prependTo(this.element),!1!==this.options.canvas&&(this.canvas=b("").prependTo(this.element)[0],this.canvas.getContext&&(this.canvasCtx=this.canvas.getContext("2d"),this.$element.addClass("tau-canvas"),b(a).bind("resize",function(){clearTimeout(this.canvasResizeTimeout),this.canvasResizeTimeout=setTimeout(this.renderCanvas.bind(this),100)}.bind(this)))),this.options.controls&&(this.options.controls.text=this.options.controls.text||{play:"Spin Object",left:"Rotate Left",right:"Rotate Right"},this.createControls()),this.createImages(),this.options.autoplay&&this.options.autoplay.enabled&&(this.autostartTimeout=setTimeout(this.autoRotate.bind(this),this.autoRotateStartDelay));var g=setInterval(function(){this.goto(this.index)&&(clearInterval(g),this.initialized=!0,this.$element.trigger("tau.init"))}.bind(this));this.bind()};e.autoRotateTraversalTime=4500,e.autoRotateStartDelay=100,e.verticalScrollRatio=4,e.maxVelocity=60,e.prototype.createControls=function(){this.$controls=b("
"),this.options.controls.play&&this.$controls.append(this.controlAnchorMarkup("play")),this.options.controls.arrows&&this.$controls.prepend(this.controlAnchorMarkup("left")).append(this.controlAnchorMarkup("right")),this.$controls.bind("mousedown touchstart",this.onControlDown.bind(this)),this.$controls.bind("mouseup",this.onControlUp.bind(this)),this.$controls.bind("click",function(a){b(a.target).is("a")&&a.preventDefault()}),this.$element.append(this.$controls)},e.prototype.controlAnchorMarkup=function(a){var b=this.options.controls.text[a];return""+b+""},e.prototype.onControlDown=function(a){switch(b(a.target).closest("a").attr("data-tau-controls")){case"left":this.$element.addClass("control-left-down"),this.stopAutoRotate(),this.autoRotate();break;case"right":this.$element.addClass("control-right-down"),this.stopAutoRotate(),this.autoRotate(!0)}},e.prototype.onControlUp=function(a){switch(b(a.target).closest("a").attr("data-tau-controls")){case"left":case"right":this.$element.removeClass("control-left-down"),this.$element.removeClass("control-right-down"),this.stopAutoRotate();break;case"play":this.autoInterval?this.stopAutoRotate():this.autoRotate()}},e.prototype.change=function(a){this.goto(this.options.reverse?this.index-a:this.index+a)},e.prototype.goto=function(a){var b,c,d=this.$images.length;return a%=d,c=(d+a)%d,b=this.$images.eq(c),b[0].tauImageLoaded?(this.$current&&this.$current.removeClass("focused"),this.$current=b,this.index=c,this.canvasCtx?this.renderCanvas():(this.$current.addClass("focused"),!0)):(this.showLoading(),!1)},e.prototype.renderCanvas=function(){var a=this.$current,b=a[0],c=b.width,d=b.height,e=this.element.clientWidth,f=e/c*d;return!!(c&&d&&b.complete)&&((this.canvas.width!==e||this.canvas.height!==f||e&&f)&&(this.canvas.width=e,this.canvas.height=f),this.canvasCtx.drawImage(b,0,0,e,f),!0)},e.prototype.createImages=function(){var a,c,d,e;if(this.$initial.length<1)throw new Error("At least one image required");if(1==this.$initial.length){e=this.imageLoaded.bind(this),this.markImageLoaded(this.$initial[0]),a=this.options.template||this.$initial.attr("data-src-template");for(var f=this.stepSize+1;f<=this.frames;f+=this.stepSize)c="",d=b(c),d.bind("load",e),this.$element.append(d),this.$render.append(c);this.loadedCount=0}else this.$initial.each(function(a,b){this.markImageLoaded(b)}.bind(this));this.$images=this.$element.children().filter("img")},e.prototype.imageLoaded=function(a){this.markImageLoaded(a.target),++this.loadedCount>=this.frames-1&&this.hideLoading()},e.prototype.markImageLoaded=function(a){a.tauImageLoaded=!0},e.prototype.bind=function(){this.$element.bind("mousedown touchstart",this.track.bind(this))},e.prototype.autoRotate=function(a){this.autoInterval||(this.$element.addClass("spinning"),this.change(a?-1:1),this.autoInterval=setInterval(function(){this.change(a?-1:1)}.bind(this),this.autoRotateDelay()*this.stepSize),this.$element.trigger("tau.auto-rotate-start"))},e.prototype.autoRotateDelay=function(){return(this.options.interval||e.autoRotateTraversalTime)/this.frames},e.prototype.stopAutoRotate=function(){clearInterval(this.autoInterval),clearInterval(this.autostartTimeout),this.$element.removeClass("spinning"),this.autoInterval=void 0,this.$element.trigger("tau.auto-rotate-stop")},e.prototype.track=function(a){var d;b(a.target).closest(".tau-controls").length||("mousedown"===a.type&&a.preventDefault(),this.tracking||(c.one("mouseup",this.release.bind(this)),c.one("touchend",this.release.bind(this)),this.tracking=!0,this.path.reset(),this.cursorGrab(),this.rotateThreshold=c[0].clientWidth/this.frames,d=this.getPoint(a),this.downX=d.x,this.downY=d.y,this.downIndex=this.index,c.bind("mousemove",this.mouseMoveBinding),c.bind("touchmove",this.touchMoveBinding)))},e.prototype.slow=function(){if(!this.path.isSufficient())return void this.clearSlowInterval();this.rotate({x:this.path.last().x+this.velocity,y:this.path.last().y}),this.velocity>0?(this.velocity=this.velocity-this.decelVal(),this.velocity<=0&&this.clearSlowInterval()):(this.velocity=this.velocity+this.decelVal(),this.velocity>=0&&this.clearSlowInterval())},e.prototype.decelVal=function(){return this.decelTimeStep()/8},e.prototype.clearSlowInterval=function(){clearInterval(this.slowInterval),this.velocity=0,this.slowInterval=void 0},e.prototype.decel=function(){var a,b;this.path.isSufficient()&&(a=this.path.velocity(this.decelTimeStep()),b=a>0?1:a<0?-1:0,Math.abs(a)>e.maxVelocity&&(a=b*e.maxVelocity),this.velocity=a,this.slowInterval=setInterval(this.slow.bind(this),this.decelTimeStep()))},e.prototype.decelTimeStep=function(){return this.autoRotateDelay()/2},e.prototype.release=function(a){this.decel(),this.cursorRelease(),c.unbind("mousemove",this.mouseMoveBinding),c.unbind("touchmove",this.touchMoveBinding),this.tracking=!1},e.prototype.cursorGrab=function(){c.addClass("grabbing")},e.prototype.cursorRelease=function(){c.removeClass("grabbing")},e.prototype.showLoading=function(){this.$loading.attr("style","display: block")},e.prototype.hideLoading=function(){this.$loading.attr("style","display: none")},e.prototype.getPoint=function(a){var b=a.touches||a.originalEvent&&a.originalEvent.touches;return b?{x:b[0].pageX,y:b[0].pageY}:{x:a.pageX||a.clientX,y:a.pageY||a.clientY}},e.prototype.rotateEvent=function(a){this.rotate(this.getPoint(a))&&a.preventDefault()},e.prototype.rotate=function(a){var b,c;if(b=a.x-this.downX,c=a.y-this.downY,Math.abs(c)/Math.abs(b)>=e.verticalScrollRatio)return!1;if(this.stopAutoRotate(),this.path.record(a),Math.abs(b)>=this.rotateThreshold){var d;return d=this.options.reverse?this.downIndex+Math.round(b/this.rotateThreshold):this.downIndex-Math.round(b/this.rotateThreshold),this.goto(d),!0}}}(this,jQuery),function(a,b){var c=a.componentNamespace=a.componentNamespace||"FG";a[c]=a[c]||{},Date.now=Date.now||function(){return(new Date).getTime()};var d=a[c].Tau.Path=function(){this.reset()};d.prototype.isSufficient=function(){return!!this.prevPoint&&this.prevPrevPoint},d.prototype.distance=function(){return this.prevPoint.x-this.prevPrevPoint.x},d.prototype.duration=function(){return this.prevTime-this.prevPrevTime},d.prototype.record=function(a){this.prevPrevTime=this.prevTime,this.prevPrevPoint=this.prevPoint,this.prevTime=Date.now(),this.prevPoint=a},d.prototype.velocity=function(a){var b,c;return b=this.distance(),c=this.duration(),b/(c/a)},d.prototype.reset=function(){this.prevPoint=void 0,this.prevTime=void 0,this.prevPrevTime=void 0,this.prevPrevPoint=void 0},d.prototype.last=function(){return this.prevPoint}}(this,jQuery),function(a,b){a.Akamai=a.Akamai||{};var c=a.Akamai.Util={};c.preflight=function(a,d,e,f){if(f=f||a.constructor.name,a._$el=b(d),!a._$el.length)throw new Error(f+" component requires element");return a._$el.data(f)?a._$el.data(f):(a._$el.data(f,a),a._$el.attr(a.constructor._dataAttr,!0),a._options=c.options(a.constructor.defaultOptions||{},e||{},a._$el,f),a._originalOptions=c.extend(!0,{},a._options),c.mapEvents(a),!1)},c.component=function(a,b,d){d||(d=b,b=!1);var e=function(e,f){var g=c.preflight(this,e,f,a);if(g)return this._trigger("init"),g;d.apply(this,arguments),b||this._trigger("init")};return e.name=a,e._dataAttr="data-akamai-"+a.toLowerCase(),e.createMany=c.createMany(e),e.prototype._trigger=c.trigger(a),e},c.mapEvents=function(a){var b=a.constructor._componentEventMapping||{};for(var d in b)if(b.hasOwnProperty(d)){var e=b[d].to||b[d],f=b[d].selector?a._$el.find(b[d].selector):void 0;c.mapEvent(a,d,e,f)}},c.mapEvent=function(a,b,c,d){(d||a._$el).bind(b,function(){a._trigger(c)}.bind(a))},c.createMany=function(a,c){return c=c||"["+a._dataAttr+"]",function(d,e){var f=b(d).find(c),g=[];return f.each(function(b,c){g.push(new a(c,e))}),g}},c.propRequired=function(a,b,c){return function(){var d=arguments;if(!this[a])throw new Error(b);return c.apply(this,d)}},c.trigger=function(a){return a=a.toLowerCase(),function(b){var c="akamai-"+a+"-"+b;this._$el.trigger(c)}},c.camelToKabob=function(a){return a.replace(/([A-Z]+)/g,function(a){return"-"+a.toLowerCase()})},c.options=function(a,b,d,e){var f={},g=c.extend(!0,{},a);d&&e&&(f=c.getDataAttrOptions(d,a,"data-akamai-"+e.toLowerCase()));var h=c.extend(!0,c.extend(!0,g,f),b);return d&&e&&c.setDataAttrOptions(d,a,h,e),h},c.getDataAttrOptions=function(a,b,d){var e={};for(var f in b)if(b.hasOwnProperty(f)){var g=c.camelToKabob(f),h=d+"-"+g;if(/object/.test(typeof b[f])){var i=b[f],j=h,k=c.getDataAttrOptions(a,i,j);e[f]=k}else{var l=a.attr(h);l=c.coerceAttrVal(l),void 0!==l&&null!==l&&(e[f]=l)}}return e},c.setDataAttrOptions=function(a,b,d,e){c.setDataAttrOptionsPrefix(a,b,d,"data-akamai-"+e.toLowerCase())},c.setDataAttrOptionsPrefix=function(a,b,d,e){b=b||{};for(var f in d)if(d.hasOwnProperty(f)&&"breakpoints"!==f){var g=c.camelToKabob(f),h=e+"-"+g;if(/object/.test(typeof d[f])){var i=d[f],j=h;c.setDataAttrOptionsPrefix(a,b[f],i,j)}else(a.attr(h)||void 0!==b[f])&&a.attr(h,d[f])}},c.coerceAttrVal=function(a){return"true"===a||"false"!==a&&(/^[0-9]+$/.test(a)?parseInt(a,10):/^[0-9]+.[0-9]+$/.test(a)?parseFloat(a,10):a)},c.extend=function(a,b,d){var e,f,g,h;if(null!=d)for(e in d)f=b[e],g=d[e],b!==g&&(a&&g&&c.isPlainObject(g)?(h=f&&c.isPlainObject(f)?f:{},b[e]=c.extend(a,h,g)):void 0!==g&&(b[e]=g));return b},c.isPlainObject=function(a){return!(!a||"[object Object]"!==Object.prototype.toString.call(a))};var d=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;c.trim=function(a){return null==a?"":(a+"").replace(d,"")},c.map=function(a,b){return c.reduce(a,function(a,c,d){return a.push(b(c,d)),a},[])},c.reduce=function(a,b,c){for(var d=0;d=d-5&&this.offsetLefte&&(d=e),a!==d&&(o?(h(B[0],d),h(B[0],d,"after")):i(B[0],d))}function n(){var a=B[0].scrollLeft,b=E.length,c=D.width();void 0===M&&(M=Math.round(a/c*b)),N&&clearTimeout(N),N=setTimeout(function(){e(),i(B[0],E[M].offsetLeft,!0),M=N=void 0},50)}function p(a){var b=B[0].scrollLeft,c=D.width(),d=f(B),e=c-d-5;return a?b>=e?s():q():0===b?t():r()}function q(){ i(B[0],B[0].scrollLeft+D.width()/F,!1,function(){B.trigger(c+".after-next")})}function r(){i(B[0],B[0].scrollLeft-D.width()/F,!1,function(){B.trigger(c+".after-prev")})}function s(){i(B[0],0)}function t(){i(B[0],D.width()-B.width())}function u(b,c,d){void 0!==a.toss?a.toss(b,{left:c,top:d}):(b.scrollLeft=c,b.scrollTop=d)}function v(){var a=B[0].scrollLeft,b=f(D),c=f(G),d=g(G),e=Math.round(a/b*F)||0,h=G.find("a").removeClass(H),i=h.eq(e).addClass(H),j=i[0].offsetLeft-c/2,k=i[0].offsetTop-d/2;u(J[0],j,k)}if(void 0===k){var w,x=this,y=b(x),z=y.is("[data-"+c+"-nextprev]"),A=y.attr("data-autoplay")||y.attr("data-snapper-autoplay"),B=b("."+c+"_pane",x),C=c+"-enhanced",D=B.find("."+c+"_items"),E=D.children();E.addClass(c+"_item");var F=E.length,G=b("."+c+"_nav",x),H=c+"_nav_item-selected",I="false"!==y.attr("data-snapper-deeplinking");if("string"!=typeof d){var J=G.find("."+c+"_nav_inner");if(J.length||(J=b('
').append(G.children()).appendTo(G)),B.attr("tabindex","0"),e(),b(x).addClass(C),z){var K=b(''),L=b(".snapper_nextprev_contain",x);L.length||(L=b(x)),K.appendTo(L)}b("a",this).bind("click",function(c){clearInterval(w);var d=b(this).attr("href");if(b(this).is(".snapper_nextprev_next"))return c.preventDefault(),p(!0);if(b(this).is(".snapper_nextprev_prev"))return c.preventDefault(),p(!1);if(0===d.indexOf("#")&&d.length>1){c.preventDefault();var e=b(d,x);e.length&&(i(B[0],e[0].offsetLeft),I&&"replaceState"in a.history&&a.history.replaceState({},document.title,d))}}),b(this).bind("keydown",function(a){37!==a.keyCode&&38!==a.keyCode||(clearInterval(w),a.preventDefault(),a.stopImmediatePropagation(),p(!1)),39!==a.keyCode&&40!==a.keyCode||(clearInterval(w),a.preventDefault(),a.stopImmediatePropagation(),p(!0))});var M,N;b(a).bind("resize",n),G.length&&(B.bind("scroll",v),v());var O;if(B.bind("scroll",function(a){m&&(O&&clearTimeout(O),O=setTimeout(j,50))}),y.bind("touchstart",function(){clearTimeout(w)}),A){var P=!1;try{A=parseInt(A,10)}catch(a){P=!0}if(!A||P){throw new Error("Snapper: `data-autoplay` must have an natural number value.")}w=setInterval(function(){p(!0)},A)}}else{var Q,R=Array.prototype.slice.call(l,1),S=D.width()/F;switch(d){case"goto":Q=R[0]%F,offset=S*Q,i(B[0],offset,!1,function(){j(),"function"==typeof R[1]&&R[1]()});break;case"getIndex":k=Math.floor((B[0].scrollLeft+1)/S);break;case"updateWidths":e()}}}}),void 0!==k?k:j}}(this,jQuery),function(a){var b=function(){var b=a.jQuery,c="enlarge";b.fn[c]=function(d){var e=arguments,f={button:!0,hoverZoomWithoutClick:!0,delay:300,flyout:{width:200,height:200},placement:"inline",magnification:3};"string"!=typeof d&&(f=b.extend(f,d));var g,h=this.each(function(){function h(){"inline"===f.placement?(B=A,L=K,J=I):(B=U.find("img")[0],L=J=U)}function i(){U.css({width:f.flyout.width+"px",height:f.flyout.height+"px",top:"",left:"","margin-left":"","margin-top":""});var a=f.placement.match(/left|right/);a&&U.css(a[0],-f.flyout.width+"px"),f.placement.match(/loupe/)&&U.css({"margin-left":-f.flyout.width/2+"px","margin-top":-f.flyout.height/2+"px"}),U[0].className=U[0].className.replace(/enlarge_flyout\-[^$\s]+/," "),U.addClass("enlarge_flyout-"+f.placement)}function j(){M=!M,u.data("zoomed",M)}function k(){if(M){var a=new Image;a.className="enlarge_img-loading",b(a).insertBefore(B),a.onload=function(){B.sizes=a.sizes,y||(B.src=F),b(a).remove()},a.sizes=n()+"px",a.srcset=D,y||(a.src=F)}else B.sizes=E,y||(B.src=C)}function l(){var a=J.width(),b=J.height(),c=B.offsetWidth,d=B.offsetHeight;J[0].scrollLeft=c/2-a/2,J[0].scrollTop=d/2-b/2}function m(){if(N)K.add(L).removeClass(O),N=!1,J.removeAttr("tabindex");else{if(f.disabled)return!1;K.add(L).addClass(O),N=!0,J.attr("tabindex","0"),J[0].focus()}}function n(){return K[0].offsetWidth*f.magnification}function o(){if(M){if(f.disabled)return!1;"inline"===f.placement&&I.add(K).css({width:K[0].offsetWidth+"px",height:parseFloat(getComputedStyle(K[0]).height)+"px"}),L.addClass(G),b(B).css("width",n()+"px"),b(v).trigger(c+".after-zoom-in")}else L.removeClass(G),"inline"===f.placement&&I.add(K).css({width:"",height:""}),b(B).css("width",""),b(v).trigger(c+".after-zoom-out")}function p(){function a(){f.placement=d,h(),b(v).unbind(c+".after-zoom-out",a)}var d=f.placement;"inline"!==d&&(b(v).bind(c+".after-zoom-out",a),f.placement="inline",h())}function q(){if(f.disabled&&!M)return!1;j(),k(),o(),l(),m()}function r(a){"touchstart"===a.type&&(S=!0),S&&"mouseenter"===a.type||"mouseenter"===a.type&&!S&&!T||N||R||(R=!0,I.addClass(H),Q=setTimeout(function(){I.removeClass(H),j(),o(),k(),P=!0,t(a)},f.delay))}function s(a){I.removeClass(H),clearTimeout(Q),P=!1,!1!==f.hoverZoomWithoutClick||S||(T=!1),S&&"mouseleave"===a.type&&(S=!1)}function t(a){if(P){if(S&&"mousemove"===a.type)return;var b=a.touches?a.touches[0]:a;a.preventDefault();var c=b.clientX-I[0].getBoundingClientRect().left,d=b.clientY-I[0].getBoundingClientRect().top;if(f.placement.match(/loupe/)){var e=(a.touches?-f.flyout.width/1.3:-f.flyout.width/2)+"px",g=(a.touches?-f.flyout.height/1.3:-f.flyout.height/2)+"px";requestAnimationFrame(function(){U.css({top:d+"px",left:c+"px","margin-left":e,"margin-top":g})})}var h=I[0].offsetWidth,i=I[0].offsetHeight,j=B.offsetWidth,k=B.offsetHeight,l=J[0].offsetWidth,m=J[0].offsetHeight;J[0].scrollLeft=c/h*(j-l),J[0].scrollTop=d/i*(k-m)}}var u=b(this),v=this,w=a.document.createElement("img"),x="srcset"in w,y=x&&"sizes"in w,z=b(this).find("a"),A=u.find("img")[0],B=A,C=B.src,D=b(B).attr("srcset"),E=b(B).attr("sizes"),F=z[0].href,G=(z[0].innerText,c+"-zoomed"),H=c+"-delay",I=b(B).closest(".enlarge_contain"),J=I,K=b(B).closest(".enlarge_pane")||u,L=K,M=u.data("zoomed")||!1;u.data("zoomed",M);var N=!1,O=c+"-locked";if("string"!=typeof d){u.data("updateUptions",function(a){f=a,h(),i(),T=f.hoverZoomWithoutClick,f.image.sizes&&(E=f.image.sizes,k()),f.disabled&&M&&q()});var P,Q,R,S,T=f.hoverZoomWithoutClick,U=b('
').append(I.clone());U.insertAfter(K),function(){I.append('')}(),h(),i(),z.bind("keydown",function(a){13!==a.keyCode&&32!==a.keyCode||p(),32===a.keyCode&&(a.preventDefault(),b(this).trigger("click"))}).bind("click",function(a){a.preventDefault(),q()}),b(a).bind("resize",function(a){N&&q()}),b(a.document).bind("mouseup",function(a){N&&!b(a.target).closest(K).length&&q()}),b(A).bind("mouseenter touchstart",r).bind("mousemove touchmove",t).bind("mouseleave touchend",function(a){R=!1,M&&!N&&(j(),k(),o()),s(a)}).bind("click",function(a){a.preventDefault(),S&&"inline"===f.placement&&q(),!1!==f.hoverZoomWithoutClick||S||(T=!T,T?b(this).trigger("mouseenter"):b(this).trigger("mouseleave"))}),b(this).bind("keydown keyup",function(a){37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode?(a.stopImmediatePropagation(),N||a.preventDefault()):"keyup"===a.type&&N&&27===a.keyCode&&(q(),z[0].focus(),a.stopImmediatePropagation())}),K.bind("scroll",function(){M&&(j(),k(),o()),N&&m()})}else{var V=Array.prototype.slice.call(e,1);switch(d){case"in":u.data("zoomed")||q();break;case"out":u.data("zoomed")&&q();break;case"isZoomed":g=u.data("zoomed");break;case"updateOptions":u.data("updateUptions")(V[0])}}});return void 0!==g?g:h}};"undefined"!=typeof module?module.exports=b:b()}("undefined"!=typeof global?global:this),function(a){var b={defaultConfig:{widths:["320","640","800","1024","2048","5000"],sizes:"100vw",policy:void 0,widthParam:"imwidth"}};a.Akamai=a.Akamai||{},a.Akamai.Image=b}("undefined"==typeof exports?window:exports),function(a,b){var c=Akamai.Util.component("Spin360",function(a,b){this._comp=new Akamai.Tau(a,this._options)});Akamai.Sourceable.extendStatic(c),c._componentEventMapping={"tau.auto-rotate-start":"play","tau.auto-rotate-stop":"pause"},c.prototype._updateOptions=function(a){a||(this._options=this._originalOptions),this._options=Akamai.Util.extend(!0,this._options,a),Akamai.Util.setDataAttrOptions(this._$el,c.defaultOptions,this._options,"Spin360")},c._renderImg=function(a,b){return'\n\t\t\t\n\t\t'},c.render=function(a,b){var d=Akamai.Util.options(c.defaultOptions,b);return Akamai.Util.trim('\n\t\t\t
\n\t\t\t\t'+Akamai.Util.map(a.urls,function(a){return c._renderImg(a,d)}).join("\n")+"\n\t\t\t
\n\t\t")},c.defaultOptions={autoplay:{enabled:!1,delay:1e3},controls:{arrows:!1,play:!1,text:{left:"Rotate Left",right:"Rotate Right",play:"Spin Object"}},frames:72,images:Akamai.Image.defaultConfig,interval:3e3,reverse:!1,template:void 0},c.prototype.goto=function(a,b){this._comp.goto(a),this._trigger("goto"),b&&b()},c.prototype.getIndex=function(){return this._comp.index},Akamai.Advanceable.extend(c),c.prototype.next,c.prototype.previous,c.prototype.play=function(){this._comp.autoRotate()},c.prototype.pause=function(){this._comp.stopAutoRotate()},c.prototype.getElement=function(){return this._$el[0]},c.States={Playing:0,Paused:1},c.prototype.getState=function(){return this._comp.autoInterval?c.States.Playing:c.States.Paused},a.Akamai=a.Akamai||{},a.Akamai.Spin360=c}("undefined"==typeof exports?window:exports,this.jQuery),function(a,b){var c=Akamai.Util.component("Magnifier",function(a,b){this._$el.enlarge(this._options)});c.prototype._updateOptions=function(a){a||(this._options=this._originalOptions),this._options=Akamai.Util.extend(!0,this._options,a),Akamai.Util.setDataAttrOptions(this._$el,c.defaultOptions,this._options,"Magnifier"),this._$el.enlarge("updateOptions",this._options)},c._componentEventMapping={"enlarge.after-zoom-in":"in","enlarge.after-zoom-out":"out"},c.defaultOptions={disabled:!1,button:!0,delay:300,buttonText:"Toggle Image Magnification",flyout:{width:200,height:200},hoverZoomWithoutClick:!0,placement:"inline",magnification:3,image:Akamai.Image.defaultConfig},Akamai.Sourceable.extendStatic(c),c.render=function(a,b){var d=Akamai.Util.options(c.defaultOptions,b);return"\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t'+d.buttonText+"\n\t\t\t\t\n\t\t\t
\n\t\t"},c.prototype.in=function(){this._$el.enlarge("in")},c.prototype.out=function(){this._$el.enlarge("out")},c.prototype.isMagnified=function(){return this._$el.enlarge("isZoomed")},c.prototype.toggle=function(){this.isMagnified()?this.out():this.in()},a.Akamai=a.Akamai||{},a.Akamai.Magnifier=c}("undefined"==typeof exports?window:exports,this.jQuery),function(a,b){var c=Akamai.Util.component("Video",function(a,b){if(this._comp=this._$el.length&&void 0,this._$videoElement=this._$el.find("video"),this._videoElement=this._$videoElement[0],!this._videoElement)throw new Error("Akamai.Video requires a child HTML Video element");if(!this._videoElement.play||!this._videoElement.pause)return this._unsupportedAPI=!0,void this._unsupported();this._setState(this._videoElement.paused?c.States.Paused:c.States.Playing),this._$el.bind("akamai-video-play",function(){this._setState(c.States.Playing)}.bind(this)).bind("akamai-video-pause",function(){this._setState(c.States.Paused)}.bind(this)),this._createPlayButton()});c._componentEventMapping={play:{to:"play",selector:"video"},pause:{to:"pause",selector:"video"},seeked:{to:"seek",selector:"video"}},c.prototype._updateOptions=function(a){a||(this._options=this._originalOptions),this._options=Akamai.Util.extend(!0,this._options,a),Akamai.Util.setDataAttrOptions(this._$el,c.defaultOptions,this._options,"Video")},c.defaultOptions={autoplay:!1,controls:!0,loop:!1,muted:!0},c.render=function(a,b){var d=Akamai.Util.options(c.defaultOptions,b),e=a.url,f=a.poster||"",g=a.mime||e.replace(/.+\.([^.]+)$/,"video/$1"),h=[d.loop?"loop":"",d.autoplay?"autoplay":"",d.controls?"controls":"",d.muted?"muted":"","playsinline"];return Akamai.Util.trim("\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t')},c.States={Playing:0,Paused:1},c.prototype._unsupported=function(){return this._unsupportedAPI&&Akamai.Util.log("Video: video API not supported","error"),this._unsupportedAPI},c.prototype.play=function(){this._unsupported()||this._videoElement.play()},c.prototype.pause=function(){this._unsupported()||this._videoElement.pause()},c.prototype.getState=function(){return this._state},c.prototype._setState=function(a){this._state=a},c.prototype.seek=function(a){if(a<0||100\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t'),c.removeAttribute("controls"),a=this._$el.find("svg")[0],a.addEventListener("click",function(){c.play(),a.classList.add("is-hidden"),this._options.controls&&c.setAttribute("controls","controls")}.bind(this)))},a.Akamai=a.Akamai||{},a.Akamai.Video=c}("undefined"==typeof exports?window:exports,this.jQuery),function(a,b){var c=Akamai.Util.component("Carousel",function(a,b){this._spins=Akamai.Spin360.createMany(this._$el[0],this._options.spin360),this._magnifiers=Akamai.Magnifier.createMany(this._$el[0],this._options.magnifier),this._videos=Akamai.Video.createMany(this._$el[0],this._options.video),this._$el.snapper(this._options),this._options.aspectratio&&this._setAspectRatio(),this._options.slideshow.autostart&&setTimeout(function(){this.startSlideshow()}.bind(this),this._options.slideshow.interval),this._activeItemAttributes(),this._$el.bind("akamai-carousel-goto",this._activeItemAttributes.bind(this)),this._handleAutoplayables(),this._$el.bind("akamai-carousel-goto",this._handleAutoplayables.bind(this)),this._$el.bind(this.constructor._stopSlideshowEvents.join(" "),this.stopSlideshow.bind(this))});c._stopSlideshowEvents=["akamai-magnifier-in","akamai-magnifier-out","akamai-spin360-goto","akamai-video-play","akamai-video-seek"],c.prototype._handleAutoplayables=function(){var a=function(a){return!!b(a.getElement()).closest("["+this.constructor.activeItemAttr+"]").length}.bind(this);this._videos.concat(this._spins).forEach(function(b){a(b)&&b._carouselWasPlaying?b.play():b.getState()==b.constructor.States.Playing?(b._carouselWasPlaying=!0,b.pause()):b._carouselWasPlaying=!1}.bind(this))},c.counter=0,c.prototype._updateOptions=function(a){a||(this._options=this._originalOptions),this._options=Akamai.Util.extend(!0,this._options,a);var b=function(a,b){a._updateOptions(this._options[b])}.bind(this);Akamai.Util.setDataAttrOptions(this._$el,c.defaultOptions,this._options,"Carousel"),this._$el.snapper("updateOptions",a),this._spins.forEach(function(a){b(a,"spin360")}),this._magnifiers.forEach(function(a){b(a,"magnifier")}),this._videos.forEach(function(a){b(a,"video")})},c._componentEventMapping={"snapper.after-snap":"goto","snapper.snap":"snap","snapper.after-next":"next","snapper.after-prev":"previous"},c.defaultOptions={arrows:!0,aspectratio:!1,slideshow:{interval:4e3,autostart:!1},thumbnail:{placement:"bottom",type:"images",policy:void 0,sizes:"300px"},images:Akamai.Image.defaultConfig},c.renderMapping={image:Akamai.Magnifier,spin360:Akamai.Spin360,video:Akamai.Video},c._typeMapping={image:"magnifier"},c._uniqueItemId=function(a,b){return"akamai-carousel-"+c.counter+"-"+a.type+"-"+b},Akamai.Sourceable.extendStatic(c),c._renderItem=function(a,b,d){var e=c._typeMapping[a.type]||a.type;if(!c.renderMapping[a.type])throw new Error("\n\t\t\t\titem type "+a.type+" at index "+b+" must be 'image', 'spin360', or 'video'\n\t\t\t");return'\n\t\t\t
\n\t\t\t\t'+c.renderMapping[a.type].render(a,d[e])+"\n\t\t\t
\n\t\t"},c._renderThumbnailAnchor=function(a,b,d,e){var f="",g=a.alt||"";f="video"===a.type?a.poster||b.reduce(function(a,b){return a||c._thumbUrl(b)},""):c._thumbUrl(a),e.images.policy=e.thumbnail.policy;var h=c._fallbackSrc(f,e.images),i=c._srcset(f,e.images),j=e.images.sizes;e.thumbnail.policy&&(j=e.thumbnail.sizes);var k=[c._dataAttr+'-thumb-type="'+a.type+'"',"video"!=a.type||a.poster?"":"${Carousel._dataAttr}-thumb-noposter"];return'\n\t\t\t\n\t\t\t\t'+g+'\n\t\t\t\n\t\t'},c._thumbUrl=function(a){return"video"===a.type?a.poster:a.url||a.urls&&a.urls[0]},c._renderThumbnails=function(a,b){return a.length<=1?"":'\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t'+Akamai.Util.map(a,function(d,e){return c._renderThumbnailAnchor(d,a,e,b)}).join("\n")+"\n\t\t\t\t
\n\t\t\t
\n\t\t"},c._setAspectAttributes=function(a){var b=c._dataAttr+"-aspectratio-orientation";a.height()>=a.width()?a.attr(b,"portrait"):a.attr(b,"landscape")},c.prototype._setAspectRatio=function(){var a=this._options.aspectratio,d=this;if("number"==typeof a){var e=this._$el.find(".snapper_item");e.css("padding-top",a/e.length+"%"),e.each(function(){var a=b(this);b(this).find("img, video").eq(0).bind("load loadedmetadata",function(){a.is("["+Akamai.Spin360._dataAttr+"]")?c._setAspectAttributes(a.find("canvas")):c._setAspectAttributes(b(this))})}),e.eq(0).find("img,video").eq(0).bind("load loadedmetadata",function(){d._trigger("first-media-load")})}},c.render=function(a,b){b=b||{};var d=Akamai.Util.options(c.defaultOptions,b),e=[""+c._dataAttr,c._dataAttr+'-item-count="'+(a||[]).length+'"','data-snapper-deeplinking="false"',d.arrows?"data-snapper-nextprev":""];return c.counter++,Akamai.Util.trim("\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t'+Akamai.Util.map(a,function(a,b){return c._renderItem(a,b,d)}).join("\n")+"\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t"+c._renderThumbnails(a,d)+"\n\t\t\t
\n\t\t")},c.prototype.getSpin360s=function(){return this._spins},c.prototype.getMagnifiers=function(){return this._magnifiers},c.prototype.getVideos=function(){return this._videos},c.prototype.goto=function(a,b){this._$el.snapper("goto",a,b)},c._itemAttr=c._dataAttr+"-item",c._activeItemAttr=c._itemAttr+"-active",c.prototype._activeItemAttributes=function(){var a=this.constructor._itemAttr,b=this.constructor._activeItemAttr;this._$el.find(".snapper_item").attr(a,!0).removeAttr(b).eq(this.getIndex()).attr(b,!0)},c.prototype.getIndex=function(){return this._$el.snapper("getIndex")},Akamai.Advanceable.extend(c),c.prototype.next,c.prototype.previous,c.prototype.startSlideshow=function(){this._$el.one("mousedown touchstart",this.stopSlideshow.bind(this)),this.next(function(){this._trigger("start-slideshow"),this._slideshowTimer=setTimeout(function(){this.startSlideshow()}.bind(this),this._options.slideshow.interval)}.bind(this))},c.prototype.stopSlideshow=function(){clearTimeout(this._slideshowTimer),this._slideshowTimer=void 0,this._trigger("stop-slideshow")},c.prototype.refresh=function(){this._$el.snapper("updateWidths")},a.Akamai=a.Akamai||{},a.Akamai.Carousel=c}("undefined"==typeof exports?window:exports,this.jQuery),function(a,b){var c=Akamai.Util.component("Viewer",!0,function(a,b){this._updateSizesOptions(!0),this._onResizeComplete(this._updateSizesOptions.bind(this)),this._options.carousel=c._extendCarouselOptions(this._options.carousel,this._options),this._withData(function(){this._tagMapping={},0==this._$el.children().length&&this._options.items.data&&(this._tagMapping=this.constructor._tagSplit(this._options.items.data,this._options.items),this._$el.append(this.constructor.render(this._options.items.data,this._options,!0))),this._carousels=Akamai.Carousel.createMany(a,this._options.carousel),this._fullscreen=new Akamai.Fullscreen(a,this._options.fullscreen),this._setBreakpoints(this._options.breakpoints||{}),this._trigger("init")}.bind(this))});c.prototype._updateSizesOptions=function(a){var b=this._$el.width();b&&b>0&&(b+="px",this._options=Akamai.Util.extend(!0,this._options,{carousel:{images:{sizes:b}}})),a||this._updateOptions(this._options)},c.prototype._withData=function(a){if(!this._options.items.uri)return void a();b.get(this._options.items.uri,function(b){b="string"==typeof b?JSON.parse(b):b,this._options.items.data=b.items,a()}.bind(this))},c.prototype._setBreakpoints=function(a){this._breakpoints=[];for(var b in a)if(a.hasOwnProperty(b))try{this._breakpoints.push(parseInt(b,10))}catch(a){Akamai.Util.log(a,"error")}this._breakpoints.sort(function(a,b){return b=0},!1)}));var e=a[0].tags[0],f=a.reduce(function(a,b){return(b.tags||[]).forEach(function(c){a[c]=a[c]||[],a[c].push(b)}),a},{});return f[c._firstRenderTag]=f[e],f},c._firstRenderTag="akamai-first-render",c._tagAttr=c._dataAttr+"-tag",c._renderTag=function(a,b){var d=a[0].tags[0];return Akamai.Util.trim("\n\t\t\t
\n\t\t\t\t'+Akamai.Carousel.render(a,b)+"\n\t\t\t
\n\t\t")},c.render=function(a,b,d){var e,f=c._tagSplit(a,b.items),g=c._extendCarouselOptions(b.carousel,b);e=b.items.renderAll?f.map(function(a,b){return c._renderTag(b,g)}).join(" "):c._renderTag(f[c._firstRenderTag],g);var h="\n\t\t\t
\n\t\t\t\t"+e+"\n\t\t\t
\n\t\t";return d?e:h},c.prototype.getCarousels=function(){return this._carousels},c.prototype.switchTag=function(a){if(-1==this.getTags().indexOf(a))return void Akamai.Util.log("tag: "+a+" is not present in the data for this viewer","error");var c="["+this.constructor._tagAttr+'="'+a+'"]',d=this._$el.find(c);if(d.length)this._showViewer(d);else{var e=this._options.carousel,f=b(this.constructor._renderTag(this._tagMapping[a],e,!0)),g=f.find("img"),h=g.length,i=0;f.css("display","none"),g.bind("load",function(){if(++i===h){g.unbind("load");var a=Akamai.Carousel.createMany(f[0],this._resolveBreakpointOptions().carousel);this._carousels=this._carousels.concat(a),this._showViewer(f,a)}}.bind(this)),this._$el.append(f)}},c.prototype._showViewer=function(a,b){this._$el.find("["+this.constructor._tagAttr+"]").css("display","none"),a.css("display","block"),b&&b.map(function(a){a.refresh()}),this._trigger("switch-tag")},c.prototype.getTags=function(){if(this._tags)return this._tags;var a=[];for(var b in this._tagMapping)this._tagMapping.hasOwnProperty(b)&&b!==c._firstRenderTag&&a.push(b);return this._tags=a},a.Akamai=a.Akamai||{},a.Akamai.Viewer=c}("undefined"==typeof exports?window:exports,this.jQuery),function(a,b){var c=Akamai.Util.component("Fullscreen",function(a,b){this._options.enabled&&this._init()});c.prototype._init=function(){this._$fullscreen=this._$el,this._$widthAdjust=this._$fullscreen.children().eq(0),this._$widthAdjust.attr(c.attr.width,""),this._$buttonContainer=this._$widthAdjust,this._$buttonContainer.addClass(c.classes.btnContainer),this._$buttonContainer.append(this.render()),this._fullscreenApiKeys=c._keys(),this._options.native?this._useNativeApi=!!this._fullscreenApiKeys:this._useNativeApi=!1,this._fullscreenFallbackEnabled=!1,this._$placeholder=b("
"),this.addEvents()},c.classes={btn:"akamai-fullscreen-btn",btnContainer:"akamai-fullscreen-btncontainer",enterBtn:"akamai-fullscreen-btn-enter",exitBtn:"akamai-fullscreen-btn-exit",active:"akamai-fullscreen-active",fallback:"akamai-fullscreen-fallback"},c.attr={width:"data-akamai-fullscreen-width",enterBtn:"data-akamai-fullscreen-btn",exitBtn:"data-akamai-fullscreen-exit-btn"},c.defaultOptions={enabled:!1,native:!1},c.prototype.addEvents=function(){this._$buttonContainer.find("["+c.attr.enterBtn+"]").on("click",function(a){this.enter(),a.preventDefault()}.bind(this)),this._$buttonContainer.find("["+c.attr.exitBtn+"]").on("click",function(a){this.exit(),a.preventDefault()}.bind(this)),this._useNativeApi&&document.addEventListener(this._fullscreenApiKeys.onchange,function(){document[this._fullscreenApiKeys.element]||this._exit()}.bind(this),!1),b(document).on("keydown",function(a){27===(a.keyCode||a.which)&&this._exit()}.bind(this))},c.prototype.render=function(){return Akamai.Util.trim("\n\t\t\t\n\t\t\t\n\t\t')},c._keyLookup=[{enter:"requestFullscreen",exit:"exitFullscreen",element:"fullscreenElement",onchange:"fullscreenchange"},{enter:"webkitRequestFullscreen",exit:"webkitExitFullscreen",element:"webkitFullscreenElement",onchange:"webkitfullscreenchange"},{enter:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",element:"webkitCurrentFullScreenElement",onchange:"webkitfullscreenchange"},{enter:"mozRequestFullScreen",exit:"mozCancelFullScreen",element:"mozFullScreenElement",onchange:"mozfullscreenchange"},{enter:"msRequestFullscreen",exit:"msExitFullscreen",element:"msFullscreenElement",onchange:"MSFullscreenChange"}],c._keys=function(a){for(var b=c._keyLookup,a=document.body,d=0,e=b.length;dc&&(e="100%"),this._$widthAdjust.width(e)},c.prototype._revertWidth=function(){this._$widthAdjust.css("width","")},c.prototype.enter=function(){this._$fullscreen.addClass(c.classes.active),this._useNativeApi?(this._$fullscreen[0][this._fullscreenApiKeys.enter](),this._adjustWidth()):(this._adjustWidth(),this._maximizePlacement())},c.prototype._exit=function(){this._$fullscreen.removeClass(c.classes.active),this._useNativeApi||this._restorePlacement(),this._revertWidth()},c.prototype.exit=function(){this._useNativeApi&&document[this._fullscreenApiKeys.exit](),this._exit()},a.Akamai=a.Akamai||{},a.Akamai.Fullscreen=c}("undefined"==typeof exports?window:exports,this.jQuery),function(a,b){b.fn.akamaiViewer=function(a){this.each(function(b,c){new Akamai.Viewer(c,a)})}}("undefined"==typeof exports?window:exports,this.jQuery);